Skip to content

Axis Configuration and Operations

Config File Loading

Axis auto-loads .env files on every command. Precedence (lowest to highest):

  1. ~/.eternum-agent/.env — global config (API keys, preferences). Auto-created on first run.
  2. ./.env (current directory) — local overrides for development or per-project settings.
  3. Shell environmentexport ANTHROPIC_API_KEY=... always wins over file values.

Values from higher-priority sources override lower ones. Shell env vars are never overwritten by file values. All runtime directories (~/.eternum-agent/data/, ~/.eternum-agent/.cartridge/) are auto-created on first run — no manual axis init required.

Core Environment Variables

VariableDefaultPurpose
MODEL_PROVIDERanthropicLLM provider (anthropic, openai, openrouter, google)
MODEL_IDclaude-sonnet-4-5-20250929Model ID
ANTHROPIC_API_KEYnoneRequired for Anthropic provider
OPENAI_API_KEYnoneRequired for OpenAI provider
CHAINslotChain selection
SLOT_NAMEnoneAuto-select discovered world
GAME_NAMEeternumSession/game namespace
TICK_INTERVAL_MS60000Tick interval in ms
LOOP_ENABLEDtrueAuto-start loop on launch
ETERNUM_AGENT_HOME~/.eternum-agentRuntime root
DATA_DIR$ETERNUM_AGENT_HOME/dataAgent data root
SESSION_BASE_PATH$ETERNUM_AGENT_HOME/.cartridgeSession/artifact root

Optional / Advanced Variables

VariablePurpose
RPC_URL, TORII_URL, WORLD_ADDRESSManual world overrides (skip discovery)
MANIFEST_PATHExplicit manifest path
CHAIN_IDOverride inferred chain id
PRIVATE_KEY, ACCOUNT_ADDRESSPrivate-key auth mode
MASTER_ADDRESS, MASTER_PRIVATE_KEYOptional auto top-up for non-mainnet fee token shortfalls
CARTRIDGE_API_BASEFactory/discovery API base override

Runtime Directory

~/.eternum-agent/
├── data/
│   └── <world>/
│       ├── soul.md
│       ├── HEARTBEAT.md
│       └── tasks/
│           ├── game.md
│           ├── economy.md
│           ├── exploration.md
│           ├── combat.md
│           ├── priorities.md
│           └── learnings.md
└── .cartridge/
    └── <world>/
        ├── profile.json
        ├── manifest.json
        ├── policy.json
        ├── session.json
        ├── auth.json
        └── auth-qr.png

Runtime Config Updates (Headless)

Use POST /config with changes to update settings live.

Typical paths:

  • tickIntervalMs
  • loopEnabled
  • modelProvider
  • modelId
  • dataDir

Some backend fields (like world connection details) require restart in headless mode.

Diagnostics

Run doctor:

axis doctor

Common issues:

  • No worlds discovered: check network reachability and CARTRIDGE_API_BASE
  • --world is required for headless mode: pre-auth and set --world
  • Auth remains pending: complete approval or run axis auth <world> --redirect-url="..."
  • Password auth fails: verify username/password and that the account has a password credential on Cartridge
  • Session expired: re-run axis auth <world>