Add an agent trace
Add an agent trace/transcript to the index.
Accepts traces as a string in Hyperdoc format (native), Vercel AI SDK format, or OpenClaw JSONL format. The format is auto-detected if not specified.
Hyperdoc format (JSON array, snake_case with type discriminators):
{"history": "[{\"type\": \"trace_message\", \"role\": \"user\", \"text\": \"Hello\"}]"}
Vercel AI SDK format (JSON array, camelCase):
{"history": "[{\"role\": \"user\", \"content\": \"Hello\"}]"}
OpenClaw JSONL format (newline-delimited JSON):
{"history": "{\"type\":\"session\",\"id\":\"abc\"}\n{\"type\":\"message\",\"message\":{\"role\":\"user\",...}}"}
Authorizations
API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.
Headers
Optionally set this header to act as a specific user when using an API Key, equivalent to first exchanging the API Key for a User Token
Body
Request to add an agent trace.
The trace history as a string. Can be a JSON array of Hyperdoc steps, a JSON array of Vercel AI SDK steps, or OpenClaw JSONL.
2000000Resource identifier for the trace.
Trace format: 'vercel', 'hyperdoc', or 'openclaw'. Auto-detected if not set.
vercel, hyperdoc, openclaw Title of the trace
Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars.
Date of the trace
What kind of memories to extract from the trace
procedure, memory, mood Response
Successful Response
reddit, notion, slack, google_calendar, google_mail, imap, google_meet, box, dropbox, github, gitlab, google_drive, vault, web_crawler, trace, microsoft_outlook, microsoft_teams, granola, fathom, fireflies, figma, linear, hubspot, salesforce, coda, confluence, jira, metabase, gong, clickup, lightfield, pylon, fellow, odoo, external_mcp pending, processing, completed, failed, pending_review, skipped, filtered, cancelled