Page
choird
The Choir control plane daemon. Runs on the host, manages agent containers, enforces policy, and owns all durable state.
Responsibilities
- Telegram gateway (multi-bot, multi-DM routing, admin/regular permissions)
- Container lifecycle (Docker create/start/stop/remove)
- Resource leasing (workspaces, git identities, DMs — exclusive access)
- RPC server (UDS + HTTP transport for choir-agent communication)
- Session management and crash recovery
- Heartbeat monitoring and crash detection
- Memory module (Postgres + pgvector: chunking, embedding, tier promotion)
- Approval pipeline (proposals, inline keyboard UX, timeout)
- Secret management (
secrets.jsonauthority + explicit apply to running agents) - Config management (two-phase load/apply, hot-reload)
- Agent image build pipeline (git clone, artifact merge, Docker build)
- Structured logging with archiving
Startup Sequence
- Read and validate
~/.choir.d/config.json - Read and validate
~/.choir.d/secrets.json - Connect to Postgres using credentials resolved from configured secret references
- Verify
pgvectoris installed in the target database, then initialize per-agent schemas if needed - Initialize connection pool
- Detect and remove orphaned containers (
choir.managed=truelabel) - Clean up stale leases (crashed sessions)
- Start gateway bot instances
- Start RPC transport server
- Accept choirctl and gateway commands
- Log ready with config version summary
Usage
choird [flags]
Flags:
--config string Path to config directory (default ~/.choir.d)
--transport string Transport mode: uds, http, both (default uds)
--listen string HTTP listen address (default :9400)
--tls-cert string TLS certificate file (HTTP mode)
--tls-key string TLS key file (HTTP mode)