Skip to main content
Create and deploy your first Managed Deep Agent: scaffold a project, configure the model and instructions, add search, test in LangSmith Studio, and deploy with the mda CLI. Managed Deep Agents supplies the Deep Agents harness and hosted runtime. After this quickstart, the tutorial adds durable memory and a daily schedule on the same project.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.

Prerequisites

To follow along, you need:
  • Python and uv.
  • An API key for your model provider of choice.

Create and deploy an agent

1

Set up the project

Install managed-deepagents, create a project, and open its directory:
You now have all the scaffolding for your agent.
2

Add your keys

Add your model provider API key to .env:
.env
This quickstart uses OpenAI by default. If you choose Google or Anthropic in the next step, set that provider’s API key instead. mda deploy adds the provider key to the deployment. You can also use any other chat provider.
Do not commit the .env file into version control. It contains secrets.
3

Set up LangSmith

Managed Deep Agents runs on LangSmith. Your LangSmith API key authenticates local development with mda dev, deploys the agent with mda deploy, and opens the agent in LangSmith Studio so you can chat with it and inspect traces.Sign up for LangSmith if you do not already have an account.To create a LangSmith API key, open Settings, go to API Keys, and click Create API Key. For more details, see Create an account and API key.Add your LangSmith API key to .env:
.env
4

Edit the instructions

Open instructions.md and describe how the agent should behave:
instructions.md
When you deploy, Managed Deep Agents syncs these instructions to LangSmith Context Hub, where you can update them without redeploying the agent.
6

Run locally

Install the project dependencies and start the agent:
mda dev loads the API keys from .env, starts a local Agent Server, and opens the agent in LangSmith Studio.In Studio, send:
You should see the agent call the web search tool, then return a concise answer that cites sources. If search never appears in the trace, confirm the provider tool dict matches the model you set in agent.py or agent.ts.For more information, see Develop locally with LangSmith Studio.
7

Deploy the agent

Deploy the project by running:
Managed Deep Agents packages the project and runs it as a hosted deployment on LangSmith Agent Server. When deployment finishes, the CLI prints the deployment dashboard URL.Open that URL. You should see the deployment in a ready state. Send the same research question from the previous step and confirm the hosted agent returns an answer with a search tool call. For deployment options and secrets handling, see Deploy a Managed Deep Agent. To inspect the agent’s execution after it runs, use LangSmith observability.

Next steps

Tutorial

Add a custom Tavily search tool, durable memory, and a daily schedule.

Custom tools

Add authored LangChain tools from your project.