Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# LLM key, no embedding key, and no API auth. Set keys here only when you
# want to enable the corresponding feature.
#
# Run `npx @agentmemory/agentmemory init` to copy this file into place
# automatically. Run `npx @agentmemory/agentmemory doctor` to verify that
# the daemon reads the env you expect.
# Run `npx -y @agentmemory/agentmemory@latest init` to copy this file into
# place automatically. Run `npx -y @agentmemory/agentmemory@latest doctor`
# to verify that the daemon reads the env you expect.
#
# Defaults shown in comments. Listed in priority order — the first key
# present wins on the LLM detection path (see src/config.ts::detectProvider).
Expand All @@ -21,8 +21,10 @@
# -----------------------------------------------------------------------------
#
# Without a provider key, agentmemory runs in noop mode: observations are
# indexed via zero-LLM synthetic compression, hybrid search still works,
# indexed via zero-LLM synthetic compression and BM25 recall still works,
# but LLM-backed summarisation / reflection / consolidation are disabled.
# A provider key alone does not enable LLM-written observation compression;
# that path also requires AGENTMEMORY_AUTO_COMPRESS=true.
# The detection order is OPENAI_API_KEY → MINIMAX_API_KEY → ANTHROPIC_API_KEY
# → GEMINI_API_KEY → OPENROUTER_API_KEY → noop.

Expand Down Expand Up @@ -64,10 +66,14 @@
# 2. Embedding provider — auto-detected, override via EMBEDDING_PROVIDER
# -----------------------------------------------------------------------------
#
# Without an embedding key, agentmemory runs in BM25-only mode for hybrid
# search. Detection order: EMBEDDING_PROVIDER override → GEMINI_API_KEY →
# Without an embedding provider, vector embeddings are disabled. `mem::search`
# uses BM25; `mem::smart-search` can also fuse structural graph matches when
# graph data exists. Remote
# provider detection order: EMBEDDING_PROVIDER override → GEMINI_API_KEY →
# OPENAI_API_KEY → VOYAGE_API_KEY → COHERE_API_KEY → OPENROUTER_API_KEY →
# local (Xenova/all-MiniLM-L6-v2, 384-dim).
# BM25-only. Local embeddings are an explicit opt-in, not the keyless default.
# `EMBEDDING_PROVIDER=local` uses Xenova/all-MiniLM-L6-v2 (384-dim) on-device;
# the first embedding request downloads the model and needs network access.

# EMBEDDING_PROVIDER=local # local | openai | voyage | cohere | gemini | openrouter

Expand Down Expand Up @@ -107,7 +113,7 @@
# 5. Behaviour flags
# -----------------------------------------------------------------------------

# AGENTMEMORY_AUTO_COMPRESS=true # Run LLM compression on every observation batch (requires a provider key). Default off — synthetic compression handles most cases.
# AGENTMEMORY_AUTO_COMPRESS=true # Run LLM-written compression on every observation batch. Requires BOTH this flag and a configured provider; a provider alone leaves synthetic compression active.
# AGENTMEMORY_INJECT_CONTEXT=true # Inject recalled memories back into agent prompts (#143). Default off — hooks capture observations but do not modify conversation.
# CONSOLIDATION_ENABLED=true # Run the 4-tier consolidation pipeline (memories → semantic → procedural). Default off — opt in once you've measured the LLM cost.
# CONSOLIDATION_DECAY_DAYS=30 # Age (days) after which non-reinforced memories decay during consolidation
Expand Down Expand Up @@ -135,6 +141,13 @@
# AGENTMEMORY_PROBE_TIMEOUT_MS=2000 # MCP shim livez probe timeout
# AGENTMEMORY_URL=http://localhost:3111 # REST base URL — honored by status, doctor, MCP shim
# AGENTMEMORY_VIEWER_URL=http://localhost:3113 # Override the viewer URL printed by `agentmemory status`
# Persistent iii state; same override as `--data-dir`, used by native and
# Docker starts. Explicit flag/env wins. Otherwise instance 0 reuses an
# existing ./data/state_store.db or ./data/iii-config.yaml before defaults: macOS
# ~/Library/Application Support/agentmemory; Linux $XDG_DATA_HOME/agentmemory
# or ~/.local/share/agentmemory; Windows %APPDATA%\agentmemory.
# AGENTMEMORY_DATA_DIR=/absolute/path
# AGENTMEMORY_USE_DOCKER=1 # Prefer bundled Docker even when a compatible native iii binary exists
# AGENTMEMORY_EXPORT_ROOT=~/agentmemory-backup # Default destination for `agentmemory export`

# STANDALONE_MCP=1 # MCP shim only — bypass the worker and run @agentmemory/mcp in-process
Expand All @@ -154,9 +167,14 @@
# 7. Ports
# -----------------------------------------------------------------------------

# III_REST_PORT=3111 # REST API port (also affects viewer at +2)
# III_STREAMS_PORT=3112 # Streams API port
# III_ENGINE_URL=ws://localhost:49134 # iii-engine WebSocket URL (used by the worker)
# III_REST_PORT=3111 # REST API + MCP HTTP anchor
# III_STREAM_PORT=3112 # Preferred streams override; defaults to REST + 1
# III_STREAMS_PORT=3112 # Legacy alias for III_STREAM_PORT
# III_VIEWER_PORT=3113 # Viewer bind port; defaults to REST + 2
# III_ENGINE_PORT=49134 # Engine bind port; defaults to REST + 46023
# III_ENGINE_URL=ws://localhost:49134 # Explicit/remote worker WebSocket URL; takes precedence over derived engine port
# Derivation applies only while the corresponding explicit port/URL is unset.
# `--instance 1` selects 3211/3212/3213/49234 and an instance-1 data subdir.

# -----------------------------------------------------------------------------
# 8. iii engine pin
Expand Down
Loading