Managed Deep Agents is in private preview, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
Find the agent ID
Find the agent ID with the CLI or the REST API.- CLI
- API
List agents:Inspect one agent:
Create threads and stream runs
You can create threads and stream runs with the SDK or REST API. Currently, there is no CLI command for running Managed Deep Agents. Install the SDK for your runtime:LANGSMITH_API_KEY by default. REST requests require the X-Api-Key header:
- Python SDK
- TypeScript SDK
- cURL
Create a thread
Create a thread before running the agent. Threads preserve conversation and execution state for long-running work. Theoptions object is optional, and both fields default to false. Set test_run to true to mark the thread as a test run that is filtered out of usage and analytics. By default, skip_memory_write_protection lets the runtime raise a human-in-the-loop interrupt before the agent writes to long-term memory, so you can approve or reject the write. Set it to true to let memory writes proceed immediately, which is useful for headless runs where no human is available to approve the write. For the full field reference, see the API reference.
- Python SDK
- TypeScript SDK
- cURL
Stream a run from a thread
Start work on the thread and stream the result:- Python SDK
- TypeScript SDK
- cURL
text/event-stream). With the stream mode (stream_mode, streamMode) shown, you receive incremental updates and messages-tuple events as the agent works, followed by a final values event with the run’s full state, including the agent’s response. Set stream_subgraphs (streamSubgraphs) to true to also stream events from subgraphs, such as subagents. The optional user_timezone sets the caller’s IANA timezone so the agent reasons about dates in local time, defaulting to the agent’s configured timezone or UTC.
The cURL example prints raw SSE lines. Parse its data: payloads as JSON to drive a UI. The Python and TypeScript SDK examples yield decoded events with event.event and event.data.
Choose a stream mode:
Stream with React useStream
The previous Python SDK and TypeScript SDK examples stream route-level events. The following React useStream example exposes LangGraph projections such as stream.messages, stream.values, and output state for chat UIs.
For React applications, use the TypeScript SDK’s LangGraph client adapter with @langchain/react:
Next steps
SDK reference
SDK configuration details for the Python and TypeScript clients.
API reference
Route-level request and response details.
If a request fails, confirm that your API key is valid, that the workspace has private preview access, and that you are calling the supported region. For response status codes and error shapes, see the API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

