Protocol v2 Command
Send a single protocol command scoped to a thread. The request body is a ProtocolCommand envelope with a method (e.g. run.start, input.respond, agent.getTree) and method-specific params. The response is either a ProtocolSuccess (with method-specific result) or a ProtocolError.
Commands that create runs (run.start, input.respond) leave the run executing in the background on the worker queue. Event streaming for that run is observed via a concurrent POST /threads/{thread_id}/stream/events connection.
WebSocket clients use the same command envelope in-band on /threads/{thread_id}/stream/events and additionally have access to subscription.subscribe / subscription.unsubscribe over the same connection.
Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-repurp-1779849905-bd7c92f.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
The ID of the thread the command applies to.
Body
A client → server command envelope. Known methods: run.start, input.respond, subscription.subscribe (WS only), subscription.unsubscribe (WS only), agent.getTree.
Response
Protocol response — either ProtocolSuccess or ProtocolError.

