Browse docs

Getting Started
Tap to expand
StartUpdated 2026-05-30

Introduction

RetainDB gives AI agents memory, a company brain, and clean agent access through MCP or HTTP.

RetainDB helps AI agents stop starting from zero.

Use it to give your product three things:

  1. Company Brain: connected sources such as docs, repos, files, web pages, and team tools that agents can query with citations.
  2. Memory: durable user, session, and agent facts that survive across conversations and runs.
  3. Agent Access: MCP and HTTP surfaces so Claude, Cursor, Codex, backends, jobs, and custom agents can read and update the right context.

Pick The Right Start

I want toStart hereBest surface
Connect company knowledge for agentsBuild a Company BrainDashboard, MCP, /v1/context
Let Claude/Cursor/Codex read RetainDBConnect AgentsMCP first, HTTP when needed
Add user memory to an AI app5 Minute QuickstartSDK v5
Use RetainDB from any runtimeRaw HTTP QuickstartREST API
Share state across planner/builder/reviewer agentsAgent task APISDK or Agent Memory API
Add RetainDB to a Next.js appNext.js integrationserver route

Mental Model

RetainDB separates knowledge by what it is for.

LayerWhat it storesRead it with
Company Braindocuments, repos, URLs, files, source-derived memories, citationsPOST /v1/context, MCP context, agent filesystem
User memorypreferences, facts, goals, support historySDK db.user(...).getContext(), /v1/memory/search
Session memorycurrent conversation or workflow stateSDK session helpers, /v1/memory/search
Agent memorydecisions, tool results, failures, handoffsSDK agent helpers, MCP agent tools, Agent Memory API

Do not put every piece of data into every layer. Good RetainDB integrations keep company knowledge, user memory, and agent task state separate, then retrieve only what the current model call needs.

The First Five Minutes

For most teams, the best first run is:

  1. Create or choose a project.
  2. Connect one trustworthy source.
  3. Ask the company brain a question in the dashboard.
  4. Connect one agent through MCP.
  5. Verify the answer includes the right source context.

That path proves the product loop before you spend time on billing, advanced connectors, SDK abstractions, or custom orchestration.

What Production-Ready Feels Like

A good RetainDB setup has these properties:

  • agents can answer from connected company knowledge without pasted transcripts
  • user memory is scoped to the authenticated user, not guessed from prompts
  • source sync state is visible before agents rely on it
  • answers expose citations, source names, or trace IDs
  • API keys stay server-side
  • failed syncs and empty searches produce clear next actions

Core URLs

SurfaceURL or route
API base URLhttps://api.retaindb.com
Ask Company BrainPOST /v1/context
Read agent filesystemGET /v1/context/files
Manage sourcesGET /v1/sources, POST /v1/sources, PATCH /v1/sources/:id, DELETE /v1/sources/:id
Memory searchPOST /v1/memory/search
Agent eventsPOST /v1/agent/memory/events

Next

Start with Build a Company Brain, or jump to Connect Agents if your sources already exist.

Was this page useful?

Your feedback helps us make the product easier to ship with.