Configuration Reference

kanade services rely on structured configurations loaded from TOML files, environment variables, or registry paths.


1. Agent Configuration

The agent searches for its configuration via the KANADE_AGENT_CONFIG environment variable or falls back to native paths.

Dev Configuration (configs/agent.dev.toml)

# Dev configuration schema
[agent]
id = "dev-pc"
nats_url = "nats://localhost:4223"
data_dir = "target/dev-data/agent"

[log]
level = "debug"
file = "target/dev-data/agent/logs/agent.log"

Configuration Parameters

FieldTypeDescriptionEnvironment Override
agent.idStringUnique hardware identifier (pc_id).KANADE_DEV_AGENT_ID (templated)
agent.nats_urlStringNetwork address of the NATS broker.KANADE_NATS_URL
agent.data_dirPathRoot path to cache outbox scripts, state database, and local completions.KANADE_AGENT_DATA_DIR
log.levelStringLogging verbosity (error, warn, info, debug, trace).RUST_LOG
log.filePathFilepath destination for rolling logs.-

2. Backend Configuration

The backend coordination layer retrieves its configurations from the file specified by KANADE_BACKEND_CONFIG or registers default structures.

Dev Configuration (configs/backend.dev.toml)

[backend]
listen_addr = "127.0.0.1:8081"
nats_url = "nats://localhost:4223"
database_url = "sqlite://target/dev-data/backend/state.db"

[auth]
# Auth settings

Configuration Parameters

FieldTypeDescriptionEnvironment Override
backend.listen_addrStringNetwork bind address for HTTP/WebSocket traffic.KANADE_BIND_ADDR
backend.nats_urlStringTarget NATS broker URL.KANADE_NATS_URL
backend.database_urlStringSQLite database connection string.DATABASE_URL
auth.disableBooleanSet to true to disable operator token validation (dev environment only).KANADE_AUTH_DISABLE

3. Windows Registry Integration

In production environments, security-sensitive tokens (like NATS client tokens and administrative API bearer tokens) are stored in the secure Windows Registry rather than plaintext files.

Key Paths

  • Agent Settings: HKLM:\SOFTWARE\Kanade\agent
  • Backend Settings: HKLM:\SOFTWARE\Kanade\backend

These registry paths are protected with local ACL configurations, allowing read permissions strictly to SYSTEM and designated operators.