selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

atomicmemory logo

Self-host atomicmemory

cli-v0.4.0

Portable semantic memory engine for AI agents

ReleaseOpen SourceOther
Updated4 months ago
LanguageTypescript
Setup difficultyModerate
Stars
440
Port
17350 (Core API server)
Requires
Postgres with pgvector
Docker
ghcr.io/atomicstrata/atomicmemory-core

What is atomicmemory?

AtomicMemory offers durable, inspectable memory systems for AI applications. It extracts structured facts from conversations, detects contradictions during ingestion, and uses hybrid retrieval combining vector similarity with BM25 full-text search. The system tracks temporal claim versions through supersession operations. Deployment options include managed Hosted Cloud or self-hosted Core via Docker on local machines. Open-source under Apache-2.0 with TypeScript SDK and framework adapters available.

Should you self-host atomicmemory?

atomicmemory scores 54/100 on selfhost.directory (how scoring works) and ranks #35 of 125 in AI. It has 440 GitHub stars.

It shipped 5 stable releases in the past year. The latest, cli-v0.4.0, came out on 30 September 2026. New versions land roughly every 2 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Other-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is supermemory (73/100, 31 447 stars). It scores higher overall, so compare the two before you pick. See atomicmemory vs supermemory side by side.

atomicmemory README

How to configure atomicmemory

  • ADAPTIVE_AGGREGATION_LIMIT
  • ADAPTIVE_COMPLEX_LIMIT
  • ADAPTIVE_MEDIUM_LIMIT
  • ADAPTIVE_MULTI_HOP_LIMIT
  • ADAPTIVE_SIMPLE_LIMIT
  • ALLOWED_ORIGINS
  • ANTHROPIC_API_KEY
  • ATOMICMEMORY_API_KEY
  • ATOMICMEMORY_API_URL
  • ATOMICMEMORY_RUN_MIGRATIONS_ON_STARTUPDocker entrypoint only: set false when migrations run from a separate pre-deploy job. Defaults to true when omitted.

    Docker entrypoint only: set false when migrations run from a separate pre-deploy job. Defaults to true when omitted.

  • AUDN_JSON_SCHEMAfalse keeps OpenAI-compatible requests on response_format=json_object.

    false keeps OpenAI-compatible requests on response_format=json_object.

  • AUDN_MAX_TOKENS
  • CLOUD_JWKS_URLOptional: verify Cloud-issued RS256 JWTs for connected-local console access. JWKS_URL + ISSUER + AUDIENCE must be set together; when unset, only CORE_API_KEY is accepted.

    Optional: verify Cloud-issued RS256 JWTs for connected-local console access. JWKS_URL + ISSUER + AUDIENCE must be set together; when unset, only CORE_API_KEY is accepted.

  • CLOUD_JWT_AUDIENCE
  • CLOUD_JWT_ISSUER
  • CLOUD_JWT_LEGACY_DEFAULT_MEMORY_USER_IDTemporary compatibility setting when the issuer omits memory_user_id:

    Temporary compatibility setting when the issuer omits memory_user_id:

  • CLOUD_JWT_STATIC_KEY_FALLBACKOptional — when false (default), CORE_API_KEY is rejected once JWT verify is enabled.

    Optional — when false (default), CORE_API_KEY is rejected once JWT verify is enabled.

  • CLOUD_PROJECT_IDOptional project binding. When set, tokens for other projects are rejected. When omitted (single-key local), Core trusts the token's own project_id.

    Optional project binding. When set, tokens for other projects are rejected. When omitted (single-key local), Core trusts the token's own project_id.

  • CLOUD_TRACE_SYNC_BASE_RETRY_MS
  • CLOUD_TRACE_SYNC_BATCH_SIZE
  • CLOUD_TRACE_SYNC_CLAIM_STALE_MS
  • CLOUD_TRACE_SYNC_DEAD_LETTER_RETENTION_MS
  • CLOUD_TRACE_SYNC_ENABLED--- Optional Cloud trace sync (OSS Core → Cloud observability) --- Disabled when all vars are absent, or when CLOUD_TRACE_SYNC_ENABLED=false. Partial configuration (some vars set without ENABLED=true) fails startup.

    --- Optional Cloud trace sync (OSS Core → Cloud observability) --- Disabled when all vars are absent, or when CLOUD_TRACE_SYNC_ENABLED=false. Partial configuration (some vars set without ENABLED=true) fails startup.

  • CLOUD_TRACE_SYNC_MAX_ATTEMPTS
  • CLOUD_TRACE_SYNC_MAX_PENDING
  • CLOUD_TRACE_SYNC_MAX_RETRY_MS
  • CLOUD_TRACE_SYNC_POLL_INTERVAL_MS
  • CLOUD_TRACE_SYNC_SENT_RETENTION_MS
  • CLOUD_TRACE_SYNC_SHUTDOWN_DRAIN_MS
  • CODEX_AUTH_PATHOptional: defaults to CODEX_HOME/auth.json or ~/.codex/auth.json.

    Optional: defaults to CODEX_HOME/auth.json or ~/.codex/auth.json.

  • CORE_ADMIN_API_KEYOptional admin-only cleanup endpoint for disposable smoke/eval scopes. When both values are set, DELETE /v1/admin/scope accepts a JSON body `{ "user_id": "..." }` and deletes only matching test scopes. Use a different secret from CORE_API_KEY. Do not enable for general clients.

    Optional admin-only cleanup endpoint for disposable smoke/eval scopes. When both values are set, DELETE /v1/admin/scope accepts a JSON body `{ "user_id": "..." }` and deletes only matching test scopes. Use a different secret from CORE_API_KEY. Do not enable for general clients.

  • CORE_API_KEY--- Core API auth --- Shared API key clients must send as `Authorization: Bearer <key>`. Rotate by restarting the server with a new value. Generate with: openssl rand -hex 32 Docker image local mode: auto-generated and persisted to $CORE_STATE_DIR/core-api-key (default /var/lib/atomicmemory/state/core-api-key) when omitted. Required in production/staging (RAW_STORAGE_DEPLOYMENT_ENV).

    --- Core API auth --- Shared API key clients must send as `Authorization: Bearer <key>`. Rotate by restarting the server with a new value. Generate with: openssl rand -hex 32 Docker image local mode: auto-generated and persisted to $CORE_STATE_DIR/core-api-key (default /var/lib/atomicmemory/state/core-api-key) when omitted. Required in production/staging (RAW_STORAGE_DEPLOYMENT_ENV).

  • CORE_INSTANCE_ID
  • CORE_RUNTIME_CONFIG_MUTATION_ENABLED--- Runtime config mutation (dev/test only) --- Opt-in gate for PUT /memories/config. Leave unset in production — the route returns 410 Gone unless this is true. See https://docs.atomicstrata.ai/platform/consuming-core.

    --- Runtime config mutation (dev/test only) --- Opt-in gate for PUT /memories/config. Leave unset in production — the route returns 410 Gone unless this is true. See https://docs.atomicstrata.ai/platform/consuming-core.

  • CORE_TEST_SCOPE_ALLOW_PATTERN
  • DATABASE_URLpostgresql://atomicmemory:atomicmemory@localhost:5433/atomicmemory--- Database --- Docker image users can omit DATABASE_URL, or set DATABASE_URL=embedded, to use the bundled single-container Postgres/pgvector instance. Source checkouts and production deployments should set a real Postgres connection string.

    --- Database --- Docker image users can omit DATABASE_URL, or set DATABASE_URL=embedded, to use the bundled single-container Postgres/pgvector instance. Source checkouts and production deployments should set a real Postgres connection string.

  • EMBEDDING_API_KEY
  • EMBEDDING_API_URL
  • EMBEDDING_DIMENSIONS1536Required — must match the actual output dimensions of your embedding model. mxbai-embed-large=1024, text-embedding-3-small=1536, Voyage 4=1024 Docker image local mode defaults this to `1536` when omitted.

    Required — must match the actual output dimensions of your embedding model. mxbai-embed-large=1024, text-embedding-3-small=1536, Voyage 4=1024 Docker image local mode defaults this to `1536` when omitted.

  • EMBEDDING_MODEL
  • EMBEDDING_PROVIDER--- Embedding ---

    --- Embedding ---

  • EXTRACTION_MAX_TOKENSDecode caps are whole safe positive integers (default 4096 / 2048; max 8192 / 4096). Not overridable via request config_override.

    Decode caps are whole safe positive integers (default 4096 / 2048; max 8192 / 4096). Not overridable via request config_override.

  • EXTRACTION_PROMPT_VARIANT--- Extraction / AUDN (SLM latency) --- Default `full` keeps the complete extraction contract. `compact` is a reduced-capability opt-in for local SLM *extraction* only. It records user-stated facts only and omits: - assistant recommendations / advice - contact-info, named-entity, and date guarantees from the full prompt - short-input retention rules - headline, keywords, entities, relations, and i

    --- Extraction / AUDN (SLM latency) --- Default `full` keeps the complete extraction contract. `compact` is a reduced-capability opt-in for local SLM *extraction* only. It records user-stated facts only and omits: - assistant recommendations / advice - contact-info, named-entity, and date guarantees from the full prompt - short-input retention rules - headline, keywords, entities, relations, and i

  • GOOGLE_API_KEY
  • GROQ_API_KEYRequired only for the matching provider selections:

    Required only for the matching provider selections:

  • LISTEN_HOSTOptional bind address. Unset keeps Node's all-interfaces default (hosted/Docker). The macOS embedded launcher sets 127.0.0.1. Do not use HOST — it collides with the system hostname on many platforms.

    Optional bind address. Unset keeps Node's all-interfaces default (hosted/Docker). The macOS embedded launcher sets 127.0.0.1. Do not use HOST — it collides with the system hostname on many platforms.

  • LITERAL_LIST_PROTECTION_ENABLED
  • LITERAL_LIST_PROTECTION_MAX_PROTECTED
  • LLM_API_KEY
  • LLM_API_URL
  • LLM_MODEL
  • LLM_PROVIDER--- LLM ---

    --- LLM ---

  • MIGRATION_LOCK_TIMEOUT_MSDocker entrypoint only: forwarded to `migrate({ lockTimeoutMs })`. Increase for rolling deploys where another replica may hold the migration lock.

    Docker entrypoint only: forwarded to `migrate({ lockTimeoutMs })`. Increase for rolling deploys where another replica may hold the migration lock.

  • OBSERVATION_DATE_EXTRACTION_ENABLED
  • OFFLINE_MODE--- Offline Personal profile (Radar C5) --- When OFFLINE_MODE=true, startup rejects any EMBEDDING_PROVIDER that makes external network calls (openai, voyage, openai-compatible). Use with EMBEDDING_PROVIDER=transformers or EMBEDDING_PROVIDER=ollama to guarantee zero external network calls. See docs/OFFLINE.md for the full profile.

    --- Offline Personal profile (Radar C5) --- When OFFLINE_MODE=true, startup rejects any EMBEDDING_PROVIDER that makes external network calls (openai, voyage, openai-compatible). Use with EMBEDDING_PROVIDER=transformers or EMBEDDING_PROVIDER=ollama to guarantee zero external network calls. See docs/OFFLINE.md for the full profile.

  • OLLAMA_BASE_URL
  • OPENAI_API_KEY--- Provider credentials --- Required when either EMBEDDING_PROVIDER=openai or LLM_PROVIDER=openai.

    --- Provider credentials --- Required when either EMBEDDING_PROVIDER=openai or LLM_PROVIDER=openai.

  • PORT17350--- Server ---

    --- Server ---

  • QUOTED_ENTITY_EXTRACTION_ENABLED
  • RAW_CONTENT_CODEC
  • RAW_CONTENT_CODEC_ACTIVE_KEY_ID
  • RAW_CONTENT_CODEC_KEYS
  • RAW_CONTENT_POLICY--- Ingest sensitivity policy (Radar C3) --- Server-side trust-boundary gate on /v1/memories/ingest{,/quick}. When `reject` (the default), core refuses to persist content marked `content_class: raw` AND content sent with no `content_class` at all (unstamped is treated as unknown/raw) — responding 422 raw_content_rejected. Single-user LOCAL deployments, where the store is not shared/hosted, may set

    --- Ingest sensitivity policy (Radar C3) --- Server-side trust-boundary gate on /v1/memories/ingest{,/quick}. When `reject` (the default), core refuses to persist content marked `content_class: raw` AND content sent with no `content_class` at all (unstamped is treated as unknown/raw) — responding 422 raw_content_rejected. Single-user LOCAL deployments, where the store is not shared/hosted, may set

  • RAW_STORAGE_DEPLOYMENT_ENVlocalRequired deployment posture for storage-policy gates. Use `local` for laptop/docker-compose development, `staging` for pre-prod, and `production` for hardened hosted deployments. Docker image local mode defaults this to `local` when omitted.

    Required deployment posture for storage-policy gates. Use `local` for laptop/docker-compose development, `staging` for pre-prod, and `production` for hardened hosted deployments. Docker image local mode defaults this to `local` when omitted.

  • RAW_STORAGE_FILECOIN_DRIVER
  • RAW_STORAGE_FILECOIN_NETWORK
  • RAW_STORAGE_FILECOIN_PRIVATE_KEY
  • RAW_STORAGE_FILECOIN_SOURCE
  • RAW_STORAGE_FILECOIN_WITH_CDN
  • RAW_STORAGE_LOCAL_FS_ROOT
  • RAW_STORAGE_MODE--- Raw document storage (optional) --- Defaults to pointer-only mode. Use managed_blob only when configuring a concrete storage provider; misconfigured provider blocks fail at startup.

    --- Raw document storage (optional) --- Defaults to pointer-only mode. Use managed_blob only when configuring a concrete storage provider; misconfigured provider blocks fail at startup.

  • RAW_STORAGE_PREFIX
  • RAW_STORAGE_PROVIDER
  • RAW_STORAGE_S3_ACCESS_KEY_ID
  • RAW_STORAGE_S3_BUCKET
  • RAW_STORAGE_S3_ENDPOINT
  • RAW_STORAGE_S3_REGION
  • RAW_STORAGE_S3_SECRET_ACCESS_KEY
  • SIMILARITY_THRESHOLD--- Internal retrieval tuning --- Defaults mirror the balanced adaptive policy. These are experimental knobs for benchmark sweeps and should not be treated as stable product config. Normalized fallback relevance floor for unscoped simple/medium non-temporal searches.

    --- Internal retrieval tuning --- Defaults mirror the balanced adaptive policy. These are experimental knobs for benchmark sweeps and should not be treated as stable product config. Normalized fallback relevance floor for unscoped simple/medium non-temporal searches.

  • STORAGE_KEY_HMAC_SECRETHex-encoded HMAC secret used to derive PII-safe storage-key prefixes. Must be at least 64 hex chars (32 bytes of entropy). Rotating this invalidates existing managed-blob storage paths; only generate once per deployment. Generate with: openssl rand -hex 32 Docker image local mode provides a non-production default when omitted.

    Hex-encoded HMAC secret used to derive PII-safe storage-key prefixes. Must be at least 64 hex chars (32 bytes of entropy). Rotating this invalidates existing managed-blob storage paths; only generate once per deployment. Generate with: openssl rand -hex 32 Docker image local mode provides a non-production default when omitted.

  • TEMPORAL_QUERY_CONSTRAINT_BOOST
  • TEMPORAL_QUERY_CONSTRAINT_ENABLED
  • TRUSTED_PROXY_MODETrusted-proxy identity guard (Radar C4). The shared CORE_API_KEY above authenticates the *caller process*, not the end user; `user_id` is asserted by the trusted caller (control plane / Radar daemon). When TRUSTED_PROXY_MODE=true, every user-scoped request carrying a `user_id` (body/query) or `X-AtomicMemory-User-Id` header MUST also carry the same value in the `X-AtomicMemory-Asserted-User` heade

    Trusted-proxy identity guard (Radar C4). The shared CORE_API_KEY above authenticates the *caller process*, not the end user; `user_id` is asserted by the trusted caller (control plane / Radar daemon). When TRUSTED_PROXY_MODE=true, every user-scoped request carrying a `user_id` (body/query) or `X-AtomicMemory-User-Id` header MUST also carry the same value in the `X-AtomicMemory-Asserted-User` heade

  • VOYAGE_API_KEY
  • VOYAGE_DOCUMENT_MODEL
  • VOYAGE_QUERY_MODEL

atomicmemory releases & version history

More in AI

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…