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 on LangSmith Cloud and Bring Your Own Cloud (BYOC). Use Managed Deep Agents CLI and SDK v0.10 or later for BYOC.
Prerequisites
To follow along, you need:- Node.js and npm.
- An API key for your model provider of choice.
Add the managed-deep-agents skill
The managed-deep-agents skill walks a coding agent through building, testing, and deploying a Managed Deep Agent with the mda CLI. To add it to the current project, run:
Build a Managed Deep Agent with the quickstart
Create and deploy an agent
1
Set up the project
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 This quickstart uses OpenAI by default. For Google, Anthropic, or Microsoft Foundry, set the matching values instead.
.env:.env
mda deploy adds the provider key to the deployment. You can also use any other chat provider.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.On BYOC, sign in to your own data plane and create the key there. Set LANGSMITH_ENDPOINT to the data plane’s API URL as well. See Select a BYOC data plane.Add your LangSmith API key to .env:.env
4
Edit the instructions
Open When you deploy, Managed Deep Agents syncs these instructions to LangSmith Context Hub, where you can update them without redeploying the agent.
instructions.md and describe how the agent should behave:instructions.md
5
Configure your model and search
Now set the model and a built-in web search tool. Google, OpenAI, Anthropic, and Microsoft Foundry offer server-side search without a separate search package or search API key. Pass the provider tool dict that matches your model:Open The agent name is also the default deployment name. For model concepts and provider options, see Models.
agent.ts:Using another provider?
Using another provider?
You can use a Tavily search tool instead. Store the key in a connection so it lives in your LangSmith workspace rather than the project.This accordion uses the connection slug Install the Tavily client:Create a custom Import the tool and add it to the agent:After you deploy in the agent in the next step, create the agent-owned connection. Agent-owned credentials belong to the deployment, so this command comes after the first successful deploy:Rotating this value later takes effect on the next run, with no redeploy. For more authored tools, see Custom tools. For other create modes and per-caller credentials, see Manage connections.
research-tavily. For mda dev, an agent-owned connection reads its value from MDA_DEV_<SLUG>. Add a Tavily API key to .env as MDA_DEV_RESEARCH_TAVILY:.env
internet_search tool. connections.get(...) resolves the key at runtime, so the tool code is the same locally and on the deployment:tools/search.ts
agent.ts
6
Run locally
Install the project dependencies and start the agent: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
mda dev loads the API keys from .env, starts a local Agent Server, and opens the agent in LangSmith Studio.In Studio, send:agent.py or agent.ts.In an agent-based workspace, tracing will result in errors until you register the agent. For details, see Trace local runs.7
Deploy the agent
On BYOC, add 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.
--push-to <image-repository> to every command in this step. A BYOC data plane deploys from an image in a registry you manage.Deploy the project by running:Next steps
Tutorial
Add a custom Tavily search tool, durable memory, and a daily schedule.
Design agent template
Deploy LangChain’s open-source design agent instead of scaffolding from scratch.
Paid media agent template
Deploy LangChain’s open-source paid media agent for Slack campaign analysis.
Custom tools
Add authored LangChain tools from your project.
Connections
Authenticate with external services, as the agent or as the caller.
Connect these docs to your agent of choice via MCP for real-time answers.

