Skip to main content
POST
/
threads
/
{thread_id}
/
commands
Protocol v2 Command
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.

Path Parameters

thread_id
string<uuid>
required

The ID of the thread the command applies to.

Body

application/json

A client → server command envelope. Known methods: run.start, input.respond, subscription.subscribe (WS only), subscription.unsubscribe (WS only), agent.getTree.

id
integer
required

Client-assigned command id; echoed in the response.

Required range: x >= 0
method
string
required

Command method name (e.g. run.start).

params
object

Method-specific parameters. See the CDDL spec for per-method shapes.

Response

Protocol response — either ProtocolSuccess or ProtocolError.

Successful command response.

type
string
required
Allowed value: "success"
id
integer
required
Required range: x >= 0
result
object
required

Method-specific result payload.

meta
ProtocolResponseMeta · object

Optional metadata attached to command responses.