runtimes array of cmd/gizzi-code/src/runtime/providers/discovery/cli-catalog.json (version 3, with choices). Both servers build it into their binary, so a new runtime arrives with a new release, not at run time.
GET /api/v1/runtimes
No sign-in needed. Two servers answer the same path with the same list:- cloud-api answers web and phones, so the picker works with no computer.
- allternit-api on a computer answers Desktop. When the caller owns that computer, it also adds
installed(see What is installed).
look carries the full set of tokens.
Clients ignore fields they do not know, so new fields can be added without a new version.
Caching
- The response has a strong
ETag. It is a hash of the catalog file, so it is the same on both servers and changes only when the file changes. Cache-Control: public, max-age=3600.- Send the ETag back in
If-None-Matchto get304 Not Modifiedwith no body. - Clients keep the last good copy and use it when the request fails, so the picker still opens offline.
What is installed
When the caller owns the computer, allternit-api adds one more key. Ownership means the runtime belongs to one person (the Desktop app or a self-hosted install) and the request carries the Desktop access token or a valid signed-in session.installedandsignedIncome from the same check the Connections page andGET /api/v1/cli-tools/cataloguse.versionisnullfor now: that check does not read the CLI’s version yet.- This response is per computer and per person, so it is sent with
Cache-Control: private, no-cacheand no ETag. - cloud-api never sends
installed. Only your computer knows what is installed on it.
Choices
The response also carrieschoices: the things a person picks to run on. Every picker draws its list from it, so a new runtime shows up without a client change. It sits next to runtimes and is passed through from the same catalog file, unchanged on both servers.
- There is one
cloudchoice, oneplanchoice per subscription provider in the runtimes’plans, and oneclichoice for every runtime whosetoolis not null. idiscloud,plan:<provider>orcli:<runtime>. Aplanchoice runs on theallternitruntime with the brain providerplan-<provider>. Aclichoice names its runtime and its catalogtool.logois an id the web and native logo maps already know.- The brains shown for a picked choice:
cloudshows the models the account can use, with plan providers left out.planshows the models of that plan’s connection row.clishows the tool’s models that fit the runtime.
Ready rule
A choice is ready when a person can start it now. Everything else goes under “Set up more” with one action.
cloud-api never sends
installed, so web, the phone layout, the PWA, iOS and Android can mark a cli choice ready only when they hold the map from the selected computer’s runtime. When installed cannot be read, show that the computer cannot be checked and offer a retry. Do not guess.
A client that gets a response with no choices (an older server) builds the same list from runtimes and plans with the same rule.
Which brains a runtime may use
A plan login (a Claude, ChatGPT, Kimi, Gemini or Copilot subscription) belongs to that provider’s own app. Most providers do not allow it inside another company’s agent, so each runtime lists the plans it may use inplans:
Every client (Desktop, ai.allternit.com, the phone apps, Gizzi Code) and the server use one rule,
allowed(runtime, brain). The reference is allowed in cmd/gizzi-code/src/runtime/providers/discovery/runtime-registry.ts; the server copy is allowed in cmd/allternit-api/src/bot_brain.rs.
- The brain fits.
brainsis"any", or the brain’s provider is listed (asubs-prefix is stripped), or the provider is the runtime’s own CLI (itstool, its id, its aliases or the tool’s aliases). - A plan brain needs the plan. A brain is a plan brain when its provider id starts with
subs-(vendor ids map to their plan:subs-anthropicisclaude,subs-openaiischatgpt), or when it is a CLI sign-in whose runtime holds exactly one plan (claude-cli,codex-cli,kimi-cli,antigravity,copilot). The plan must be in the runtime’splans. - A runtime’s own CLI sign-in always passes.
claude-clion Claude Code is allowed whateverplanssays.
allowed. When a new runtime can’t use the current brain, the picker switches to the first allowed brain (the runtime CLI’s default model) and shows a one-line note. Gizzi Code refuses an explicit --brain that is a plan the runtime can’t use, with the plan_not_allowed_on_runtime message below.
Saving a bot: errors and warnings
422 errors
allternit-api checks the runtime and brain only when the request setsconfig.botBrain.runtime itself:
POST /api/v1/agents(create): always checked.PUTandPATCH /api/v1/agents/:id(update): checked when the runtime or brain changes. The request’s runtime and brain provider are compared with the stored record’s normalizedbotBrain(and itsmodelwhenmodelRefis absent). When both are the same, the save is never rejected, even if that pair would fail today’s rules. Bots saved before these rules keep working, and clients that send the whole config back on a rename are not refused. A request with no brain keeps the stored brain.
runtime) is normalized as described below and never rejected. The brain is botBrain.modelRef (a provider/model string or a {providerID, modelID} object), else the request’s model when it is provider/model. A brain with no provider is not checked. runtime: "custom" is not checked either.
Install warning
When a create or update that carriesconfig.botBrain succeeds and its runtime (after normalizing) is not allternit, allternit-api checks whether the runtime’s CLI is on this computer, with the same check that fills installed in What is installed. When it is not, the response gets warnings. The save still succeeds.
warnings is added to the usual body of each route ({agent} on POST and PATCH, {success} on PUT) and is absent when there is nothing to say. Clients show the message under the Runtime layer.
A runtime’s own web app
Some runtimes ship a web app of their own: the registry entry carriesliveUi. Your computer’s runtime (allternit-api) can start that app, keep it to your computer, and stop it again. cloud-api has no such routes: the app always runs on your own computer.
All three routes are owner only: the same check as What is installed. Anyone else gets 403 owner_only. They take an optional session id (sessionId in the POST body, ?sessionId= on GET and DELETE). The app runs in that session’s workspace folder, or in your home folder when there is none.
POST /api/v1/runtimes/:id/live
:id is a runtime id or alias. The answer:
- The app listens on
127.0.0.1only, never on your network. - The registry’s
portis used when it is free; otherwise a free local port is picked. - It never opens a browser window.
BROWSERpoints at a command that does nothing, and the usual browser openers on itsPATH(open,xdg-open,*-browser) do nothing either. A command the app’s agent runs that callsopendoes nothing while the app runs. - The route waits up to 20 seconds for the app’s
liveUi.healthpath to answer. If it does not, the app is stopped and the route answers504 live_timeout. - There is one app per person, runtime and folder. A second POST returns the running one with
reused: true. - Clients frame the app through
resourceUri(the MCP Apps frame, see MCP servers), not with a plain iframe ofurl.
Errors:
GET /api/v1/runtimes/:id/live
Returns the same body as POST withreused: true, or {"running": false, "runtime": "<id>"}. Each GET counts as a heartbeat.
DELETE /api/v1/runtimes/:id/live
Stops the app and answers{"stopped": true|false, "runtime": "<id>"}. The app’s whole process group gets SIGTERM, then SIGKILL after 3 seconds.
When an app stops
- You send DELETE.
- The session that started it is deleted (
DELETE /api/v1/agent-sessions/:id) and no other session still uses it. - Nobody sends a POST or GET for 30 minutes.
- The runtime shuts down (Desktop quits). On Linux the app also stops if the runtime crashes.
From the web and phones
ai.allternit.com and the PWA reach your computer through the Cloud relay. The POST, GET and DELETE calls are ordinary/api paths, so the relay already carries them. To show the app itself, the web frame needs a forward to the app’s port on your computer (POST /api/v1/computers/:id/forward with remotePort set to port). Until the web and PWA frame uses that forward, they show the runtime’s look with a note to open it on your computer.
Bot record fields
A bot’s runtime and brain live in the agent’sconfig (Agents API). All of these fields are optional, so older clients keep working.
The fields
mode, harness, uhpHarnessId, nativeSessionId, modelRef and effort are unchanged.
How the server fills in the record
Each create,PUT or PATCH that carries config.botBrain passes through one normalizer before it is saved, so a record always has both the old and the new fields and they agree:
- No
runtime. It is worked out from the old fields:allternit_cloudbecomesallternit.native_harnesswith harness h becomes the runtime whoselegacy.harness, id or alias is h, orcustomwhen there is none.uhp_harnessbecomes the runtime whoselegacy.uhpholdsuhpHarnessId, orcustom.
- With
runtime.modeandharnessare worked out from it. The Allternit runtime setsmode: "allternit_cloud". A runtime with adapterunsupportedsetsuhp_harness. Any other runtime setsnative_harnesswith its harness id. - A runtime this server does not know is rejected with
422 runtime_unknownwhen a create, or an update that changes the runtime, names it (see 422 errors). A stored record that already holds one is read as a native harness with that id.customkeeps the storedmodeandharnessas they are. - Every other key in
botBrainis kept. An empty or missingbotBrainis left alone.
botBrain replaces that object, which is why agentView is a separate key.
Wire names that stay vendor
In the apps and these docs, bots run by another company’s service are called Connected bots. Their wire names did not change, and there is no connected alias:
- the bot type
'vendor' - the
vendor_bot_*tables andbot_execution_bindings.type = 'vendor' - the MCP route
/mcp/bots/<id> - the event
vendor.ticket.created
botKind: "connected" is the one place the new name appears in an API response, and it is read only.
Related
- Agents API for the full agent record.
- Connections API for signing in to the CLIs a runtime needs.
- Connected bots for the user guide.