A bird's-eye map of brk — the main parts and what each is for. Detail for each part comes later, drilling down one at a time.
brk drives every coding agent through one protocol (the Agent Client Protocol, ACP), then exposes those same sessions over chat platforms. The shape exists to keep two things one-step easy: adding an agent (implement one interface) and adding a chat platform (implement one adapter).
Source is src/{engine,cli,bridge,platforms}. Layers import only downward.
cli/ (terminal UI) platforms/ (telegram · whatsapp · cli console)
\ / \
\ / bridge/ (platform-agnostic chat core)
\ / /
engine/ (the public API)
| Part | Purpose |
|---|---|
engine/ |
The agent-agnostic core and the only public API. Owns the ACP transport, the per-agent modules (incl. installing/updating an agent CLI via its official installer + login detection — install.ts), sessions, groups, and on-disk state. Everything else consumes it through one barrel (engine/index.ts). |
cli/ |
The Ink (React) terminal UI — the picker, chat, group builder, and platform setup screens. Talks to agents only through the engine. |
bridge/ |
The platform-agnostic chat core: the Adapter contract plus the router, daemon, and message formatting shared by every chat platform. |
platforms/ |
One interchangeable Adapter per chat platform — Telegram, WhatsApp, and the in-process CLI console — each feeding the same bridge. |
README.md— whatbrkis and how to use it.AGENTS.md— the working agreement for AI coding agents (rules + conventions).- Drill-downs for each part above will be added incrementally.