How a run works
Every request you send becomes a run. A run always follows the same path, so a request of a known kind gives the same kind of result each time.
The path of a run
Section titled “The path of a run”- Admit. Before anything starts, the product checks that you may do this, that your plan allows it, that you have credits, that the budget is not used up and that the stop switch is off. If one of them blocks the run, it says which one and what you can do about it.
- Plan. In plan mode, or for a large request, the lead persona proposes a plan. You approve it or edit it.
- Build. The lead works with other personas through the engine to change the app. You see each step, the files that change and the text the personas write, live.
- Check. The same checks run every time: a type-check, a build, and a browser check of the preview that looks for console errors and takes a screenshot.
- Fix. If a check fails, automatic fixes go first: the formatter, the linter’s fixes and a table of known errors that each have a fixed repair. If that is not enough, an agent gets at most three fix rounds.
- Record. The result is saved as a restore point, and usage and audit entries are written.
- Finish. The preview shows the result, or the run stops at Needs you with the reason.
Who does the work
Section titled “Who does the work”The work is shared between personas, which are roles with fixed instructions, tools and limits. The first ones are:
- a lead, who plans and delegates;
- a front-end builder and a back-end builder;
- a checker, who runs the checks and writes no product code;
- a code reviewer and a security reviewer, who only read, and use a different model family from the builders;
- a designer, a release operator, a docs writer and a git steward.
The Team screen lists them. A persona is a role; a character is just the name and picture a persona wears in the Studio.
What you see while it runs
Section titled “What you see while it runs”The conversation shows events as they arrive: the plan, each step, tool use, file changes, checks and the cost so far. If your browser disconnects, it reconnects and receives what it missed, so nothing is lost from the view.
You can interrupt a run at any time if you have the permission to.
Approvals
Section titled “Approvals”Some things are never done without a person. These land in Needs you:
- publishing an app;
- a data change that would destroy data;
- spending past a run’s budget;
- turning on a new connector.
An approval is an action by a signed-in member. An agent cannot create one or give one. See The security model.
Limits that keep a run under control
Section titled “Limits that keep a run under control”- A cost limit, a time limit and a step limit for each run; a run that reaches one stops.
- Monthly limits per project and per organisation.
- A spend check-in that pauses a run at a threshold and asks you.
- A stop switch that destroys every sandbox of your organisation. Only members who hold the stop-switch permission can use it, and its use is recorded.
Why a run can fail
Section titled “Why a run can fail”A failed run states one of these reasons:
| Reason | What it means |
|---|---|
| Checks failed | The checks still failed after the automatic fixes and the fix rounds. |
| Cost limit | The run reached its cost limit. |
| Time limit | The run reached its time limit. |
| Step limit | The run reached its step limit. |
| Interrupted | A member stopped it. |
| Engine error | The engine that drives the agents reported an error. |
| Rules changed | The run’s rules did not match the expected version, so it stopped rather than continue. |
| Sandbox lost | The sandbox went away during the run. |
| Refused | The run was not allowed to start. |
| Internal | Something went wrong inside the product. |
A run that is stopped by a restart of its sandbox or of the project’s session resumes from its saved events and the last restore point.
What a run costs
Section titled “What a run costs”Each run uses credits; see Plans and credits. Fix rounds are recorded on their own so that they can be priced differently from ordinary work.