Agent Memory
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
ComponentRole
API hostThe 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 hostThe 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.
PostgreSQLWith 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.
RedisAuthorization cache, idempotency records, session memory and coordination.
Model providersOptional. 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

On this page