BaihuBaihu
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.

variabledescription
BAIHU_API_KEYAPI key (plaintext, overrides encrypted config value)
BAIHU_PROVIDERdefault provider name
BAIHU_MODELdefault model name
BAIHU_WORKSPACEworkspace directory path
BAIHU_GATEWAY_PORTgateway server port
BAIHU_AUTOSTART_CHANNELScomma-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

On this page