/api/mcp/memory. Both halves share one SqliteMemoryStore over the same SQLite file — a fact saved here is immediately searchable from a runtime’s Memory tool.
Memory is always on — these routes are not feature-gated. The store uses FTS5 (full-text) plus an optional vector index. Vector and hybrid search require a reachable embedding provider. When none is available, they degrade to FTS automatically. Use
GET /api/memory/provider to see the active provider.title/content and a procedure’s content are passed through a secret scrubber before they are embedded and inserted. Credentials can never land in a durable, searchable fact regardless of who wrote it.
Routes
| Method | Path | Summary |
|---|---|---|
GET | /api/memory | Search facts (FTS, vector, or hybrid) |
POST | /api/memory | Save a fact or a procedure |
GET | /api/memory/browse | List recent facts and procedures |
GET | /api/memory/provider | Inspect the active embedding provider |
GET /api/memory
Searches stored facts. Scope filters are inclusive of globally-scoped facts — a scoped query also sees facts with a null scope.
Search query. 1–2,000 chars. A missing or blank query returns
400.Search mode. One of
fts, vector, or hybrid. Defaults to hybrid when an embedding provider is reachable, otherwise fts. Vector and hybrid degrade to FTS when no provider is available.Number of results to return. 1–100, default
10.Scope filter. Results include team-scoped and globally-scoped facts.
Scope filter. Results include agent-scoped, team-scoped (if
teamId is also set), and globally-scoped facts.Response 200 OK
Matched facts, each annotated with a relevance score and the mode that matched it.
hybrid mode, the score blends cosine similarity (60%) and an FTS-hit signal (40%).
POST /api/memory
Saves a memory entry. The body is a discriminated union: a fact (the default) or a procedure (kind: "procedure"). A fact is a durable declarative statement. A procedure is a versioned “how-to” kept separately from the fact store — saving a procedure under an existing name + scope creates a new version rather than overwriting.
Request body — Fact
Omit or pass
"fact" to save a fact.Fact title. 1–500 chars.
Fact content. 1–50,000 chars.
Up to 50 tags, each up to 100 chars.
Scope the fact to a team and/or agent. Omit for global scope.
Request body — Procedure
Must be
"procedure" to save a procedure.Procedure name. 1–200 chars. Saving under an existing
name + scope creates a new version.Procedure content. 1–100,000 chars.
Optional scope (same structure as fact scope above).
Response 200 OK — Fact saved
Response 200 OK — Procedure saved
GET /api/memory/browse
Lists the most recent facts and procedures, scoped the same inclusive way as search. Facts are ordered by updatedAt descending; the limit applies to facts and procedures independently.
Max entries to return per type. 1–200, default
10.Scope filter (inclusive of global rows).
Scope filter (inclusive of global rows).
Response 200 OK
Recent facts, newest
updatedAt first. Same shape as search results minus score and matchedVia.Recent procedures.
GET /api/memory/provider
Reports the embedding provider that backs vector and hybrid search. The resolution order at boot is: reachable Ollama (http://localhost:11434) → OpenAI key (OPENAI_API_KEY) → null. A null provider means the store is FTS-only.
Response 200 OK — provider resolved
The active embedding provider.
Response 200 OK — no provider (FTS-only)
Scope inclusivity
When you passteamId and/or agentId to search or browse, results include:
- Facts scoped to that team (
scopeTeamId = teamId) - Facts scoped to that agent (
scopeAgentId = agentId) - Globally-scoped facts (
scopeTeamId = null AND scopeAgentId = null)
See also
- Memory concepts — shared tier, FTS5 + vector, scope inclusivity, scrub-on-write
- Tools & MCP API — the Memory MCP server (model-facing half)
- Memory browser — search, save, and browse from the dashboard
- REST API overview