mda. To build a fuller agent step by step, follow the tutorial.
For the full deploy workflow and all CLI flags, see Deploy an agent and the CLI reference.
Managed Deep Agents is in private beta, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
Prerequisites
Before you start, make sure you have:- An organization with Managed Deep Agents private beta access.
- A LangSmith API key.
- Python and
uvfor Python projects, or Node.js and npm for TypeScript projects. - An API key for your model provider of choice.
Create and deploy an agent
Install the package
Install For Python, the
managed-deepagents for the language you want to author in. Both packages include the mda CLI.pip command installs the mda CLI. After you scaffold a project, run uv sync inside that project to install the dependencies from its generated pyproject.toml.Create a project
Create a Managed Deep Agents project:The CLI detects
For the full project layout, see the CLI project file reference.
pyproject.toml or package.json in the current directory. If it cannot infer a language, it prompts you to choose Python or TypeScript.The scaffold creates:| File | Purpose |
|---|---|
agent.py or agent.ts | The named agent definition compiled by mda. |
instructions.md | Managed system prompt embedded locally and synced to Context Hub on deploy. |
pyproject.toml or package.json | Minimal project manifest with managed-deepagents. |
README.md | Local project notes and deploy command. |
.env | Deploy auth and runtime secrets. Do not commit real secrets. |
.gitignore | Ignores .env, .env.*, .mda/, and dependency caches. |
Add API keys to `.env`
Open the generated
.env file and add your LangSmith API key plus the provider key for the model you plan to use:.env
LANGSMITH_API_KEY authenticates mda deploy. Provider keys, MCP tokens, database URLs, and other non-reserved .env values are sent to the hosted deployment as secrets when you deploy. The .env file itself is not uploaded in the source archive.The CLI targets US LangSmith Cloud by default. To deploy with an organization-scoped key, set LANGSMITH_TENANT_ID in .env or pass --tenant-id to mda deploy.If a request returns 401 or 403, confirm the key belongs to a workspace with beta access.
Edit the agent
Open the generated The managed runtime owns
For the full field list, see the agent definition reference.The generated model uses OpenAI. If you use another provider, change the model identifier and set the API key required by that provider in
agent.py or agent.ts and configure the model, tools, middleware, and interrupts in code.backend, store, checkpointer, memory, skills, and the system prompt. Do not set those fields in the agent definition.| Concern | Owner | Where you configure it |
|---|---|---|
backend, store, checkpointer | Managed runtime | Not configurable. |
memory | Managed runtime, backed by Context Hub | disableMemory / disable_memory to turn off agent-scoped memory. |
skills | Managed runtime, backed by Context Hub | skills/** in the project. |
| System prompt | Managed runtime, backed by Context Hub | instructions.md in the project. |
| Model, tools, middleware, subagents, interrupts | You | The agent definition and imported modules. |
.env, your shell environment, or LangSmith workspace secrets.Edit the instructions
Open
instructions.md and replace the generated prompt with the behavior you want:instructions.md
mda dev embeds this file into the generated local entry module. mda deploy syncs it to Context Hub and the deployed runtime reads it from there.Run locally
Install the generated project dependencies, then start the local LangGraph dev server:For TypeScript projects,
mda dev runs npx --yes @langchain/langgraph-cli dev. For Python projects, it uses uv to resolve and run the local LangGraph dev server automatically. You do not need to install langgraph-cli[inmem] yourself.mda dev loads the project .env file from the compiled local build so model provider keys and connector tokens are available during local development.Next steps
Quickstart
Deploy a first code-first agent with the
mda CLI.Tutorial
Build a scheduled research agent from an empty directory.
How it works
Understand compilation, the deploy lifecycle, and Context Hub.
Custom tools
Add authored LangChain tools from your project source.
Custom middleware
Add built-in or custom middleware around model and tool calls.
Connect MCP tools
Declare remote MCP servers with Managed Deep Agents connectors.
Schedules
Run agents on managed cron schedules.
Deploy an agent
Test and deploy Managed Deep Agents with
mda.Examples
Explore a complete project that uses every primitive.
CLI reference
Review
mda init, mda dev, and mda deploy.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

