Bonsai
Documentation

Driver and third party

Bonsai assigns only two kinds of agent to an issue. The driver carries an issue end to end in one session and writes back when it closes; the third party is a fresh session for the statuses given to another model group. Both are built in, so there are no roles to maintain.

Bonsai assigns only two kinds of agent to an issue: the driver and the third party. Both are built into Bonsai. You don’t create them, and there are no roles or role notes. What you set, on the Issue Type page, is which candidate models each model group has and which statuses go to a group other than the driver’s.

QuestionAnswer
What it isThe driver is an issue’s main agent: every status left to it happens in one session, and so does the final writeback. The third party is a reviewer from outside that session: a fresh session for each status given to another model group
Who it belongs toIt follows the Issue Type. Types live in your personal space, so the candidate models are yours; in one shared project, two people each use their own
Who can change itYou, on the Issue Type page: the candidates of each model group, and who does each status. The model a group uses on one issue can be changed in that issue’s properties
Related conceptsAssigned by Automation; works under the rules of an Agent; runs on a runtime; is the computed assignee during an Issue’s AGENT’S TURN

Who does a status

The flow chart of a type only says the order of the work. Who does each status is set on the status:

The status isWho does it
Left as it isThe driver, continuing its one session
Given to another model group, such as ReviewerA fresh session, with a model from that group
Ticked “Prefer a different provider”A fresh session, with a model from a different provider than the driver’s when the group has one

Driver

  • Every status goes to the driver unless you say otherwise.
  • One session per issue. The first time the driver is assigned it starts a session; every later status continues that session. When the issue waits for you in between and you pick a path, answer a decision or resume, it is still the same session and the driver remembers what it did. It only starts over on another machine, or when the runtime cannot continue a session yet.
  • The writeback after the work is also the driver’s. When the issue enters Closed, the driver runs once and writes what is worth keeping back into the project notes. The Completed card in the Inbox reports whether the writeback happened from that run’s real state.

Third party

  • A status given to another model group is done by an agent independent of the driver. It always starts its own session, without the context of the driver’s session. It suits adversarial review.
  • It can use a different model, and with “Prefer a different provider” a different provider. If you only subscribe to one provider, the same harness with another model works too.
  • When the third party is done, the issue moves along the type’s paths: back to the driver, on to the next status, or to you when the next path needs a person. When a review sends the issue back to the driver, Bonsai raises the issue’s effort by one level before assigning.

In the built-in types the review steps (Reviewing, Verify Staging, Checking, In Review) go to a group called Reviewer.

Model groups

A type’s model groups are lists of candidate models, written harness/model. The first group is the driver’s; you add and name the others. The Issue Type page offers the harnesses and models your runtimes report.

The first time a group runs on an issue, Bonsai picks one of its candidates and writes it into the issue’s agents: line. From then on that group uses the same model on that issue. Each group shows as a row in the issue’s properties, where you can change it. A group with no candidates uses the runtime’s default.

How each step is done

Bonsai says what each step should do, in instructions placed in the <step> block at the top of the message each step starts with (not shown in the UI). A driver that continues its session gets the new step’s block too, so it always works from the current step’s instructions. The Extra prompt you write for a status on the type page follows them, together with the paths out of that status and their conditions. Use the Extra prompt for what an agent can’t tell from the context or the flow, or leave it empty. The protocol parts (write back with a summary, log what isn’t finished, stay on the free paths) live in code, and the Extra prompt cannot override them.

FAQ

Can I create roles of my own?

No. Bonsai has no roles and no role notes. The only two agents are the driver and the third party; what you shape is the model groups and which statuses they do.

Where do I change the model?

The candidates: on the Issue Type page, per model group. The model one issue uses: in that issue’s properties, one row per group.

Is the driver the same as the issue’s owner?

No. The owner is always a person and never changes; the driver is an agent that works for the owner during the agent’s turns. See Agent.

Is the third party a different product or account?

No. It is another session on your own runtime, with a model from the group you chose.

Can other people use my driver and runtime?

The driver follows your types; other people see their own. Today only the machine’s owner can use a runtime; see runtime.