deepagents deploy is a legacy beta CLI deployment path for users already using Deep Agents Deploy. It takes your agent configuration and files and deploys them together as a LangSmith Deployment.
LangSmith Deployments are horizontally scalable servers 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
Compare to Claude Managed Agents
Install
Install the CLI or run directly withuvx:
Usage
deepagents deploy looks for deepagents.toml in the current directory. Pass --config to use a different path:
deepagents deploy fully rebuilds and creates a new revision on every invocation. Use deepagents dev for local iteration.
deepagents init
Scaffold a new agent project:
After init, edit your project files and run
deepagents deploy.
Setup
The deploy command uses the following project layout. Place the following files alongside yourdeepagents.toml and they are automatically discovered and deployed:
Configuration file
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.
[agent]
Configure the core agent identity:
deepagents.toml
[sandbox]
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. For the production tradeoffs between thread-scoped and assistant-scoped sandboxes, file transfers, and secret management, see Going to production: Sandboxes.
deepagents.toml
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.
[auth]
Add an [auth] section to configure authentication on the deployed agent. [auth] is required when [frontend].enabled = true; otherwise it is optional (without it, LangSmith Deployment’s default x-api-key requirement applies). For background on multi-tenant authentication patterns—including team-level RBAC and forwarding end-user credentials to external APIs—see Going to production: Multi-tenancy.
deepagents.toml
Pick one of three providers:
- Clerk (
[auth] provider = "clerk") — per-user real authentication. Each user signs in; threads and memory are scoped per user. - Supabase (
[auth] provider = "supabase") — per-user real authentication. Same per-user scoping as Clerk. - Anonymous (
[auth] provider = "anonymous") — the bundler ships a permissive auth handler that overrides LangSmith Deployment’s defaultx-api-keyrequirement so the frontend can reach/threads, which means anyone with the deploy URL can call the API. The frontend assigns each browser a UUID cookie and filters the thread picker by it (UX-only scoping, not security). The CLI requires an interactivey/Nconfirmation before pushing.
.env alongside your other credentials:
Runtime behavior:
- Unauthenticated requests return
401. - On success, the authenticated user’s identity is injected into
config.configurable.langgraph_auth_user_id. - All resources (threads, runs, store) are automatically scoped per user via
metadata.owner. - LangSmith Studio bypasses auth for local development.
[frontend]
Frontend deployment requires
deepagents-cli>=0.0.43.[frontend] to ship a prebuilt React chat UI alongside your agent on the same deployment. The frontend is mounted at /app on your deployment URL; your LangGraph API stays at the root (/threads, /runs, /assistants). The frontend provides:
- Streaming chat with the agent
- Thread picker with auto-generated titles from the first user message
- Real-time todos, files, and subagent activity panels that reflect your deep agent’s live graph state
- Light/dark theme toggle that follows OS preference on first load and persists after
- (Clerk / Supabase only) Sign-in / sign-up / sign-out flows — Clerk ships its full widget (social logins, password reset); Supabase ships email/password with a built-in password reset flow
[auth]).
deepagents.toml
Environment variables:
The frontend reuses most of what
[auth] already requires. Only Clerk needs one additional browser-facing key.
Post-deploy setup:
After deploying, add your deployment URL to your auth provider’s dashboard so auth redirects land back in the app. This is a one-time step per deployment URL.
- Clerk: Dashboard → your application → Domains → add your deployment host (e.g.
clerk-abc.us.langgraph.app). Clerk development instances auto-whitelist localhost; production deployment URLs need explicit whitelisting. - Supabase: Dashboard → Authentication → URL Configuration → add
https://<your-deployment>/app/**to Redirect URLs. Without this, password-reset and email-confirmation links won’t route back to your app.
Environment variables
Place a.env file alongside deepagents.toml with your API keys. For sandbox code that needs to call external APIs without leaking credentials, prefer the sandbox auth proxy over baking secrets into .env.
Authentication
The runtime auth posture depends on[auth]:
[auth] provider = "supabase"or"clerk"— per-user real authentication. Pass the user’s auth-provider token in theAuthorizationheader.[auth] provider = "anonymous"— the bundler ships a permissive auth handler. The API is open to anyone with the deploy URL. No header required. (Required when shipping[frontend]without real per-user auth.)- No
[auth]section — the deploy falls back to LangSmith Deployment’s defaultx-api-keyrequirement. Pass your LangSmith API key in thex-api-keyheader. Only valid when[frontend].enabledisfalseor unset.
[auth] is configured for supabase or clerk, pass the token from your auth provider in the Authorization header:
- curl
- Python (langgraph-sdk)
Each user’s threads and memory are isolated automatically—User B cannot see User A’s threads.
Deployment endpoints
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
User Memory
User memory gives each user their own writableAGENTS.md that persists across conversations. This is the CLI’s built-in equivalent of the user-scoped memory pattern described in Going to production: Memory. To enable it, create a user/ directory at your project root:
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.
How it works
- Bundle time — the bundler reads
user/AGENTS.md(or uses an empty string) and includes it in the seed payload. - Runtime (first access) — when the agent sees a
user_idfor the first time, it writes theAGENTS.mdtemplate 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 using the
edit_filetool. The sharedAGENTS.mdfile and skills folder are read-only.
Permissions
User identity
Theuser_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.
Subagents
Subagents let the main agent delegate specialized tasks to isolated child agents. Each subagent has its own system prompt, optional skills, and optional MCP tools. The main agent receives atask tool that dispatches work to subagents by name.
For background on why subagents are useful and how they work at the SDK level, see Subagents.
Directory structure
Create asubagents/ directory at your project root. Each subdirectory is a subagent:
Each subagent subdirectory may contain:
Subagent configuration
subagents/researcher/deepagents.toml
Inheritance
Subagents inherit some properties from the main agent by default:Memory isolation
Each subagent gets a dedicated, isolated memory namespace at/memories/subagents/<name>/. The subagent’s AGENTS.md and skills are seeded into this namespace at deploy time.
Example
A go-to-market agent that delegates research to a specialized subagent:deepagents.toml
subagents/researcher/deepagents.toml
subagents/researcher/AGENTS.md
Limitations
- MCP: HTTP/SSE only. Stdio transports are rejected at bundle time.
- No custom Python tools. Use MCP servers to expose custom tool logic.
Examples
A content writing agent with per-user preferences that the agent can update:deepagents.toml
deepagents.toml
deepagents.toml
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

