{
  "service": "memory",
  "version": "0.3.0",
  "tagline": "Memory as an API for AI agents.",
  "data_endpoints": {
    "POST /v1/register": "Create account, get default memory's API key",
    "GET /v1/me": "Account + current memory info",
    "POST /v1/remember": "Store a memory entry (auto-embedded)",
    "POST /v1/remember/from-session": "Mine a transcript via LLM → atomic entries",
    "POST /v1/recall": "Semantic search (MMR + correction boost)",
    "GET /v1/memories": "List entries (paginated)",
    "GET /v1/memories/:id": "Get one entry",
    "GET /v1/memories/:id/chain": "Walk the supersession chain for an entry",
    "DELETE /v1/memories/:id": "Forget one entry",
    "POST /v1/forget": "Forget by ids or by query",
    "GET /v1/stats": "Current memory statistics",
    "GET /v1/export": "Export all entries as JSONL"
  },
  "dashboard_endpoints": {
    "POST /v1/auth/request-login": "Email a magic link",
    "GET /v1/dash/my-memories": "List your memories",
    "POST /v1/dash/my-memories": "Create a new memory (plan-limited)",
    "POST /v1/dash/my-memories/:id/rotate-key": "Rotate API key",
    "DELETE /v1/dash/my-memories/:id": "Soft-delete (recoverable 30d)",
    "POST /v1/dash/my-memories/:id/undelete": "Recover soft-deleted memory",
    "POST /v1/dash/my-memories/:id/cleanup": "TTL sweep — tombstone old entries",
    "POST /v1/dash/my-memories/:id/consolidate": "LLM-planned dedup of near-duplicates",
    "POST /v1/dash/my-memories/:id/mine": "LLM-mine a transcript into atomic entries"
  },
  "knowledge_base_endpoints": {
    "POST /v1/kb/upload": "Add a document (content + title). Chunked + embedded.",
    "POST /v1/kb/query": "Hybrid retrieval (vector + BM25 + RRF + MMR) over chunks",
    "GET /v1/kb/documents": "List docs in this KB",
    "GET /v1/kb/documents/:id": "Get doc metadata + its chunks",
    "DELETE /v1/kb/documents/:id": "Soft-delete a doc + its chunks",
    "GET /v1/kb/stats": "Totals for this KB",
    "GET /v1/dash/knowledge-bases": "(session) List your KBs",
    "POST /v1/dash/knowledge-bases": "(session) Create a new KB (Pro+)"
  },
  "docs": "/docs",
  "dashboard": "/login",
  "auth": "Header: Authorization: Bearer ctxk_...  (each API key maps to one memory OR one knowledge base)"
}