How it works
How Open Managed Agents works
A meta-harness: the platform owns what an agent has; a harness owns how the model loop runs. The same business logic runs on Cloudflare and self-hosted Docker.
Request flow
One message, five hops
A user message walks the same path on Cloudflare and self-hosted Node: the platform hands the harness what it needs, the harness decides how to use it.
- Client Console, CLI, or API
- API POST /v1/sessions/:id/events
- SessionDO Append event, wake harness
- Harness Model loop, tool steps
- Sandbox & tools Exec, vault-proxied network
The full path of a turn: the platform persists every event before it broadcasts it, and the sandbox never holds a credential — the outbound proxy attaches it on the way out.
How it is designed
The platform owns what an agent has; a harness owns how the model loop runs — swappable by name.
System architecture layers
Client to isolated execution, three hard boundaries: state stays in the Durable Object, secrets stay outside the sandbox, the harness stays swappable.
Client & API
- HTTP API mirrors Claude Managed Agents (/v1/agents, /v1/sessions)
- SSE event stream for live agent.* and session.* events
- Console, CLI, or any client that speaks the same surface
Platform · SessionDO
- Per-session Durable Object with SQLite event log
- Tool catalog, skills mount, sandbox binding, credential wiring
- Crash recovery: new harness instance rebuilds context from the log
Harness · model loop
- Decides how to drive the model: context, compaction, tool steps
- Default harness ships; register custom harnesses by name
- Prompt-cache-aware: byte-deterministic system prefix
Sandbox · Vault proxy
- Isolated exec for bash, files, packages (CF Containers, Docker, …)
- Outbound proxy injects vault secrets — never plaintext in the box
- MCP calls route through the platform, not the untrusted runtime
Runtime
Durable lifecycle loop
Every turn is events-first: persist, then broadcast. That ordering is why a crash loses no work and a new process resumes mid-run.
Session start
SessionDO restores the event log, binds the agent version, mounts skills, and registers tools for the environment.
Compile & query
Harness builds history into a model context, applies compaction, and calls the provider (Anthropic, OpenAI-compat, or model card).
Sandbox run
Tool calls dispatch into the sandbox: shell, read/write/edit, glob/grep, web tools. Vault material is never exposed.
Vault injection
Outbound HTTPS matches vault credentials; the proxy attaches Authorization at the network edge of the sandbox.
Durable replay
On crash, a fresh harness reads SQLite, emits session.error if needed, and continues from durable events. No lost turns.