uberblick/ub-agents v0.5.4
How the loop works · How the loop works

How the loop works

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.

We call this loop engineering. You design the loop once: the roles, the labels and where a person steps in. Then you improve it from the agents' retros instead of steering each run by hand.

See the loop play through different outcomes in the workflow gallery, starting with the default loop and Dependabot on autopilot.

Labels are the queue

Each launcher looks for labeled issues and pull requests, sorts them by priority and milestone, and hands the next eligible one to its agent.

  1. Claim. The run claims the item with a comment, so no other agent picks it up.
  2. Run. The agent works in its own worktree and branch. Nothing touches main.
  3. Report. A second comment releases the claim and posts the next steps, and the labels move on to the next role. Older claim and report comments are hidden, so the thread shows the latest state.
  4. Move. Issues become pull requests, and pull requests merge as your gates allow, some automatically, others after a maintainer approves.

The diagrams show the starter labels that ub-agents init writes. Every label, role and outcome is a line in ub-agents.yaml; change it and the launcher follows. See Add a step to the workflow.

Issues: from idea to ready

A team member writes an issue needs-preparation The loop claims eligible items in order issue-preparer grounds it in the code, challenges assumptions, aims for an MVP ready Delivery picks it up needs-human A person reviews or answers someone sets it starts the agent successfully prepared; acceptance criteria set needs-human, blocked comment on GitHub, remove needs-human, re-add the label GitHub label, like ready human involved

The preparer gives each acceptance criterion a short check: a command, test or observation, or a manual check naming who performs it.

Complex issues

Instead of reporting prepared, the issue-preparer can:

issue-preparer grounds the issue, writes criteria needs-review issue-reviewer second opinion, ideally on another model ready Delivery picks it up needs-preparation review approved changes-requested apply the findings GitHub label, like ready

Both reviewers use needs-review: the issue-reviewer takes only issues, the reviewer only pull requests.

Delivery: implementer, reviewer, integrator

ready (issue) implementer branch, code, checks, opens the PR needs-review reviewer reviews the exact head commit ready-to-merge integrator updates base, checks, merges Merged · issue closed needs-changes needs-human A person reviews or answers handed-off approved merged changes-requested on merge conflict changes-requested revise the same PR needs-human blocked maintainer-merge, blocked GitHub label, like ready human involved

What may merge, and who decides, is your policy in .agents/ub_agents.md. See Instructions.

Outside contributors and approvals

An issue or PR carries a trigger label The launcher checks the input who applied the trigger who edited it since who approved the PR head The agent runs needs-human Held for a maintainer an authorized GitHub org member must approve it a maintainer started it outside input maintainer acts GitHub label, like ready human involved

On open source repositories anyone can open an issue or a pull request. With approvals on, someone with the maintain or admin role starts the work by adding the trigger label, and approves a pull request's current head with a review. Without approvals, any labeled work runs, which is usually enough for private repositories. Approvals are on by default for public repositories. See Approvals.

When work is paused

Agents pause when an issue is ambiguous, contradicts itself or your instructions (such as AGENTS.md), or needs a decision. The item gets needs-human, or an Action needed comment when the role has no such outcome, with concrete recommendations you can answer on GitHub. A crash or exhausted retries also posts an error report. Unstick an item covers each case.