| title | Deploy with the CLI |
|---|---|
| description | Deploy a model-agnostic, open source agent to production with the Deep Agents CLI |
Deep Agents Deploy takes your agent configuration and deploys it as a LangSmith Deployment: a horizontally scalable server with 30+ endpoints including MCP, A2A, Agent Protocol, human-in-the-loop, and memory APIs. Built on open standards:
- Open source harness: MIT licensed, available for Python and TypeScript
- AGENTS.md: open standard for agent instructions
- Agent Skills: open standard for agent knowledge and actions
- Any model, any sandbox: no provider lock-in
- Open protocols: MCP, A2A, Agent Protocol
- Self-hostable: LangSmith Deployments can be self-hosted so memory stays in your infrastructure
| Deep Agents Deploy | Claude Managed Agents | |
|---|---|---|
| Model support | OpenAI, Anthropic, Google, Bedrock, Azure, Fireworks, Baseten, OpenRouter, many more | Anthropic only |
| Harness | Open source (MIT) | Proprietary, closed source |
| Sandbox | LangSmith, Daytona, Modal, Runloop, or custom | Built in |
| MCP support | ✅ | ✅ |
| Skill support | ✅ | ✅ |
| AGENTS.md support | ✅ | ❌ |
| Agent endpoints | MCP, A2A, Agent Protocol | Proprietary |
| Self hosting | ✅ | ❌ |
deepagents deploy packages your agent configuration and deploys it as a LangSmith Deployment. You configure your agent with a few parameters:
| Parameter | Description |
|---|---|
model |
The LLM to use. Any provider works — see supported models. |
AGENTS.md |
The system prompt, loaded at the start of each session. |
skills |
Agent Skills for specialized knowledge and actions. Skills are synced into the sandbox so the agent can execute them at runtime. See skills docs. |
user/ |
Per-user writable memory. If present, a single AGENTS.md is seeded per user (from user/AGENTS.md if provided, otherwise empty). Writable at runtime. Preloaded into the agent's context via the memory middleware. |
mcp.json |
MCP tools (HTTP/SSE). See MCP docs. |
sandbox |
Optional execution environment. See sandbox providers. |
Install the CLI or run directly with uvx:
```bash uvx (no install)
uvx deepagents-cli deploy
```
deepagents init [name] [--force] # scaffold a new project
deepagents dev [--config deepagents.toml] [--port 2024] [--allow-blocking] # bundle and run locally
deepagents deploy [--config deepagents.toml] [--dry-run] # bundle and deployBy default, deepagents deploy looks for deepagents.toml in the current directory. Pass --config to use a different path:
deepagents deploy --config path/to/deepagents.tomlScaffold a new agent project:
deepagents init my-agentThis creates the following files:
| File | Purpose |
|---|---|
deepagents.toml |
Agent config — name, model, optional sandbox |
AGENTS.md |
System prompt loaded at session start |
.env |
API key template (ANTHROPIC_API_KEY, LANGSMITH_API_KEY, etc.) |
mcp.json |
MCP server configuration (empty by default) |
skills/ |
Directory for Agent Skills, with an example review skill |
After init, edit AGENTS.md with your agent's instructions and run deepagents deploy. Optionally add a user/ directory with per-user memory templates — see User Memory.
The deploy command uses a convention-based project layout. Place the following files alongside your deepagents.toml and they are automatically discovered:
my-agent/
├── deepagents.toml
├── AGENTS.md
├── .env
├── mcp.json
├── skills/
│ ├── code-review/
│ │ └── SKILL.md
│ └── data-analysis/
│ └── SKILL.md
└── user/
└── AGENTS.md| File/directory | Purpose | Required |
|---|---|---|
AGENTS.md |
Memory for the agent. Provides persistent context (project conventions, instructions, preferences) that is always loaded at startup. Read-only at runtime. | Yes |
skills/ |
Directory of skill definitions. Each subdirectory should contain a SKILL.md file. Read-only at runtime. |
No |
user/ |
Per-user writable memory. When present, a single AGENTS.md is seeded per user (from user/AGENTS.md if provided, otherwise empty). Writable at runtime — the agent can update this file as it learns about the user. Preloaded into the agent's context at the start of each session. |
No |
mcp.json |
MCP server configuration. Only http and sse transports are supported in deployed contexts. |
No |
.env |
Environment variables (API keys, secrets). Placed alongside deepagents.toml at the project root. |
No |
Convert stdio servers to HTTP or SSE before deploying.
deepagents.toml configures the agent's identity and sandbox environment. Only the [agent] section is required. The [sandbox] section is optional and defaults to no sandbox.
(Required)
Core agent identity. For more on model selection and provider configuration, see supported models.
Name for the deployed agent. Used as the assistant identifier in LangSmith. Model identifier in `provider:model` format. See [supported models](/oss/deepagents/models#supported-models).[agent]
name = "research-assistant"
model = "anthropic:claude-sonnet-4-6"Skills, user memories, MCP servers, and model dependencies are auto-detected from the project layout — you don't declare them in deepagents.toml:
- Skills: the bundler recursively scans
skills/, skipping hidden dotfiles, and bundles the rest. - User memory: if
user/exists, a singleAGENTS.mdis bundled as per-user memory (fromuser/AGENTS.mdif present, otherwise empty). At runtime, each user gets their own copy (seeded on first access, never overwritten). The agent can read and write this file. - MCP servers: if
mcp.jsonexists, it is included in the deployment andlangchain-mcp-adaptersis added as a dependency. Only HTTP/SSE transports are supported (stdio is rejected at bundle time). - Model dependencies: the
provider:prefix in themodelfield determines the requiredlangchain-*package (e.g.,anthropic->langchain-anthropic). - Sandbox dependencies: the
[sandbox].providervalue maps to its partner package (e.g.,daytona->langchain-daytona).
Configure the isolated execution environment where the agent runs code. Sandboxes provide a container with a filesystem and shell access, so untrusted code cannot affect the host. For supported providers and advanced sandbox configuration, see sandboxes.
When omitted or set to provider = "none", the sandbox is disabled. Sandboxes are for if you need code execution or skill script execution.
Scope behavior:
"thread"(default): Each conversation gets its own sandbox. Different threads get different sandboxes, but the same thread reuses its sandbox across turns. Use this when each conversation should start with a clean environment."assistant": All conversations share one sandbox. Files, installed packages, and other state persist across conversations. Use this when the agent maintains a long-lived workspace like a cloned repo.
Place a .env file alongside deepagents.toml with your API keys:
# Required — model provider keys
ANTHROPIC_API_KEY=sk-...
OPENAI_API_KEY=sk-...
# ...etc.
# Required for deploy and LangSmith sandbox
LANGSMITH_API_KEY=lsv2_...
# Optional — sandbox provider keys
DAYTONA_API_KEY=...
MODAL_TOKEN_ID=...
MODAL_TOKEN_SECRET=...
RUNLOOP_API_KEY=...Set [sandbox].provider in deepagents.toml and add the required env vars to .env. For available providers, see sandbox integrations. For lifecycle patterns and SDK usage, see sandboxes.
The deployed server exposes:
- MCP: call your agent as a tool from other agents
- A2A: multi-agent orchestration via A2A protocol
- Agent Protocol: standard API for building UIs
- Human-in-the-loop: approval gates for sensitive actions
- Memory: short-term and long-term memory access
A content writing agent with per-user preferences that the agent can update:
[agent]
name = "deepagents-deploy-content-writer"
model = "openai:gpt-4.1"my-content-writer/
├── deepagents.toml
├── AGENTS.md
├── skills/
│ ├── blog-post/SKILL.md
│ └── social-media/SKILL.md
└── user/
└── AGENTS.md # writable — agent learns user preferencesA coding agent with a LangSmith sandbox for running code:
[agent]
name = "deepagents-deploy-coding-agent"
model = "anthropic:claude-sonnet-4-5"
[sandbox]
provider = "langsmith"
template = "coding-agent"
image = "python:3.12"User memory gives each user their own writable AGENTS.md that persists across conversations. To enable it, create a user/ directory at your project root:
user/
└── AGENTS.md # optional — seeded as empty if not providedIf the user/ directory exists (even if empty), every user gets their own AGENTS.md at /memories/user/AGENTS.md. If you provide user/AGENTS.md, its contents are used as the initial template; otherwise an empty file is seeded.
At runtime, user memory is scoped per user via custom auth (runtime.server_info.user.identity). The first time a user interacts with the agent, their namespace is seeded with the template. Subsequent interactions reuse the existing file — the agent's edits persist, and redeployments never overwrite user data.
- Bundle time — the bundler reads
user/AGENTS.md(or uses an empty string) and includes it in the seed payload. - Runtime (first access) — when a user_id is seen for the first time, the
AGENTS.mdtemplate is written to the store under that user's namespace. Existing entries are never overwritten. - Preloaded — the user
AGENTS.mdis passed to the memory middleware, so the agent sees its contents in context at the start of every conversation. - Writable — the agent can update it via
edit_file. The sharedAGENTS.mdand skills are read-only.
| Path | Writable | Scope |
|---|---|---|
/memories/AGENTS.md |
No | Shared (assistant-scoped) |
/memories/skills/** |
No | Shared (assistant-scoped) |
/memories/user/** |
Yes | Per-user (user_id-scoped) |
The user_id is resolved from custom auth via runtime.user.identity. The platform injects the authenticated user's identity automatically — no need to pass it through configurable. If no authenticated user is present, user memory features are gracefully skipped for that invocation.
- AGENTS.md and skills are read-only at runtime. Edit source files and redeploy to update them. The per-user
AGENTS.mdat/memories/user/AGENTS.mdis the exception — it is writable by the agent. - Full rebuild on deploy:
deepagents deploycreates a new revision on every invocation. Usedeepagents devfor local iteration. - Sandbox lifecycle: Thread-scoped sandboxes are provisioned per thread and will be re-created if the server restarts. Use
scope = "assistant"if you need sandbox state that persists across threads. - MCP: HTTP/SSE only. Stdio transports are rejected at bundle time.
- No custom Python tools. Use MCP servers to expose custom tool logic.