Skip to content

Session Run Tool Response

POST
/v1/sessions/{session_id}/runs/{run_id}/tool-response
curl --request POST \
--url https://agents.lumalabs.ai/v1/sessions/example/runs/example/tool-response \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "invocation_id": "example", "result": "example" }'

Answer the pending interaction owned by one run in this session.

session_id
required
Session Id
string
run_id
required
Run Id
string
Media typeapplication/json
RunToolResponseRequest

Answer the gate or client tool a run is suspended on.

object
invocation_id
required
Invocation Id

Id from the run's pending payload.

string
<= 255 characters
result
required
Result

The answer. For a review gate, {"verdict": "proceed"}.

Examplegenerated
{
"invocation_id": "example",
"result": "example"
}

Successful Response

Media typeapplication/json
ToolResponseAck
object
status
required
Status

Tool result was routed to the waiting session worker.

string
Allowed value: delivered
warning
Any of:
ToolResponseWarning

The ack is not the whole truth.

Nothing unresolved was waiting for the posted invocation_id — the session was reset, the turn already moved on, or this response was delivered before — so the result was accepted by the wire contract and consumed by nobody. On or after sunset the same condition answers 409.

object
code
required
Code

Why this ack carries a warning.

string
Allowed value: TOOL_RESPONSE.UNKNOWN_INVOCATION
message
required
Message

Human-readable explanation of what did not happen.

string
sunset
required
Sunset

Date this condition starts answering 409 instead of 200.

string format: date
Example
{
"status": "delivered",
"warning": {
"code": "TOOL_RESPONSE.UNKNOWN_INVOCATION"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}