Skip to content
AlbertCode SWE

Using the agents

Agent execution

Where the agents run, how a run is started and answered — interactively, from a script, in CI, or on a service your organisation hosts — and why this website never executes them.

Where the agents can run

Both agents were checked against four places code could run. Only one is supported today.

Environment Supported Notes
Your computer (Windows, macOS, Linux) Yes The way both agents are distributed and documented
A service your organisation runs Client support AlbertCode SWE Agent: albertcode --url <address> --api-key <key>. mini-AlbertCode: albert-mini attach <url>, and albert-mini serve --host to listen beyond this machine, with authentication. Deploying such a service yourself isn't covered by the public docs
Entirely in a web browser No The agents are native applications that need your files, your toolchain and a model connection
Hosted by albertcode.dev No Not offered. The website never runs either agent or any code you give it

The run planner is designed around that: it prepares the exact commands for your machine and reads the output you bring back, entirely in your browser.

Interactively

Terminal
cd your-project
albertcode            # or: albert-mini

Type a request. The current mode decides what a change does (see Architecture); /plan and /do choose for one request.

Mode Switch with
AlbertCode SWE Agent /mode governed, direct, auto or ask; the mode chip in the browser
mini-AlbertCode SWE Agent Tab cycles modes in the terminal; one click each in the browser. /plan, /do or /direct auto for a single message

Answering the gates

In the terminal a gate is a question over the prompt; in the browser it is a card. mini-AlbertCode documents a key for every answer, the same in both interfaces:

Gate Answers
The plan A approve and build · E ask for changes · D read the whole plan · R reject
The result A accept into your files · V view the diff · E ask for changes · X discard · R reject
A write (Direct · ask each write) A allow once · Shift A allow the rest of the task · N decline
A change offered (Ask only) P plan it first · O do it directly

An answer given in one interface is seen at once in the other, and a task is never answered twice.

From a script: run

Both agents send one request without the interface, print what happens, and end with the answer or the change:

Terminal
albertcode run "Why does the cart total round down?" --lane ask
albertcode run "Add a test for the 10% code" --approve plan,result
albert-mini run "rename the helper" --lane direct_auto --json
Option Meaning
--lane MODE governed, direct, direct_auto or ask, for this request only
--approve GATES Answer these gates on your behalf: plan, result, writes, or all (comma separated)
--json Print every event as one JSON line
--timeout SECONDS Give up after this long (mini-AlbertCode's default is 3600)

Without --approve, a governed change stops at its plan and exits with code 3. Open the session to read and answer it (albertcode --session <id>, albert-mini -s <id>, or either browser).

mini-AlbertCode documents its exit codes in full:

Exit code Meaning
0 Done: answered, or the change was applied
1 Failed, or the change was rejected
2 Refused: a wrong option, or nothing that could run it
3 Stopped at a gate --approve did not cover
124 Timed out

From a script: one step at a time

AlbertCode SWE Agent also exposes every step of a governed task as a subcommand that prints JSON, so a script can hold each gate:

Terminal
TASK=$(albertcode create "Add tests for the billing module" --workspace ./repo | jq -r .id)

albertcode show    "$TASK" | jq -r .state     # wait until it says plan_ready
albertcode approve "$TASK"                    # approval 1: the plan
albertcode show    "$TASK" | jq -r .state     # wait until it says completed
albertcode diff    "$TASK"                    # read the change
albertcode accept  "$TASK"                    # approval 2: apply it

albertcode reject <task> discards a plan; albertcode rollback <task> throws away a task you have not accepted.

In CI

The run command and the installers' --yes option are what a CI job needs. A sketch for a job that asks a question and keeps the event log:

Terminal
curl -fsSL https://raw.githubusercontent.com/huynvic/mini-albertcode-swe-agent/main/installer/install.sh | sh -s -- --yes
albert-mini run "Summarise what changed in this branch and any risk you see" --lane ask --json > run.jsonl

A job also needs a model connected without the interactive step. AlbertCode SWE Agent's profiles do that, and suit scripts and shared services:

Terminal
albertcode configure --name local --provider local --base-url http://localhost:11434/v1 --model <model>
albertcode --profile local

Guides for specific CI systems aren't published yet — "Guides for running AlbertCode in CI" is on the roadmap. Treat this as a starting point, not a supported recipe.

Inspecting results

Bring output back to the run planner to read it:

  • the --json event log of a run, and its exit code;
  • albertcode show <task> — the task as JSON, with its state;
  • albertcode diff <task> — the files and the unified diff, as JSON;
  • git diff after accepting a change.

The inspector runs in your browser and never uploads what you paste. The --json event format isn't publicly documented, so events are shown generically: their type and message fields, with error-looking events highlighted.

A guide written for this site, covering both agents. For every command and setting, see the full reference for AlbertCode SWE Agent and mini-AlbertCode.