Skip to navigation

Append Agent Trace Event

A tool call and its result can share a tool_call_id. For example, append {“event_type”:“tool_call”,“tool_call_id”:“call_8f2b”,“content”:“Search orders”,“context”:{“tools”:[{“name”:“search_orders”}]}} and {“event_type”:“tool_result”,“tool_call_id”:“call_8f2b”,“content”:“Order results”,“context”:{“tools”:[{“name”:“search_orders”}]}}.

Authentication

AuthorizationApi-Key

Type “Api-Key” followed by a space and the project API key.

Path parameters

agent_uuidstringRequired
Agent UUID
trace_uuidstringRequired
Trace UUID

Request

Request body
event_typeenumRequired
contentstringOptional
contextobjectOptional
Context gives the model, the tools, and the environments of the event. context.tools is the tool that the event calls or returns, and Skills learning reads it. A tool event can omit the tool name.
event_idstringOptional
metadatamap from strings to anyOptional
Metadata is developer data. Skills learning does not read it.
occurred_atstringOptional
sequenceintegerOptional
sourceslist of objectsOptional
tool_call_idstringOptional

ToolCallID is the ID that the agent framework gives a tool call. Use the same ID on the tool_call and tool_result events. It is valid only on these event types. A result without a matching call is valid. OpenAI uses tool_calls[].id, Anthropic uses the tool_use block id, and LangChain uses ToolMessage.tool_call_id.

Response

OK
agent_uuidstringOptional
contentstringOptional
contextobjectOptional
Context gives the model, the tools, and the environments of the event. context.tools is the tool that the event calls or returns, and Skills learning reads it. A tool event can omit the tool name.
created_atstringOptional
event_idstringOptional
event_typeenumOptional
failed_atstringOptional
metadatamap from strings to anyOptional
Metadata is developer data. Skills learning does not read it.
occurred_atstringOptional
processed_atstringOptional
processing_stateenumOptional
Allowed values:
sequenceintegerOptional
sourceslist of objectsOptional
tool_call_idstringOptional

ToolCallID is the ID that the agent framework gives a tool call. Use the same ID on the tool_call and tool_result events. It is valid only on these event types. A result without a matching call is valid. OpenAI uses tool_calls[].id, Anthropic uses the tool_use block id, and LangChain uses ToolMessage.tool_call_id.

trace_uuidstringOptional
updated_atstringOptional
uuidstringOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
503
Service Unavailable Error