aiti-agent-badge (Agent Badge)
About 1 min
Agent Badge (aiti-agent-badge)
Who is running, where it lives, whether it is alive — one badge says it all.
A small badge in the composer's left icon row (mobile: the bottom action area of the + sheet) showing which agent the session uses, whether a turn is running and where the process is hosted. Click it to open a panel and switch hosting in place.
Status dots
| Dot | Meaning |
|---|---|
| filled accent | a turn is running |
| filled muted | the agent process is alive but idle |
| hollow | cold session (no live process) |
| dashed ring | hosted survive-restart (detached), or marked to start that way next time |
What the panel does
- Inspect: agent description, runtime status, hosting mode, backend, runner, session id and working directory.
- Switch hosting (pi sessions): in-process / subprocess (ends with pi-web) / subprocess · survives restarts (agent-starter wrapper).
- Switch hosting (external agents): backends that opted into detachable hosting can move between subprocess and subprocess · survives restarts (there is no in-process mode for external backends). The choice is persisted in the shared preference marker, so a cold reopen stays direct.
- Refusals: switching during a running turn is refused ("stop the current turn first"); TUI-bridge-owned sessions and backends without detachable support are read-only.
Data and switches
- Host API:
GET/POST /api/sessions/[id]/hosting; live state arrives on the aiti-event-busrunningtopic (no polling), with a refresh button for mode changes made elsewhere. - Feature: Extension Manager → Agent Badge → "Show agent badge" (
badge.show); disabling removes the item immediately. - Client-only: the hosting route ships with the pi-web host; this extension registers no server hook.