Included in every RetainDB plan

Context layer that keeps
your agents sharp

Production-ready context infrastructure for AI agents. Auto-sync from your codebase, docs, and data sources. Memory, retrieval, and knowledge assembled in one layer. Built for scale.

$20/month | 7-day trial (card required) | 5 minute setup

query.ts
import { RetainDB } from '@retaindb/sdk';

const context = await whisper.query({
  query: "How do we handle authentication?",
  includeMemories: true,  // User preferences
  includeGraph: true,     // Code relationships
});

// Context stays fresh automatically
console.log(context.answer);

Everything you need for AI state

Not just retrieval. A complete state system designed for production AI applications.

Auto-Sync

Connect 15+ data sources. GitHub, Notion, Slack, Discord, and more. Your context updates automatically when your data changes.

GitHubNotionSlack+12 more

Conversational Memory

Remember user preferences, facts, and context across sessions. Scoped per-user, per-session, or per-agent.

Knowledge Graphs

Understand code relationships. Which functions call what? What depends on this API? Graph traversal gives deeper context than vector search alone.

Hybrid Search

Vector similarity + BM25 ranking + optional reranking. Get the most relevant results every time.

Context Compression

Reduce token usage with smart compression. Save costs without losing context quality.

Multi-Tenant Ready

Built for SaaS. Isolate data per organization. Rate limiting, usage tracking, and webhooks included.

Three ways to integrate

Pick the method that fits your stack

REST API

Use from any language. Full OpenAPI spec available.

POST /v1/context/query
Authorization: Bearer wctx_...
View API Docs

SDK

Type-safe clients for JavaScript/TypeScript. Python & Go coming soon.

npm install @retaindb/sdk
SDK Documentation

MCP Server

Model Context Protocol for Claude Desktop. Zero configuration needed.

npx @retaindb/mcp-server
MCP Setup Guide

Built for production use cases

Developer Tools

Build AI coding assistants that understand your entire codebase. Index repos, traverse dependencies, answer questions about your architecture.

Code search and Q&A
Dependency graphs
Auto-generated docs

Customer Support Bots

Give your chatbot access to help docs, FAQs, and conversation history. Remember user preferences across sessions.

Knowledge base search
User memory & personalization
Multi-turn conversations

Research Assistants

Index research papers, build knowledge graphs of concepts, and keep everything up-to-date as new papers are published.

Paper search & summaries
Citation graphs
ArXiv auto-sync

Internal Knowledge Bases

Connect Notion, Confluence, Slack, and Google Docs. Make company knowledge searchable across all platforms.

Multi-source aggregation
Scheduled auto-sync
Organization-level isolation

How it works

Four layers that work together to give your AI the perfect context

1

Connect

Point to your GitHub repos, Notion pages, Slack channels, or any of 15+ data sources

2

Index

We chunk, embed, and build knowledge graphs automatically. Code relationships, entity extraction, all done.

3

Query

Hybrid search (vector + keyword) + knowledge graph traversal + conversation memory = best results

4

Stay Fresh

Auto-sync on git push, doc updates, or schedule. Your context is always current.

┌─────────────┐      ┌──────────────┐      ┌────────────┐      ┌──────────┐
│ Data Sources│─────▶│ Knowledge    │─────▶│   Hybrid   │─────▶│   Your   │
│  15+ types  │      │    Graph     │      │   Search   │      │  Agent   │
│             │      │ + Embeddings │      │+ Memories  │      │          │
└─────────────┘      └──────────────┘      └────────────┘      └──────────┘
  GitHub, Notion       Auto-indexed          Sub-50ms p95        Perfect
  Slack, Confluence    Real-time sync        context             answers
Production Performance

Fast enough for production

Real benchmarks from production workloads

~50ms
Vector Search p95
Including embedding generation
85%
Answer Accuracy
On LongMemEval benchmark
10x
Cost Savings
vs basic retrieval-only systems

Latency Breakdown

Cached Query
~10ms
Vector Search
~50ms
Hybrid Search + Rerank
~150ms
Oracle Research (Deep)
~2s
Enterprise-Grade Security

Built with security in mind

Your data stays yours. Always encrypted, isolated, and compliant.

Encryption at Rest

All data encrypted with AES-256. Keys managed via AWS KMS.

SOC 2 Type II

In progress. GDPR and CCPA compliant today.

Data Isolation

Multi-tenant architecture with complete org-level data isolation.

Regional Hosting

Choose US, EU, or Asia regions for data residency requirements.

SSO & RBAC

Enterprise SSO with Okta, Azure AD. Role-based access control.

Audit Logs

Complete audit trail of all API calls and data access.

Frequently asked questions

How does RetainDB differ from Pinecone or Weaviate?

Pinecone and Weaviate are vector databases. RetainDB is a complete memory and context layer that includes retrieval, memory management, connectors, and context assembly. Think of it as the full stack instead of only the database.

Can I use my own embedding models?

Yes! We support OpenAI, Cohere, and custom embedding endpoints. You can even bring your own vector database if you have a custom setup.

What's the pricing model?

RetainDB is $20/month. Your 7-day trial starts after you add a card, and you are charged automatically when the trial ends unless you cancel.

How do you handle rate limiting?

Rate limits are per API key. Pro includes 100K queries/month. Enterprise limits are custom.

Do you support on-premise deployment?

Not at this time. If you have strict requirements, reach out and we can discuss options.

What happens to my data if I cancel?

You get 30 days to export your data via API. After that, all data is permanently deleted. We can provide longer retention for Enterprise customers.

How we compare

RetainDB versus leading memory and context systems

12.5%
Hallucination Rate
vs Nia's 52.1%
92.5%
Context Relevance
vs Nia's 85.0%
98.2%
Memory Consistency
vs Nia's 90.0%
76%
Better Accuracy
than competition
FeatureRetainDBMem0Nia
Hallucination Rate12.5%~35%52.1%
Context Relevance92.5%~80%85.0%
Memory Consistency98.2%~85%90.0%
Knowledge GraphsLimited
Temporal ReasoningBasic
15+ Data ConnectorsLimited
Auto-SyncManualManual
Hybrid Search (Vector + BM25)Vector onlyVector only
Oracle Research Mode
Multi-Tenant ReadyBuild yourselfBuild yourself
Setup Time5 minutes1-2 days1-2 days

Benchmarks run on production workloads. See full benchmark results →

Start building with better context

Included in every RetainDB plan. No extra cost.

$20/month | Memory and context | Cancel anytime

RetainDB Security
Secure delivery for teams that ship fast
Platform
Overview
Pricing
Integrations
Automation
Roadmap
Company
About RetainDB
Security & Trust
Careers
Press
Contact
Resources
Docs & Guides
API Reference
Changelog
Status
Support
Privacy PolicyTerms of Service
Refund Policy (14 days)
SOC2
SOC 2 Type II
GDPR Compliant
256-bit Encryption
Zero Data Retention