Introduction

OverviewArchitectureAgent Experience

The product

This repository

Structure

Usage

Other

Overview

OPB Brain is the system of record for agent work

OPB Brain is the system of record for agent work. Humans and agents write intent, state, knowledge and results into it. The work itself happens somewhere else: on remote workstations running Claude Code or Codex, which claim tasks, do the work in real repositories, browsers and terminals, and write status, events and artifacts back.

An Agent in this system is a CRUD record. It has an identity, a persona, capabilities, a home machine and a status. A Task is the unit of intent. Nothing executes inside the app.

   Human ──creates──▶ Task ──queued──▶ [ OPB Brain: DB + API + MCP ]
                                             ▲            │
                                    write-back│           │claim / read context
                                             │            ▼
                              Remote workstation: Claude Code, Codex,
                              browser automation, shell, GitHub

What runs today

The repository is a Bun and Turborepo monorepo. These parts are built and working:

  • Three Next.js applications: apps/web (marketing, port 3001), apps/app (the authenticated product shell, port 3000) and apps/api (health check, keep-alive cron, Clerk and Stripe webhooks, port 3002).
  • Clerk authentication, with sign-in and sign-up routes in apps/app.
  • Cloudflare D1 via @repo/database (raw D1 at runtime; Prisma schema for tooling). Workspace tenancy is implemented; most domain tables are still unbuilt.
  • The Quiet Instrument design system, implemented as tokens in packages/design-system/styles/globals.css and checked by bun run design:lint.
  • The supporting platform packages: Arcjet, KV rate limiting, Stripe, Resend, PostHog and Cloudflare R2.
  • This documentation site.

What is not built yet

The pages under Concepts and Interfaces describe the intended shape of the product. None of it is running:

  • The domain tables. Workspace, Agent, Machine, Project, Task, Run, Event, Artifact, Comment, Document, Approval and the credential tables do not exist. The Prisma schema still ships the template's Page stub.
  • The MCP server at /mcp, the REST API at /api/v1, and the GraphQL endpoint at /graphql.
  • Leasing, the task state machine, and the write-back contract that depends on both.

Read those pages as design, not as documentation of behaviour you can call. Each one repeats this in its own words.

Why it exists

Agent work today lives in one terminal and one context window, and dies when the session ends. OPB Brain is designed to make it durable, queryable and multi-player.

  1. Centralize. One place for tasks, decisions, documents, links, artifacts, credential references, run logs and agent identities.
  2. Durable state. The database, not a context window, is the source of truth. Any agent, on any machine, at any time, can reconstruct full working context from the API.
  3. Observable. Every agent action is an append-only event. Humans watch progress live.
  4. Handoff. An agent that dies mid-task loses nothing. The lease expires, the task requeues, and the next agent reads the same record.

What it is not

  • Not an execution engine. No LLM inference and no agent loops run server-side.
  • Not a sandbox, a container orchestrator, or a CI runner.
  • Not a chat app. Conversation is an artifact attached to a task, not the primary object.
  • Not a secret store. The design holds references to secrets, never secret values.

The prime constraint

The primary user of every surface is an AI agent. Humans are the secondary user.

Every API, schema, page and error message is designed so that an agent with no prior context can discover what exists, learn the rules without guessing, act idempotently, verify the result, and leave enough behind that the next agent needs no explanation. In practice that means self-describing endpoints, machine-readable state machines, explicit next actions, RFC 9457 errors carrying a hint, idempotency keys, optimistic concurrency, token-efficient response views, and a stable data-testid on every interactive element.

These rules gate review. They are stated in full in the agent experience page.

Where to go next

  • Tasks is the centre of the domain. Start there.
  • The MCP server is the primary door a remote agent uses.
  • Architecture maps the applications and packages in this repository.
  • Quickstart gets the monorepo running locally.