|
| 1 | +# Agents |
| 2 | + |
| 3 | +Baudbot uses a small multi-agent architecture: one persistent orchestrator and task-scoped workers. This keeps the team-facing interface stable while allowing parallel execution in the background. |
| 4 | + |
| 5 | +## Role overview |
| 6 | + |
| 7 | +| Agent | Lifecycle | Primary responsibility | |
| 8 | +|------|-----------|------------------------| |
| 9 | +| `control-agent` | Persistent | Intake, triage, delegation, user communication, orchestration | |
| 10 | +| `dev-agent` | Ephemeral per task | Code changes, tests, PRs, CI/review iteration | |
| 11 | +| `sentry-agent` | Persistent/on-demand | Sentry alert triage and investigation support | |
| 12 | + |
| 13 | +## Control-agent |
| 14 | + |
| 15 | +The control-agent is the team-facing coordinator. |
| 16 | + |
| 17 | +Responsibilities: |
| 18 | + |
| 19 | +- monitor inbound requests (Slack/email) |
| 20 | +- create and manage todos |
| 21 | +- select target repo(s) |
| 22 | +- spawn and supervise dev-agent sessions |
| 23 | +- relay progress/results to users |
| 24 | +- enforce operational guardrails (cleanup, escalation) |
| 25 | + |
| 26 | +It should remain lightweight on coding itself and focus on orchestration quality. |
| 27 | + |
| 28 | +## Dev-agent |
| 29 | + |
| 30 | +The dev-agent is a coding worker launched in a dedicated git worktree for each task. |
| 31 | + |
| 32 | +Responsibilities: |
| 33 | + |
| 34 | +- read project guidance (`CODEX.md`, `AGENTS.md`, `CLAUDE.md` as available) |
| 35 | +- implement requested changes |
| 36 | +- run tests/build checks |
| 37 | +- open PR and monitor CI |
| 38 | +- fix failures and address review comments |
| 39 | +- report completion details back to control-agent |
| 40 | + |
| 41 | +Each dev-agent is task-scoped and should exit when work is done. |
| 42 | + |
| 43 | +## Sentry-agent |
| 44 | + |
| 45 | +The sentry-agent handles incident-oriented analysis. |
| 46 | + |
| 47 | +Responsibilities: |
| 48 | + |
| 49 | +- investigate Sentry issues by issue ID |
| 50 | +- summarize likely impact and root cause |
| 51 | +- provide actionable recommendations for fixes |
| 52 | +- hand off coding tasks to dev-agent through control-agent |
| 53 | + |
| 54 | +## Session model |
| 55 | + |
| 56 | +- Control and sentry sessions are long-lived. |
| 57 | +- Dev sessions are ephemeral and tied to todos. |
| 58 | +- Session-control sockets allow inter-agent messaging (`send_to_session`). |
| 59 | +- Naming conventions encode role and task context (for observability and cleanup). |
| 60 | + |
| 61 | +## Concurrency |
| 62 | + |
| 63 | +Baudbot limits concurrent dev agents to keep resource usage predictable and avoid context thrash. |
| 64 | + |
| 65 | +Use this model when scaling: |
| 66 | + |
| 67 | +- keep a fixed max active dev-agent count |
| 68 | +- queue additional tasks |
| 69 | +- prioritize by urgency or user/channel policy |
| 70 | + |
| 71 | +## Communication contract |
| 72 | + |
| 73 | +- **Users talk to control-agent** |
| 74 | +- **Dev-agent reports to control-agent** |
| 75 | +- **Control-agent reports back to users** |
| 76 | + |
| 77 | +This keeps the external interface stable while allowing internal execution strategies to evolve. |
| 78 | + |
| 79 | +For flow details, see [team-workflow.md](team-workflow.md). |
0 commit comments