entorin

Retrieval

Tenant-scoped, audited query interface returning ranked Chunk records. Bring your own pgvector / Qdrant / Pinecone backend.

Tenant-scoped, audited query interface returning ranked Chunk(text, score, metadata) records. RetrievalClient wraps any Retrieval backend (MCPRetrieval, your own pgvector / Qdrant / Pinecone) with capability check, audit events, and a span.

from entorin.retrieval import MCPRetrieval, RetrievalClient

retrieval = RetrievalClient(
    "docs", backend=MCPRetrieval(my_mcp_session), bus=bus,
)
hits = await retrieval.query(ctx, "where are the deploy notes", k=5)
for chunk in hits:
    ...  # chunk.text, chunk.score, chunk.metadata

MCPRetrieval

Calls one of the MCP server’s tools (canonical query) with {"query", "k", "principal_id", "filter"}. The server scopes the corpus per principal_id. Capability: retrieval.<id>.query.

Bring your own backend

pgvector, Qdrant, Pinecone, OpenSearch — implement the four-line Retrieval protocol against your infra. RetrievalClient wraps it the same way: same span name, same audit events, same capability shape.

The control plane does not ship: vector indexes, embedding models, chunk pipelines, reranking. That’s your backend’s job.