mda CLI compiles and deploys code-first Managed Deep Agents.
It is included with the managed-deepagents Python package.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.
Install
Install the package for the language you use to author your agent. The package exposes themda binary.
uv
uv tool install managed-deepagents installs the mda CLI. A project generated by mda init has its own pyproject.toml; run uv sync inside that project to install project dependencies before local development or deploy.
The package provides agent, identity, schedule, and sandbox authoring APIs with snake-case names, plus the mda console script.
Authentication
mda deploy reads API keys in this order:
LANGGRAPH_HOST_API_KEYLANGSMITH_API_KEYLANGCHAIN_API_KEY
.env file first, then from the process environment. If no key is found in an interactive terminal, mda deploy prompts for a LangSmith API key and saves it to the project .env file.
.env
LANGSMITH_WORKSPACE_ID or pass --workspace-id to mda deploy.
The LangSmith API key authenticates the deploy. The agent’s model provider also needs credentials at runtime. Set the provider key in .env, export it in your shell, or configure it as a LangSmith workspace secret. For example, openai:gpt-5.5 requires OPENAI_API_KEY.
mda deploy forwards non-reserved .env entries, such as OPENAI_API_KEY, MCP tokens, and custom tool credentials, as hosted deployment secrets. Reserved platform variables, including LANGSMITH_API_KEY, LANGGRAPH_HOST_API_KEY, LANGCHAIN_API_KEY, and LANGSMITH_WORKSPACE_ID, are used for CLI authentication and deploy routing but are not uploaded as user-managed deployment secrets.
Command overview
Initialize projects
Usemda init to create a new project directory:
To include Slack in a new project:
The scaffold creates:
Eval tasks are opt-in and are not created by
mda init. Run mda evals init -i from the project root to initialize the Harbor workspace and continue in a coding agent with the eval-engineering skill.
Initialize a Slack channel
Run the following command from the root of an existing managed deep agent project:channels/ directory. The next mda deploy sets up the resources the agent needs to appear in Slack. For the complete workflow, see Connect a Managed Deep Agent to Slack.
Build projects
Usemda build to compile a project into a managed LangGraph app without deploying it:
Evaluate projects
Usemda evals init to initialize a Harbor workspace. The command is also available as mda eval. Use the interactive handoff to develop complete tasks with a coding agent and the eval-engineering skill.
The handoff asks the coding agent to install the
eval-engineering skill, inspect the managed agent, and write complete Harbor tasks under evals/<task>/. It also includes the pinned Harbor command that loads the MDA job plugin and LangSmith plugin.
mda evals compile is an internal command used by the Harbor job plugin. The plugin runs it when a Harbor job starts, so you do not compile eval artifacts separately.
For workflow guidance, see Evals.
Develop locally
Usemda dev to compile a project and run the local LangGraph dev server:
mda dev compiles into .mda/build, then starts the language-specific LangGraph dev server from that directory:
Install
uv before running mda dev. The CLI resolves the local LangGraph dev server automatically, so you do not need to install langgraph-cli[inmem] yourself.
When a sandbox is configured, mda dev tries the configured provider. If provider credentials are unavailable or provider creation fails, it falls back to a local temp-directory sandbox and prints the chosen path.
For local development, mda dev stages the project .env file into .mda/build/.env so LangGraph can load model provider keys and other runtime credentials.
Deploy projects
Usemda deploy to compile and deploy a project to LangSmith:
Deploy runs these steps:
- Validate the project directory and load the agent entry file.
- Resolve the LangSmith API key and optional workspace ID.
- Collect non-reserved
.envvalues as hosted deployment secrets. - Verify the model provider API key is available from
.env, the shell environment, or LangSmith workspace secrets. - Sync deploy-owned context to Context Hub.
- Compile the project into
.mda/buildand extract optionalschedules/andchannels/declarations. - Create or find a LangSmith hosted deployment by name.
- Archive the build, upload it, and trigger a remote build.
- Poll the revision until it reaches
DEPLOYEDunless--no-waitis set. - Reconcile the managed LangSmith cron jobs for schedules unless
--no-waitis set. - Provision the declared Slack channel. If Slack authorization or workspace approval is required, display the action and continue after you complete it.
--no-wait because Slack provisioning requires the deployed Agent Server URL. For the complete workflow, see Connect a Managed Deep Agent to Slack.
On success, the CLI prints the LangSmith deployment dashboard URL. For secrets routing and deploy tips, see Deploy an agent.
Read deployment logs
Usemda logs to tail Agent Server logs for a deployed agent:
Delete deployments
Usemda delete to delete a deployed Managed Deep Agent and the LangSmith resources it created. mda destroy is an alias.
Troubleshooting
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

