mda CLI both accept them.
Use it to keep a staging build and a production build of the same agent apart, so each one reports into its own environment.
Beta. Agent-based workspaces are in beta. LangChain enables the change for an organization, and it applies to workspaces created after that. An existing project-based workspace does not convert automatically, but LangChain can convert it. To ask about access, contact our sales team.
Prerequisites
Both CLIs need the following:- A LangSmith API key in
.envor your shell environment. - A project folder holding
langgraph.json. Run the CLI from that folder. - An agent-based workspace, because the flags require agent mode on the workspace.
LANGSMITH_TENANT_ID for the LangGraph CLI, and LANGSMITH_WORKSPACE_ID for the mda CLI. A workspace-scoped key needs neither. The LangGraph CLI prompts for the value when the key is org-scoped. In a script or CI job, set LANGSMITH_TENANT_ID ahead of time, and pass --no-input so the LangGraph CLI fails instead of waiting for input. Both the Python and the TypeScript LangGraph CLI accept --no-input.
Addressing flags
Both CLIs take the same two flags:--agent-id: The agent to deploy to. The value is the agent’s identifier, not its display name. For which value is which, see Identifiers and display names.--agent-environment: The environment the deployment reports into, and one ofdevelopment,staging, orproduction. A deployment cannot takelocal. That environment does not display on deployments at all, which is the one way this set differs from the four values agent addressing accepts.
LANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT. The mda CLI does not read those variables, so pass the flags to it directly.
Deploy with the LangGraph CLI
These flags requirelanggraph-cli v0.4.32 or later in Python, and @langchain/langgraph-cli 1.5.2-dev.0 in TypeScript. The TypeScript version is a prerelease build. Install it exactly, because the current stable release, 1.5.1, does not accept the flags. To deploy:
-
Install the CLI:
-
Deploy, naming the agent and the environment:
--name or --deployment-id, which name a deployment directly and are rejected alongside an agent.
--remote forces a remote build. Without it, the CLI builds locally whenever Docker is available. For the rest of the flags, see langgraph deploy.
Deploy with the mda CLI
These flags requiremanaged-deepagents 0.7.5.dev4 in Python, or 0.7.5-dev.4 in TypeScript. Both are prerelease builds. Install that version exactly, because 0.8.0 and later do not accept the flags and a version range resolves to a build that rejects them. To deploy:
-
Install the CLI:
-
Deploy the project in the current folder:
mda binary and the project’s own dependency on one version. For the rest of the flags, see Deploy projects, and for deploying without the agent flags, see Deploy a Managed Deep Agent.
Confirm the binding
Open the agent and read the Deployments section of its Overview. The new deployment appears as a row there as soon as the deploy succeeds, and the row links to the deployment. If the new deployment has no row, or the Overview has no Deployments section, the deployment is not bound to the agent. This usually happens when you set theLANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT variables and deploy with the mda CLI, which ignores them. Add --agent-id and --agent-environment to the deploy command instead.
See also
Connect these docs to your agent of choice via MCP for real-time answers.

