What is CortexDB?
The long-term memory layer for AI agents — durable memory, connected context, and practical ways to integrate memory into real workflows.
CortexDB is the long-term memory layer for AI agents.
It helps teams give agents and AI applications durable memory, connected context, and practical ways to integrate memory into real workflows.
Whether you are building an internal copilot, a support assistant, an engineering knowledge layer, or a companion-style application, CortexDB is designed to help memory become a first-class part of the product.
Self-hosting is the recommended way to run CortexDB
Run the same server the cloud runs, on your own infrastructure — your data never leaves your network,
and there's no per-token cost. Start with the Self-Hosting Quickstart:
one docker run to a stored-and-recalled memory. A managed cloud is also available if you'd rather not
operate the server.
Why CortexDB?
AI systems often struggle with continuity. They lose context between sessions, forget important prior decisions, and cannot easily draw from the full working memory of a team, product, or organization.
Teams use CortexDB when they want to:
- give agents durable memory beyond a single conversation
- connect knowledge across tools like Slack, GitHub, and Jira
- provide richer context to workflows, copilots, and assistants
- support multi-tenant and enterprise use cases
- make memory accessible through SDKs, APIs, and MCP-compatible tools
Key advantages
- Self-hosted first — run the full server yourself with one
docker run; your data and embeddings stay in your infrastructure. A managed cloud is also available. - Built for AI memory — designed around memory workflows: storing context, retrieving it later, and connecting related information across sessions.
- Integration ready — use CortexDB with popular agent frameworks, SDKs, connectors, and MCP-compatible tools.
- Connected context — work with relationships, history, and related context instead of isolated text fragments.
- Operational workflows — power developer tools, support workflows, research assistants, copilots, and customer-facing AI products from one memory layer.
- Multi-tenant and governed — organize memory by tenant, team, or application and support enterprise operational requirements.
How CortexDB fits into your stack
CortexDB sits between your applications and the knowledge they need to retain and retrieve. It commonly works with application events and user interactions; chat, ticketing, and collaboration systems; code and engineering systems; agent frameworks and orchestration layers; and API/SDK/MCP tool environments.
Connect → Capture → Retrieve → Operate: connect via SDKs, APIs, connectors, or MCP; capture the interactions, events, documents, and decisions your AI system should remember; retrieve relevant context during prompts, workflows, and agent runs; operate as part of production AI systems that need persistent memory and cross-tool context.
Integrations and connectors
CortexDB ships 31 integration recipes and 18 connectors across the AI ecosystem. Inference-backend guides are deployment-configuration pages for self-hosted and enterprise deployments, not adoption integrations.
- Agent Frameworks (22) — LangChain · LangGraph · LlamaIndex · CrewAI · AG2 (AutoGen) · AutoGen · Agno · DSPy · Smolagents · CAMEL-AI · PydanticAI · OpenAI Agents · Google ADK · Letta · BeeAI · NeMo Guardrails · Instructor · ControlFlow · Eliza OS · Hermes · OpenClaw · Mastra
- Orchestration (6) — Temporal · n8n · Prefect · Airflow · Zapier · Make.com
- No-Code Platforms (3) — Vercel AI SDK · Flowise · Dify
- Inference Backends (6) — Ollama · Groq · Together AI · Fireworks AI · vLLM · DeepInfra
- Data Connectors (18) — Slack · GitHub · GitLab · Jira · Freshdesk · tl;dv · Linear · Confluence · Notion · PagerDuty · Discord · Microsoft Teams · Google Workspace · Salesforce · HubSpot · Zendesk · Intercom · ServiceNow
Every connector runs self-hosted against your own instance with the cortexdb-sync CLI (a managed
sync worker is also available). See Connectors.
Access surfaces
| Artifact | Install package / command | Import or executable |
|---|---|---|
| Python SDK | pip install cortexdbai | from cortexdb.v1 import V1Client |
| TypeScript SDK | npm install cortexdbai | import { V1Client } from "cortexdbai/v1" |
| CLI | pip install cortexdb-cli | cortexdb |
| MCP server | pip install cortexdb-mcp | cortexdb-mcp |
| REST API | none | http://localhost:3141 (self-hosted) · https://api-v1.cortexdb.ai (cloud) |
The install package names are intentionally artifact-specific: cortexdbai for the SDKs,
cortexdb-cli for the CLI, and cortexdb-mcp for MCP clients.
Quick example
Against a self-hosted dev server on localhost:3141 started with
CORTEX_INSECURE_NO_AUTH=1 — no token required (on a keyed server, pass bearer=):
from cortexdb.v1 import V1Client
# Dev server started with CORTEX_INSECURE_NO_AUTH=1 — no bearer needed.
# On a keyed server: bearer=os.environ["CORTEX_API_KEY"].
client = V1Client(api_url="http://localhost:3141", actor="user:local")
scope = "org:demo/user:local"
# Capture an experience
client.experience(
scope=scope,
text="We decided to migrate from PostgreSQL to CockroachDB for the payments service. Timeline is Q2 2026.",
observed_at="2026-05-16T10:42:00Z",
idempotency_key="decision-payments-001",
wait="indexed",
)
# Recall a stratified pack (events + episodes + facts + beliefs + understanding)
pack = client.recall(
scope=scope,
query="What database are we using for payments?",
view="holistic",
include=["events", "beliefs", "facts", "episodes"],
)
print(pack.get("context_block", ""))Using the managed cloud instead? Point api_url at https://api-v1.cortexdb.ai and pass a token from
/v1/auth/signup — see the Python Quickstart.
Next steps
- Self-Hosting Quickstart — start here: one
docker runto a running server. - Python Quickstart · TypeScript Quickstart — the SDKs against your instance.
- Integrations — CortexDB in popular agent and application frameworks.
- REST API — direct HTTP reference with curl examples.