Distill agent sessions into memories
What memloom import sessions calls. Claude Code is the only supported agent today
and the default. Discovers local Claude Code transcripts (fixed to
~/.claude/projects; the client cannot pass an arbitrary path), then for
each session checks the ledger, redacts secret-shaped strings, chunks, distills with
the configured LLM into typed memories, embeds, and saves through the belief
pipeline. The response streams NDJSON: one {"type":"item"} event per session, then
a final {"type":"done"} event with the run totals and the cost line (extraction,
embedding, and classifier calls spent). A dry run makes zero LLM calls and writes
nothing.
Body
Which agent's sessions to import. Default and only supported value today is claude-code.
"claude-code"
Widen the day window (default 14).
60
Raise the session cap (default 20).
100
Only sessions whose project folder name contains this substring.
"myapp"
List what would be processed; no LLM calls, no writes.
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.
"{\"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"