Skip to main content
AeonSage offers flexible configuration through multiple methods: environment variables, configuration files, and CLI commands. This guide covers all configuration options.

Configuration Methods

Priority Order

Configuration is loaded in the following priority (highest first):

Configuration File

Location

The configuration file is located at:

Structure

{
  "gateway": {
    "port": 8080,
    "mode": "local",
    "bind": "127.0.0.1"
  },
  "providers": {
    "default": "openai",
    "openai": {
      "apiKey": "${OPENAI_API_KEY}",
      "model": "gpt-4o"
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "${TELEGRAM_BOT_TOKEN}"
    }
  },
  "skills": {
    "enabled": ["web", "memory", "files"]
  },
  "database": {
    "type": "sqlite",
    "path": "~/.aeonsage/data.db"
  }
}

Gateway Configuration

Environment Variables

GATEWAY_PORT=8080
GATEWAY_BIND=127.0.0.1
GATEWAY_MODE=local
GATEWAY_TOKEN=your-secure-token
GATEWAY_LOG_LEVEL=info

Provider Configuration

Example

{
  "providers": {
    "default": "openai",
    "fallback": ["openai", "anthropic", "ollama"],
    "openai": {
      "apiKey": "${OPENAI_API_KEY}",
      "model": "gpt-4o",
      "temperature": 0.7
    },
    "anthropic": {
      "apiKey": "${ANTHROPIC_API_KEY}",
      "model": "claude-3-5-sonnet-latest"
    },
    "ollama": {
      "host": "http://localhost:11434",
      "model": "llama3.2"
    }
  }
}

Channel Configuration

Example

{
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "${TELEGRAM_BOT_TOKEN}",
      "allowlist": ["user:123456789"],
      "prefix": "!",
      "webhookUrl": "https://your-gateway.com/webhook/telegram"
    },
    "discord": {
      "enabled": true,
      "botToken": "${DISCORD_BOT_TOKEN}",
      "applicationId": "${DISCORD_APP_ID}",
      "allowlist": ["guild:123456789"],
      "provider": "anthropic"
    }
  }
}

Database Configuration

SQLite (Local Mode)

{
  "database": {
    "type": "sqlite",
    "path": "~/.aeonsage/data.db"
  }
}

PostgreSQL (SaaS Mode)

{
  "database": {
    "type": "postgres",
    "url": "${DATABASE_URL}",
    "poolSize": 20
  }
}

Session Configuration


Logging Configuration


CLI Commands

View Configuration

# View all configuration
aeonsage config list

# View specific key
aeonsage config get gateway.port

# View effective config (with env vars resolved)
aeonsage config list --effective

Set Configuration

# Set a value
aeonsage config set gateway.port 8080

# Set nested value
aeonsage config set providers.openai.model gpt-4o

# Set from file
aeonsage config import /path/to/config.json

Unset Configuration

# Unset a value (reverts to default)
aeonsage config unset gateway.port

# Reset all configuration
aeonsage config reset

Environment Variables Reference


Next Steps