The ambient-code plugin brings
Ambient into a Claude Code session, reached with /ambient. Claude stays in
charge: it plans, reviews, runs the tests, and commits on its frontier model,
and routes the token-heavy work to Ambient's open models. You can also skip the
plugin and point Claude Code's own provider at Ambient to run the whole session
on the network.
Install#
Add the marketplace and install#
/plugin marketplace add AmbientCrypto/ambient-code /plugin install ambient-code@ambientConnect your key#
/ambientClaude walks you through setup. You enter the key in your own terminal with hidden input, so it never passes through the chat, and the first run verifies it with a real call.
Ways to work#
The plugin adds two session modes; a third path skips the plugin entirely and points Claude Code's own provider at Ambient. Pick per task.
On demand (default)#
Claude Code works exactly as it does now. Ambient runs only when you ask for it by name, for a one-off audit, build, or second opinion.
Delegate#
Turn on delegate mode with /ambient on. Claude plans and reviews on its
frontier model and routes the token-heavy work to Ambient: larger audits, bulk
reading, code drafts, and multi-file builds go to open models, while Claude keeps
trivial edits and anything sensitive, destructive, or production-facing local.
You get frontier orchestration at open-model rates on the volume.
/ambient onRun the whole session on Ambient#
Point Claude Code's provider at Ambient with environment variables, so every request runs on the network with no frontier model in the loop. Ambient speaks the Anthropic Messages format, so this is environment variables only.
export ANTHROPIC_BASE_URL=https://api.ambient.xyz
export ANTHROPIC_AUTH_TOKEN=your-ambient-api-key
export ANTHROPIC_MODEL=ambient/large
export ANTHROPIC_DEFAULT_HAIKU_MODEL=ambient/largeAdd them to ~/.zshrc or ~/.bashrc to make them permanent, then run claude.
Already signed in to an Anthropic subscription? After launch, run /status to
confirm Claude Code is using the Ambient provider. If it is still on your
Anthropic login, run /logout inside Claude and relaunch.
Workflows#
The same set of jobs the Codex plugin exposes, driven in plain language or by the
command directly. Two sticky model lanes back them: chat/audit (ask, audit,
chat, map) and code (code, build, agent).
| Workflow | What it does |
|---|---|
| Ask | A one-shot answer or piped digest (cat doc.txt | ambient ask "..." -), with optional --consensus across models |
| Audit | An adversarial code review of a diff, files, or the whole repo (--repo), with multi-model consensus and an installable pre-commit gate (--install-hook) |
| Code | A single-file code draft from the context you point it at |
| Build | A multi-file build with a manifest-first plan and truncation-safe, reviewable writes (--apply writes) |
| Map | One prompt run independently over many files, or one item per stdin line |
| Agent | An interactive agentic terminal running on Ambient |
| Chat | An interactive REPL with a per-turn token receipt |
Generated code is untrusted until Claude reviews and tests it. Large builds are truncation-safe: complete files are kept, and anything cut off is re-requested on the next pass.
git diff | ambient audit # second opinion on the diff
ambient audit --repo . --install-hook # audit the repo, add a pre-commit gate
ambient build "FastAPI /users CRUD plus pytest" --dir src/ --apply
cat contract.txt | ambient ask "Summarize the obligations and risks." -Choose your models#
Each lane keeps its own default, starting at moonshotai/kimi-k2.7-code.
ambient models shows what is serving now, ambient use <id> sets your default
(--chat / --code scopes a single lane), and ambient curate chooses which
models the menus surface. The model catalog shows the live
roster.
Diagnostics#
ambient doctor # pinpoint a key, funds, model-availability, or network problem
ambient usage # per-model calls and tokens (--days N)
ambient mode off # turn delegate mode back offWhat you get#
- One key. Create it once at app.ambient.xyz/keys.
- Your model choice. The model catalog shows what the network serves now.
- Verified inference. Every response carries a receipt. See Verified inference for what it proves.
- Zero data retention by default. You decide, per task, what leaves your machine.
Related#
- Coding agents: every way to bring Ambient into your agent
- Codex: the same integration for Codex
- Models and readiness: what the network is serving now
- ambient-code on GitHub: source, issues, and the full command reference