Memory

Read, write, and bootstrap agent memory (RMM).

Endpoints

MethodPathAuthDescription
GET/v1/memory/blocksAPI KeyList blocks with entry counts
GET/v1/memory/blocks/:blockAPI KeyList entries in a block
GET/v1/memory/entriesAPI KeyList all entries
POST/v1/memory/entriesAPI KeyAppend an entry
PUT/v1/memory/entries/:idAPI KeyUpdate an entry
DELETE/v1/memory/entries/:idAPI KeyDelete an entry
POST/v1/memory/initAPI KeyBootstrap from documents

Memory blocks

Memory is organized into blocks:

BlockPurposeLimit
humanUser preferences, identity, communication style50 entries
projectProject details, tech stack, architecture50 entries
systemInfrastructure, deployment, environment50 entries
generalEverything else worth remembering100 entries

List blocks

curl https://api.brainstormrouter.com/v1/memory/blocks \
  -H "Authorization: Bearer br_live_..."
{
  "blocks": [
    { "name": "human", "count": 12, "limit": 50, "pinned_count": 3 },
    { "name": "project", "count": 8, "limit": 50, "pinned_count": 1 }
  ],
  "total_core_entries": 35,
  "total_archival_entries": 128
}

Append an entry

curl -X POST https://api.brainstormrouter.com/v1/memory/entries \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{"fact": "User prefers TypeScript over Python", "block": "human", "pinned": true}'
FieldTypeRequiredDefault
factstringYes
blockstringNogeneral
pinnedbooleanNofalse

Pinned entries are protected from automatic eviction.

Update an entry

curl -X PUT https://api.brainstormrouter.com/v1/memory/entries/entry-uuid \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{"fact": "User prefers TypeScript and Bun", "pinned": true}'

Delete an entry

curl -X DELETE https://api.brainstormrouter.com/v1/memory/entries/entry-uuid \
  -H "Authorization: Bearer br_live_..."

Bootstrap from documents

Extract structured facts from text documents using LLM analysis. The model reads each document and stores relevant facts into the appropriate memory blocks.

curl -X POST https://api.brainstormrouter.com/v1/memory/init \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"content": "Project uses Next.js 15 with App Router...", "source": "README.md"},
      {"content": "Deploy to AWS ECS Fargate via GitHub Actions...", "source": "infra.md"}
    ],
    "model": "anthropic/claude-sonnet-4"
  }'
{
  "status": "ok",
  "summary": "Extracted 12 facts from 2 documents",
  "entries_after": 47,
  "entries": [...],
  "duration_ms": 8500
}