Architecture: brain, body and hands
Minga splits each agent into a body, a mind and hands, around one shared brain per project. The split answers a simple question: does an agent live in the cloud or on my machine? Its body always lives in the cloud, so it is always reachable. Where it thinks and where its work runs can each be placed where you want.
The four parts
Section titled “The four parts”| Part | What it is | Where it lives |
|---|---|---|
| Brain (one per project) | The plan, the event log, the brief, decisions, Needs you. One writer per project, so every change is ordered and checked against the same rules. | Cloudflare: one Durable Object per project and one per workspace, D1 for accounts and workspaces, R2 for files |
| Body (one per agent) | The agent’s identity, mission and instructions, its chat, its inbox and when it wakes. Always reachable, even when the machine it thinks on sleeps. | One Durable Object per persistent agent (Cloudflare Agents SDK) |
| Mind (one per agent) | Where a turn is computed: the Claude Code or Codex CLI on one of your runners, or Minga’s cloud with your workspace’s API key | A runner, or the cloud |
| Hands (one per item) | Workers that do the work, each on a runner that can take it, in a worktree of your repo | Your runners |
How a change flows
Section titled “How a change flows”- Everything is a command. A message from you, a tool call by Lea, a click on a card: each becomes a command to the project’s brain.
- The brain checks it against the same rules for people and agents: who may do what, the agent’s autonomy level, the item’s state. A command is applied, refused with a reason, or turned into a card for a person.
- Applied commands are recorded as events. The plan is computed from the event log, so history can be replayed and every screen shows the same state. The web app gets the changes live.
- Events wake the right agents. A finished run wakes the item’s owner; a person’s edit wakes the agent it affects. Wakes are batched and debounced, and stale ones are dropped.
- The scheduler starts work. When an item becomes ready, the brain asks for a run, and a runner that can take it claims it.
How a turn runs
Section titled “How a turn runs”- Something wakes the agent’s body: your message, a finished run, an approval.
- The body sends the turn to its mind. For a runner mind: over the runner’s open WebSocket, with the new messages, a context pack (the brief, goals and milestones, what changed) and a short-lived token for Minga’s tools.
- The runner starts the CLI with Minga’s tools, resuming the agent’s session where it can.
- The CLI’s output (text, reasoning, tool calls) streams back into the chat as it is written.
- The agent changes the plan through Minga’s tools; every call goes through the brain like any other command.
For a cloud mind, the body calls the model itself with your workspace key and uses the same tools in place. Everything you see in the chat is the same either way.
Properties that hold everywhere
Section titled “Properties that hold everywhere”- Runners dial out. A runner opens one WebSocket to Minga and keeps it open. The cloud never connects into your machine.
- No silent fallback. If an agent’s mind is not available, its turns wait and it shows as away. Minga never moves it to another machine or provider on its own.
- Every run ends with a stated reason: completed, interrupted, the runner went offline, and so on. A run never just disappears.
- System processes never create items. Items come from people and agents, on the record.
- Leases keep runs honest. A runner holds a lease on each run and renews it. If the runner disappears, the lease runs out and the run ends; a stale runner cannot report over a newer attempt.
- The person’s own tools. Runs use the stock Claude Code and Codex CLIs with your setup; Minga adds its plan tools and relays permission prompts.
What is stored where
Section titled “What is stored where”The short version: your repo and CLI credentials stay on your machine; the plan, chats, history, outputs and run transcripts are stored by Minga. The full list, and what is and is not gated, is in Data and security.