Web console
The backend serves a browser console at /ui/ on the same address as the
REST API. It submits runs, follows them live, shows reports with their
criteria and evidence, cancels runs, runs a finished plan again, and
reviews outcome actions. It uses only the client routes; it
adds no capability the API and the CLI do not have.
Opening it
Start the backend (saci backend start, command line) and open
http://<backend.listen>/ui/; / redirects there. When the backend
requires a client token (backend.auth.token_env,
authentication) the console asks for it before
showing anything else.
A backend built without the console answers /ui/ with a short page that
says how to build it; the API is unaffected.
What it shows
- Runs: newest first, with their status, units done and environment.
Active runs refresh every five seconds. Load more follows the API’s
cursor.
- New run: import the entry plan and every procedure it follows (files
or a folder), check their bundle paths, pick the environment and policy
(their limits and outcome actions are shown), and start. Plan problems
come back with their file and line and are marked in the source.
- A run: its outcome and reason, progress, environment, policy, model,
worker image and times, and six views. The worker image shows its
reference with the tag, and the digest or image ID that identifies the
exact image (worker image).
- Results: each unit grouped by phase, nested under the procedure
invocations that reached it, with its attempts, the authored action,
each expected result with its status, whether a mechanical check or the
model’s judgment decided it, and the evidence it cites. Cleanup that
did not run is called out.
- Activity: the live event feed. It follows the newest event until you
scroll away or pause it, and keeps the newest 500 on screen. A finished
attempt shows its model requests, the time and tokens spent on them, and
the time spent in tool calls.
- Plan performance: where the run spent its time, to show which phases
and steps to make faster. The view uses the attempt times and timing in
the report (see
AttemptTiming in contracts) and has
three parts:
- Where the time went: the run time, and how much of it went to model
requests, tool calls, other time in units (worker and assessment) and
time between units (worker start, sequencing, shutdown). It also
shows the model requests, the mean time per request, the tokens and
the attempts.
- Timeline: each phase and its units on the run’s time axis. Each
attempt is a bar, split into model, tool and other time. A striped bar
is an attempt that still runs, or that has no timing because an older
worker image ran it. Select a unit to open it in Results.
- Slowest units: the 10 units that took the longest, with their share
of the run, model, tool and other time, model requests, output tokens
and attempts. Show all lists every unit that ran.
While the run is active, the values are the values so far.
- Plan: the documents retained with the run and the units the backend
expanded from them.
- Environment: the Saci version and commit of the backend and the
worker, and the worker container: image, operating system, kernel,
architecture and tool versions
(environment details).
- Outcome actions: the run’s actions and their delivery.
The selected view, unit, attempt and evidence are part of the address, so
a link opens the same place.
A unit with a failure investigation shows an
Investigation button with its state.
- Investigations: the investigations of all runs, newest first, with
the failed unit, the plan, the status and the number of hypotheses.
Active investigations refresh every five seconds. Load more follows the
API’s cursor.
- An investigation: its state, the investigated plan, run and unit, and
the times. While it runs, the page refreshes every three seconds. Once the
agent concluded, it shows the summary, the bug or the reason for none,
and each hypothesis with its confidence, its code locations and the
evidence it cites. For a repository on GitHub or GitLab, a code location
links to the cited lines at the cloned commit. Source code lists the
repositories, their refs and the cloned commits. Agent evidence lists
every observation of the agent. Agent activity opens the event feed of
the run that executes the investigation. Only
https addresses become
links.
- Outcome actions: actions across runs, one delivery state at a time,
oldest first. Opening one shows the exact arguments, their digest, the
idempotency key and the history.
- Connection: whether the backend answers and whether the console has
a token.
Evidence is shown as recorded: commands, requests and outputs exactly as
retained, with truncation and byte counts, [REDACTED:NAME] markers
highlighted, and control characters (terminal escapes, bidirectional
overrides) shown as visible symbols rather than interpreted. Recorded URLs
are never fetched or turned into links.
Decisions it asks for
- Cancel run asks for confirmation. The run shows Cancellation
requested until its lifecycle reaches
finished
(cancelling).
- Run again is on a finished run that has a plan (not on an
investigation). After a confirmation, it submits a new run with the plan
documents of this run (
GET /api/v1/runs/{run_id}/plan) and the same
environment, policy, and start unit if one was selected. It then opens
the new run. The new run uses the
current configuration of that environment and policy. The submission is
retry-safe, as described in submissions and lost answers.
- Approve and send or Reject an action waiting for approval. The
decision names the digest of the arguments on screen. If the action
changed meanwhile (
digest_mismatch, action_not_pending), the console
reloads it and asks you to review it again; it never retries a decision
by itself.
- For an
unknown delivery, It happened or It did not happen
records what you found on the remote system and sends nothing; Send
again queues the same arguments after a second confirmation that says
whether the action has an idempotency key
(retries and restarts). An error
delivery offers Send again only.
- Nothing is changed optimistically: the screen shows what the backend
answered.
Submissions and lost answers
Each submission carries a random Idempotency-Key, kept for as long as
the request stays the same. When the backend’s answer is lost
(network failure or a 5xx), the console says the run may exist, keeps the
key, and Retry start resends the identical request, so the backend
returns the original run instead of starting another. Changing the plan or
settings afterwards starts a new submission with a new key. While a
submission is unconfirmed, leaving the page asks for confirmation.
The token
The client token is kept in memory only: never in local or session
storage, cookies, the address or logs. Reloading the page or a 401
forgets it, together with every response the console holds, and asks for
it again. Disconnect on the connection screen does the same. The console
sends the token only to its own origin.
Deployment
The console is served by the backend from files built into its binary, so
API calls are same-origin: no CORS configuration, and the backend’s TLS
and network policy apply unchanged. Responses carry a restrictive
Content-Security-Policy ('self' only, no inline scripts or styles, no
framing), X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer
and X-Frame-Options: DENY. Files under /ui/assets/ are named by content
hash and cached for a year; index.html is revalidated on every load. Any
other path under /ui/ answers index.html, so deep links reload; paths
under /api/v1 always answer JSON.
The container image (Containerfile) builds the console in a Node stage
and embeds it in saci-backend. The Helm chart needs no change: the
console is on the backend’s service port.
Next steps