Join us May 13th & May 14th at Interrupt, the Agent Conference by LangChain. Buy tickets >
curl --request POST \
--url https://api.example.com/threads/{thread_id}/commands \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"method": "<string>",
"params": {}
}
'{
"type": "<string>",
"id": 1,
"result": {},
"meta": {
"applied_through_seq": 1
}
}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.
curl --request POST \
--url https://api.example.com/threads/{thread_id}/commands \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"method": "<string>",
"params": {}
}
'{
"type": "<string>",
"id": 1,
"result": {},
"meta": {
"applied_through_seq": 1
}
}Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
The ID of the thread the command applies to.
A client → server command envelope. Known methods: run.start, input.respond, subscription.subscribe (WS only), subscription.unsubscribe (WS only), agent.getTree.
Protocol response — either ProtocolSuccess or ProtocolError.
Was this page helpful?