Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

Export events and memories as JSON Lines

/v1/exportsPOST
Streams application/x-ndjson: a header line, then event lines (as GET /v1/events returns them) and memory lines, then an end line with counts. A body without an end line means the export failed part way. Stops after a record limit and says truncated: true; narrow it with streamId. At most 10 exports an hour per key. Importing the file with the jsonl source into another project keeps the original idempotency keys.
Authorization
bearer *Bearer <token>
API key of the form kaibo_<id>.<secret>. Scopes: read, write, read_write, forget, admin.
Request Bodyapplication/jsonrequired
streamId?string
Min length: 1Max length: 128
include?"events" | "memories"[]
Min items: 1Max items: 2
memoryStatus?"active" | "superseded" | "canceled" | "tombstoned"[]
Min items: 1Max items: 4
Response
200 · JSON Lines: one object per line
One of:
Option 1
record *"header"
version *1
projectId *string
Min length: 1Max length: 128
exportedAt *string (date-time)
include *"events" | "memories"[]
Option 2
streamId *string
Min length: 1Max length: 128
seq *integer
Min: 1Max: 9007199254740991
idempotencyKey *string
Min length: 1Max length: 255
occurredAt *string (date-time)
recordedAt *string (date-time)
source *object
Show properties
kind *"message" | "tool_call" | "file" | "commit" | "system" | "import"
agent *stringnull
uri *stringnull
payloadDigest *string
Pattern: ^[0-9a-f]{64}$
blobRef *stringnull
payload *object | null
prevHash *string
Pattern: ^[0-9a-f]{64}$
hash *string
Pattern: ^[0-9a-f]{64}$
id *string
Min length: 1Max length: 128
projectId *string
Min length: 1Max length: 128
record *"event"
Option 3
id *string
Min length: 1Max length: 128
projectId *string
Min length: 1Max length: 128
type *"fact" | "decision" | "task" | "preference" | "procedure" | "episode"
content *string
Min length: 1Max length: 20000
validFrom *string (date-time)
validTo *string (date-time) | null
recordedAt *string (date-time)
supersedes *string | null
supersededBy *string | null
sourceEventIds *string[]
Min items: 1
confidence *number
Min: 0Max: 1
salience *number
Min: 0Max: 1
strength *number
Min: 0Max: 1
scope *"org" | "project" | "agent" | "user" | "session"
visibility *"private" | "project" | "org"
status *"active" | "superseded" | "canceled" | "tombstoned"
version *integer
Min: 1Max: 9007199254740991
record *"memory"
Option 4
record *"end"
counts *object
Show properties
events *integer
Min: 0Max: 9007199254740991
memories *integer
Min: 0Max: 9007199254740991
truncated *boolean
400 · Invalid request
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
401 · Missing, malformed, revoked or expired key
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
403 · The key lacks the required scope
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
429 · Rate limited. See Retry-After
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
Request example
curl -X POST "/v1/exports" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "streamId": "string", "include": [ "events" ], "memoryStatus": [ "active" ] }'