Traces
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\",...}}"}
post/trace/add
Request body
Response
Successful Response