Session Run Tool Response
POST
/v1/sessions/{session_id}/runs/{run_id}/tool-response
const url = 'https://agents.lumalabs.ai/v1/sessions/example/runs/example/tool-response';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"invocation_id":"example","result":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”session_id
required
Session Id
string
run_id
required
Run Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”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
result
required
Result
The answer. For a review gate, {"verdict": "proceed"}.
Examplegenerated
{ "invocation_id": "example", "result": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
ToolResponseAck
object
status
required
Status
Tool result was routed to the waiting session worker.
string
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
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
null
Example
{ "status": "delivered", "warning": { "code": "TOOL_RESPONSE.UNKNOWN_INVOCATION" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}