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
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. - Sensitive data: Agnost does not currently provide automatic PII redaction before ingestion. See Data Governance for redaction and pseudonymization patterns.
Verify
Send one event, then open Raw logs in Agnost. Confirmprimitive_name, args, result, success, and latency look right.
Troubleshooting
event_idandsession_idmust be UUIDs.- Create the session first with Capture Session.
- For tool calls, set
parent_idwhen the tool was triggered by another agent/tool event.
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.
Response
Event recorded
