The independent, open-source runtime for Claude Managed Agents.
Documentation · Getting started · Compatibility · Architecture · Roadmap
Mango implements the documented Managed Agents API as a self-hosted runtime: durable sessions, event streaming, tool orchestration, File and custom Skill resources, persistent Memory Stores, an encrypted Vault control plane, durable scheduled Deployments, self-hosted Environment worker leases, and pluggable sandbox execution. Its production-oriented architecture is built in Go on PostgreSQL and Temporal.
- Own the runtime. Use the supported Anthropic wire contract through raw HTTP or the official Go SDK while keeping state and execution on your infrastructure.
- Keep accepted work durable. Sessions, events, interrupts, tool calls, and client-action waits survive API and worker restarts.
- Bring your own execution environment. Choose local, Docker, E2B, CubeSandbox, OpenSandbox, or Daytona sandbox adapters.
- Run the whole stack locally. Start a credential-free development stack with an offline model, PostgreSQL, Temporal, NATS, and MinIO.
- Inspect every turn. Query the persisted event history, stream live previews over SSE, and inspect active workflows in Temporal UI.
You need Docker with Compose and make.
git clone https://github.com/yanpgwang/managed-agent-go.git
cd managed-agent-go
make local-up
make local-healthVerify that Mango is ready:
curl -i http://localhost:8080/readyzThe local stack uses a deterministic offline model, so no API key is required. Follow the five-minute walkthrough to create an Environment, Agent, and Session, then send and stream your first message.
make local-downImportant
Mango is in alpha. It exposes the 90 operations in its pinned Managed Agents contract, with capability-specific limitations, and is not an Anthropic product or a drop-in replacement for every hosted behavior. Its architecture is designed for production operation, but the project does not yet claim production readiness. Review the compatibility matrix before relying on a capability. The default local sandbox is for development and is not a security boundary.
| Area | Current support |
|---|---|
| Core resources | Agent, Environment, and Session lifecycle, versioning, filtering, and pagination |
| Events and runtime | Messages, interrupts, custom-tool results, confirmations, outcomes, retries, SSE, and durable park/resume |
| Tools | Sandbox built-ins, provider-native Web Search/Fetch, and remote MCP tools with optional Vault-backed bearer authentication |
| Files | Five-operation Files API with configured object storage; File-backed Session Resources with durable read-only Docker mounts |
| Skills | Nine custom resource operations, immutable Version pins, and Claude Code-style on-demand instruction loading in Docker Sessions |
| Memory | Fourteen Store, Memory, and immutable Version operations; durable read/write or read-only Docker mounts at /mnt/memory |
| Vaults | Thirteen encrypted Vault and Credential operations plus ordered Session attachment, live OAuth validation, and automatic token refresh; environment-variable egress remains in progress |
| Deployments | Ten Deployment and Deployment Run operations, pinned Agent versions, manual runs, and PostgreSQL-leased cron scheduling |
| Environment Work | Eight worker-protocol operations, transactional self-hosted Session activation, lease heartbeats, reclaim, and official Go WorkPoller interoperability |
| Session Threads | Persistent coordinator delegation with independent child context, execution, usage, retries, reports, isolated event/preview streams, routed client-action waits, and global or targeted durable interrupts |
| Sandboxes | Local and Docker available; E2B, CubeSandbox, OpenSandbox, and Daytona in Preview |
The compatibility summary states the user-visible boundary. Ordinary persistent child-Agent orchestration is implemented; advisors, shared Session budgets, environment-variable secret egress, and production-platform hardening remain roadmap work.
flowchart LR
Client --> API["Managed Agents API"]
API --> PG[("PostgreSQL")]
API --> Objects[("S3-compatible storage")]
API <-- "work lease + Session events" --> SelfHostedWorker["EnvironmentWorker"]
SelfHostedWorker --> CustomerSandbox["Customer-hosted sandbox"]
PG -- "durable outbox" --> Worker
Worker <--> Temporal
Worker --> Model["Messages API"]
Worker --> Sandbox
Worker -. "live previews" .-> NATS
NATS -.-> API
PostgreSQL owns public state, event history, Memory contents and Versions, and File/Skill lifecycle intents. An S3-compatible store owns File bytes and immutable Skill archives. Temporal owns in-flight execution. NATS carries only ephemeral wakeups and previews; persisted events are always reconciled from PostgreSQL. A lost signal, process restart, or NATS outage cannot discard accepted work.
Read the architecture overview for the failure model, transactional outbox, tool journal, interrupt ordering, and sandbox lifecycle.
| I want to… | Read |
|---|---|
| Run my first agent session | Getting started |
| Connect a real model endpoint | Use a real model endpoint |
| Choose an execution backend | Sandbox backends |
| Run a coordinator and child Agents | Multi-agent guide |
| Check an API operation | API reference |
| Understand supported behavior | API compatibility |
| Plan a deployment | Deployment model |
The complete documentation is also published at yanpgwang.github.io/managed-agent-go.
make verify # lint, unit tests, race tests, and vet
make docs-check # type-check and build the documentation site
make image-smoke # build and smoke-test the container imageDefault tests are offline. PostgreSQL, Temporal, NATS, MinIO, Docker, model, and remote-sandbox integrations have explicit opt-in suites. See the local stack guide and contribution guide.
Report vulnerabilities privately as described in SECURITY.md.
Mango is licensed under the Apache License 2.0.