The dashboard
The dashboard is the web UI of a running kōjō. It is where a team watches what the factory is doing, replays a session step by step, edits and tests skills, and changes settings with a form instead of a YAML file. kojo serve serves it on the same port as the API and the webhooks (server.listen, default :8080): open server.public_url in a browser.
go run ./test/dashdev, so the repositories, people and amounts are made up.Everything a screen does goes through the HTTP API, so anything you do here can also be scripted. What you may do depends on your role; a page you cannot change is shown read-only.
Sign-in
The web UI signs people in with OpenID Connect, configured under server.auth.oidc in kojo.yaml.
GET /auth/loginstarts the authorization code flow with PKCE (S256), a state and a nonce. They are kept in a signed cookie,__Host-kojo_oidc, whose signed value also holds when it expires, 10 minutes later: the callback refuses it after that, even from a client that sends it again.- The identity provider redirects to
<public_url>/auth/callback. Register that URL as the redirect URI. - kōjō checks the state, exchanges the code, verifies the ID token and its nonce, and requires an
emailclaim and anemail_verifiedclaim that is true (see verified email addresses). An address with a character that lowercases into an ASCII letter (the Kelvin sign intok) is refused: emails are compared without case, so it would read as someone else’s. Withallowed_domainsset, other email domains are refused. - The user is recorded and gets a session cookie,
__Host-kojo_session: signed with HMAC-SHA256, valid 12 hours,HttpOnly,SameSite=LaxandSecure. The__Host-prefix makes a browser keep a cookie only when it isSecureand set by this host for the whole site, so a sibling subdomain cannot plant a sign-in cookie of its own. When the public URL is http (development), the cookies are namedkojo_oidcandkojo_session, withoutSecure. The sign-in is recorded in the audit log asauth.login. The browser then goes to the page the login link named innext(/auth/login?next=/sessions) when that is a path on this site, and to the home page otherwise: a value with a scheme, a host, a second leading slash, a backslash or a control character is not followed. GET /auth/logoutclears the cookie.
Set server.auth.session_secret. Without it kōjō generates a random secret at start, which signs everyone out on a restart and does not work with more than one replica.
Roles are not stored in the cookie. They are read from the rbac object on every request, so a role change applies at once.
A signed-in user whom rbac does not name gets viewer only when server.auth.oidc.allowed_domains is set. Without that restriction, anyone the identity provider signs in could look around, so such a user has no role: every API call answers 403 with a message to ask an admin for access.
Other ways in:
- API tokens.
server.auth.tokensinkojo.yamllists static tokens, each with aname, atokenof at least 16 characters and arole(defaultoperator). Send one asAuthorization: Bearer <token>. The CLI and MCP clients use tokens (--tokenorKOJO_TOKEN). The web UI has no token sign-in: it works with the session cookie only. - Development mode. With
dev: trueand no OIDC, every request without a token is a local admin, when it is made tolocalhost, a loopback address (127.0.0.1,[::1], any port) or the host ofserver.public_url. A request to any other name gets421: a web page can point its own name at your machine (DNS rebinding) and reach kōjō from your browser, and the name it was made to is what tells it apart. Do not expose such a server.
kojo.yaml must configure OIDC or at least one token, unless dev: true is set.
Verified email addresses
Roles are given to email addresses, so the address in the ID token decides who someone is. An identity provider that does not vouch for an address may let a person set any address on their account, an admin’s included. kōjō therefore signs someone in only when the ID token’s email_verified claim is true:
email_verified |
trust_unverified_email off (default) |
trust_unverified_email: true |
|---|---|---|
true |
Signed in | Signed in |
false |
Refused | Refused |
| Missing | Refused, with a page that names the setting | Signed in |
Some providers never send the claim; Microsoft Entra ID and AD FS are among them. For such a provider, set server.auth.oidc.trust_unverified_email: true, and only when the provider issues addresses your organization assigns (accounts in your own directory, not addresses users type in). kojo doctor warns while it is on.
This is a change for providers that leave the claim out: earlier versions accepted a token without email_verified and refused only one where it was false. After an upgrade, people of such a provider cannot sign in until an admin sets trust_unverified_email; API tokens are not affected. Google sends the claim, so a Google sign-in works as before.
server:
auth:
oidc:
issuer: https://login.microsoftonline.com/<tenant ID>/v2.0
client_id: "${OIDC_CLIENT_ID}"
client_secret: "${OIDC_CLIENT_SECRET}"
allowed_domains: [example.com]
trust_unverified_email: true
Sessions
The Overview shows the last seven days: sessions per day by status, spend against the budgets, the goal critic’s pass rate per skill, and the latest sessions. Its Limits section lists the install when it has a daily or monthly cap, then each team, each repository with limits, and each skill and person with limits or spend this month, with its spend over the last 24 hours and this month and its running sessions against them, and how many of its queued sessions a limit holds back; caps per trigger are listed below it. People are listed to operators and admins only; a viewer sees a note instead. A session held by its requester’s limit says only its requester's running-session limit, not who. Sessions is the full list, filtered by repository, status and surface. A session that a limit keeps from starting is marked held, with the limit, for example team platform has 2 of its 2 running sessions. The sessions evals start, several per case, are hidden unless you tick Show eval sessions.
Start a session
Run a session starts work by hand. Choose a repository, optionally a skill (“Let the orchestrator choose” is the default), write what it should do, and optionally name an issue or a pull request by number. A dry run does the work but pushes and posts nothing. It needs the operator role and does the same as kojo run.
One session
A session’s page shows what was asked, the result, the goal critic’s report check by check, the risk assessment the merge policy made, and the config revisions and skill versions the session ran with. A change across linked repositories lists its pull requests, one per repository. A running session can be cancelled from here. A session that a limit keeps from starting says which, and whether it waits for a slot or for the spend to fall back under the limit. At the bottom is the diff of the session’s change.
When kōjō continued one of the session’s pull requests, Follow-ups on #N lists the rounds of that pull request, oldest first: each round’s session, whether a mention (and whose) or a failed check (and which) started it, how it ended (pushed, branch_moved, answered, …) and the commit it pushed, with how many of the repository’s rounds are used. A follow-up session shows the same panel for the pull request it continued, marks itself in the list, and names the session that opened the pull request under Request. GET /api/v1/sessions/{id} returns the rounds as follow_ups. On a person’s pull request, the panel is Follow-ups on a person’s pull request #N: it names the pull request’s branch, and no session opened it.
A session that a red default branch started has the trigger “red default branch”, in the list too. Its Request names the failed check, linked, with the branch and the red commit, and folds the output of the failed checks.
A session a production alert started has the trigger alert via sentry or alert via datadog. Its Request panel links the issue, with its Sentry project or Datadog service, environment and how often it happened (Sentry reports a count; for Datadog, which does not, the row says when the issue was first seen), and folds the error report the session was given.
A session that wrote a plan before changing code shows it under Plan: what asked for it, the approach, the files likely to change, the risks, the tests, what the work leaves alone, the rough cost, the revision, and what writing it cost. While the plan waits, a banner says so, the panel shows the deadline, and an operator can Approve plan or Decline it there; a message from Messages asks for a revised plan instead. Once decided, the panel says who decided and when.
While a session is queued or running, Messages, between the summary and the replay, lets an operator tell it something without cancelling it: a correction or a detail, up to 4000 characters. Its next model step reads the message as guidance, which cannot change a skill’s goals, constraints or limits; a message does not stop the session, the Cancel button does. The section lists every message the session was given, from the dashboard and from mentions and chat threads, with who sent it, from where and when, and whether it is waiting for the next step, was read (by the orchestrator, or by which subagent), or was not read because the work ended first. Talking to a session at work has the rules.
An operator can Share a session: kōjō makes a link to a shareable report of it, a read-only, redacted page that anyone with the link can open without signing in, and shows the link with its expiry and a Copy link button. Each Share makes a new link. When settings/reports does not allow the session one, or the session is confidential, the dialog says why. An admin sees Revoke all links in the same dialog, which ends every link to the session’s report made so far, the ones in pull request descriptions included.
Replay
Below that is the replay: every recorded step as a tree, one row per step with a waterfall of durations. It covers orchestrator turns, subagents, model turns, tool calls, sandbox commands, critic verdicts, merge decisions, surface actions, the sandbox lifecycle, the plans written before code changed, and the messages people sent, at the moment a model read them. Filter by kind and text, jump between failures, and open a step to see its input and output. Commands are shown as a terminal would show them. A tool call that wrote lines of the session’s change is marked with how many (+18 in the change), and its detail lists each file with the line ranges it wrote (+) and removed (−). /sessions/<id>?step=<step id> opens the page with that step unfolded, open and in view.
kojo sessions logs prints the same steps.Diff
The diff of the session’s change, file by file. In a column of its own, each block of changed lines links to the step that last wrote it, by its number in the replay; hovering the link shows the step’s tool, skill and intent, and a · marks lines no tool call wrote (a kit’s setup, a check of the goal critic). Following a link opens that step in the replay. How the steps are worked out is in Session replay; when they could not be, the diff says why.
Skills
Skills lists what the org or one repository resolves to, with the layer each skill comes from (the repository, the org or built in) and the layers it overrides, and the drafts in progress.
Skills studio
The studio changes a skill in four steps: draft, test, eval, activate. A draft never runs in a real session.
1. Draft
Create a draft for a scope and a skill name. Without files, the draft copies the skill that scope currently resolves to. For a built-in skill that is how you customise it: the copy becomes a skill of the scope and shadows the built-in. For a new name the draft starts with a SKILL.md skeleton.
- A draft holds the skill’s files:
SKILL.md,goals.yaml,kit.yaml. Together they may be at most 1 MiB. - Every save names the version it edited. A save from a stale version is refused with 409, so two editors do not overwrite each other.
- An edit clears the draft’s test sessions and its eval run: they measured the previous content.
- Reading a draft returns its validation: schema errors, and separately the ways its kit exceeds the scope’s
settings/egress. It also returns the active version, for a diff.
Requires skill:edit.
2. Test
A test runs the draft against a repository, optionally against a chosen issue or pull request, as a dry run in a throwaway sandbox. Nothing is pushed and nothing is posted. The diff and the critic’s report are in the test session’s result, and the session ID is attached to the draft. The repository must be enabled: a test is not a way to read a repository kōjō does not work on.
Requires skill:edit.
3. Eval
An eval runs the draft against the skill’s eval fixtures in the background. The run is attached to the draft with its pass rate. See Evals.
Requires skill:edit.
4. Activate
Activation checks, in order:
- The files validate.
- The kit stays inside the scope’s
settings/egress. SKILL.mdnames the same skill as the draft.- With
require_second_reviewer: the person activating wrote none of the draft. Its author and everyone who saved its files since are its editors, listed in the draft’seditors, and none of them may activate it. - With
require_eval: the draft has an eval run that finished, with a pass rate of at leastmin_eval_pass_rate. A skill that has no eval fixtures cannot be measured that way. It needs a test run of this draft that the goal critic accepted instead. Saving a draft forgets its earlier tests, so the proof is always of the current content.
What happens next depends on the scope’s skills source:
| Source | Activation does |
|---|---|
dashboard |
Writes a new skill/<name> revision in the draft’s scope and makes it active. New sessions use it at once. |
git |
Opens a pull request that writes the files to .factory/skills/<name>/ in the source repository, from a kojo/skill-<name>-<id> branch. The skill changes when that pull request is merged. |
In both cases the draft is deleted and the activation is recorded in the audit log as skill.activate.
Requires operator.
Proposals kōjō makes
With self-improvement on, Skills has a section “Proposed by kōjō”: the changes kōjō proposed to its own skills, with their status, their eval next to the version in use’s, and how many goals each loosens. A skill with an open proposal carries its status in the skill list, and an operator can press Propose a change on a skill that self-improvement covers. A proposal’s draft is listed among the drafts as “proposed by kōjō”.
A proposal’s page (/skills/proposals/<id>) is where it is decided. It shows, from the top: what it loosens, in a box that is never folded away; the rationale, each change with the evidence it cites; the evidence, each item linked to its session, pull request or review; the diff against the version in use now; and the eval, case by case, for the version in use and the proposal. Approve and activate runs the activation above, for a person signed in only, and Reject takes an optional reason. To change the proposal first, or to test it, open it in the studio: the studio shows that kōjō proposed it, and saving refuses anything that would widen the skill.
Deleting a skill
Deleting a dashboard-managed skill writes a revision marked deleted. Resolution then uses the git-backed skill of that name in the same scope, if there is one, and otherwise falls through to the next layer: the org’s skill, or the built-in one. Built-in skills and git-backed skills cannot be deleted from the dashboard.
Changed after 0.3.0. In 0.3.0 and earlier, a deleted dashboard copy also hid the git-backed skill of its name in that scope. It no longer does: deleting the copy hands the name back to git. If you deleted a copy to keep a git skill from running, remove the skill from git (
.factory/skills/<name>/in the repository, or in the org’s skills repository), or leave it out of the repository’sskillslist inrepos.
Evals
Evals lists the eval runs, newest first, with the skill, the pass rate, the cost, who started each run and when; a run of a draft says so, and so does a run on the history of a repository. Filter it by skill. Cases opens a run: its models and duration, and each case with its result, its attempts, its cost and how close its diff is to the human fix. Run an eval evaluates a skill’s active version and needs skill:edit; to evaluate a draft, run the eval from the studio. See Evals.
With the operator role, Run an eval can also run a skill on issues a repository already fixed: choose the repository, give the test command, the number of cases (at most 50) and how far back to look. The run first checks every case in a sandbox without calling a model, then waits as awaiting confirmation with the valid cases and the most running them can cost. Nothing runs on live models until someone with the operator role presses Run. An open history run shows the repository, how many merged pull requests were looked at, the valid and invalid cases, the bound and who confirmed it; each case links to its issue and to the pull request that fixed it, says whether it passed the fix’s tests, failed them, or was invalid and why, gives the goal critic’s verdict, the similarity to the fix, the cost and the time, and links to its sessions: Replay for the skill’s session, Tests for the run of the fix’s tests on its result, Check for the validation. The pull requests that were left out are listed under the cases with the reason. See Evals from your own history.
Memory
Memory has three tabs: the team’s memories, the lessons learned from reviews of kōjō’s pull requests, and your own. Each memory shows the repository it applies to and where it came from. Search a tab, narrow it to one repository, add a memory for the team or only for yourself, and delete one. Who may see and delete which memories is described in Memory.
Campaigns
Campaigns runs one task across many repositories, one session each, a few at a time, within a cost bound you confirm. The list shows each campaign’s status, how many of its repositories are over and what it spent of its bound. New campaign takes the task and the repositories (ticked, a team’s, or a pattern); nothing runs until you confirm the bound on the campaign’s page. That page has a row per repository with its session, its pull request and the pull request’s state, and the buttons to continue after the pilot, retry failed repositories, or cancel. Campaigns explains the bound, the pilot and the pace.
Schedules
Schedules lists every schedule with its last and next run. Create one with a form, or describe it in words: a model proposes the schedule, and nothing is stored until you confirm it. A schedule created here goes into the org’s list; a repository’s own schedules come from its .factory/schedules.yaml. Editing, disabling or deleting one of those opens a pull request that changes the file: the edit dialog says so, and its button reads Open pull request.
Settings
There is one settings page per runtime config object: repositories, models and budgets, limits, merge policy, egress and credentials, activation, skills source, access, memory, self-improvement, plan first and reports. Each page shows the role the object needs and is read-only without it. Saving takes an optional message and writes a new revision.
Next to the form is the object’s history: its revisions, a diff for the selected one, and rollback, which makes an earlier revision the active one. The merge policy, egress, memory, self-improvement, plan first and reports pages have a selector for the org or one repository. A repository without its own value shows the org’s, and saving creates an override. Self-improvement is the exception: a repository does not inherit the org’s value, so without one of its own it is off there.
Each repository on the Repositories page has its automatic triggers, the skills it is limited to, its linked repositories and, under Follow-ups and failed checks, follow-up rounds on failed checks, the rounds per pull request, the label that lets kōjō commit to a person’s pull request, and Fix a red default branch (see Fixing red CI). A repository’s row says when it follows up failed checks and when it fixes a red default branch.
A repository’s merge policy kept in its .factory/factory.yaml is edited through a pull request. The page says so above the form (“Kept in .factory/factory.yaml”, or the number of kōjō’s open pull request on the file, which the form then starts from), the trigger permission is the org’s and cannot be changed there, and the button reads Open pull request. Saving opens the pull request, or adds a commit to the open one; the toast links to it. The same holds for rollback. See Editing a setting that lives in git.
.factory/factory.yaml, with kōjō's pull request on it open.On Repositories, an admin sees Move to the repository on a configured repository that keeps its merge policy and schedules in kōjō. It opens one pull request that creates the repository’s .factory/factory.yaml and .factory/schedules.yaml from them (Moving from the dashboard).
Export & apply downloads the whole runtime config as YAML and applies a document, with a dry run first. It is the same as kojo config export and kojo config apply and needs the admin role.
Audit log and doctor
The Audit log is the append-only record of who did what: sign-ins, config changes and rollbacks, skill activations, session starts and ends, sandboxes, and pull requests opened and merged. Filter it by actor, action, session and time, and export it as newline-delimited JSON.
Doctor runs the checks of kojo doctor on the running server and shows the report: the database, the sandbox driver and its isolation, egress, the forges, branch protection on every enabled repository, the activation policy, budgets, limits, the model providers and the model tiers.
Every screen
The web UI is a single-page app embedded in the binary, written as plain ES modules. Its static files carry one ETag per build, so a browser reloads them after an upgrade and not before. Every screen is a client of the API below, so everything it does can also be scripted.
| Path | Screen |
|---|---|
/ |
Overview: the last seven days of sessions, one column per day, with spend, the install, each team, repository, skill and person against its limits, the goal critic’s pass rate per skill, and the latest sessions |
/sessions |
The session list, filtered by repository, status and surface, and the Run dialog |
/sessions/<id> |
One session: what was asked, its plan with approve and decline, the result, the config revisions and skill versions it ran with, the messages people sent it and a box to send one, the replay, the diff with the step that wrote each block, cancel, and Share for a link to its read-only report. ?step=<step id> opens that step of the replay |
/campaigns |
Campaigns with their progress and spend; the New campaign dialog |
/campaigns/<id> |
One campaign: its cost bound to confirm, a row per repository with its session and pull request, continue, retry and cancel |
/schedules |
Every schedule with its last and next run; add, edit, disable and delete; the history of the org’s schedule list |
/skills |
The skills the org or one repository resolves to, with the layer each comes from and the layers it overrides, the proposals kōjō made, and the drafts in progress |
/skills/drafts/<id> |
The Skills studio for one draft |
/skills/proposals/<id> |
A change kōjō proposed to one of its skills: rationale, evidence, diff, eval comparison, approve and reject |
/evals |
Eval runs per skill with their cases; start a run |
/memory |
Memory: the team’s, what was learned from reviews with a link to each review, and your own; search, add, delete |
/settings/repos |
Repositories |
/settings/models |
Models and budgets |
/settings/limits |
Spend limits per team, repository, skill and person, and caps on running sessions per team, repository, person and trigger |
/settings/merge-policy |
Merge policy, for the org or one repository |
/settings/egress |
Egress and credential limits, for the org or one repository |
/settings/activation |
The activation policy |
/settings/skills-source |
The skills source |
/settings/memory |
Learning from reviews, per-person memory, and links between a person’s logins |
/settings/self-improvement |
Whether kōjō proposes changes to the skills of the org or one repository |
/settings/plan |
When sessions write a plan and wait for the go-ahead before changing code, for the org or one repository |
/settings/reports |
Which sessions may have a shareable report, and how long a link works, for the org or one repository |
/settings/access |
Users, teams, the repositories each team owns, and roles |
/settings/config |
Export the whole config as YAML, and apply a document, with a dry run |
/audit |
The audit log, filtered by actor, action, session and time, and its export |
/doctor |
Run the doctor checks of the running server |
Known limits
- Skills have no history or rollback screen. Their revisions are in the API (
/api/v1/revisionswithobject=skill/<name>). - The form view of the studio rewrites a YAML file without its comments. It warns before it touches a file that has any; the raw editor keeps them.
- The merge policy’s approvals cannot be decided in the dashboard: they happen in chat. A session’s plan can be.
- There is no sign-in with an API token. The web UI needs OIDC, or development mode.