I spent this evening turning one OpenBot instance into something closer to a small engineering org: five agents with separate jobs, a sidebar that reads like an org chart, GitHub on both sides of the code, and Cloudflare doing the plumbing between the outside world and the agents.
None of it is clever. Most of the value comes from one rule and a lot of boring wiring. Here is the shape, and the parts that are actually load-bearing.
Five agents, five jobs
OpenBot runs on a server in the house and each agent is a separate conversation with its own instructions, tools and memory. The split is deliberately narrow:
| Agent | Job | Touches |
|---|---|---|
| Chief | Coordination: takes the request, splits it, routes it, combines the result | Every agent, no production code |
| PA | Email and calendar: triage, drafts, scheduling | Inbox, calendar |
| Engineer | Development: code, tests, pull requests, deployment | Repositories, CI, hosting |
| Dr. Eggbot | Agent design: prompts, instruction files, skills | Agent configuration |
| Sentry | Independent review: reads the diff, checks the claims, approves or blocks | Pull requests |
The point of five agents instead of one generalist is not parallelism. It is context. An agent with a narrow remit can have short instructions and still be good at its job, because it never has to hold the whole system in its head at once. The PA does not need to know how the blog builds. The reviewer does not need to know why I chose a particular worker binding, and that is a feature: the value of review is partly in not sharing the author's assumptions.
The roles are also deliberately lopsided. Chief cannot write production code. Engineer cannot merge its own work. Sentry does not get to decide what to build. Nobody holds both the pen and the stamp.
Sidebar sections
The sidebar is split into Dev and Admin. Engineer and Sentry sit in Dev; PA and Dr. Eggbot sit in Admin. Chief works across both without being buried in either.
This is presentation, but it does real work. Before the split, every conversation sat in one list and the only signal about who did what was the name. Sections give you a quick filter for "is this a build problem or a life-admin problem", and they stop unrelated traffic from competing for attention. It also makes the shape of the team legible at a glance, which matters more than I expected when there are five of them.
pstack as the engineering playbook
Engineer has pstack installed: 52 skills that load on demand. A skill is a procedure the model pulls in when the task matches it, rather than another thousand tokens of system prompt that apply to everything and therefore nothing.
The ones that earn their keep:
- architect before writing code, so types and module boundaries get decided before they get baked in
- arena when one attempt would lock in the wrong shape: several candidates, pick a base, graft the best parts of the losers
- swarm for fan-out work that is more about coverage than cleverness
- interrogate for adversarial review from more than one angle
- tdd when there is a cheap local test target, which is not the same as always
Two honest caveats. Skills are documentation with teeth, so they go stale like documentation: a skill that says "run the tests" is worth less than a check that refuses the merge. And a library of 52 playbooks is only useful if the agent picks the right one; the failure mode is a swarm when you wanted a scalpel.
GitHub, with a real review gate
GitHub is connected through an MCP server, so agents can read repositories, branches and pull requests, push files and open PRs without me relaying anything through a shell. The MCP covers most of it; gh fills the gaps and runs the checks.
The interesting part is not the connection. It is the ruleset.
Every active repository, 31 of them, carries a branch ruleset called Sentry review baseline. Across all branches, with no bypass actors:
- one approving review is required
- a push dismisses stale reviews
- the most recent push must be approved
- every review thread must be resolved
The detail that makes this more than theatre is identity. Sentry reviews from its own GitHub account, sentry-bassett, with write access to the repository. If Sentry reviewed as the same user as Engineer, GitHub would treat it as self-review and the approval would be worthless. The gate only works because the two sides are different people as far as GitHub is concerned.
I will be honest about the timeline: the ruleset is new, and the PRs merged before it went in have no approving review on them. That is precisely the problem it exists to stop, and the next PR is the test.
CI runs on every pull request and on main: typecheck, post validation and the test suite, which builds the site from scratch to catch static-hosting regressions. It runs on a self-hosted runner rather than a hosted one. CI is not the gate; the review is. The checks are there so the reviewer is not the first person to find out the build is broken.
Cloudflare email routing
Agents need addresses, and running a mail server to get them is not a trade I want to make. agents.bassett.network is delegated to Cloudflare Email Routing: its MX records point at route1, route2 and route3.mx.cloudflare.net, and the SPF record includes _spf.mx.cloudflare.net.
Each agent gets its own address. Mail to that address hits an Email Routing rule, which hands the message to a Worker's email() handler. The worker turns MIME into a small JSON payload, posts it to an OpenBot webhook, and the webhook starts the routine that wakes the right agent.
So email is not a mailbox any more. It is an API call with a very old client. That changes what you have to think about:
- The body is hostile input. Quoted replies, signatures, tracking pixels and HTML all arrive before the instruction does. The worker has to hand over plain text, capped in length, with the noise stripped.
- The address is a capability. Anything that can send mail to
engineer@can start work, so the webhook has to be authenticated and the routine has to check who sent the message. An inbox that anyone can post to is a remote control for your repository. - Email is inbound only. Cloudflare Email Routing delivers mail; it does not send it. Replies are a separate problem with a separate binding, and I would rather keep that split explicit than pretend one service does both.
The pull request pipeline
The pipeline that matters most is the one that starts when code is ready for review:
GitHub pull_request event
|
v
Cloudflare Worker (public endpoint, signature check)
|
v
OpenBot webhook (private, token authenticated)
|
v
Sentry routine (review the head SHA)
The webhook fires on opened, synchronize, reopened and ready_for_review. The worker verifies the GitHub signature, reduces the event to the repository, pull request number and head SHA, and posts that to OpenBot. OpenBot is not exposed to the internet; the worker is the only public surface, and it knows about exactly one kind of event.
Four details that decide whether this works or quietly rots:
- The head SHA is the unit of review. "Approved" means approved at a commit, not approved in general. The ruleset enforces the same idea by dismissing stale reviews on push.
- GitHub retries. Deliveries can arrive twice, or out of order. Deduplicate on the delivery ID or on repository, PR and SHA, or Sentry will review the same commit three times and charge you for the privilege.
- Acknowledge fast. GitHub gives a webhook ten seconds. Return
202and do the work asynchronously, or the delivery is marked failed and retried while the first attempt is still running. - A silent worker is worse than a cron. With polling, a broken job shows up as nothing happening. With webhooks, a broken worker shows up as nothing happening too, except nobody is looking. Log every delivery and keep a way to replay one.
Why a worker instead of a GitHub Action? Actions could call OpenBot directly, but then the token lives in repository configuration, and the pipeline only sees events GitHub chooses to run workflows for. A worker keeps the secret on the edge, works for anything that can send a signed HTTP request, and gives one place to look when a delivery goes missing.
The Agent Email Routing skill
Provisioning an agent inbox is the same eight steps every time, and every one of them is easy to half-do: create the address, add the routing rule, bind the worker, set the agent's webhook and token, send a test message, confirm the routine actually ran, record the address in the agent's instructions, and write down how to remove it.
That is now a skill, Agent Email Routing. It exists because Dr. Eggbot should be able to add a sixth agent without me remembering the order, and because the failure mode of a missed step is an address that looks live and silently drops mail.
What the skill deliberately does not do is hold secrets. It names the step where a token is needed and leaves the value in the vault. A skill is shared documentation; a credential in a skill is a credential in every conversation that loads it.
What I would fix next
Three things, in order:
- Reviewer access is the linchpin. If
sentry-bassettloses write access, the gate degrades from a block to a comment, and nothing will look broken. That is worth a periodic check. - Worker observability. Email and webhooks are both fire-and-forget from the sender's point of view. A delivery log with a replay button is the difference between "the agent ignored me" and "the worker never ran".
- Trust boundaries on inbound mail. The message is data, not instructions. Sender allowlists, small payloads, and no tool selection from message content. The moment an email can ask an agent to change its own permissions, the whole thing is a liability.
The shape of it
What I have now is not an autonomous software company. It is a small org with one hard rule: the person who writes the code does not approve it. Everything else is plumbing — a sidebar that groups the work, a skill library that keeps the engineer's habits consistent, an email address that turns into a webhook, and a review that starts on its own when a branch is ready.
The rule is the part I would keep if I had to throw the rest away.