Skip to main content
POST
Distill agent sessions into memories

Body

application/json
agent
string

Which agent's sessions to import. Default and only supported value today is claude-code.

Example:

"claude-code"

days
integer

Widen the day window (default 14).

Example:

60

maxSessions
integer

Raise the session cap (default 20).

Example:

100

project
string

Only sessions whose project folder name contains this substring.

Example:

"myapp"

dryRun
boolean

List what would be processed; no LLM calls, no writes.

force
boolean

Ignore the ledger and reprocess every discovered session from the start.

Response

NDJSON progress stream ending with a done (or error) event.

The response is of type string.

Example:

"{\"type\":\"item\",\"path\":\"/home/me/.claude/projects/-home-me-app/3f2a....jsonl\",\"project\":\"app\",\"sessionId\":\"3f2a...\",\"index\":1,\"total\":3,\"outcome\":\"imported\",\"chunks\":2,\"saved\":4,\"merged\":0,\"versioned\":1,\"conflicts\":0,\"autoResolved\":0,\"dropped\":0,\"truncated\":0,\"redactions\":1,\"malformed\":0}\n{\"type\":\"done\",\"sessions\":3,\"skipped\":{\"sidecars\":0,\"active\":0,\"outsideWindow\":2,\"overCap\":0,\"upToDate\":1},\"saved\":4,\"merged\":0,\"versioned\":1,\"conflicts\":0,\"autoResolved\":0,\"dropped\":0,\"truncated\":0,\"redactions\":1,\"malformed\":0,\"calls\":{\"extraction\":2,\"embedding\":2,\"classifier\":1},\"dryRun\":false}\n"