Try our new Claude Code Skill to automatically integrate Hyperspell into your project
curl --request POST \
--url https://api.hyperspell.com/trace/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"history": "<string>",
"session_id": "<string>",
"format": "vercel",
"title": "<string>",
"metadata": {},
"date": "2023-11-07T05:31:56Z",
"extract": [
"procedure"
]
}
'{
"source": "reddit",
"resource_id": "<string>",
"status": "pending"
}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\",...}}"}
curl --request POST \
--url https://api.hyperspell.com/trace/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"history": "<string>",
"session_id": "<string>",
"format": "vercel",
"title": "<string>",
"metadata": {},
"date": "2023-11-07T05:31:56Z",
"extract": [
"procedure"
]
}
'{
"source": "reddit",
"resource_id": "<string>",
"status": "pending"
}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.
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.
Resource 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.
Show child attributes
Date of the trace
What kind of memories to extract from the trace
procedure, memory Was this page helpful?