# MindMemOS Deployment & Configuration Guide
## 1. Overview MindMemOS uses a `uv workspace` to manage three core Python packages, organized into server, client, and evaluation layers: ```text Applications / Agents ──────────────┐ Agent Plugins ───── CLI ─────────────┼──> mindmemos_sdk ── HTTP ──> mindmemos mindmemos_eval ──────────────────────┘ ``` - `mindmemos` is the core server-side algorithm package. It provides FastAPI endpoints, memory and Skill workflows, model calls, data persistence, and asynchronous tasks. - `mindmemos_sdk` provides the Python SDK and CLI for applications and plugins. It calls `mindmemos` over HTTP without depending on server internals. - `mindmemos_eval` is an independent evaluation package. It uses `mindmemos_sdk` to call the service, load datasets, run evaluations, and aggregate results. The main runtime-related directories are: ```text . ├── src/ │ ├── mindmemos/ # Core server package │ ├── mindmemos_sdk/ # Python SDK and mindmemos CLI │ └── mindmemos_eval/ # Benchmark evaluation tools ├── config/ │ ├── mindmemos/ # Server runtime and authentication configuration │ ├── mindmemos_eval/ # Evaluation task configuration │ └── presets/ # Algorithm preset resources ├── dockers/ # Qdrant, Neo4j, Kafka, and observability components ├── plugins/ # Agent plugin integrations ├── Makefile # Entry points for local services and dependencies └── pyproject.toml # uv workspace and development dependencies ``` The primary configuration entry points are: | Scope | Configuration File | Description | | --- | --- | --- | | `mindmemos` | `.env` | Docker dependencies, service ports, and connection addresses. | | `mindmemos` | `config/mindmemos/dev.yaml` | Server models, databases, pipelines, and runtime configuration. | | `mindmemos` | `config/mindmemos/api_keys.yaml` | API keys, `project_id`, memory algorithms, and access permissions. | | `mindmemos` | `config/presets/*.json` | Memory algorithm presets. | | `mindmemos_sdk` | `~/.mindmemos/settings.json` | SDK and CLI connection information and default user. | | `mindmemos_eval` | `config/mindmemos_eval/*.yaml` | Evaluation models, datasets, concurrency, and algorithm configuration. | ## 2. Minimal Startup Flow ```bash cp .env.example .env cp config/mindmemos/dev.example.yaml config/mindmemos/dev.yaml # Edit .env and config/mindmemos/dev.yaml, then start the service. make dev-setup make dev ``` Default addresses: - FastAPI: `http://127.0.0.1:8000` - API Docs: `http://127.0.0.1:8000/docs` - Qdrant: `http://localhost:6333` - Neo4j Browser: `http://localhost:7474` `make dev` starts the full Docker dependency stack before starting FastAPI. To start only core dependencies: ```bash make dev-core # Qdrant + Neo4j + Kafka make db-observability # Qdrant + Neo4j + Kafka + ClickHouse + OTel + Grafana ``` Stop local dependencies: ```bash make dev-down ``` ## 3. Required Environment Variables Configuration file selection: | Variable | Purpose | Default | | --- | --- | --- | | `MINDMEMOS_CONFIG_NAME` | Selects the configuration name; `dev` reads `config/mindmemos/dev.yaml`. | `dev` | | `MINDMEMOS_CONFIG_PATH` | Specifies a configuration file path directly; takes precedence over `MINDMEMOS_CONFIG_NAME` when set. | Empty | Qdrant: | Variable | Purpose | Default | | --- | --- | --- | | `MINDMEMOS_QDRANT_URL` | HTTP address used by FastAPI to access Qdrant. | `http://localhost:6333` | | `MINDMEMOS_QDRANT_HTTP_PORT` | Qdrant HTTP port exposed by Docker. | `6333` | | `MINDMEMOS_QDRANT_GRPC_PORT` | Qdrant gRPC port exposed by Docker; also overrides `database.qdrant.grpc_port` in the configuration. | `6334` | | `MINDMEMOS_QDRANT_PREFER_GRPC` | Whether the Qdrant client prefers gRPC. | `false` | | `MINDMEMOS_QDRANT_API_KEY` | Qdrant API key; can be left empty for an unauthenticated local setup. | Empty | | `MINDMEMOS_GRAFANA_QDRANT_URL` | HTTP address used by the Grafana container to access Qdrant. | `http://qdrant:6333` | Neo4j: | Variable | Purpose | Default | | --- | --- | --- | | `MINDMEMOS_NEO4J_URI` | Bolt address used by FastAPI to access Neo4j. | `bolt://localhost:7687` | | `MINDMEMOS_NEO4J_HTTP_PORT` | Neo4j Browser port exposed by Docker. | `7474` | | `MINDMEMOS_NEO4J_BOLT_PORT` | Neo4j Bolt port exposed by Docker. | `7687` | | `MINDMEMOS_NEO4J_USERNAME` | Neo4j username; also used as the username in Docker `NEO4J_AUTH`. | `neo4j` | | `MINDMEMOS_NEO4J_PASSWORD` | Neo4j password; also used as the password in Docker `NEO4J_AUTH`. | `mindmemos_dev_password` | Optional dependencies: | Variable | Purpose | Default | | --- | --- | --- | | `MINDMEMOS_KAFKA_BOOTSTRAP_SERVERS` | Kafka address; the service starts consumers/producers only when `kafka.enabled=true` in the configuration. | `localhost:9092` | | `MINDMEMOS_TELEMETRY_ENDPOINT` | OTel HTTP endpoint; telemetry is reported only when `telemetry.enabled=true` in the configuration. | `http://localhost:4318` | | `MINDMEMOS_CLICKHOUSE_USER` / `MINDMEMOS_CLICKHOUSE_PASSWORD` / `MINDMEMOS_CLICKHOUSE_DB` | ClickHouse/Grafana observability data configuration. | See `.env.example` | API bind address: | Variable | Purpose | Default | | --- | --- | --- | | `MINDMEMOS_API_HOST` | Host used by `make dev` / `make api` to start FastAPI. | `127.0.0.1` | | `MINDMEMOS_API_PORT` | Port used by `make dev` / `make api` to start FastAPI. | `8000` | ## 4. Docker Start local dependencies with: ```bash docker compose --env-file .env -f dockers/docker-compose.memory.yml up -d --wait qdrant neo4j kafka kafka-ui kafka-exporter ``` `make dev-core` starts Qdrant, Neo4j, Kafka, Kafka UI, and kafka-exporter. `make dev` starts the full Docker dependency stack before starting FastAPI. `make db` remains available as a compatibility entry point for the full dependency tier and is equivalent to `make db-observability`. Core services in Docker Compose: - `qdrant`: stores memory/entity/source vectors and payloads. - `neo4j`: stores graph relationships. - `kafka`: asynchronous task queue; it can run even when it is disabled in the default configuration. - `clickhouse` + `otel-collector` + `grafana`: observability stack; disable `telemetry.enabled` in the configuration when observability is not needed. For local deployment, the port variables in `.env` must align with the connection addresses in `config/mindmemos/dev.yaml`. At startup, environment variables also override the following configuration fields: - `database.qdrant.url` - `database.qdrant.api_key` - `database.qdrant.grpc_port` - `database.qdrant.prefer_grpc` - `database.neo4j.uri` - `database.neo4j.username` - `database.neo4j.password` - `kafka.bootstrap_servers` - `telemetry.telemetry_endpoint` ## 5. LLM Configuration LLMs are used for memory extraction, schema processing, dreaming, and other generation tasks. Configure `chat_model_router`: ```yaml chat_model_router: routing_strategy: simple-shuffle endpoints: - model: openai/gpt-4.1-mini api_key: your-api-key api_base: https://your-base-url/v1 timeout: 1200 temperature: 0.0 num_retries: 3 extra_body: {} ``` Notes: - `model` uses LiteLLM-style model names. OpenAI-compatible endpoints usually use `openai/