Describe a goal. A planner shapes it, an orchestrator runs each phase, workers build in parallel in their own git worktrees, a gate merges, runs your checks and has a fresh read-only QA agent review the diff — fix workers repair what it finds — and a manager watches the whole run. Decisions travel up the chain — and reach you only when they have to.
{{ roleSel.desc }}
Workers ask the orchestrator. The orchestrator asks the planner. The manager owns the run and unsticks whatever stalls. A watchdog nudges, respawns, escalates — and halts with a typed reason instead of looping. A question for you is a saffron band, not a stop: the run keeps going meanwhile.
You already have a coding agent in your terminal. Mantra is the room you put it in — and the room fits more than one. ctrl+o switches.
Same room, more in it: a pattern cut for many small workers, an experimental notebook a group of agents writes together, any MCP server you already use, and a look at the screen for models that can see.
mantra --swarm 16 "port the tests to pytest"The mantra-swarm pattern runs every role on Bija: the planner cuts the work into many small tasks with disjoint scopes — up to 32 a phase — and the orchestrator keeps N of them running. N is the run’s own, 1–128, never written into the saved pattern; /swarm N <goal> does it from inside the app, mantra run --parallel N for any pattern.
mantra experimental enable akashaAgents in a pattern’s group share one small block of notes — a fact about the code, a decision, an interface, a pitfall. Each keeps its own context; a note marked urgent reaches busy members mid-turn. Off until you switch it on, and its format and tools may still change. /akasha shows the blocks; mantra-swarm ships with one group, builders.
mantra mcp add blender -- uvx blender-mcpAny stdio MCP server — Blender, a browser, a database — handed to agents on Codex, Claude Code and Bija. Solo gets every enabled server by default; a Mandala role only what its pattern lists (mcp = ["blender"]). A call shows on the agent’s card as blender.get_scene_info.
mantra_screenshot · mantra_view_imageA model marked vision in /models gets two tools: a capture of the screen, or a region of it, saved under the run’s screenshots/; and a look at an image in its working directory. Nothing is ever captured unless the model calls the tool.
Every worker gets its own git worktree and a declared file scope. A plan whose parallel tasks overlap is rejected; a worker that edits outside its scope trips a wire.
A watchdog knows who should be busy and nudges, respawns or escalates when they are not. Failures halt with a reason and the key that fixes it, instead of looping.
Runs are saved as they go. mantra runs resume <id> picks one up at the nearest safe boundary, from any directory. A run has one owner: a second Mantra won’t open it while the first still does.
One codex app-server or claude -p process per agent, so your logins, sandboxes and model access keep working exactly as they do today. Where neither is installed, or for a swarm, bija ships beside mantra and needs nothing but an API key.
Every built-in pattern caps an agent’s context at 200k (context_cap), so the backend compacts there; QA starts from the diff instead of re-reading the repo; and every count shows its cached share — · 5.9M cached — so a big number reads as what it is.
When the model gateway goes down, the run halts with the gateway’s own wording instead of waking the manager and the planner on the same dead gateway. space when it is back respawns every worker the outage took, where it was.
An alias maps to a model and its backend — Codex, Claude Code or Bija. The same model via your Claude subscription and via a gateway are two clearly labelled rows. Any Responses-API provider works through Codex — OpenRouter verified end to end — and any OpenAI- or Anthropic-compatible API through Bija, a local server included. Discover a catalogue with D, test a model for real with t.
Bija (bīja, a seed) is a small Rust binary that ships beside mantra and turns any OpenAI-compatible Chat Completions API — or an Anthropic-compatible Messages API — into a coding agent: file tools, commands with a timeout or in the background, every retryable API error retried with backoff. No Node, no login: a key, or none for a local server. It is Solo’s default, and any role can use it.
sol-api: the OpenAI API with OPENAI_API_KEYbija run, bija sessions, bija show <id> -f--web serves an installable app for the same running session — chat with every agent, approve or answer from your phone, approve a plan, change a role’s model, watch the pulse feed — on your LAN or over HTTPS. --remote reaches it from anywhere through a relay that only ever forwards AES-256-GCM ciphertext: never your password, your key, or a byte of what an agent says.
Installs two binaries side by side — mantra and bija, each checked against its sha256 — to ~/.local/bin, fixes your PATH, then runs mantra doctor. Re-run to upgrade.
export OPENAI_API_KEY=…
bija · Solo’s default
npm i -g @openai/codex && codex login
npm i -g @anthropic-ai/claude-code && claude
Bija is already there: a key and Solo runs on it — or point it at any other OpenAI- or Anthropic-compatible provider; a local server needs no key. Codex and Claude Code are optional. Plus git for worktrees. mantra doctor probes what is actually ready — app-server handshake, provider key accepted, sandbox runs a command — not just what is on PATH.
mantra --demo
Real UI, real state machine, scripted agents — Bija talks to a mock API, no provider key needed. Press ctrl+o, type a goal, watch a full team run play out in about twenty seconds. Every screenshot on this page is demo mode.
mantra doctor runs at the end.cd your-project && mantra — you're in Solo.ctrl+o, describe the goal, approve the plan, /land.Bugs and feature requests are happiest as GitHub issues. For everything else, the form opens your mail client — nothing is stored on a server. A quick automatic check in your browser keeps the address away from spam bots.
curl -fsSL https://raw.githubusercontent.com/sahelea1/mantra/master/support-bundle.sh | sh > mantra-bundle.txtVersions, doctor, settings, recent runs. Keys are redacted; nothing leaves your machine.