# RetainDB Docs RetainDB is hosted memory infrastructure for AI apps and agentic systems. Use these docs to integrate user memory, session memory, Agent Memory Bus, Memory Router v1, MCP tools, and the RetainDB API. ## Start here - Introduction: https://www.retaindb.com/docs/intro - 5 minute quickstart: https://www.retaindb.com/docs/start/5-minute-quickstart - SDK quickstart: https://www.retaindb.com/docs/sdk/quickstart - Agent Memory Bus: https://www.retaindb.com/docs/agent-memory-bus - Memory Router v1: https://www.retaindb.com/docs/sdk/memory-router - MCP setup: https://www.retaindb.com/docs/mcp/setup-tools ## All pages - Agent Memory Bus: Shared hosted memory for agentic systems, task context, and handoffs. https://www.retaindb.com/docs/agent-memory-bus - Agent Memory Bus API: REST routes for agent events, context bundles, handoffs, and handoff resume. https://www.retaindb.com/docs/api/agent-memory-bus - Authentication: Authenticate RetainDB API requests with server-side API keys. https://www.retaindb.com/docs/api/authentication - Context Query API: Retrieve project knowledge from indexed sources through the RetainDB API. https://www.retaindb.com/docs/api/context-query - Errors: RetainDB API error shape, status codes, and debugging practices. https://www.retaindb.com/docs/api/errors - Memory API: Write, search, update, and delete RetainDB memories over HTTP. https://www.retaindb.com/docs/api/memory - Memory Model: The core RetainDB concepts for user memory, sessions, agents, tasks, and project knowledge. https://www.retaindb.com/docs/concepts/memory-model - Memory Quality: How to make RetainDB memory useful instead of noisy. https://www.retaindb.com/docs/concepts/quality - Scopes: How project, user, session, agent, and task scopes keep RetainDB memory isolated and useful. https://www.retaindb.com/docs/concepts/scopes - Contributing: How to update RetainDB public docs. https://www.retaindb.com/docs/contributing - Dashboard Overview: Use the RetainDB dashboard for keys, projects, usage, and team operations. https://www.retaindb.com/docs/dashboard/overview - Next.js Integration: Use RetainDB from a server-side Next.js route. https://www.retaindb.com/docs/integrations/nextjs - OpenAI-Compatible Chat: Add RetainDB memory to OpenAI-compatible chat providers. https://www.retaindb.com/docs/integrations/openai-compatible - Introduction: RetainDB is hosted memory infrastructure for AI apps and agentic systems. https://www.retaindb.com/docs/intro - Agent Host Setup: Setup snippets for Claude Code, Codex, Cursor, OpenCode, Windsurf, Cline, and generic MCP clients. https://www.retaindb.com/docs/mcp/agent-hosts - MCP Setup: Connect RetainDB to MCP clients and expose shared memory tools to agents. https://www.retaindb.com/docs/mcp/setup-tools - Release Checklist: Checklist for shipping RetainDB integrations safely. https://www.retaindb.com/docs/operations/release-checklist - Troubleshooting: Fix the most common RetainDB integration issues quickly. https://www.retaindb.com/docs/operations/troubleshooting - Agent Task API: Use SDK v5 to record agent events, retrieve task context, and create handoffs. https://www.retaindb.com/docs/sdk/agent-task-api - Memory Router v1: Inject RetainDB memory into OpenAI-compatible chat calls with best-effort fallback. https://www.retaindb.com/docs/sdk/memory-router - SDK v5 Migration: Move to RetainDB SDK v5 names and the Agent Memory Bus API. https://www.retaindb.com/docs/sdk/migration-v5 - SDK Quickstart: Use RetainDB SDK v5 for user memory, session memory, agent tasks, and Memory Router. https://www.retaindb.com/docs/sdk/quickstart - User and Session Memory: Store, retrieve, and manage memory for users and conversations with SDK v5. https://www.retaindb.com/docs/sdk/user-session-memory - 5 Minute Quickstart: Build a user memory chat loop with RetainDB SDK v5 and an OpenAI-compatible model. https://www.retaindb.com/docs/start/5-minute-quickstart - Auth and Caller Model: How RetainDB authenticates API requests and scopes memory calls. https://www.retaindb.com/docs/start/auth-caller-model - Raw HTTP Quickstart: Write and search memory with curl against the RetainDB API. https://www.retaindb.com/docs/start/http-quickstart - Build a Multi-Agent Handoff: Record planner decisions and hand context to a builder agent with Agent Memory Bus. https://www.retaindb.com/docs/tutorials/multi-agent-handoff - Build a User Memory Chatbot: A complete server-side chat loop that retrieves and stores RetainDB user memory. https://www.retaindb.com/docs/tutorials/user-memory-chatbot