Capture Event
Record one turn-pair or tool call within a session
event_id client-side (UUID) so child events can reference their parent before the parent’s response returns.
Body
| Field | Type | Required | Description |
|---|---|---|---|
event_id | string (UUID) | Required | Client-generated UUID. Use as parent_id on child events. |
session_id | string (UUID) | Required | Session UUID from capture-session. |
primitive_name | string | Required | Agent name (turn-pair) or tool name (tool call). |
args | string | Required | Input: user message or JSON-encoded tool args. |
result | string | Required | Output: assistant reply or JSON-encoded tool result. |
success | boolean | Optional | Defaults to true. |
latency | integer (ms) | Optional | Execution time in milliseconds. |
timestamp | integer (ms) | Optional | Unix time in ms when the event occurred. Defaults to server time. |
parent_id | string (UUID) | Optional | Parent event UUID. Set on tool calls to point at the agent turn (or parent tool) that triggered them. |
metadata | object | Optional | Free-form event metadata. |
Core rules
- One session per conversation: reuse
session_idon every event. - One event per turn-pair:
primitive_nameis the agent name,argsis the user input,resultis the assistant output. Don’t emit separate output events. - Merge assistant turns: if one user turn is followed by N assistant turns (with tool calls between), concatenate the N texts into a single
result. - Tool calls = own event:
primitive_nameis the tool name,args/resultare plain text or JSON-encoded strings. - Sub-tools chain: when a tool invokes another tool, set
parent_idto the parent tool’sevent_id.
Headers
Your organization ID (UUID, case-insensitive).
"<org-id>"
Body
Client-generated UUID. Use as parent_id on child events.
"e8b1c52f-3a9d-4e7c-8f0b-2d6a91c4ef58"
Session UUID from capture-session.
"a3f9c182-7d4e-4b6a-9e21-c5d8f0b4e731"
Agent name (turn-pair) or tool name (tool call).
"your-agent-name"
Input — user message or JSON-encoded tool args.
"your input in plain text or JSON-encoded string"
Output — assistant reply or JSON-encoded tool result.
"your output in plain text or JSON-encoded string"
Defaults to true.
Execution time in ms.
5200
Unix time in ms when the event occurred. Defaults to server time.
1714867201000
Parent event UUID. Set on tool calls to point at the agent turn (or parent tool) that triggered them.
"4c7d2e8a-1b95-4f3d-a08e-7b3c9d12f5e6"
Free-form event metadata.
{ "language": "hi-IN" }Response
Event recorded
