SandBase Managed Agents: Open-Source CMA-Compatible Runtime
SandBase Managed Agents is an open-source, local-first agent runtime with CMA-compatible APIs, multiple sandbox backends, and model-agnostic design.
TL;DR: SandBase Managed Agents is an Apache-2.0 licensed, local-first runtime for AI agents. It exposes a CMA-compatible
/v1API so you can point the Anthropic SDK at localhost, swap in any model provider (OpenAI, Ollama, vLLM), and run sandboxed agent sessions backed by SQLite. One command to start:npx managed-agents init && npx managed-agents start.
Why Another Agent Runtime?
If you’ve tried to run AI agents in production, you know the pain: session state disappears, sandboxing is an afterthought, and you end up gluing together a half-dozen services just to get tool execution working safely.
Claude Managed Agents solved this with a hosted, proprietary platform. But what if you need to run on-prem, use non-Claude models, or simply don’t want vendor lock-in?
That’s why we built SandBase Managed Agents. Same architecture principles — decoupled brain/hands/session — but open-source, local-first, and model-agnostic.
Get Running in 60 Seconds
npx managed-agents init && npx managed-agents start
That’s it. You now have:
- A CMA-compatible API server on
localhost:3000 - A web console dashboard
- A SQLite database with agents, sessions, memory, and credential vaults
No Docker required. No Redis. No Postgres. Just Node.js 22+ and your model provider key.
sandbaseai/managed-agents — Apache-2.0, local-first, CMA-compatible agent runtime.
Architecture
| Layer | Component | Responsibility |
|---|---|---|
| API | /v1 REST + SSE | CMA-compatible endpoints, resumable streaming |
| Brain | Loop Engine | Model interaction, tool orchestration, memory |
| Hands | Sandbox Backend | Code execution, file I/O, process management |
| State | SQLite Store | Agents, sessions, environments, files, skills |
| Config | YAML Definitions | Agent specs, permissions, MCP toolsets |
| UI | Console Dashboard | Session monitoring, replay, debugging |
Everything persists in SQLite — no Redis, no Postgres, no external dependencies beyond your model provider.
Features
Sandbox Backends
Choose the isolation level that fits your deployment:
| Backend | Isolation | Use Case |
|---|---|---|
| Local Process | None (host execution) | Development, prototyping |
| Docker | Per-session containers | Production, resource limits |
| Kubernetes | kubectl exec/cp | Enterprise clusters |
| Worker Queue | Distributed execution | Multi-node scaling |
Model Agnostic
Point at any OpenAI-compatible endpoint:
model:
provider: openai
api_key: ${OPENAI_API_KEY}
Works with OpenAI, Anthropic, Ollama, vLLM, or any endpoint that speaks the chat completions format. Agents specify their model ID (gpt-4o, claude-sonnet-4, qwen2.5:72b) — the workspace config just says how to reach the service.
CMA API Compatibility
The /v1 API follows Claude Managed Agents resource shapes. If you have existing CMA code:
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env.MANAGED_AGENTS_API_KEY ?? 'local-dev-key',
baseURL: 'http://127.0.0.1:3000',
});
const session = await client.beta.sessions.create({
agent: 'agent_...',
environment_id: 'env_...',
});
Your existing Anthropic SDK code works without changes — just swap baseURL.
Console Dashboard
The built-in web console gives you:
- Real-time session monitoring via resumable SSE
- Session replay for debugging agent loops
- Agent configuration management
- Credential vault UI
- Memory and file browser
TypeScript SDK
import { ManagedAgentsClient } from 'managed-agents/sdk';
const client = new ManagedAgentsClient({
baseUrl: 'http://127.0.0.1:3000',
});
const session = await client.sessions.create({
agent: 'agent_...',
environment_id: 'env_...',
});
for await (const event of client.sessions.chat(session.id, 'Hello')) {
if (event.type === 'agent.message_chunk') {
process.stdout.write(event.delta ?? '');
}
}
Agent Definition (YAML)
Agents are YAML files in your workspace:
# agents/incident-commander.yaml
name: Incident commander
description: Triages alerts and coordinates response.
model: gpt-4o
system: |-
You are an on-call incident commander.
mcp_servers:
- name: sentry
type: url
url: https://mcp.sentry.dev/mcp
tools:
- type: agent_toolset_20260401
default_config:
permission_policy: { type: always_ask }
- type: mcp_toolset
mcp_server_name: sentry
skills:
- type: custom
skill_id: skill_...
CLI
managed-agents init # Initialize workspace
managed-agents start # Start runtime + console
managed-agents list # List agents
managed-agents reload # Hot-reload agent definitions
managed-agents chat <agent-id> # Interactive chat
managed-agents template list # Browse templates
Comparison: SandBase vs CMA vs Roll Your Own
| SandBase Managed Agents | Claude Managed Agents | DIY | |
|---|---|---|---|
| License | Apache-2.0 | Proprietary | N/A |
| Hosting | Self-hosted, local-first | Anthropic Cloud | Self-hosted |
| Models | Any (OpenAI, Anthropic, Ollama, vLLM) | Claude only | Any |
| Sandbox | Local, Docker, K8s, Worker Queue | Cloud / self-hosted | You build it |
| State | SQLite (zero-config) | Anthropic-managed | You build it |
| Session Replay | Built-in (resumable SSE) | Built-in | You build it |
| API Compatibility | CMA /v1 compatible | Native | Custom |
| Setup Time | 60 seconds | Account + setup | Weeks-months |
| Cost | Infrastructure only | Tokens + runtime | Engineering time |
| Dashboard | Built-in Console | Anthropic Console | You build it |
FAQ
Is this a fork of Claude Managed Agents?
No. Clean-room implementation targeting CMA /v1 API compatibility. The internals are completely different — SQLite state, pluggable sandbox backends, model-agnostic design.
Can I use it with the Anthropic SDK?
Yes. Point baseURL at your SandBase instance. The /v1 endpoints are wire-compatible with the Anthropic SDK’s beta sessions API.
How production-ready is it?
Used internally at SandBase and by early adopters in production. SQLite handles single-node deployments well. For horizontal scaling, use the Worker Queue sandbox backend.
What about DeepSeek Harness?
Different approach. DeepSeek Harness is a plugin-first meta-framework — you assemble everything from Cordis plugins. SandBase Managed Agents is an opinionated runtime — batteries included, production-ready out of the box. Choose DSH if you want maximum flexibility; choose SandBase MA if you want to ship today.
Why SQLite and not Postgres?
Zero configuration. No separate database server to deploy, configure, or maintain. SQLite handles the concurrency patterns of a single-node agent runtime without issues. If you outgrow it, the storage layer is pluggable.
Star the repo, file issues, send PRs — Apache-2.0, community-driven.
For background on why agent runtimes matter, see Production AI Agents Need a Runtime Layer.


