A Company Brain for a live festival.
BC CrabFest is a large seafood festival in Victoria, BC, run by a small team carrying finance, kitchen, beverage, entertainment, sponsorship, volunteers, HR, and two websites at once. All of that used to live in scattered Google Docs, spreadsheets, email threads, and PDFs. I built them a Company Brain: one self-hosted system where a version-controlled knowledge base, a role-gated dashboard, and a fleet of Claude agents run the festival as a single nervous system, with every action written to an audit log.
The problem
Event operations are painful for a predictable reason: the information is fragmented and perishable.
- Scattered sources of truth. The event brief in a Google Doc, the run of show in a Sheet, the budget in another Sheet, decisions buried in email, contracts in PDFs. Nobody knows which copy is current.
- Coordination overhead. One real-world event ("the sponsor confirmed") should trigger several actions: update the sponsor record, notify a stakeholder, add a design task, refresh the dashboard. Done by hand, steps get dropped.
- No memory or audit trail. When something goes wrong the week of the event, "who changed what, when, and why" is unanswerable.
- Perishable context. Email threads carry decisions that never reach a system of record.
- Small team, high surface area. A handful of people running a dozen departments at once.
No single one of these justifies buying a dedicated platform. Together they eat the team's time and put the event at risk.
What I built
The Company Brain is a self-hosted platform that fuses three things most small organisations keep separate: a structured knowledge base, a team-facing web dashboard, and a fleet of AI agents that read, write, and act on that knowledge. It runs in production on a single Linux server, behind a reverse proxy, with the whole knowledge base version-controlled in Git.
The system has four planes: reality enters, agents reason and act, knowledge is stored, and people see it.
A dual knowledge store
The defining choice is how knowledge is held. The system uses two stores, each for what it is good at.
- Markdown is the source of truth for planning. Event details, sponsor notes, marketing plans, meeting prep. Human-readable, git-versioned, and directly usable by an AI as context.
- SQLite is the store for live operations. Expenses, revenue, people, tasks, sessions, audit logs. Anything queried and changed often stays fast.
The two stay in step automatically. Every database write triggers a debounced sync that recomputes the markdown summaries, such as department budget spend, with an hourly fallback sync as a safety net. Planning stays in readable text. Operations stay fast.
Agents that do the work
The brain routes work through specialised Claude agents under a strict orchestration protocol, so the business logic lives in configuration. Every interactive request flows through one orchestrator, the admin-assistant, which snapshots the current state for easy rollback, decomposes the request, handles the administrative parts itself, and delegates technical work to the right specialist.
A set of built-in workflows is what makes the orchestration reliable. Any status change must also update the dashboard, so the record and the display never drift. Every new paid ad, collaboration, or contest adds a row to the designer's queue. Every completed request fires a push notification. Every action appends a row to the audit log. The reliable path is the only path.
Background workers raise a specific problem: when a worker invokes the AI on its own, full orchestration would cause loops and hangs. A worker mode swaps in a stripped-down configuration that skips orchestration and handles the request directly, and a wrapper serialises invocations so concurrent runs cannot collide in Git.
How reality enters the system
Three long-running services pull the outside world in on their own schedule.
- Google Docs and Sheets sync. Polls every ten minutes, read-only, and writes JSON snapshots of the event brief, run of show, and budget. It hashes content so it only writes on a real change, then propagates the update into the markdown knowledge base. These snapshots are authoritative, so agents flag a stale upload for a human to resolve.
- Gmail worker. Watches two labels. One has the AI draft a context-aware reply for a human to review and send. The other ingests the thread into the knowledge base and audit log. Perishable email decisions become durable records automatically.
- Request queue. A durable queue lets requests arrive asynchronously from email or the dashboard, run through the AI with a timeout, support scheduled execution, recover stuck jobs, and reply back.
Outbound email has real safety rails. Recipients must be on an approved list, so it fails closed. Every send needs an explicit request flag, and every send is logged.
A complete audit trail
Every significant action, by any agent, appends a row to a single human-readable log: date, who did it, what changed, and the outcome. At fifteen to twenty entries on a working day, it is a complete operational history, the thing that makes compliance, debugging, and a post-event retrospective possible. AI-triggered actions are recorded a second time in the database and surfaced in the dashboard's own audit view.
The dashboard
The team works from a single role-gated dashboard that spans the whole operation: overview and critical path, run of show, communications, marketing and sponsors, kitchen and beverage, programming, dockside sales, people and HR, finance, and an AI assistant with the knowledge base and audit log. Access is controlled by role, from admin and manager down to domain roles like kitchen, marketing, and volunteer lead. Login is rate-limited, passwords are hashed, and email flows use passwordless magic links.
The dashboard renders the same Google Doc the festival team already edits, so "synced from Google Doc" and "last update" sit right at the top and nobody has to wonder whether they are looking at the current version.
Marketing assets live in the brain alongside the operational data, under the same access model. Anyone on the team can pull the current logo file without asking who has the latest version.
Design rationale
- Right tool for each job. Markdown for what humans read and AI reasons over, SQLite for what gets queried and changed, JSON snapshots for external truth. No single store is forced to do everything.
- Orchestration over hardcoding. Business rules live in agent configuration and prose, so the operating model evolves by editing text.
- Guardrails baked in. Mandatory logging, dashboard sync, notifications, approved-recipient lists, and staging-only website edits mean the safe path is the default path.
- Fail-safe, not fail-open. Pre-request snapshots, change detection by content hash, rate-limit backoff, stuck-job recovery, and worker-mode loop prevention make continuous autonomous operation survivable.
- Human in the loop where it counts. Emails are drafted for review, sends need explicit intent, and destructive actions are deferred to a person.
Where it stands
The brain runs in production for BC CrabFest 2026 on commodity infrastructure: one Linux box, a reverse proxy, SQLite, and Git. For a lean team running a complex live event, it collapses a dozen disconnected tools into one coherent, self-documenting system.
The takeaway
Company Brain is a working example of an AI-native operations platform. Not a chatbot bolted onto a database, but an architecture where AI agents are first-class operators of a version-controlled knowledge base, bounded by explicit guardrails and a complete audit trail.
The festival is a hard test because the surface area is enormous and the deadline does not move. The same shape fits any lean team running a complex operation across too many disconnected tools.