Skip to main content
Running a Managed Deep Agent covers creating threads, starting runs, and streaming output. Deploy the agent first with the CLI or REST API, then invoke it with the REST API.
Managed Deep Agents is in private preview, available on LangSmith Cloud in the US region only. Join the waitlist to request access.

CLI: find the agent ID

There is no CLI command for running Managed Deep Agents yet. Use the CLI to find the agent ID, then use the REST API to create threads and stream runs. List agents:
Inspect one agent:

API: create threads and stream runs

Set request defaults:
Requests require the X-Api-Key header:
Install an HTTP client for Python examples:
The examples below reuse these variables:

Create a thread

Create a thread before running the agent. Threads preserve conversation and execution state for long-running work:

Stream a run from a thread

Start work on the thread with POST /v1/deepagents/threads/{thread_id}/runs/stream. Include the agent_id in the request body and set Accept: text/event-stream:
Use stream modes based on the experience you want to build: messages-tuple mode emits a messages event. The payload is a [chunk, metadata] tuple. For route-level details, see the Managed Deep Agents API reference.