Skip to main content

Mental model

The current memory API is exposed under /admin/memory/*.
  • Memory records/items are source-backed durable statements with provenance and lifecycle metadata.
  • Lenses are curated views over memory with criteria, rendered claims, and coverage status.
  • Graphs expose linked memory items and edges for inspection.
Most users should manage memory from the desktop Memory view. These endpoints are for admin/client surfaces.

Records

Create record

curl -X POST http://localhost:6877/admin/memory/record \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"User prefers concise engineering feedback.","kind_tag":"preference"}'

Pin or unpin record

curl -X POST http://localhost:6877/admin/memory/record/rec_123/pin \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pinned":true}'

Items

List items

curl "http://localhost:6877/admin/memory/items?limit=50" \
  -H "Authorization: Bearer $API_KEY"

Get item

curl http://localhost:6877/admin/memory/items/item_123 \
  -H "Authorization: Bearer $API_KEY"

Search items

curl "http://localhost:6877/admin/memory/search?q=backend%20preferences&limit=20" \
  -H "Authorization: Bearer $API_KEY"

Lenses

List lenses

curl http://localhost:6877/admin/memory/lenses \
  -H "Authorization: Bearer $API_KEY"

Draft a lens

curl -X POST http://localhost:6877/admin/memory/lenses/draft \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Show project planning preferences"}'

Create a lens

curl -X POST http://localhost:6877/admin/memory/lenses \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Project planning","criterion":"planning preferences and constraints"}'

Update lens criterion

curl -X PUT http://localhost:6877/admin/memory/lenses/lens_123/criterion \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"criterion":"durable project planning preferences"}'

Promote lens

curl -X POST http://localhost:6877/admin/memory/lenses/lens_123/promote \
  -H "Authorization: Bearer $API_KEY"

Delete lens

curl -X DELETE http://localhost:6877/admin/memory/lenses/lens_123 \
  -H "Authorization: Bearer $API_KEY"

Lens pages

Get rendered page

curl http://localhost:6877/admin/memory/lenses/lens_123/page \
  -H "Authorization: Bearer $API_KEY"

Get render status

curl http://localhost:6877/admin/memory/lenses/lens_123/page/status \
  -H "Authorization: Bearer $API_KEY"

Write back edits

curl -X POST http://localhost:6877/admin/memory/lenses/lens_123/writeback \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"claims":[]}'

Graph

Global graph

curl http://localhost:6877/admin/memory/graph \
  -H "Authorization: Bearer $API_KEY"

Item-centered graph

curl http://localhost:6877/admin/memory/items/item_123/graph \
  -H "Authorization: Bearer $API_KEY"

Agent tools

For normal chat usage, prefer the agent tools:
  • remember — store a durable memory record
  • recall — search long-term memory
  • forget — archive/delete a matching remembered record