CortexDB · docs

CortexDB

The long-term memory platform for AI systems.

CortexDB gives agents and applications durable, scoped memory with hybrid retrieval, grounded answers, optional derived artifacts, and SDK/connectors for production workflows.

Quick start with Docker

Download CortexDB from the customer portal, https://customer.cortexdb.ai (Releases), with your company's license: the image file for your platform, cortexdb-<version>-image-linux-<arch>.tar.gz (amd64 or arm64), and the .sha256 beside it. Check the file and load it; it loads as cortexdb/cortexdb:v<version>:

sha256sum -c cortexdb-0.16.1-image-linux-amd64.tar.gz.sha256
docker load -i cortexdb-0.16.1-image-linux-amd64.tar.gz

There is no public image to pull. For a host without Docker, the same page has the binary, cortexdb-<version>-linux-<arch>.tar.gz (Production deployment).

The image uses OpenAI embeddings by default. Set an embedding API key, a strong CortexDB API key and your license before starting it (the server keeps the license in its data directory and renews it):

export OPENAI_API_KEY="..."
export CORTEX_API_KEY="$(openssl rand -hex 32)"
export CORTEX_LICENSE='...'

docker run -d \
  --name cortexdb \
  --restart unless-stopped \
  -p 127.0.0.1:3141:3141 \
  -v cortexdb-data:/data \
  -e OPENAI_API_KEY \
  -e CORTEX_API_KEY \
  -e CORTEX_LICENSE \
  cortexdb/cortexdb:v0.16.1

--restart unless-stopped lets Docker bring the server back after the admin console's Restart button (it exits so the supervisor can relaunch it with new settings) or a crash; without a restart policy the container stays stopped. Binding the host port to 127.0.0.1 keeps this local by default. The explicit CORTEX_API_KEY makes the bearer stable across restarts; data routes reject missing or incorrect credentials, including a request that carries only an X-Cortex-Actor header. Omitting the key does not just relax that — on a network-reachable bind the server generates one and prints it to the log, and on loopback it accepts any actor the caller names. See Authentication postures. The liveness and readiness endpoints remain public:

curl http://localhost:3141/v1/admin/health
curl http://localhost:3141/v1/admin/ready

Capture and recall a first memory:

curl --fail-with-body -X POST 'http://localhost:3141/v1/experience?wait=indexed' \
  -H "Authorization: Bearer $CORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "ws:demo",
    "modality": "observation",
    "content": {
      "kind": "text",
      "text": "Alice deployed payments-service v3.1 to production."
    },
    "idempotency_key": "quickstart-deploy-v31"
  }'

curl --fail-with-body -X POST http://localhost:3141/v1/recall \
  -H "Authorization: Bearer $CORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": "ws:demo",
    "query": "What happened to payments-service?",
    "budgets": { "max_tokens": 1500 }
  }'

The Docker image fails closed when its configured embedding provider lacks credentials. To use a different embedding provider, configure its URL, model, dimensions, and key as described in the deployment documentation. The mock embedding provider is suitable only for plumbing tests, not meaningful retrieval.

The default /v1/answer route uses Anthropic and requires ANTHROPIC_API_KEY. Capture and recall do not require that key.

Python SDK

pip install cortexdbai
import os
from cortexdb import Cortex

with Cortex(
    "http://localhost:3141",
    bearer=os.environ["CORTEX_API_KEY"],
) as cortex:
    cortex.experience(
        "ws:demo",
        text="Alice deployed payments-service v3.1 to production.",
        wait="indexed",
    )
    pack = cortex.recall(
        "ws:demo",
        query="What happened to payments-service?",
    )
    print(pack["context_block"])

Core workflows

CortexDB is built around a few simple memory operations:

These workflows can be used directly through SDKs and APIs or embedded into agent frameworks and MCP tools.

Framework integrations

CortexDB is designed to work with the tools teams already use to build AI systems, including integrations for frameworks such as:

See the docs site for integration-specific setup and examples.

Connectors

CortexDB can be used alongside common organizational systems so agents have access to operational and business context.

Current connector coverage includes:

MCP server

CortexDB can also be exposed through an MCP server so MCP-compatible agents and tools can use memory operations as native capabilities.

Typical MCP-enabled workflows include:

Deployment options

CortexDB supports multiple ways of getting started and operating in production:

A cluster starts only through cortexdb node. On plain cortexdb the old cluster flags (--node-id other than 1, --rpc-addr, --gossip-addr, --seed-nodes, --peers, --rf, and their CORTEX_CLUSTER_* environment forms) still exit 78 with code=CLUSTER_MODE_UNSUPPORTED. --node-id=1 / CORTEX_NODE_ID=1 alone are exempt.

For deployment guidance, see the docs site and Docker examples in this repository.

Local Docker deployment + live validation

The repository includes a no-mocks Docker validation matrix that builds the local image, starts real single-node containers for core, startup, growth, enterprise, and custom, and runs live tests against them.

Run it from the repository root with: The official npm package is also named cortexdbai:

npm install cortexdbai

Linux binaries

Download the archive for your platform, cortexdb-<version>-linux-<arch>.tar.gz, from the customer portal, https://customer.cortexdb.ai (Releases), with your company's license. Verify the archive against its adjacent .sha256 file before extracting it. The archive includes the binary, required assets, license, and operator docs. The tarballs are dynamically linked for an Ubuntu 24.04-class userspace: glibc 2.39 or newer and the OpenSSL 3 runtime (libssl.so.3) must be installed. Use the image file from the same page when that host ABI is unavailable.

Core operations

All data is scoped. Use separate tenant/workspace paths and signed authorization for multi-tenant deployments.

Operations

CortexDB persists data under /data in the container. Use a named volume, monitor /v1/admin/ready, and take verified backups before upgrades or before enabling new durable artifact features.

License

CortexDB v0.9.10 and its coordinated client releases are distributed under the Apache License 2.0. The license included with each older archive governs that version.