# ub-agents

> Decide in the session, deliver in the loop. A coding loop for GitHub: any agent, no server.

Work out the change with Claude Code or Codex, then file it as an issue. A loop on your own machine prepares it, implements it, has a second agent review it and merges what your policy allows. When a decision needs a person, it stops and asks on the issue. Every step is a comment on GitHub, so there is nothing to host, and launchers on a laptop and a server share one queue.

It is for engineers and teams of up to a few dozen people with a hacker, hands-on mentality: full control, without a convoluted setup or cloud infrastructure to run.

Under the hood, it is a glorified script that polls labels and calls an agent. You could write one in an afternoon. This project is for everything after that afternoon: duplicate claims, interrupted runs, endless review loops, comments from strangers and GitHub failures. Browse [our closed issues](https://github.com/uberblick-ai/ub-agents/issues?q=is%3Aissue%20is%3Aclosed) to see what it took. It makes coding-agent work repeatable, inspectable and recoverable: the model is a black box already, and the loop around it shouldn't be another one.

Install on macOS or Linux with `brew install uberblick-ai/tap/ub-agents`. Source, issues and releases: https://github.com/uberblick-ai/ub-agents

## Docs
- [Motivation](https://agents.uberblick.ai/docs/motivation.md): ub-agents started because we spent more time managing coding agents than letting them work: starting sessions, waiting for an agent to ask something, carrying its work to a reviewer, carrying the review back and restarting runs that died. We spent more time waiting than deciding.
- [Installation](https://agents.uberblick.ai/docs/installation.md): Install ub-agents with Homebrew, on macOS or Linux.
- [How the loop works](https://agents.uberblick.ai/docs/how-the-loop-works.md): ub-agents passes work between agents with GitHub labels. A label says which role works on an issue or pull request next. GitHub holds all the state, so there is no server to run.
- [Security model](https://agents.uberblick.ai/docs/security-model.md): Agents use the access you give their CLI and launcher. A private worktree separates each run's changes; it does not isolate the agent from the machine.
- [FAQ](https://agents.uberblick.ai/docs/faq.md): You decide how far they go. Agents never commit to your default branch: each run works in its own worktree and branch, and every change arrives as a pull request. A reviewer agent checks it, ideally on a different model from the one that wrote it, and sends it back with findings until it is fit to merge. A serious finding still open after three rounds goes to a person. Your CI runs on every pull request, and a ruleset with required checks keeps anything red off your default branch.

### Configuration
- [Configuration](https://agents.uberblick.ai/docs/configuration/index.md): ub-agents.yaml sits at the root of your repository. ub-agents init writes a starter file, and ub-agents doctor --offline validates it. Unknown keys are errors.
- [Agents](https://agents.uberblick.ai/docs/configuration/agents.md): An agent is one role in your workflow, such as implementer or reviewer. It starts when its trigger label appears, does its job and reports an outcome. Each agent has either a runtime or a command.
- [Runtimes](https://agents.uberblick.ai/docs/configuration/runtimes.md): A runtime is the agent CLI that does the work. Claude Code and Codex are built in. Anything else can run as a command.
- [Permissions](https://agents.uberblick.ai/docs/configuration/permissions.md): ub-agents adds no permission flags. The CLIs start in their default headless modes and usually cannot edit files or push. Grant each role what it needs with runtime-args.
- [Outcomes](https://agents.uberblick.ai/docs/configuration/outcomes.md): When an agent finishes, it reports a named outcome. ub-agents checks the result on GitHub, removes the agent's trigger labels and applies the labels you declared.
- [Instructions](https://agents.uberblick.ai/docs/configuration/instructions.md): Each agent's job is a Markdown file in your repository. init writes starter files for five roles; rewrite them in your own words.
- [Queue](https://agents.uberblick.ai/docs/configuration/queue.md): Decides what runs next: higher priority first. At equal priority, work already under way, such as open pull requests, goes before new issues, and older items go before newer ones. Issues wait for their blockers.
- [Limits](https://agents.uberblick.ai/docs/configuration/limits.md): Claim timing, timeouts and retries. Set them under limits; timeout and retry keys can also be set on one agent.
- [Stop labels](https://agents.uberblick.ai/docs/configuration/stop-labels.md): A stop label pauses all work on an issue or pull request until a person removes it. The default is needs-human. Agents never set workflow labels themselves; the launcher applies them from the reported outcome.
- [Approvals](https://agents.uberblick.ai/docs/configuration/approvals.md): Decides whose input reaches the agents. On by default for public repositories, off for private and internal ones.
- [Launcher accounts](https://agents.uberblick.ai/docs/configuration/launchers.md): Launchers on different machines share one queue through GitHub. By default, any account with write, maintain or admin access can run one, so engineers can use their own gh logins.
- [Command agents](https://agents.uberblick.ai/docs/configuration/command-agents.md): An agent can be any program instead of an agent CLI: a script, a linter or another tool.
- [Cleanup hook](https://agents.uberblick.ai/docs/configuration/cleanup.md): After every run, the launcher removes the run's private worktree. The optional cleanup hook runs just before that, to stop things a run started, such as test services.
- [Runtime updates](https://agents.uberblick.ai/docs/configuration/runtime-updates.md): Keeps Claude Code, Codex, the GitHub CLI (gh), Uberblick (ub) and the launcher itself up to date, once a day, between runs. Off unless you turn it on; leaving out a CLI runs no updater for it.
- [Checkout setup](https://agents.uberblick.ai/docs/configuration/checkout-setup.md): Set up dependencies in the control checkout before each new run and in new private worktrees.
- [Loop events](https://agents.uberblick.ai/docs/configuration/events.md): Run a project command when work starts or a run finishes, for example to notify Slack.

### Commands
- [View all commands](https://agents.uberblick.ai/docs/commands/index.md): Run ub-agents help for an overview of the commands people run. Agents also use report, retrospective and read; see those sections for details.
- [ub-agents init](https://agents.uberblick.ai/docs/commands/init.md): Run ub-agents init from the root of a clean checkout of your project. It checks your machine and GitHub access and asks a few questions. Cancel any time before you confirm, and nothing is written.
- [ub-agents doctor](https://agents.uberblick.ai/docs/commands/doctor.md): Run ub-agents doctor when a launch fails or you're unsure your setup is complete. It checks your machine, the configuration, GitHub access, labels and agent CLIs, and shows a fix for every problem.
- [ub-agents launch](https://agents.uberblick.ai/docs/commands/launch.md): ub-agents launch runs the loop on your machine: it watches the queue and runs the agent for the next item. Start it in a clean checkout of your default branch and leave it running. Teammates can run their own launchers on the same queue.
- [ub-agents status](https://agents.uberblick.ai/docs/commands/status.md): Run ub-agents status to see the queue: what's running, what's next, what's waiting and what needs a person. It never changes anything on GitHub, so it's safe to run anytime.
- [ub-agents monitor](https://agents.uberblick.ai/docs/commands/monitor.md): Run ub-agents monitor to watch the loop in a browser: what needs a person, what runs now, what runs next and what ended in the last 24 hours, on every machine that runs a launcher for the repository. The terminal view shows only this launcher's runs; the monitor shows all of them, including a server's. It never changes anything on GitHub.
- [ub-agents retry](https://agents.uberblick.ai/docs/commands/retry.md): Run ub-agents retry once you've fixed why an item stopped. It resets the item's failure count, records your reason on the issue or pull request and switches the labels back: stop labels such as needs-human come off, and the agent's trigger label goes on. A running launcher picks the item up on its next poll.
- [ub-agents help](https://agents.uberblick.ai/docs/commands/help.md): Run ub-agents help for an overview of the commands people run, or ub-agents help COMMAND for one of them. It works without configuration or network access. ub-agents --version prints the installed version.
- [Loop internal commands](https://agents.uberblick.ai/docs/commands/loop-internal.md): Agents run these commands themselves; the built-in run rules tell them when and how.

### Guides
- [Add more launchers](https://agents.uberblick.ai/docs/guides/add-a-launcher.md): A launcher runs wherever you start it: your laptop, a teammate's or a server. For a loop that keeps going overnight, use an always-on machine. All launchers for a project share one queue through GitHub, and a claim keeps two of them off the same item.
- [Unstick an item](https://agents.uberblick.ai/docs/guides/stuck-items.md): Work stops for a reason, and ub-agents says which. Start with status, or ask about one item. monitor shows what stopped on every machine in a browser page, and can notify you when something new needs a person.
- [Add a step to the workflow](https://agents.uberblick.ai/docs/guides/add-a-step.md): The starter workflow passes every change through four roles: issue-preparer, implementer, reviewer and integrator. Your flow may need more, such as another check or a person looking at some changes before they merge. Add those as steps of their own.
- [How it works with Uberblick](https://agents.uberblick.ai/docs/guides/with-uberblick.md): ub-agents runs delivery: issues, pull requests, reviews and merges, all on GitHub. It doesn't hold what the product should do. We keep that in Uberblick, a shared workspace of pages and decisions that people edit in the browser and agents read over MCP. Both come out of the same work, building our own software with coding agents, and both stayed separate tools. The Uberblick motivation tells the whole story; this page covers the part where the two meet.
- [Run the loop on a public repository](https://agents.uberblick.ai/docs/guides/public-repos.md): On a public repository, anyone can open issues, comment and send pull requests, and agents act on that text with your launcher account's access. A malicious issue can try to steer them: an instruction hidden in the markup, a request to add someone's package, or "run this script to reproduce".
- [Run a command on loop events](https://agents.uberblick.ai/docs/guides/loop-events.md): The events hook runs a command of yours whenever a run starts or finishes. The command can do anything that should follow the loop's progress: post to chat, record run times and outcomes, update a board or dashboard, or start a job in another system. The Slack message at the end of this page is one example.
- [Running launchers](https://agents.uberblick.ai/docs/guides/running-launchers.md): What a launcher prints, how to stop it, and what to do when something fails. The configuration reference lists every key, and the coordination contract has the exact rules for claims, attempts and recovery.
- [Local terminal view](https://agents.uberblick.ai/docs/guides/terminal-view.md): ub-agents launch, launch --once and launch N open a read-only view of their own launcher when stdin and stdout are terminals. Use --no-ui for plain line output. Pipes, CI and services always get plain output. The view has no workflow controls: it shows what the launcher is doing, and you act through the CLI or GitHub.

### Best practices
- [Keep issues small](https://agents.uberblick.ai/docs/best-practices/small-issues.md): One issue, one change, one pull request a person can review in a few minutes. Small issues fail less, review faster and are cheap to redo.
- [Treat instructions as code](https://agents.uberblick.ai/docs/best-practices/instructions-as-code.md): Role files live in your repository. Change them in pull requests and review them like any other code.
- [Review with a different model](https://agents.uberblick.ai/docs/best-practices/review-model.md): A second model catches what the first one missed. Make the reviewer run on a different CLI and model from the agent that wrote the commit.
- [Give launchers their own account](https://agents.uberblick.ai/docs/best-practices/launcher-account.md): Run the loop with a dedicated GitHub account for your agents, with write access to this repository only.
- [Keep people on the decisions](https://agents.uberblick.ai/docs/best-practices/people-decide.md): Agents do the work; people decide what matters. Make that boundary explicit in the instructions.
- [Agent retros](https://agents.uberblick.ai/docs/best-practices/retrospectives.md): Agents notice what slowed them down: a missing pointer, an unclear rule, a long search. Retros catch that while it's fresh, so the next run doesn't pay for it again, and over time show where your documentation has gaps.
- [How many launchers one account supports](https://agents.uberblick.ai/docs/best-practices/account-capacity.md): One GitHub account supports up to ten launchers, counted across every machine and repository using it. For many short runs, put launchers beyond about seven on a second account.
- [Run launchers on a server](https://agents.uberblick.ai/docs/best-practices/launchers-on-a-server.md): A launcher on an always-on machine keeps the loop going overnight. Its agents run pull-request code as the launcher's user, with its environment, so this page is about what that user can reach and how you notice a stopped loop. Each practice says what to achieve; your service manager, cloud and monitoring decide how.
- [Upgrading](https://agents.uberblick.ai/docs/upgrading.md): A running launcher picks up configuration and instruction changes by itself, but keeps the ub-agents version it started with until it restarts. Most releases let you upgrade and restart launchers one at a time. Check the release notes before upgrading: they say when every launcher must be stopped and upgraded together because of a coordination record-format change or a new config key that older launchers reject.

## Workflows
- [The default ub-agents loop](https://agents.uberblick.ai/workflows/default/index.md): The loop every repository starts with after ub-agents init.
- [Dependabot on autopilot](https://agents.uberblick.ai/workflows/dependabot/index.md): Patch and minor bumps merge on their own once the tests pass, without anyone opening the PR. Majors, and failures one fix round can't settle, wait for you.
- [Ship to milestone branch instead of main](https://agents.uberblick.ai/workflows/milestone-branches/index.md): Each issue in a milestone merges into the milestone's own branch. The team tries the whole milestone, then lands it in main with a single merge.
