Architecture
Axocoatl ships as one Rust binary assembled from focused crates. axocoatl dev,
axocoatl serve, the installed service, the CLI IPC client, and the embedded
browser app converge on one daemon state.
Runtime shape
Section titled “Runtime shape”Browser / CLI / integration │ HTTP + WebSocket / Unix-socket IPC / MCP / A2A ▼Axocoatl server and daemon ├── Provider registry ├── Agent actor registry and supervision ├── Session, turn, attachment, memory, and checkpoint stores ├── Sandbox and repository tools ├── MCP tool registry and approval gate ├── Automation store, DAG executor, and trigger dispatcher └── Event feed and webhook subscribersThe HTTP router embeds the static workbench at /. WebSocket frames carry live
Session, tool, event, approval, and Automation updates. IPC lets the CLI reach
the running daemon without creating a second runtime.
One native Session turn
Section titled “One native Session turn”New data roots use the native execution controller. The Session retains an explicitly reviewed team, provider profiles, limits, and authority before work starts. The daemon records the request and exact activation identities, then reserves provider and tool invocations against that authority. A provider call that reports its usage is then charged only that usage. Each activation uses its own model-facing state; a lead’s helpers consume allocations reserved from the lead’s grant while they run and return what they did not use.
Provider observations, tool evidence, outputs, and control receipts remain attached to those exact generations. Only accepted current results become future conversation state. Failed, superseded, and interrupted work remains inspectable, and continuation requires an explicit command. The current native actor factory does not attach daily-log, core-memory, or semantic-recall stores. See State and memory and Coordination.
If the team has completion conditions, the host evaluates them on the exact final tree when the required Agents finish: each required check runs between two captures of the repository, then a required reviewer reads the result in a fresh conversation. The turn completes only when they pass.
Existing legacy roots keep compatibility execution until an explicit offline upgrade. Its actor/checkpoint path is described below.
A loadout run
Section titled “A loadout run”axocoatl run asks the daemon to admit a run of a
loadout: the daemon resolves its parameters, finds or creates the
Workspace, creates a native Session bound to the loadout (network egress, the hardened
workload), prepares its environment with exactly the setup the run approves, and writes
the run’s manifest. A task in the daemon then builds the Team and budget edit from the
loadout, applies it through the same review and apply path as the workbench, sends the
turn (for an audit, a plan, the areas, follow-ups while they read something new, and an
integration), and
observes it: each node and generation, the check results, the review rounds and the
usage. From those it builds the Outcome, decides the
verdict and exit code, and writes them once to the run record. Each kind of loadout has
its own driver; see Fix, QA and audit runs.
Early stream ends and short context windows
Section titled “Early stream ends and short context windows”- An Ollama stream that ends early, including one ended by an error record such as an unparseable tool call, is retried once. The retry is charged to the same grant.
- Tool output older than the latest few tool rounds is replaced by a short placeholder in later requests; Session History keeps the full content.
- A request that would still overflow the model’s context window is reduced to fit, with a note, instead of failing.
- A failed activation states its failure class, such as provider stream, budget, tool-round limit, context limit, write scope, or capture, and a suggested next step.
One legacy Session turn
Section titled “One legacy Session turn”- The server validates the Session and appends a durable turn begin, including stable request identity and structured context references.
- The Session dispatches to its one selected Agent. A turn that would run two or
more Agents is refused before it starts; run
axocoatl session upgrade --confirmto move multi-Agent Sessions to native execution. - An autonomous Agent builds model input from its conversation, core memory, passive recall, tools, and current request. A Coordinator instead builds its decomposition/synthesis input from Tier-1 conversation and delegates to declared Workers, which each own the ordinary Tier 1–4 pipeline.
- Token-budget preflight runs before a provider call.
- The provider streams output. Tool calls execute inside the Session sandbox or through the host daemon for registered integrations such as MCP.
- Tool start/result events and the final turn state are persisted and then broadcast to the browser.
- The model-facing conversation is checkpointed for actor restart recovery. A terminal Coordinator turn clears its private orchestration state and the next turn decomposes fresh.
The Session ledger is canonical for workbench History. The Agent checkpoint is a model-facing recovery cache and cannot stand in for multi-Agent output, structured attachments, Stop state, or every tool event.
Session isolation
Section titled “Session isolation”The daemon-global sandbox config selects either local Podman or an E2B Cloud remote backend when a Session sandbox starts. The Session creation request chooses the directory, mode, optional enabled Skills, exposed ports, and—on Podman—an allowed image; it does not independently switch the configured backend. E2B uses the daemon-global template and rejects an explicit or devcontainer OCI image instead of silently replacing it. Native repository tools and required checks currently require Podman’s supervised command boundary; E2B supports the compatibility execution path.
A Ready E2B Session persists its exact provider identity, data-plane domain, and remote root. Close and graceful daemon shutdown pause that runtime; Reopen and restart recovery connect to the same ID instead of cloning a replacement. Delete Session and Change/Rebuild runtime are the checked destructive transitions.
Local file and shell tools run in a rootless Podman container. The Workspace is the repository boundary visible to those tools. The host daemon still owns providers, persistence, MCP connections, webhooks, and the browser/API.
Before any repository tool runs, the Session persists one environment
generation through unprepared, awaiting_approval, preparing, ready, or
failed. Detection may propose an image and exact setup command, but does not
grant consent. The operator may default only the exact devcontainer command for
an unreviewed Session; a reviewed checked or unchecked choice wins, and an
edited or lockfile-detected command remains outside that default.
Local Podman accepts only a fixed curated image set unless the operator enables
arbitrary images. It probes the repository commands Axocoatl requires,
provisions them inside a supported distribution when possible, and removes the
container if it still cannot become Ready. It never installs host software or
creates a Podman VM, though it may start an existing stopped VM. With
network: none, the image must already contain those commands because
in-container provisioning cannot download them.
Files tree/read/write, Git, Terminal, Preview, Agent tools, and Ways operations
that start work or inspect a live checkout all use the same Ready sandbox
instead of falling back to host filesystem access. Durable History and exact
Keep/Discard recovery do not require reconstructing that live checkout. A local
root Node project gets a Podman volume over root node_modules, masking the
host’s native dependencies while leaving the Workspace bind read-write. An E2B
template must already contain Axocoatl’s repository commands; readiness verifies
the template but does not package-provision it.
Attempts add a stricter path: each Way receives an independent no-origin clone and local Podman container. Attachments, Skills, MCP, web search, and writable shared memory are withheld to keep comparison inputs and write ownership bounded.
Coordination paths
Section titled “Coordination paths”Do not collapse all multi-Agent behavior into one scheduler:
- Native leads, including Coordinator templates, delegate tasks to distinct read-only helper activations from explicitly approved Worker templates and limits in the Session controller. This is the default team’s shape.
- Native multi-Agent Sessions run selected configured Agents in dependency order inside one foreground Session sandbox.
- Required checks and required review are completion conditions the host runs after the required Agents finish; the lead cannot skip or answer them.
- Automations execute explicit persisted DAGs manually or from triggers.
- The event feed carries the events a Skill publishes when it fires to triggers, webhooks, and observers; it never starts Agents on its own.
- Legacy Coordinators dynamically decompose a goal and assign each subtask to the first declared worker Agent that can call its tools during that Agent execution.
Failure and recovery seams
Section titled “Failure and recovery seams”- A non-Ready Session rejects live checkout and compute operations while retaining its exact environment plan, bounded setup evidence, durable History, and explicit review/rebuild path.
- An orphaned running Session turn is reconciled to interrupted on restart.
- Agent supervision polls liveness and restores the latest conversation checkpoint, not an arbitrary in-flight tool.
- Provider responses reject a 129th tool call before hooks or dispatch. Only the Ollama providers read calls written as answer text, and only Qwen3-Coder calls that end the answer; an answer that calls a tool in a way that cannot run is refused, so the turn needs attention. Parallel dispatch retains each original call identity even if one task panics.
- Top-level Automation Interrupts are durable; arbitrary running nodes are not.
- Attempt Keep and cleanup have resumable lifecycle states.
- Rewind makes the ledger authoritative and repairs the checkpoint on restart if a process death interrupted the cross-file sequence.
Crate map
Section titled “Crate map”axocoatl-cli— commands and service entrypoints;axocoatl-server— HTTP, WebSocket, protocols, and embedded app;axocoatl-daemon— composition root and runtime orchestration;axocoatl-actor— Agent execution and coordinator behavior;axocoatl-session— folder Session and durable turn model;axocoatl-memory— memory stores, embeddings, and checkpoints;axocoatl-isolation— local Podman and the optional E2B Cloud backend;axocoatl-exec— the embedded Linux supervisor for bounded repository commands;axocoatl-mcpandaxocoatl-a2a— interoperability;packages/lattice— browser graph web components.
The isolation crate contains other implementation experiments, but Podman and E2B Cloud Sessions are the selectable daemon backends. Do not infer a product tier merely from a crate or feature existing in source.
Next: State and memory →