Self-hosting
Self-hosting overview
The components of an Agent Memory deployment, what each one needs, and which guide to follow next.
Agent Memory runs as a container image plus PostgreSQL and Redis. You can run it on a single VM with Docker Compose, on a container platform, or fully offline.
Components
HTTPS (your TLS terminator / load balancer)
│
▼
┌──────────────────── agent-memory image ───────────────────┐
│ API host (dotnet /app/api/AgentMemory.Api.dll, port 8080) │
│ /v1 REST · /v1/mcp · /app console · OAuth server │
│ background jobs: webhooks, retention, erasure, ingestion │
│ │
│ Console host (dotnet /app/console/AgentMemory.dll) │
│ --migrate (schema + roles) · service mode worker │
└────────────────────────────────────────────────────────────┘
│ │
▼ ▼
PostgreSQL 17 + pgvector Redis 7
agentmemory (control plane) caches, idempotency,
tenant_shared (tenant data) session memory
agentmemory_platform
│
▼ (optional)
LLM + embedding providers — Anthropic, OpenAI or any
OpenAI-compatible server (Ollama, vLLM), ONNX or hashing| Component | Role |
|---|---|
| API host | The default entrypoint of the image. Serves the REST API, the MCP endpoints, the web console (/app/), the built-in OAuth server, health endpoints and the downloadable SDK packages (/sdk/). Runs scheduled jobs: webhook dispatch, retention, erasure obligations and deferred ingestion effects. |
| Console host | The same image with a different entrypoint. --migrate creates databases, roles and schema. In service mode (Runtime:Mode=service) it runs the maintenance worker that consolidates idle runs. |
| PostgreSQL | With the pgvector extension (the pgvector/pgvector:pg17 image works). Three databases: the control plane (agentmemory), shared tenant data (tenant_shared) and platform memory (agentmemory_platform). Dedicated tenant databases can be added later. |
| Redis | Authorization cache, idempotency records, session memory and coordination. |
| Model providers | Optional. Without an LLM, fact extraction and summaries fall back to rule-based paths; without an embedding provider, a local hashing embedder is used. |
Requirements
- An x86-64 or arm64 host with Docker (or another OCI runtime).
- PostgreSQL 17 with
pgvector, and Redis 7. Managed services work as long as you can create roles and databases for the migration step. - A TLS-terminating proxy or load balancer in front of port 8080 for anything beyond local testing.
- For production: a certificate (base64 PKCS#12) to encrypt the key ring, and an authentication mode — the built-in OAuth server, an external OpenID Connect provider, or API-keys-only air-gapped mode.
Guides
Workspace settings
Tune retrieval, consolidation, screening, retention, learning and promotion per workspace or per organization, and how setting values are resolved.
Deployment
Build the Agent Memory image, run it with PostgreSQL and Redis using Docker Compose, apply migrations and create the first tenant and API key.