Skip to main content
POST
/
trace
/
add
Add an agent trace
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"
}

Authorizations

Authorization
string
header
required

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.

Body

application/json

Request to add an agent trace.

history
string
required

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.

session_id
string

Resource identifier for the trace.

format
enum<string> | null

Trace format: 'vercel', 'hyperdoc', or 'openclaw'. Auto-detected if not set.

Available options:
vercel,
hyperdoc,
openclaw
title
string | null

Title of the trace

metadata
Metadata · object

Custom metadata for filtering. Keys must be alphanumeric with underscores, max 64 chars.

date
string<date-time>

Date of the trace

extract
enum<string>[]

What kind of memories to extract from the trace

Available options:
procedure,
memory

Response

Successful Response

source
enum<string>
required
Available options:
reddit,
notion,
slack,
google_calendar,
google_mail,
box,
dropbox,
google_drive,
github,
vault,
web_crawler,
trace
resource_id
string
required
status
enum<string>
required
Available options:
pending,
processing,
completed,
failed