Server, embedding, extraction, and CLI/admin runtime variables.
| Variable | Required | Default | Description |
|---|
DATABASE_URL | yes | | PostgreSQL connection string. |
OPENAI_API_KEY | conditional | | Required when OpenAI embeddings are used or OpenAI extraction is enabled. |
PORT | no | 3100 | HTTP/MCP server port. |
LOG_LEVEL | no | info | Logger level (fatal/error/warn/info/debug). |
ENRICHMENT_POLL_INTERVAL_MS | no | 1000 | Enrichment worker polling interval. |
| Variable | Required | Default | Description |
|---|
EMBEDDING_PROVIDER | no | openai | openai or ollama. |
EMBEDDING_MODEL | no | per provider | Defaults: text-embedding-3-small (OpenAI), bge-m3 (Ollama). |
EMBEDDING_DIMENSIONS | no | per provider | Must match active embedding_models entry. |
EMBEDDING_BASE_URL | when ollama | OLLAMA_BASE_URL fallback | Embedding host (can be different from LLM host). |
EMBEDDING_API_KEY | no | | Optional bearer token for embedding endpoint. |
| Variable | Required | Default | Description |
|---|
EXTRACTION_ENABLED | no | false | Toggle extraction pass. |
EXTRACTION_PROVIDER | no | openai | openai, anthropic, ollama, openai-compatible. |
EXTRACTION_MODEL | no | per provider | Controls model used by extraction worker. |
EXTRACTION_AUTO_CREATE_ENTITIES | no | false | Auto-create entity stubs referenced by extracted text. |
EXTRACTION_AUTO_CREATE_TYPES | no | person,project,interaction | Allowed entity types for auto-create. |
EXTRACTION_AUTO_CREATE_MIN_CONFIDENCE | no | 0.7 | Min confidence threshold for auto-create. |
EXTRACTION_SEMANTIC_NEIGHBORS_ENABLED | no | false | Enable semantic-neighbor graph pass. |
EXTRACTION_SEMANTIC_NEIGHBORS_MAX | no | 10 | Max neighbors per entity. |
EXTRACTION_SEMANTIC_NEIGHBORS_MIN_SIMILARITY | no | 0.65 | Similarity threshold for semantic neighbor links. |
EXTRACTION_BASE_URL | when compatible provider | | OpenAI-compatible base URL including /v1 if needed. |
EXTRACTION_API_KEY | no | | Optional bearer token for compatible extraction endpoint. |
ANTHROPIC_API_KEY | when anthropic | | Anthropic API key. |
OLLAMA_BASE_URL | no | http://localhost:11434 | Ollama endpoint. |
LLM_REQUEST_TIMEOUT_MS | no | 120000 | Per-call timeout in milliseconds. |
| Variable | Required | Description |
|---|
PGM_API_URL | yes | API URL used by pgm. |
PGM_API_KEY | yes | API key for user operations. |
DATABASE_URL or PGM_DATABASE_URL | admin | DB access for pgm-admin. |
PGM_BACKUP_PASSPHRASE | when encrypt | Passphrase for encrypted backups. |
- For Docker + host-hosted Ollama, prefer
http://host.docker.internal:11434.
- The semantic-neighbor feature creates edges with
source='semantic-neighbor'.