Skip to content

Latest commit

 

History

History
268 lines (196 loc) · 13.7 KB

env-vars-reference.md

File metadata and controls

268 lines (196 loc) · 13.7 KB

Environment Variables Reference

Applies to: TotalReclaw v1 (all clients). Last updated: 2026-11-10.

v1 deliberately removes every env var that was an internal knob pretending to be user configuration. The list below is the complete set of env vars that end users or deployment operators should ever need to set.

If you had one of the removed vars set (see bottom of this page), you can delete it — clients will silently ignore it.


User-facing env vars

TOTALRECLAW_RECOVERY_PHRASE

Required. Your 12-word BIP-39 recovery phrase. All encryption keys are derived from this. Never sent to any server.

export TOTALRECLAW_RECOVERY_PHRASE="your twelve word recovery phrase here"

Default: none — you must set this. When to override: always set it once during setup. Security: treat this like a seed phrase. Losing it means losing access to every memory you have ever stored.

TOTALRECLAW_EXTRACTION_MODEL

Optional, Python client (Hermes). Operator override. Pin the memory-extraction model for every user of this install. It must be a model of the LLM provider the agent already uses: the key, base URL and API format stay the same. Changing it needs a restart.

TOTALRECLAW_EXTRACTION_MODEL=glm-5.3-flash

Default: unset. TotalReclaw picks the model automatically: the chat model when its name marks it as small (flash, mini, haiku, …), otherwise a tested per-provider default (z.ai: glm-5.3-flash on the Coding endpoint, glm-4.5-flash on the Standard endpoint), moving to the next candidate and finally to the chat model if one is unavailable on the user's plan. When to override: you operate the deployment and want one fixed model. End users don't need it: they ask the agent, which calls totalreclaw_set_extraction_model (or run totalreclaw extraction-model <model>), stored in ~/.totalreclaw/settings.json and applied on the next turn without a restart. This env var wins over that setting. Versions up to 2.5.3rc3 wrongly log ignoring removed env var(s): TOTALRECLAW_EXTRACTION_MODEL at startup; the override still applies.

TOTALRECLAW_SERVER_URL

Optional. Override the relay server URL. Defaults to the managed service.

# Default (do not set)
# TOTALRECLAW_SERVER_URL=https://api.totalreclaw.xyz

# Self-hosted
export TOTALRECLAW_SERVER_URL="http://localhost:8080"

Default: https://api.totalreclaw.xyz (managed service). When to override: pointing at a self-hosted server, or at the staging relay for development (https://api-staging.totalreclaw.xyz). Precedence: in ZeroClaw this variable overrides relay_url under [memory.totalreclaw] in ~/.zeroclaw/config.toml. In Hermes, TOTALRECLAW_RELAY_URL is not an alias: it only sets the pairing URL when this variable is unset, and reads and writes stay on the default.

TOTALRECLAW_SELF_HOSTED

Optional. Flag that tells the client it is talking to a self-hosted PostgreSQL server instead of the managed on-chain service.

export TOTALRECLAW_SELF_HOSTED=true

Default: false (managed service). When to override: when running your own server. What changes: dedup and forget use HTTP endpoints (not on-chain tombstones); consolidation tool is available.

TOTALRECLAW_CREDENTIALS_PATH

Optional. Override the path where the setup wizard writes the local credentials file (smart account address, registration state).

# Default (macOS / Linux)
# ~/.totalreclaw/credentials.json
export TOTALRECLAW_CREDENTIALS_PATH="$HOME/.config/totalreclaw/creds.json"

Default: ~/.totalreclaw/credentials.json. When to override: sandboxed environments, XDG-compliant layouts, multi-tenant deployments.

TOTALRECLAW_CACHE_PATH

Optional. Override the path to the client's encrypted on-disk cache (fact store, hot cache, etc.).

# Default
# ~/.totalreclaw/cache.enc
export TOTALRECLAW_CACHE_PATH="$HOME/.config/totalreclaw/cache.enc"

Default: ~/.totalreclaw/cache.enc. When to override: same as TOTALRECLAW_CREDENTIALS_PATH — sandboxed environments, XDG layouts, multi-tenant deployments.

TOTALRECLAW_SESSION_ID

Optional. QA / observability session tag. When set, every outbound relay call adds the X-TotalReclaw-Session header so Axiom log filters and the qa-totalreclaw skill can scope log searches per QA run.

export TOTALRECLAW_SESSION_ID="qa-rc.22-run-7"

Default: unset — header omitted, requests are untagged. When to override: set during QA runs so log queries can be filtered by session id. Production users do not need to set it. Security: non-secret. Shows up in relay logs by design. Pick a non-PII tag.

TOTALRECLAW_DISABLE_UPDATE_NOTICE

Optional. Kill-switch for the automatic "TotalReclaw X is available" update nudge (Python / Hermes client). When the relay advertises a newer stable than the installed version, the client injects a one-line update reminder at session start (at most once per 24h). Set this to silence it.

export TOTALRECLAW_DISABLE_UPDATE_NOTICE=1

Default: unset — the notice is enabled. Truthy values (1, true, yes, on) disable it. When to override: you manage updates out-of-band and don't want the reminder, or you're running a pinned build on purpose. Note: this only suppresses the notice. It does not affect installs, and the update itself is always user-initiated (say "update TotalReclaw" — see hermes-setup.md).

TOTALRECLAW_AGENT_NAME

Optional. User-given name of this agent instance (issue #317). When set, the name is persisted inside the encrypted memory blob (per-memory, client-side), so a memory's provenance can be rendered as e.g. John (Hermes) instead of the bare client type hermes. It survives decrypt on any client and the vault SPA.

export TOTALRECLAW_AGENT_NAME="John"

Default: unset — memories carry no agent_name and render exactly as before (client type only). Backward-compatible: old memories and new memories written without this set are unchanged. How it is stored: additive metadata on a different axis from the v1 source field (source stays user/assistant/external/…). It rides the encrypted inner blob, not the on-chain protobuf/subgraph schema — so no schema change and no migration. Precedence: an explicit agent_name= argument to client.remember() (or a per-fact agent_name key in remember_batch()) wins; otherwise this env var; otherwise unset. Names are trimmed and truncated to 64 chars. Security: the name IS encrypted at rest (it lives in the E2EE blob). Still, treat it as content — don't put secrets in an agent name.

TOTALRECLAW_CREDENTIALS_PROVIDER

Optional. Selects where the client reads its credential from: the local credentials.json file, or an operator-managed secret manager. Applies to both a recovery phrase and a derived-bundle-v1 bundle — the provider abstraction is credential-shape-agnostic.

# Default (do not set)
# TOTALRECLAW_CREDENTIALS_PROVIDER=file

# Secret-manager injection (headless deployments)
export TOTALRECLAW_CREDENTIALS_PROVIDER=external

Default: file — reads/writes ~/.totalreclaw/credentials.json (or TOTALRECLAW_CREDENTIALS_PATH). When to override: external mode for Docker/Kubernetes/systemd deployments that inject credentials from a secret manager instead of writing them to disk — see headless deployment for the two transports (TOTALRECLAW_EXTERNAL_CREDENTIALS_PATH / TOTALRECLAW_EXTERNAL_CREDENTIALS_JSON) and the derived-bundle-v1 payload shape. Note: an unrecognised value falls back to file mode (a deploy-time typo reads disk rather than silently going dark) — this is distinct from an unrecognised credentials.json version, which is a loud error, never a silent fallback. Client scope: the file / external provider abstraction is implemented in Python (Hermes) only (credential_provider.py). The MCP server understands the derived-bundle-v1 version: 2 credential SHAPE (Option E Phase 2 / #581, P2-13) but always reads it via file-mode disk access — setting this env var has no effect on the MCP server today.

TOTALRECLAW_NO_AUTO_MIGRATE

Optional. Kill-switch for the automatic local phrase → derived-bundle-v1 migration (Hermes / Python client). By default, on every plugin load, a host holding a plaintext or v1-keychain-wrapped recovery phrase is transparently migrated to a v2 credential bundle — the phrase is replaced with derived vault keys and a signing key, and is no longer stored on that host (see hermes-setup.md for what this means for recovery). Set this to opt out and stay on the legacy phrase-on-disk path indefinitely.

export TOTALRECLAW_NO_AUTO_MIGRATE=1

Default: unset — migration runs automatically. Truthy values (1, true, yes, on) disable it. When to override: you have tooling that depends on reading the phrase from credentials.json (e.g. a backup script), or you want to defer migration until you've confirmed your own written copy of the phrase. Note: migration is idempotent and safe to leave enabled — a version: 2 file is a no-op on every subsequent boot.

LLM provider keys

Required if the client needs an LLM (auto-extraction, LLM-guided dedup, import processing).

The client reads whichever provider key is present. It picks the LLM automatically — you no longer select a model with an env var.

Provider Env var
Anthropic ANTHROPIC_API_KEY
OpenAI OPENAI_API_KEY
Z.AI / GLM ZAI_API_KEY
Groq GROQ_API_KEY
DeepSeek DEEPSEEK_API_KEY
OpenRouter OPENROUTER_API_KEY
Google Gemini GOOGLE_API_KEY
Mistral MISTRAL_API_KEY
xAI XAI_API_KEY
Together TOGETHER_API_KEY

On OpenClaw: the plugin reads OpenClaw's own provider config, no separate LLM key needed.


Removed in v1

These env vars existed in earlier versions and are now silently ignored. Delete them from your config if present.

Removed var Why it is gone
TOTALRECLAW_CHAIN_ID All tiers use Gnosis mainnet; chain selection is no longer user-configurable.
TOTALRECLAW_EMBEDDING_MODEL Harrier-OSS-v1-270M (640d) is the only supported model in v1.
TOTALRECLAW_STORE_DEDUP Store-time near-duplicate detection is always on.
TOTALRECLAW_LLM_MODEL The extraction LLM is picked automatically from the available provider. To pick a different extraction model, ask the agent (totalreclaw_set_extraction_model, Python client) or set TOTALRECLAW_EXTRACTION_MODEL.
TOTALRECLAW_TAXONOMY_VERSION v1 is the only format. No opt-in needed.
TOTALRECLAW_CLAIM_FORMAT Same reason — the v0 {text, metadata} shape is gone.
TOTALRECLAW_DIGEST_MODE Digest behaviour is no longer user-configurable.
TOTALRECLAW_HOT_RELOAD Kept for OpenClaw plugin development only — see plugin README.
TOTALRECLAW_TWO_TIER_SEARCH Merged into the default search path.

Advanced / self-hosted env vars

These are for deployment operators, not end users. They live in the server or relay environment, not your local shell. See:

Self-hosted deployments can still set the following as env-var fallbacks — on managed service, the relay billing response delivers these and env vars are ignored:

Env var Purpose Default
TOTALRECLAW_COSINE_THRESHOLD Minimum cosine similarity to surface a result 0.15
TOTALRECLAW_RELEVANCE_THRESHOLD Auto-injection relevance cutoff 0.3
TOTALRECLAW_SEMANTIC_SKIP_THRESHOLD Store-time dedup similarity threshold 0.85
TOTALRECLAW_MIN_IMPORTANCE Minimum extracted-fact importance to auto-store 6
TOTALRECLAW_CACHE_TTL_MS Hot-cache TTL 300000
TOTALRECLAW_TRAPDOOR_BATCH_SIZE Trapdoors per subgraph query 5
TOTALRECLAW_SUBGRAPH_PAGE_SIZE Graph Studio page size 1000
TOTALRECLAW_EXTRACT_INTERVAL Turns between auto-extractions 3
TOTALRECLAW_MAX_FACTS_PER_EXTRACTION Max facts captured per auto-extraction batch 15
TOTALRECLAW_RECALL_TOP_K Results returned per recall (after reranking) 16
CANDIDATE_POOL_MAX_FREE Search candidate-pool size (free / unknown tier) 250 (Hermes) / 100 (ZeroClaw)
CANDIDATE_POOL_MAX_PRO Search candidate-pool size (pro tier) 250
TOTALRECLAW_DATA_EDGE_ADDRESS DataEdge contract address (self-hosted chain only) Built-in
TOTALRECLAW_ENTRYPOINT_ADDRESS ERC-4337 EntryPoint (self-hosted chain only) v0.7 address
TOTALRECLAW_RPC_URL Alternative RPC URL (self-hosted chain only) Relay bundler

See client-consistency spec for the full resolution order.

Internal kill-switches (not public config)

Env var Purpose
TOTALRECLAW_AUTO_RESOLVE_MODE Internal emergency kill-switch for the auto-contradiction-resolution loop (active / shadow / off). Not part of user-facing config; reserved for incident response only.

Related