remembero
Agent harness integration

Add proof-carrying memory without dumping memory into the prompt.

Give the model one bounded tool. Let Remembero own retrieval and proof. Validate the call, return only the tool result, and keep writes behind review.

  1. 1User question
  2. 2Model calls Query
  3. 3Harness validates
  4. 4Remembero returns proof
  5. 5Model phrases the answer
  6. 6Contract accepts or blocks
Fastest path

Start Remembero as an MCP server.

Use MCP when your harness already has a tool registry. Raw query and proof tools work without an LLM key; natural-language recall uses your configured provider.

Start the server

npm install -g remembero
remembero serve

Register it

{
  "mcpServers": {
    "remembero": {
      "command": "npx",
      "args": ["-y", "remembero", "serve"],
      "env": {
        "REMBERO_HOME": "/absolute/path/to/agent-memory"
      }
    }
  }
}
Golden path

Wire one narrow tool loop.

These four pieces map to OpenAI-compatible clients, local WebLLM, LangGraph-style nodes, custom orchestrators, and most agent harnesses.

01

Expose one semantic Query tool

Keep namespaces, database paths, limits, and mutation controls in trusted application configuration—not in model arguments.

const queryTool = {
  type: "function",
  function: {
    name: "Query",
    description:
      "Query governed memory and return bindings, sources, and proof.",
    parameters: {
      type: "object",
      properties: {
        query: { type: "string" }
      },
      required: ["query"],
      additionalProperties: false
    }
  }
} as const;
02

Ask the model to call it

The first prompt contains the user question and tool schema only. It must not contain facts, rows, rules, or the expected answer.

const first = await model.complete({
  messages: [{
    role: "user",
    content: [
      "Call Query exactly once with the user's question.",
      "Do not answer until the tool result is available.",
      `Question: ${question}`
    ].join("\n")
  }],
  tools: [queryTool],
  toolChoice: {
    type: "function",
    function: { name: "Query" }
  }
});
03

Validate, then execute Remembero

Reject unknown tool names, changed questions, oversized inputs, and unauthorized namespaces before any tool executes.

const result = await remembero.callTool(
  "recall_explain",
  {
    question: validatedQuery,
    namespaces: ["agent"],
    answerMode: "evidence",
    proofLimit: 4
  }
);
04

Return only the tool evidence

The final prompt receives the validated call and bounded tool result. A deterministic contract checks that the answer agrees with its bindings and proof.

const final = await model.complete({
  messages: [
    {
      role: "system",
      content:
        "Answer using only TOOL_RESULT. Cite bindings and sources. " +
        "If status is not answered, return an explicit non-answer."
    },
    {
      role: "user",
      content: [
        `QUESTION: ${question}`,
        `TOOL_CALL: ${JSON.stringify(first.toolCall)}`,
        `TOOL_RESULT: ${JSON.stringify(result)}`
      ].join("\n")
    }
  ]
});
Choose the read surface

Natural recall or governed application query?

General memory

recall_explain

Accepts a natural-language question and returns status, generated query, bindings, proof, durable sources, and a query-scoped graph.

Governed workflow

explain_query

Trusted code selects an allowlisted Datalog relation. The model never authors SQL, chooses namespaces, or broadens its own authority.

Ship gate

Fail closed at every boundary.

Executable evidence

Gate the database, not the marketing claim.

Run one command to verify structured accuracy, proof citations, stale leakage, engine latency, a real stdio MCP round trip, clean installation, million-fact memory use, and a pinned external retrieval comparison.

Exact answers100%Citation recall100%Engine p950.54 msMCP explain7.95 msScale gate100k factsScale query p9581.70 msMillion-fact gate1.01 s · 2.15 GiBModel calls0API keys0Natural recall$0.000644 avgNatural write$0.000220 avgLuna cost leadabout 15xCold npm install5.19 sFirst proof query95.46 msTop retrieval group4 stacks · 100% R@kRemembero precision100% P@kVector precision88.6% P@kMem0 formation$0.044 · 118 callsGraphiti retrieval44.0% R@kGraphiti formation$0.0379 · 275 callsLongMemEval-S500 questionsBroad Recall@583.27%Broad MRR80.96%Broad retrieval p9510.78 msPreference Recall@543.3 → 73.3%Held-out semantic MRR47.2%Semantic route cost$0.000412 avgRestart cache32 → 9 tokensPrewarmed first query412 ms · 9 tokens
npm run bench:agent-db:check
npm run bench:agent-db:scale -- --check
npm run bench:agent-db:install:check
npm run bench:agent-db:million
npm run bench:agent-db:cost
npm run bench:longmemeval
npm run bench:longmemeval:semantic # live embedding cost
npm run bench:memory:external
npm run bench:memory:mem0 # live provider cost
npm run bench:memory:graphiti # live provider cost
Read the scorecard and evidence limits →
See every boundary

Run the live model → tool → SQLite → proof trace.

Open the chat-memory lab