Open Source · MIT Licensed

The retrieval layer your
AI pipeline is missing.

RecallDB is an opinionated persistence and retrieval engine on top of PostgreSQL and pgvector. Store embeddings alongside raw content, labels, tags, and metadata — then query it with vector, full-text, and hybrid search through a single REST API.

terminal
$ docker compose up
# API at localhost:8600, Dashboard at localhost:8601

$ curl -X PUT http://localhost:8600/v1.0/tenants/default/collections/default/documents \
  -H "Authorization: Bearer recalldbadmin" \
  -d '{
    "DocumentId": "readme-guide",
    "ContentType": "Text",
    "Content": "RecallDB stores embeddings alongside rich metadata.",
    "Embeddings": [0.1, 0.2, 0.3],
    "Labels": ["documentation", "guide"],
    "Tags": [{"Key": "source", "Value": "readme"}]
  }'
50+ REST Endpoints
3 Search Modes
5 Distance Metrics
10 Tag Operators
9 Content Types
3 SDKs

You've built this before.
You shouldn't have to again.

Every RAG project reinvents the same storage layer. RecallDB is the architecture you'd build if you had the time to do it right.

Bolt pgvector onto Postgres

Install extensions, write migration scripts, design a schema — all before you can store your first embedding.

Hand-roll a chunking schema

Documents, chunks, positions, metadata tables. Every team builds their own, and it never carries forward to the next project.

Build an API layer with auth

REST endpoints, bearer tokens, multi-tenant isolation, admin scopes. Important work — but it's undifferentiated infrastructure.

Maintain it all yourself

The result works, but it's tightly coupled to one project — and the next one needs something slightly different.

Store the complete context your AI needs.

Most vector databases store embeddings and call it a day. RecallDB stores everything your retrieval pipeline needs to find, rank, and act on information — without you designing the schema.

Vector Embeddings

Semantic similarity search via pgvector with a dedicated HNSW index per collection (m=16, ef_construction=64). No noisy neighbors.

Raw Content

Full text, code, tables, lists, hyperlinks, images, and binary data live right next to their embeddings — not in a separate store you have to join by hand.

9 Typed Content Categories

Text, Code, Table, List, Image, Hyperlink, Binary, Meta, and Unknown — so your retrieval pipeline always knows what it's looking at.

Chunk Positions

Ordered document segments grouped by document_id + position. Reconstruct full documents or pull the neighbors around any match.

Labels & Key-Value Tags

Categorical labels with boolean logic and structured tags queried through 10 operators — equals, contains, ranges, prefix/suffix, and null checks.

SHA256 Hashes & ETags

Deduplication, cache invalidation, and change detection out of the box — plus content length for token-budget awareness. No extra plumbing.

Built on Postgres. Powered by pgvector.

No exotic infrastructure. No proprietary lock-in. Just PostgreSQL with the pgvector extension, wrapped in an opinionated schema and a clean REST API — and you can always reach the database directly.

Your Application
C# · Python · JavaScript SDK
RecallDB API Server
50+ REST endpoints · MCP server · Auth · Multi-tenant · OpenAPI
React Dashboard
Visual management · Query builder
PostgreSQL + pgvector
Per-collection tables · HNSW indexes · Trigram · Labels · Tags

Per-Collection Isolation

Each collection gets its own Postgres tables with a dedicated HNSW vector index and a pg_trgm trigram index for substring matching. Labels and tags live in separate relational tables, keeping the vector index lean.

Multi-Tenant by Design

Tenants, users, credentials, and collections are fully scoped. One deployment serves many clients with complete data isolation between tenants.

Bring Your Own Embeddings

No vendor lock-in. Use OpenAI, Cohere, Voyage, Ollama, or anything that outputs a float array. RecallDB stores and indexes them all the same.

Not just storage — a system you can operate.

RecallDB ships with the operational surface most vector stores leave to you: an in-process MCP server for agents, OpenTelemetry metrics and tracing, built-in request analytics, statistics, and self-documenting APIs.

Built-in Request Analytics

Every request is recorded automatically. Query history by method, status, source IP, and time range — or pull time-bucketed summaries (minute to day) with success/failure counts for dashboards.

OpenAPI & Swagger

The server auto-generates an OpenAPI spec with bearer security, tags, and license metadata — explore and generate clients without writing docs by hand.

Collection & Document Stats

Query document counts, unique documents, total content length, and label/tag totals per collection — and aggregate stats across every chunk of a document.

Facet Discovery

Distinct-value endpoints enumerate every label and tag key in a collection — the building blocks for faceted filters and query builders in your own UI.

Bulk & Batch Operations

Ingest documents in batches, delete by a set of keys, or delete everything matching a filter in a single call — built for high-throughput pipelines.

Auth, SSL & Multi-Tenant

Bearer-token auth with admin and user scopes, optional SSL, and hard isolation between tenants, users, credentials, and collections.

In-Process MCP Server

Drive the database from AI agents over the Model Context Protocol — the full REST surface exposed as 51 tools over Streamable HTTP, hosted inside the server with per-caller bearer auth. One command wires up Claude Code, Cursor, Gemini, Codex, and Mux.

Metrics & Distributed Tracing

OpenTelemetry instrumentation across every HTTP, MCP, application, search, and storage path. Metrics scrape into Prometheus and traces export to Tempo, with a pre-provisioned Grafana + Loki stack that comes up with docker compose.

Art of the possible with RecallDB.

RAG & Conversational AI

Store knowledge-base articles, FAQ embeddings, and conversation history. Retrieve contextually relevant answers with compound filters on topic labels and recency.

Document Intelligence

Chunk PDFs, contracts, and reports with position tracking. Search thousands of documents with label-scoped vector queries and tag-based metadata filters.

Agent & Conversational Memory

Persist agent memory and chat history with per-session labels and user tags. Recall the right past exchange with vector, full-text, or hybrid search and temporal filters.

Multi-Modal Content

Store image embeddings, audio transcripts, and video descriptions alongside their raw content. Typed content categories let your pipeline handle each format correctly.

Multi-Tenant SaaS

Ship AI features inside your product. Each customer gets a fully isolated tenant with its own collections, users, and credentials — one deployment, many clients.

Enterprise Knowledge Bases

Centralize organizational knowledge with rich metadata. Filter by department, access level, document type, and date range across semantic, full-text, or hybrid search.

Everything you need. Nothing you don't.

Multi-tenant isolation

Tenants, users, credentials, and collections are fully scoped.

Per-collection HNSW indexes

Dedicated vector indexes with no noisy-neighbor problems.

5 distance metrics

Cosine, Euclidean, and inner product — similarity and distance variants.

Compound search queries

Vector, full-text, and hybrid + labels + tags + terms + dates in one request.

Bring your own embeddings

OpenAI, Cohere, Voyage, Ollama, or any float array. No vendor lock-in.

Built-in request analytics

Automatic request history with time-bucketed summaries for observability.

React dashboard

Manage tenants, collections, and documents visually with a query builder.

In-process MCP server

Drive the database from AI agents — 51 tools, no separate service.

Metrics & distributed tracing

OpenTelemetry across every path, exported to Prometheus, Tempo, Loki, and Grafana.

Docker Compose deployment

Postgres + pgvector, API server, dashboard, and observability stack in one command.

Drop into your stack in minutes.

Typed clients for C#, Python, and JavaScript. Full CRUD and search with zero boilerplate — or hit the REST API directly.

terminal
$ curl -X POST http://localhost:8600/v1.0/tenants/default/collections/default/search \
  -H "Authorization: Bearer recalldbadmin" \
  -H "Content-Type: application/json" \
  -d '{
    "Vector": {
      "SearchType": "CosineSimilarity",
      "Embeddings": [0.1, 0.2, 0.3],
      "MinimumScore": 0.7
    },
    "LabelFilter": {
      "Required": ["documentation"]
    },
    "Terms": {
      "Required": ["metadata"]
    },
    "MaxResults": 10
  }'
Program.cs
using RecallDb.Sdk;
using RecallDb.Sdk.Models;

var client = new RecallDbClient("http://localhost:8600", "recalldbadmin");

// Store a document with embeddings and metadata
await client.CreateDocumentAsync("default", "default", new DocumentRecord
{
    DocumentId = "readme-guide",
    ContentType = "Text",
    Content = "RecallDB stores embeddings alongside rich metadata.",
    Embeddings = new List<float> { 0.1f, 0.2f, 0.3f },
    Labels = new List<string> { "documentation", "guide" }
});

// Search with compound filters
SearchResult results = await client.SearchAsync("default", "default", new SearchQuery
{
    Vector = new VectorQuery
    {
        SearchType = "CosineSimilarity",
        Embeddings = new List<float> { 0.1f, 0.2f, 0.3f },
        MinimumScore = 0.7
    },
    MaxResults = 10
});
main.py
from recalldb_sdk import RecallDbClient

client = RecallDbClient("http://localhost:8600", "recalldbadmin")

# Store a document with embeddings and metadata
client.create_document("default", "default", {
    "DocumentId": "readme-guide",
    "ContentType": "Text",
    "Content": "RecallDB stores embeddings alongside rich metadata.",
    "Embeddings": [0.1, 0.2, 0.3],
    "Labels": ["documentation", "guide"]
})

# Search with compound filters
results = client.search("default", "default", {
    "Vector": {
        "SearchType": "CosineSimilarity",
        "Embeddings": [0.1, 0.2, 0.3],
        "MinimumScore": 0.7
    },
    "MaxResults": 10
})
index.js
const { RecallDbClient } = require('recalldb-sdk');

const client = new RecallDbClient('http://localhost:8600', 'recalldbadmin');

// Store a document with embeddings and metadata
await client.createDocument('default', 'default', {
  DocumentId: 'readme-guide',
  ContentType: 'Text',
  Content: 'RecallDB stores embeddings alongside rich metadata.',
  Embeddings: [0.1, 0.2, 0.3],
  Labels: ['documentation', 'guide']
});

// Search with compound filters
const results = await client.search('default', 'default', {
  Vector: {
    SearchType: 'CosineSimilarity',
    Embeddings: [0.1, 0.2, 0.3],
    MinimumScore: 0.7,
  },
  MaxResults: 10,
});

50+ endpoints. Full CRUD. OpenAPI & Swagger.

A complete REST API covering every resource in the system. Bearer-token authentication, admin and user scopes, and self-documenting OpenAPI out of the box.

Tenants & Collections

GET /v1.0/tenants
PUT /v1.0/tenants
GET /v1.0/.../collections
GET /v1.0/.../collections/{id}/stats

Documents

GET /v1.0/.../documents
PUT /v1.0/.../documents
POST /v1.0/.../documents/batch
DEL /v1.0/.../documents/{key}

Search & Facets

POST /v1.0/.../search
POST /v1.0/.../enumerate
GET /v1.0/.../labels/distinct
GET /v1.0/.../tags/distinct

Analytics & Auth

GET /v1.0/requesthistory
GET /v1.0/requesthistory/summary
GET /v1.0/.../users
PUT /v1.0/.../credentials

Up and running in 60 seconds.

1

Clone & Launch

$ git clone https://github.com/jchristn/RecallDB.git
$ cd RecallDB/docker
$ docker compose up

Postgres + pgvector, the API server, the React dashboard, and the Prometheus + Tempo + Loki + Grafana observability stack all come up together.

2

Store Documents

$ curl -X PUT \
  localhost:8600/v1.0/tenants/default/collections/default/documents \
  -H "Authorization: Bearer recalldbadmin" \
  -d '{
    "DocumentId": "doc1",
    "ContentType": "Text",
    "Content": "Hello world",
    "Embeddings": [0.1, 0.2, 0.3]
  }'

A default tenant and collection are created on first boot. Start storing documents immediately.

3

Search

$ curl -X POST \
  localhost:8600/v1.0/tenants/default/collections/default/search \
  -H "Authorization: Bearer recalldbadmin" \
  -d '{
    "Vector": {
      "SearchType": "CosineSimilarity",
      "Embeddings": [0.1, 0.2, 0.3],
      "MinimumScore": 0.5
    },
    "MaxResults": 10
  }'

Combine vector similarity, full-text relevance, or hybrid search with labels, tags, terms, and date filters in a single query.

Default Credentials

Admin API Key recalldbadmin
User Login admin@recall / password
Bearer Token default
Server localhost:8600
Dashboard localhost:8601

Spend your time on what makes your product unique.

RecallDB gives you a complete persistence and retrieval architecture out of the box — so you can focus on building the features that matter.