Getting Started
configuration
config file and environment variables
config file
default location: ~/.baihu/config.toml
# provider
default_provider = "openrouter"
default_model = "anthropic/claude-3.5-sonnet"
api_key = "enc2:..." # encrypted, set via onboard wizard
# temperature
default_temperature = 0.7
# workspace
workspace_dir = "~/.baihu/workspace"
# gateway
[gateway]
port = 3000
auto_pair = false
# autonomy
[autonomy]
level = "supervised" # readonly | supervised | full
workspace_only = true
max_actions_per_hour = 60
# channels
[channels_config]
autostart = ["telegram", "discord"]
# memory
[memory]
max_entries = 10000
embedding_cache_size = 1000
# tunnel
[tunnel]
provider = "cloudflare" # cloudflare | tailscale | ngrok | custom
environment variables
all env vars override config file values.
| variable | description |
|---|---|
BAIHU_API_KEY | API key (plaintext, overrides encrypted config value) |
BAIHU_PROVIDER | default provider name |
BAIHU_MODEL | default model name |
BAIHU_WORKSPACE | workspace directory path |
BAIHU_GATEWAY_PORT | gateway server port |
BAIHU_AUTOSTART_CHANNELS | comma-separated channel list |
config directory structure
~/.baihu/
├── config.toml # main config
├── .secret_key # encryption key (0600 perms)
├── workspace/
│ ├── memory.db # sqlite memory database
│ ├── skills/ # custom skills
│ └── HEARTBEAT.md # periodic task definitions
└── daemon.lock # single-instance lock file