Skip to content

Commit 886500f

Browse files
authored
docs: restructure README, add agents/integrations sections (#18)
1 parent 16666a3 commit 886500f

1 file changed

Lines changed: 91 additions & 56 deletions

File tree

README.md

Lines changed: 91 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
[![CI](https://github.com/modem-dev/baudbot/actions/workflows/ci.yml/badge.svg)](https://github.com/modem-dev/baudbot/actions/workflows/ci.yml)
44
[![Integration](https://github.com/modem-dev/baudbot/actions/workflows/integration.yml/badge.svg)](https://github.com/modem-dev/baudbot/actions/workflows/integration.yml)
55

6-
**Hardened autonomous agent infrastructure.**
6+
**Hardened infrastructure for always-on AI agents.**
77

8-
Baudbot is an open framework for running always-on AI agents that support software teams — coding agents, automated SREs, QA bots, monitoring, triage, and more. Agents run as isolated Linux processes with defense-in-depth security. Baudbot assumes the worst: that an agent *will* be prompt-injected, and builds kernel-level walls that hold even when the LLM is fully compromised.
8+
Baudbot runs AI agents as isolated Linux processes with defense-in-depth security. Agents code, test, deploy, monitor, and triage. They work on real repos with real tools. The infrastructure assumes agents *will* be prompt-injected and builds kernel-level walls that hold when the LLM is compromised.
99

10-
**Built for Linux.** Baudbot uses kernel-level features (iptables, `/proc` hidepid, Unix users) that don't exist on macOS or Windows. Every PR is integration-tested on fresh **Ubuntu 24.04** and **Arch Linux** droplets.
10+
Built for Linux. Uses iptables, `/proc` hidepid, and Unix user isolation. Every PR is integration-tested on fresh Ubuntu 24.04 and Arch Linux droplets.
1111

1212
## Why
1313

14-
Every AI agent framework gives the model shell access and hopes for the best. Baudbot doesn't hope — it enforces:
14+
Every agent framework gives the model shell access and hopes for the best. Baudbot enforces:
1515

16-
- **OS-level isolation** — dedicated Unix user, no sudo, can't see other processes
17-
- **Kernel-enforced network control** iptables per-UID egress allowlist
18-
- **Source/runtime separation** — agent can't read or modify its own infrastructure code
19-
- **Dual-layer command blocking** — dangerous shell patterns caught before execution at two independent layers
20-
- **Self-healing** — permissions hardened on every boot, secrets redacted from logs automatically
16+
- **OS-level isolation.** Dedicated Unix user, no sudo, can't see other processes.
17+
- **Network control.** iptables per-UID port allowlist. Standard ports only (80/443/22/53). No listeners, no reverse shells on non-standard ports.
18+
- **Source/runtime separation.** Agent can't read or modify its own infrastructure.
19+
- **Dual-layer command blocking.** Dangerous patterns caught at two independent layers.
20+
- **Self-healing.** Permissions hardened on every boot, secrets redacted from logs.
2121

22-
Agents work on real files in real repos — no sandbox friction. They make real git branches, run real tests, and push real PRs. But they can't exfiltrate data, escalate privileges, or phone home.
22+
No sandbox friction. Agents make real branches, run real tests, push real PRs. But they can't escalate privileges or open reverse shells.
2323

2424
## Requirements
2525

@@ -37,19 +37,19 @@ git clone https://github.com/modem-dev/baudbot.git ~/baudbot
3737
sudo ~/baudbot/install.sh
3838
```
3939

40-
The installer detects your distro, installs dependencies, creates the agent user, sets up the firewall, and walks you through API keys interactively. Takes ~2 minutes.
40+
The installer detects your distro, installs dependencies, creates the agent user, sets up the firewall, and walks you through API keys. Takes ~2 minutes.
4141

4242
<details>
4343
<summary>Manual setup (without installer)</summary>
4444

4545
```bash
46-
# Setup (creates user, firewall, permissions run as root)
46+
# Creates user, firewall, permissions (run as root)
4747
sudo bash ~/baudbot/setup.sh <admin_username>
4848

4949
# Add secrets
5050
sudo -u baudbot_agent vim ~/.config/.env
5151

52-
# Deploy source agent runtime
52+
# Deploy source to agent runtime
5353
~/baudbot/bin/deploy.sh
5454

5555
# Launch
@@ -61,19 +61,77 @@ See [CONFIGURATION.md](CONFIGURATION.md) for the full list of secrets and how to
6161

6262
## Configuration
6363

64-
Secrets and configuration live in `~baudbot_agent/.config/.env` (not in repo, 600 perms).
65-
See [CONFIGURATION.md](CONFIGURATION.md) for the full list and how to obtain each value.
64+
Secrets live in `~baudbot_agent/.config/.env` (not in repo, 600 perms).
65+
See [CONFIGURATION.md](CONFIGURATION.md) for all keys and how to obtain each value.
66+
67+
## Agents
68+
69+
Baudbot ships three agent roles. The control agent starts automatically and spawns the others in tmux sessions.
70+
71+
| Role | What it does |
72+
|------|-------------|
73+
| **control-agent** | Monitors email inbox, triages requests, delegates to workers, runs Slack bridge |
74+
| **dev-agent** | Full coding loop: branch, code, test, PR, fix CI, repeat |
75+
| **sentry-agent** | Watches Sentry alerts, investigates via API, reports triage to control agent |
76+
77+
Agents can read/write files, run shell commands, create git branches and PRs, build Docker images (via a security wrapper), message each other across sessions, monitor email inboxes, automate cloud browsers, and manage shared todos.
78+
79+
## Integrations
80+
81+
| Integration | How |
82+
|---|---|
83+
| **Slack** | Socket Mode bridge. @mentions + channel monitoring. Rate-limited, content-wrapped. |
84+
| **GitHub** | SSH + PAT. Branches, commits, PRs via `gh`. |
85+
| **Email** | AgentMail inboxes. Send, receive, monitor. |
86+
| **Sentry** | API integration. Alert forwarding from Slack channel. |
87+
| **Docker** | Security wrapper blocks privilege escalation. |
88+
| **Cloud browser** | Kernel browser + Playwright automation. |
89+
90+
Slack is the primary human interface. Email is for agent-to-agent and automated workflows.
91+
92+
## How it works
93+
94+
The control agent spawns sub-agents in tmux sessions and starts the Slack bridge. Messages flow through layered security:
95+
96+
```
97+
Slack → bridge (access control + content wrapping) → pi agent → tools (tool-guard + safe-bash) → workspace
98+
```
99+
100+
Every layer assumes the previous one failed. The bridge wraps content and rate-limits, but tool-guard blocks dangerous commands even if wrapping is bypassed. Safe-bash blocks patterns even if tool-guard is evaded. The firewall blocks non-standard ports even if all software layers fail.
101+
102+
## Architecture
103+
104+
```
105+
admin_user (your account)
106+
├── ~/baudbot/ ← source repo (agent CANNOT read)
107+
│ ├── bin/ deploy, firewall, security scripts
108+
│ ├── pi/extensions/ 🔒 tool-guard, auto-name, etc.
109+
│ ├── pi/skills/ agent skill templates
110+
│ ├── slack-bridge/ 🔒 bridge + security module
111+
│ └── setup.sh / start.sh system setup + launcher
112+
113+
baudbot_agent (unprivileged uid)
114+
├── ~/runtime/ ← deployed copies of bin/, bridge
115+
├── ~/.pi/agent/
116+
│ ├── extensions/ deployed extensions (read-only)
117+
│ ├── skills/ agent-owned (can modify)
118+
│ └── baudbot-manifest.json SHA256 integrity hashes
119+
├── ~/workspace/ project repos + worktrees
120+
└── ~/.config/.env secrets (600 perms)
121+
```
122+
123+
Deploy is a one-way push: `~/baudbot/bin/deploy.sh` stages source to `/tmp`, copies as `baudbot_agent` via `sudo -u`, stamps an integrity manifest, and cleans up.
66124

67125
## Operations
68126

69127
```bash
70128
# Deploy after editing source
71129
~/baudbot/bin/deploy.sh
72130

73-
# Launch agent (in tmux for persistence)
131+
# Launch agent (tmux for persistence)
74132
tmux new-window -n baudbot 'sudo -u baudbot_agent ~/runtime/start.sh'
75133

76-
# Check security posture
134+
# Security audit
77135
~/baudbot/bin/security-audit.sh
78136
~/baudbot/bin/security-audit.sh --deep # includes extension scanner
79137

@@ -83,7 +141,7 @@ sudo -u baudbot_agent tmux ls
83141
# Kill everything
84142
sudo -u baudbot_agent pkill -u baudbot_agent
85143

86-
# Uninstall (reverses setup.sh)
144+
# Uninstall
87145
sudo ~/baudbot/bin/uninstall.sh --dry-run # preview
88146
sudo ~/baudbot/bin/uninstall.sh # for real
89147

@@ -107,56 +165,33 @@ bin/test.sh shell
107165
npm run lint && npm run typecheck
108166
```
109167

110-
## How It Works
168+
## Adding agents
111169

112-
Baudbot runs a **control-agent** that spawns specialized sub-agents in tmux sessions and starts a Slack bridge. Out of the box it ships with a dev-agent (coding), sentry-agent (monitoring/triage), and a control-agent (orchestration) — but you can add any agent role. Messages flow:
170+
An agent role is a skill file. Baudbot ships three but you can add more.
113171

114-
```
115-
Slack → bridge (access control + content wrapping) → pi agent → tools (tool-guard + safe-bash) → workspace
116-
```
117-
118-
Every layer assumes the previous one failed. The bridge wraps content and rate-limits, but tool-guard blocks dangerous commands even if wrapping is bypassed. Safe-bash blocks patterns even if tool-guard is somehow evaded. The firewall blocks exfiltration even if all software layers fail. Defense in depth, all the way down.
119-
120-
## Architecture
121-
122-
```
123-
admin_user (your account)
124-
├── ~/baudbot/ ← source repo (agent CANNOT read)
125-
│ ├── bin/ deploy, firewall, security scripts
126-
│ ├── pi/extensions/ 🔒 tool-guard, auto-name, etc.
127-
│ ├── pi/skills/ agent skill templates
128-
│ ├── slack-bridge/ 🔒 bridge + security module
129-
│ └── setup.sh / start.sh system setup + launcher
130-
131-
baudbot_agent (unprivileged uid)
132-
├── ~/runtime/ ← deployed copies of bin/, bridge
133-
├── ~/.pi/agent/
134-
│ ├── extensions/ deployed extensions (read-only)
135-
│ ├── skills/ agent-owned (can modify)
136-
│ └── baudbot-manifest.json SHA256 integrity hashes
137-
├── ~/workspace/ project repos + worktrees
138-
└── ~/.config/.env secrets (600 perms)
139-
```
172+
1. Create `pi/skills/my-agent/SKILL.md` with role instructions.
173+
2. Add a startup block to the control agent's `startup-cleanup.sh`.
174+
3. Deploy: `~/baudbot/bin/deploy.sh`
140175

141-
Deploy is a one-way push: `~/baudbot/bin/deploy.sh` stages source → `/tmp` → copies as `baudbot_agent` via `sudo -u` → stamps integrity manifest → cleans up.
176+
See `pi/skills/dev-agent/SKILL.md` for the pattern.
142177

143-
## Security Stack
178+
## Security stack
144179

145180
| Layer | What | Survives prompt injection? |
146181
|-------|------|---------------------------|
147-
| **Source isolation** | Source repo is admin-owned, agent has zero read access. Deploy is one-way. | ✅ Filesystem-enforced |
148-
| **iptables egress** | Per-UID firewall chain. Allowlisted ports only, no listeners, no reverse shells. | ✅ Kernel-enforced |
149-
| **Process isolation** | `/proc` mounted `hidepid=2`. Agent can't see other PIDs. | ✅ Kernel-enforced |
182+
| **Source isolation** | Source repo is admin-owned. Agent has zero read access. Deploy is one-way. | ✅ Filesystem |
183+
| **iptables egress** | Per-UID port allowlist (80/443/22/53 + DB ports). Blocks non-standard ports, listeners, raw sockets. | ✅ Kernel |
184+
| **Process isolation** | `/proc` mounted `hidepid=2`. Agent can't see other PIDs. | ✅ Kernel |
150185
| **Shell deny list** | `baudbot-safe-bash` blocks rm -rf, reverse shells, fork bombs, curl\|sh. Root-owned. | ✅ Root-owned |
151-
| **Tool call interception** | Pi extension blocks dangerous tool calls before they hit disk or shell. |Compiled into runtime |
152-
| **Integrity manifest** | Deploy stamps SHA256 hashes of all files. Agent can verify its own runtime hasn't been tampered with. | ✅ Admin-signed |
153-
| **Content wrapping** | External messages wrapped with security boundaries + Unicode homoglyph sanitization. | ⚠️ LLM-dependent |
154-
| **Injection detection** | 12 regex patterns flag suspicious content. Log-only. | ⚠️ Detection, not prevention |
186+
| **Tool interception** | Pi extension blocks dangerous tool calls before they hit disk or shell. |Read-only |
187+
| **Integrity manifest** | Deploy stamps SHA256 hashes. Security audit verifies runtime files match. | ✅ Admin-signed |
188+
| **Content wrapping** | External messages wrapped with security boundaries + homoglyph sanitization. | ⚠️ LLM-dependent |
189+
| **Injection detection** | 12 regex patterns flag suspicious content. Log-only. | ⚠️ Detection only |
155190
| **Filesystem hardening** | 700 dirs, 600 secrets, enforced on every boot. | ✅ Boot script |
156191
| **Log redaction** | Scrubs API keys, tokens, private keys from session logs. | ✅ Boot script |
157192
| **Extension scanning** | Static analysis for exfiltration, obfuscation, crypto-mining patterns. | ✅ Audit-time |
158193

159-
## Security Details
194+
## Security details
160195

161196
See [SECURITY.md](SECURITY.md) for the full threat model and trust boundary diagram.
162197

0 commit comments

Comments
 (0)