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.
$ 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"}]
}'
Every RAG project reinvents the same storage layer. RecallDB is the architecture you'd build if you had the time to do it right.
Install extensions, write migration scripts, design a schema — all before you can store your first embedding.
Documents, chunks, positions, metadata tables. Every team builds their own, and it never carries forward to the next project.
REST endpoints, bearer tokens, multi-tenant isolation, admin scopes. Important work — but it's undifferentiated infrastructure.
The result works, but it's tightly coupled to one project — and the next one needs something slightly different.
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.
Semantic similarity search via pgvector with a dedicated HNSW index per collection (m=16, ef_construction=64). No noisy neighbors.
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.
Text, Code, Table, List, Image, Hyperlink, Binary, Meta, and Unknown — so your retrieval pipeline always knows what it's looking at.
Ordered document segments grouped by document_id + position. Reconstruct full documents or pull the neighbors around any match.
Categorical labels with boolean logic and structured tags queried through 10 operators — equals, contains, ranges, prefix/suffix, and null checks.
Deduplication, cache invalidation, and change detection out of the box — plus content length for token-budget awareness. No extra plumbing.
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.
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.
Tenants, users, credentials, and collections are fully scoped. One deployment serves many clients with complete data isolation between tenants.
No vendor lock-in. Use OpenAI, Cohere, Voyage, Ollama, or anything that outputs a float array. RecallDB stores and indexes them all the same.
Vector similarity, full-text relevance, or a hybrid blend — combined with labels, tags, terms, and date filters in a single compound query.
// Semantic similarity search using embeddings
{
"Vector": {
"SearchType": "CosineSimilarity",
"Embeddings": [0.1, 0.2, 0.3, ...],
"MinimumScore": 0.7
},
"LabelFilter": {
"Required": ["important"]
},
"IncludeNeighbors": 2,
"MaxResults": 10
}
// 5 metrics: cosine + euclidean (similarity
// or distance), plus inner product
// Ranked text search with stemming & stop words
{
"FullText": {
"Query": "OAuth2 PKCE configuration",
"SearchType": "TsRank",
"Language": "english",
"MinimumScore": 0.01
},
"SortOrder": "TextScoreDescending",
"MaxResults": 10
}
// Postgres ts_rank / ts_rank_cd relevance
// No embeddings needed — pure lexical search
// Best of both: semantic + lexical in one query
{
"Vector": {
"SearchType": "CosineSimilarity",
"Embeddings": [0.1, 0.2, 0.3, ...]
},
"FullText": {
"Query": "OAuth2 PKCE flow",
"TextWeight": 0.3
},
"MaxResults": 10
}
// Score = (1 - TextWeight) * vector
// + TextWeight * text_rank
5 metrics: cosine similarity, cosine distance, Euclidean similarity, Euclidean distance, and inner product. Set score or distance thresholds.
PostgreSQL ts_rank scoring with stemming, stop-word removal, and language support. TsRank or TsRankCd for term-proximity ranking.
Blend vector similarity and text relevance with a configurable weight. One query, both scoring models, unified ranking.
Boolean label filters, 10 tag operators, and case-insensitive substring matching backed by a trigram index. Compose with any search mode.
Pull up to 10 surrounding chunks for context, scope by CreatedBefore/After, and page through up to 1,000 results with continuation tokens.
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.
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.
The server auto-generates an OpenAPI spec with bearer security, tags, and license metadata — explore and generate clients without writing docs by hand.
Query document counts, unique documents, total content length, and label/tag totals per collection — and aggregate stats across every chunk of a document.
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.
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.
Bearer-token auth with admin and user scopes, optional SSL, and hard isolation between tenants, users, credentials, and collections.
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.
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.
Store knowledge-base articles, FAQ embeddings, and conversation history. Retrieve contextually relevant answers with compound filters on topic labels and recency.
Chunk PDFs, contracts, and reports with position tracking. Search thousands of documents with label-scoped vector queries and tag-based metadata filters.
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.
Store image embeddings, audio transcripts, and video descriptions alongside their raw content. Typed content categories let your pipeline handle each format correctly.
Ship AI features inside your product. Each customer gets a fully isolated tenant with its own collections, users, and credentials — one deployment, many clients.
Centralize organizational knowledge with rich metadata. Filter by department, access level, document type, and date range across semantic, full-text, or hybrid search.
Tenants, users, credentials, and collections are fully scoped.
Dedicated vector indexes with no noisy-neighbor problems.
Cosine, Euclidean, and inner product — similarity and distance variants.
Vector, full-text, and hybrid + labels + tags + terms + dates in one request.
OpenAI, Cohere, Voyage, Ollama, or any float array. No vendor lock-in.
Automatic request history with time-bucketed summaries for observability.
Manage tenants, collections, and documents visually with a query builder.
Drive the database from AI agents — 51 tools, no separate service.
OpenTelemetry across every path, exported to Prometheus, Tempo, Loki, and Grafana.
Postgres + pgvector, API server, dashboard, and observability stack in one command.
Typed clients for C#, Python, and JavaScript. Full CRUD and search with zero boilerplate — or hit the REST API directly.
$ 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
}'
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
});
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
})
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,
});
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.
$ 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.
$ 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.
$ 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.
recalldbadmin
admin@recall / password
default
localhost:8600
localhost:8601
RecallDB gives you a complete persistence and retrieval architecture out of the box — so you can focus on building the features that matter.