Skip to content

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.

Minga's architecture: brain, body, mind and handsYou in the app and your own Claude Code or Codex session connect to the Minga cloud. In the cloud, the brain holds the plan and the event log, each agent has a body, and an agent can think in the cloud with your API key. Your runners dial out to the cloud over a WebSocket; on them, agents can think in the CLI and workers do the work in worktrees. Every arrow points into the cloud.You, in the appapp.minga.runYour own sessionClaude Code or Codex, over MCPMINGA CLOUD (CLOUDFLARE)Brain · one per projectThe plan, the event log, the brief, decisions,Needs you. One writer, so every change is ordered.Body · one per agentChat, inbox, wakes.Always reachable, evenwhen its machine sleeps.Mind · in the cloudA turn computed with yourworkspace's Anthropic orOpenAI API key (optional).Runners dial out (WebSocket)Runner · my-macMind: a turn in the CLIHands: workers inworktrees of your repoYour logins, your cloneRunner · vps-1Mind: a turn in the CLIHands: workers inworktrees of your repoStays on overnight
Every arrow points into the cloud. Minga never connects into your machine.
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
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. The scheduler starts work. When an item becomes ready, the brain asks for a run, and a runner that can take it claims it.
  1. Something wakes the agent’s body: your message, a finished run, an approval.
  2. 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.
  3. The runner starts the CLI with Minga’s tools, resuming the agent’s session where it can.
  4. The CLI’s output (text, reasoning, tool calls) streams back into the chat as it is written.
  5. 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.

  • 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.

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.

Claude Code is a trademark of Anthropic; Codex of OpenAI. Minga is not affiliated.

PrivacyImprintTerms