Skip to content

Ingest agent-run trace spans

POST
/v1/agent-traces/{session_id}/spans
curl --request POST \
--url https://api.aerandil.com/v1/agent-traces/example/spans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "rows": [ {} ], "start_seq": 0 }'

Append a batch of enveloped trace rows exactly as the runtime emitted them (ts, session_id, gen_ai.agent.name, typed event payload). Idempotent per (session, seq) — re-posting a batch no-ops, so blind retries are safe. Requires traces:write.

session_id
required
string
Media typeapplication/json
object
rows
required

Enveloped trace rows, verbatim.

Array<object>
object
start_seq

Sequence number of rows[0]; the uploader keeps incremental batches contiguous.

integer
0

Batch absorbed

Media typeapplication/json
object
inserted
integer
next_seq
integer
session_id
string
Examplegenerated
{
"inserted": 1,
"next_seq": 1,
"session_id": "example"
}