v1

latestOpenAPI 3.0.32026-07-26215.9 KB
SDK

Capture event

Record one turn-pair or tool call. Generate event_id client-side so children can reference parents.

post/api/v1/capture-event

Headers

x-org-idstring required
Example:<org-id>

Your organization ID (UUID, case-insensitive).

Request body

event_idstring uuid required

Client-generated UUID. Use as parent_id on child events.

session_idstring uuid required

Session UUID from capture-session.

primitive_namestring required

Agent name (turn-pair) or tool name (tool call).

argsstring required

Input — user message or JSON-encoded tool args.

resultstring required

Output — assistant reply or JSON-encoded tool result.

successboolean

Defaults to true.

latencyinteger

Execution time in ms.

timestampinteger

Unix time in ms when the event occurred. Defaults to server time.

parent_idstring uuid

Parent event UUID. Set on tool calls to point at the agent turn (or parent tool) that triggered them.

metadataobject

Free-form event metadata.

Example request

{
  "event_id": "e8b1c52f-3a9d-4e7c-8f0b-2d6a91c4ef58",
  "session_id": "a3f9c182-7d4e-4b6a-9e21-c5d8f0b4e731",
  "primitive_name": "your-agent-name",
  "args": "your input in plain text or JSON-encoded string",
  "result": "your output in plain text or JSON-encoded string",
  "latency": 5200,
  "timestamp": 1714867201000,
  "parent_id": "4c7d2e8a-1b95-4f3d-a08e-7b3c9d12f5e6",
  "metadata": {
    "language": "hi-IN"
  }
}

Response

Event recorded

event_idstring uuid
All 2 operations