RE-callIntegrations

LangChain · LlamaIndex · Agent SDK · MCP

Use RE-call from your framework


RE-call ships retrievers for LangChain and LlamaIndex, in-process tools for the Claude Agent SDK, and an MCP server for any MCP client. All of them return the same thing: trust-evaluated memories carrying verdict, confidence, cosine and provenance, or an explicit abstention when the corpus cannot answer. The adapters depend only on each framework's core package.

Every integration sits on the same store: your own PostgreSQL with pgvector. Set one up first with the install guide, or in one command with recall quickstart.

LangChain

Shell
pip install "recall-rag[langchain,fastembed]"
Python
from recall.embeddings import FastEmbedEmbedder
from recall.generation_store import GenerationStore
from recall.integrations.langchain import RecallRetriever

emb = FastEmbedEmbedder()
store = GenerationStore(DSN, dim=emb.dim, tenant="acme")
retriever = RecallRetriever.from_store(store, emb, k=5)
docs = retriever.invoke("what is the rate limit?")

Each returned Document carries the trust signal in metadata: recall_verdict, recall_confidence, recall_cosine, supersession details and provenance. When the trust layer abstains, the retriever returns no documents by default, so a chain built on it does not paraphrase a nearest neighbour into an answer. The adapter depends only on langchain-core.

LlamaIndex

Shell
pip install "recall-rag[llamaindex,fastembed]"
Python
from recall.integrations.llamaindex import RecallRetriever

retriever = RecallRetriever.from_store(store, emb, k=5)
nodes = retriever.retrieve("what is the rate limit?")

Nodes carry the same trust metadata. One option matters in production: constructed with return_abstention_reason=True, an abstention returns a single empty node whose metadata carries recall_abstained and recall_reason, so an application can tell "the corpus cannot answer this" apart from "retrieval broke" and say so, instead of debugging a silent empty response. The adapter depends only on llama-index-core.

Claude Agent SDK

For a Python application built on the Claude Agent SDK, RE-call's tools can run in the same process: no MCP server, no stdio handshake, no per-session start-up. The tool names, the model-facing descriptions and the rendered results are identical to the MCP server's, so a skill or prompt written against recall_search transfers unchanged.

Shell
pip install "recall-rag[agent,fastembed]"
Python
from claude_agent_sdk import query
from recall_agent import RecallAgentMemory

with RecallAgentMemory.from_env() as memory:
    options = memory.options(model="claude-sonnet-5")
    async for message in query(prompt="What do we already know about X?", options=options):
        print(message)

options() assembles a ClaudeAgentOptions carrying the in-process server, the fully qualified tool names and a SessionStart hook that injects a short memory digest. It merges with anything you pass rather than replacing it: your own servers, tools and hooks survive. Configuration comes from the same environment variables the MCP server reads (RECALL_SERVING_DSN, RECALL_EMBEDDER, RECALL_TRUST_MODE, RECALL_TENANT, RECALL_TABLE), so pointing both surfaces at one corpus needs no extra configuration.

Read tools are exposed by default. recall_index and recall_forget require an explicit write_tools=True, because in-process there is no scope or authentication layer between the model and the corpus: the MCP server gates those operations behind authenticated scopes, and here the host application is the authority. Erasure through this surface also does not reach a shadow generation or the migration outbox, so use the server for erasure on a tenant that is mid-migration. The Agent SDK guide states each boundary.

MCP, for every other agent

The MCP server exposes recall_search, recall_evidence, recall_index, recall_forget, recall_stats and the rest of the tool surface over stdio or token-scoped HTTP. On Claude Code the plugin wires it in two lines; for any other MCP client the manual configuration is in the MCP guide.

What all of them share

BehaviourMeaning
Verdicts per hitA superseded, expired, not-yet-valid or low-confidence memory is surfaced as such, not flattened into an ordinary result.
Explicit abstentionBelow the calibrated threshold the caller gets a refusal with a reason, never the nearest neighbour.
Local by defaultMemory builds and answers on your PostgreSQL with local embeddings; no memory layer LLM call.
TenancyTenant scoping enforced with row-level security in the database, not in adapter code.

API reference for both adapters: docs/API.md.