Finish an agent span
POST /api/v1/agent_spans/{agent_span_id}/finish
POST
/api/v1/agent_spans/{agent_span_id}/finish
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” agent_span_id
required
AgentSpan_Id
A valid agent span ID
string
Example
013xrzp12g3nqk8ndr93q068mw7y0nv0Request Body
Section titled “Request Body ”Terminal status: ‘complete’ (default), ‘failed’, or ‘cancelled’. When ‘cancelled’, span must be pending and both timestamps are set to the (optional) timestamp.
string
Example
completeResponses
Section titled “ Responses ”Success
object
details
AgentSpan_Details
object
account_id
Account_Id
A valid account ID
string
Example
013xrzp12g3nqk8ngskn1wtxgka5b0nf agent_id
Agent_Id
A valid agent ID
string
Example
013xrzp12g3nqk8nx0y2vfkg4s3jp2qr agent_instance_id
AgentInstance_Id
A valid agent instance ID
string
Example
013xrzp12g3nqk8n4evtrcj59k8dhn3t finished_at
id
AgentSpan_Id
A valid agent span ID
string
Example
013xrzp12g3nqk8ndr93q068mw7y0nv0 parent_span_id
One of:
AgentSpan_Id
A valid agent span ID
string
Example
013xrzp12g3nqk8ndr93q068mw7y0nv0 Null
Null
string
payload
Span payload data (arbitrary JSON object)
object
key
additional properties
any
result_payload
schema_name
Name of the schema for this span
string
Example
llm schema_title
Human-readable title for the schema (from JSON schema, defaults to schema_name)
string
Example
LLM started_at
status
Status of the span: ‘pending’ (not started), ‘active’ (started but not finished), ‘complete’ (finished successfully), ‘failed’ (ended with failure), or ‘cancelled’ (never started, cancelled)
string
Example
active summary
type
Type of resource (always ‘agent_span’)
string
Example
agent_span status
string
Example
successdefault
Section titled “default ”Error
One of:
object
code
string
Example
bad_request message
string
status
string
Example
errorobject
code
string
Example
validation_errors errors
message
string
status
string
Example
error