Governed RAG and agent memory

Relata DB 3.0
Interfaces are HTTP under /v1/, the Python/TypeScript/Go SDKs, MCP and read-only GraphQL. The /memory routes are /v1/memory/*. Embeddings are produced by you or OpenETL and supplied with the data; Relata may call one configured embedding endpoint for queries only.

The problem

An application or agent answers from internal documents and from what it remembered about a user. The answer must respect the same access rules as a direct query, cite its sources, and be reproducible when someone asks "what did you retrieve, and under which version of the definitions?".

Retrieval

  • Register a definition with POST /v1/ontology/definitions, then publish, compare and migrate versions. GET /v1/ontology/definitions/{name}/status shows where a definition stands.
  • Load chunks through POST /v1/ingest/bulk.
  • Retrieve with POST /v1/search (lexical, dense or hybrid), POST /v1/rag/query or POST /v1/search/multi. Hits carry their BM25 and vector scores separately.
  • Ask for retrieval evidence and get a citation record: GET /v1/evidence/{id} returns it and POST /v1/evidence/{id}/replay re-runs it against the pinned versions. See Retrieval evidence.
  • Governance is inherited: ACL, PURPOSE, cell masking and audit apply to retrieval exactly as to SQL.

Memory

An agent calls POST /v1/memory/remember, recall, summarise and consolidate, reads GET /v1/memory/resolve, justify and episodes, and removes with DELETE /v1/memory/forget. The same operations are MCP tools: discover them with GET /v1/mcp/tools and call them with POST /mcp (JSON-RPC) or POST /v1/mcp/tools/call. Masked cells (for example a session id) are redacted on recall, resolve, point read, SQL, MCP and the SSE stream, and forgetting removes recall.

Honest limits

  • Under strict purpose mode, remember and recall accepted an unregistered purpose in the last run; GET /v1/memory/recall-procedure ignored all_versions=true (the MCP tool honored it).
  • Rows written with PUT /v1/objects, /v1/commit or synchronous bulk were not stamped with their definition; only queued ingest stamps it.
  • A tokenized column accepted an equality filter on the plaintext, which confirms a guessed value. Masked columns refuse it.
  • An application-asserted end-user principal (X-Relata-Principal) is default-deny and there is no operator surface yet to grant it access, so it cannot serve a user today.
  • Per-user or per-customer isolation inside one node is not a 3.0 open feature. See SaaS backends.

Exercised by

V3-07 (support copilot memory with masking, purpose and MCP), V3-08 (governed registry: purpose, masking, tokenization, conditional deny, AS OF, provenance, audit) and V3-11 (policy-handbook retrieval with evidence, replay and definition versions, 77 checks) in the relata-test 3.0 battery, 2026-11-03, debug build; each passed its defining assertions and recorded the defects above. The Governed RAG R1-R16 journeys passed 15 of 16 (one is Enterprise).