swarm ui: an agent's details are an identity card and sections by question
The details pane showed the agent's name, then status, message and wanted rows with no card, then a folded status section repeating the state, and a single settings section of eleven rows of different kinds. The pane now opens with one identity card: icon and name, the wanted menu, badges for freshness, turn state, context and a needed login, the whole status message, and the hive, links and config PR. Below it the folded sections answer one question each: terminal, activity (todos, subagents and background tasks together), instructions, inference (which now holds the claude login and API key), access, and accounts. The terminal page's popover shows the card without the name and the four settings sections.
This commit is contained in:
parent
9909e63c2d
commit
ab329e5793
1 changed files with 480 additions and 375 deletions
|
|
@ -104,16 +104,16 @@ create first, since the badge is the only way to destroy.
|
|||
|
||||
An agent created here or with `swarmctl agent create` starts `paused`; set it
|
||||
`up` from its card. A card shows **login needed** when the agent's own
|
||||
turn-state header says its claude has no session, and a **log in** button
|
||||
that runs the claude login from a dialog: open the URL it shows, then paste
|
||||
the code back. A failed login offers **try again** in the same dialog. When the
|
||||
secret store has the login, the dialog closes and a
|
||||
short toast in the top-right corner says so. The credentials go to the agent through the secret store
|
||||
([`claude-login.md`](../../2-handbook/swarm/claude-login.md)). The agent's own web UI login still
|
||||
works too. The settings section of an agent's details has a **claude login** row: when
|
||||
the swarm stored the agent's login, or that none is, with a **log in** button
|
||||
(**log in again** when the swarm holds one) that opens the same dialog, and a **delete
|
||||
login** action that asks first.
|
||||
turn-state header says its claude has no session, and a **log in** button that
|
||||
runs the claude login from a dialog: open the URL it shows, then paste the code
|
||||
back. A failed login offers **try again** in the same dialog. When the secret
|
||||
store has the login, the dialog closes and a short toast in the top-right corner
|
||||
says so. The credentials go to the agent through the secret store
|
||||
([`claude-login.md`](../../2-handbook/swarm/claude-login.md)). The agent's own
|
||||
web UI login still works too. The **inference** section of an agent's details
|
||||
has a **claude login** row: when the swarm stored the agent's login, or that
|
||||
none is, with a **log in** button (**log in again** when the swarm holds one)
|
||||
that opens the same dialog, and a **delete login** action that asks first.
|
||||
|
||||
A card shows its freshness when the agent isn't **fresh**: **stale** with how long ago the hive last
|
||||
reported it, **never reported**, or **not in swarm identity**. A fresh agent shows nothing, so the
|
||||
|
|
@ -170,56 +170,72 @@ got the message, a toast says so and select mode ends. Otherwise the dialog
|
|||
stays with the per-agent result, and **select the N that failed** picks just
|
||||
those for another send. One broadcast takes at most 64 agents.
|
||||
|
||||
Below the agent's state, message and wanted menu, the details have six sections,
|
||||
and each reads nothing until you open it. **status** and **terminal** start
|
||||
open, the other four folded:
|
||||
At the top of the details, one **identity card** says who the agent is and how
|
||||
it's doing: its icon and name, the **wanted** menu (the one action there),
|
||||
badges for how fresh its last report is (with its age), its turn state and
|
||||
context, and **login needed** when its claude has no session, the whole status
|
||||
message with how long ago it set it, and a line with its hive, links to its
|
||||
profile and its config repo on the swarm's forge (built from the forge entry of
|
||||
`GET /api/links`; hidden when the swarm lists none, and an agent built from an
|
||||
archetype has no config repo link), its open config PR, and, for an agent built
|
||||
from an archetype, the archetype with a **turn into custom** button.
|
||||
|
||||
Below it, the details have six folded sections, one for each question an
|
||||
operator comes with, and each reads nothing until you open it. **terminal**
|
||||
starts open, the other five folded:
|
||||
|
||||
- **status**: how fresh the agent's last report is (with its age), its turn state and context, its hive, links to its
|
||||
profile and its config repo on the swarm's forge (built from the forge entry
|
||||
of `GET /api/links`; the row stays hidden when the swarm lists none, and an
|
||||
agent built from an archetype has no config repo, so it gets no config repo
|
||||
link), and its open config PR.
|
||||
- **terminal**: the live terminal with its message box, a pill floating over the
|
||||
terminal's bottom edge whose right end holds the send button, a circle with an
|
||||
arrow. Typing `/` opens a menu
|
||||
filled from `GET /api/agents/<name>/commands`, which lists the swarm's own
|
||||
commands and the skills the agent published. Sending exactly `/clear` isn't a
|
||||
message: the box POSTs `/api/agents/<name>/new-session` instead of `/input` (see
|
||||
the command paragraph below).
|
||||
- **open todos**: the agent's open todos from `GET /api/agents/<name>/todos`, newest first, each with
|
||||
its subsystem, one line of text and how long ago it changed. Read only; refetched every ten seconds.
|
||||
- **subagents**: the agent's subagents and their terminal preview (next section).
|
||||
- **background tasks**: the agent's bash tasks (see the section on them below).
|
||||
- **settings**: inference, instructions, resource caps, internet, allowed
|
||||
domains and permissions, then the agent's linked accounts and the menu that
|
||||
links another. Internet, allowed domains and permissions show a badge; select
|
||||
it to open the control that changes it (described below).
|
||||
arrow. Typing `/` opens a menu filled from `GET /api/agents/<name>/commands`,
|
||||
which lists the swarm's own commands and the skills the agent published.
|
||||
Sending exactly `/clear` isn't a message: the box POSTs
|
||||
`/api/agents/<name>/new-session` instead of `/input` (see the command
|
||||
paragraph below).
|
||||
- **activity**: what the agent is working on, in three lists one under another.
|
||||
Its open todos from `GET /api/agents/<name>/todos`, newest first, each with
|
||||
its subsystem, one line of text and how long ago it changed (read only,
|
||||
refetched every ten seconds); its subagents and their terminal preview (next
|
||||
section); and its bash tasks (see the section on them below).
|
||||
- **instructions**: the agent's AGENTS.md, with an **edit** button.
|
||||
- **inference**: how the agent thinks and what it costs: its model and effort
|
||||
and the other inference settings, its resource caps, and the claude login and
|
||||
API key (the login's state, **log in**, and **set API key**), since the key is
|
||||
how the agent reaches claude.
|
||||
- **access**: what the agent may reach: internet, allowed domains, repositories,
|
||||
SSH and permissions. Internet, allowed domains, repositories, SSH and
|
||||
permissions show a badge; select it to open the control that changes it
|
||||
(described below).
|
||||
- **accounts**: the agent's linked external accounts, and the menu that links
|
||||
another.
|
||||
|
||||
The terminal page's details popover shows the identity card without the icon and
|
||||
name (the popover's own header has the name), then the four settings sections.
|
||||
|
||||
### Agent and subagent terminals
|
||||
|
||||
An agent's detail pane on `/agents` shows, in its **terminal** section, a small live preview of its
|
||||
terminal, and below it the agent's **subagents**: every subagent the swarm
|
||||
queue holds terminal rows for from the last 24 hours. Picking one shows its
|
||||
terminal in the same preview, and **expand** opens it in its own tab, as it
|
||||
does for the agent. The list refreshes every 10 seconds, so a subagent the
|
||||
agent spawns shows up once it writes output. A subagent that drops out of the
|
||||
list closes its terminal, and a later subagent with the same name starts
|
||||
unpicked.
|
||||
Each subagent in the list shows the model and effort it runs, like
|
||||
`opus · high`, beside its name; one on the default model shows only the effort.
|
||||
The `/agents/<name>/terminal` page's subagent list shows them too.
|
||||
An agent's detail pane on `/agents` shows, in its **terminal** section, a small
|
||||
live preview of its terminal, and in its **activity** section the agent's
|
||||
**subagents**: every subagent the swarm queue holds terminal rows for from the
|
||||
last 24 hours. Picking one shows its terminal in the same preview, and
|
||||
**expand** opens it in its own tab, as it does for the agent. The list refreshes
|
||||
every 10 seconds, so a subagent the agent spawns shows up once it writes output.
|
||||
A subagent that drops out of the list closes its terminal, and a later subagent
|
||||
with the same name starts unpicked. Each subagent in the list shows the model
|
||||
and effort it runs, like `opus · high`, beside its name; one on the default
|
||||
model shows only the effort. The `/agents/<name>/terminal` page's subagent list
|
||||
shows them too.
|
||||
|
||||
The preview carries only a small connection light and **expand**, so it stays
|
||||
clear of the text. What the agent is doing shows in the details table above it,
|
||||
in the **state** row: the turn state (idle, thinking or compacting), a **paused**
|
||||
badge for a paused agent, and the tokens in its context. The row
|
||||
shows the latest report the controller holds, if it's under 150 seconds old, as
|
||||
soon as you look. It reads "no report yet" when there is none: for an agent
|
||||
that's offline, and until the first report after the controller restarts. The
|
||||
agent sends a report when its state changes and once a minute. If
|
||||
the browser gives up on the stream, a **reconnect** badge opens it again. The
|
||||
terminal's own tab keeps these badges, with the model, beside the agent's name;
|
||||
the turn-state badge says how long the agent has been in that state.
|
||||
clear of the text. What the agent is doing shows in the identity card above it,
|
||||
in the state badges: the turn state (idle, thinking or compacting), a **paused**
|
||||
badge for a paused agent, and the tokens in its context. The badges show the
|
||||
latest report the controller holds, if it's under 150 seconds old, as soon as
|
||||
you look. It reads "no report yet" when there is none: for an agent that's
|
||||
offline, and until the first report after the controller restarts. The agent
|
||||
sends a report when its state changes and once a minute. If the browser gives up
|
||||
on the stream, a **reconnect** badge opens it again. The terminal's own tab
|
||||
keeps these badges, with the model, beside the agent's name; the turn-state
|
||||
badge says how long the agent has been in that state.
|
||||
|
||||
The terminal is a `role="log"` that takes the keyboard focus, so the arrow keys
|
||||
scroll it, and it doesn't announce new rows, since many can arrive in a second.
|
||||
|
|
@ -256,8 +272,8 @@ thinks quietly for longer drops out of the count. The list shows the others belo
|
|||
dimmed, as **not running**.
|
||||
|
||||
Beside it, an agent with background bash tasks has a **bash tasks** badge, a
|
||||
prompt icon and the number running, which opens the same list of tasks the card's
|
||||
"background tasks" section shows. An agent with no tasks has no badge, and a
|
||||
prompt icon and the number running, which opens the same list of tasks the
|
||||
details' **activity** section shows. An agent with no tasks has no badge, and a
|
||||
subagent's terminal has none.
|
||||
|
||||
An agent's terminal opens with its last 100 rows from the past 24 hours, then
|
||||
|
|
@ -299,14 +315,15 @@ different agents tell apart. A subagent's tab shows its agent's icon. An agent
|
|||
with no icon keeps the hyperhive mark. Everywhere else the swarm UI shows an agent's icon (the cards, the pickers, the badges), an agent with none shows the default agent icon.
|
||||
|
||||
The tab also has an agent badge, with the agent's icon (carrying the connection
|
||||
light) and name, ahead of the state badges. It opens the agent's details in a popover under the badge:
|
||||
the same status, state, wanted state and folded **status** and **settings** sections (inference, resource caps, internet, allowed domains, permissions and linked accounts) as the
|
||||
details on `/agents`, without the terminal and subagents. The popover doesn't dim the
|
||||
page. Selecting outside it, or Escape, closes it. From the keyboard, opening a
|
||||
popover moves focus into it, and Escape puts focus back on the badge. The filter
|
||||
popovers on table headers work the same way. You can stop or pause the
|
||||
agent, or link an account, without leaving the terminal. A subagent's tab opens
|
||||
its agent's details.
|
||||
light) and name, ahead of the state badges. It opens the agent's details in a
|
||||
popover under the badge: the same identity card and folded **instructions**,
|
||||
**inference**, **access** and **accounts** sections as the details on `/agents`,
|
||||
without the terminal and the activity. The popover doesn't dim the page.
|
||||
Selecting outside it, or Escape, closes it. From the keyboard, opening a popover
|
||||
moves focus into it, and Escape puts focus back on the badge. The filter
|
||||
popovers on table headers work the same way. You can stop or pause the agent, or
|
||||
link an account, without leaving the terminal. A subagent's tab opens its
|
||||
agent's details.
|
||||
|
||||
#### Groups of terminals
|
||||
|
||||
|
|
@ -732,15 +749,16 @@ store identity, or no queue address, publishes no subagent terminals.
|
|||
|
||||
<details><summary>Where the background task list comes from</summary>
|
||||
|
||||
An agent's detail pane has a **background tasks** section, below the subagents, listing the
|
||||
tasks the agent started through the bash MCP. Its bash MCP publishes one status per task
|
||||
to the `bash-task-status` bucket, and swarm-controller serves the list as
|
||||
`GET /api/agents/<name>/bash-tasks`: each task's id, command, state, the time the agent queued it and
|
||||
the time it entered its state, and the exit status. The state is the published
|
||||
one, or `stale` for a live task whose daemon stopped reporting. The section lists the running
|
||||
tasks first, then the rest, each newest first. Before the age it says `started`,
|
||||
`finished`, `exited N`, `timed out`, `killed` or `stopped reporting`. It refetches
|
||||
every ten seconds and shows no output, which is a separate stream.
|
||||
An agent's detail pane lists, in its **activity** section below the subagents,
|
||||
the tasks the agent started through the bash MCP. Its bash MCP publishes one
|
||||
status per task to the `bash-task-status` bucket, and swarm-controller serves
|
||||
the list as `GET /api/agents/<name>/bash-tasks`: each task's id, command, state,
|
||||
the time the agent queued it and the time it entered its state, and the exit
|
||||
status. The state is the published one, or `stale` for a live task whose daemon
|
||||
stopped reporting. The section lists the running tasks first, then the rest,
|
||||
each newest first. Before the age it says `started`, `finished`, `exited N`,
|
||||
`timed out`, `killed` or `stopped reporting`. It refetches every ten seconds and
|
||||
shows no output, which is a separate stream.
|
||||
|
||||
</details>
|
||||
|
||||
|
|
@ -860,25 +878,37 @@ text stays.
|
|||
|
||||
### Inference settings
|
||||
|
||||
An agent's detail pane shows, in its **settings** section, its model and effort under **inference**, each
|
||||
with where it comes from: the swarm, its agent.nix, its own pick, or the
|
||||
default. Below them are the subagent model list the swarm sets, or "its own"
|
||||
when it sets none, the subagent cap, which reads "no cap" when unset, and the
|
||||
fresh-session threshold and the soft context limit, which each read "its own" when unset. **edit** opens a dialog with the fields, filled with what the swarm
|
||||
stores; saving does a `PUT /api/agents/{agent}/inference` of
|
||||
the whole value. A field you leave empty stays out of it, so the agent keeps
|
||||
its own value for that field; an empty max subagents is no cap, and the two context limits share one slider with two handles on the model's context window, from 5 to 100 percent: a turn that finds the prompt cache cold starts a fresh session once the context passes the left (green) handle, and the agent compacts at the end of a turn once it passes the right (purple) one, and a turn can run past it. The handles can't cross. A handle the swarm hasn't set sits at the harness's own value (50 and 75), dimmed; **use its own** on its line puts it back there, which leaves that field out of the `PUT`. **clear the swarm's setting** sends the `DELETE`.
|
||||
The model is a dropdown of the models the swarm already knows (`GET /api/models`: those in any agent's stored settings and those the agents report running on), with the agent's own as the empty choice; **other…** opens a box for any other model name, and a stored name the list lacks opens it too. The subagent models stay a typed list.
|
||||
The card reads `GET /api/agents/{agent}/inference`; before the agent's first
|
||||
report reaches the controller, it shows the swarm's stored values only.
|
||||
An agent's detail pane shows, in its **inference** section, its model and
|
||||
effort, each with where it comes from: the swarm, its agent.nix, its own pick,
|
||||
or the default. Below them are the subagent model list the swarm sets, or "its
|
||||
own" when it sets none, the subagent cap, which reads "no cap" when unset, and
|
||||
the fresh-session threshold and the soft context limit, which each read "its
|
||||
own" when unset. **edit** opens a dialog with the fields, filled with what the
|
||||
swarm stores; saving does a `PUT /api/agents/{agent}/inference` of the whole
|
||||
value. A field you leave empty stays out of it, so the agent keeps its own value
|
||||
for that field; an empty max subagents is no cap, and the two context limits
|
||||
share one slider with two handles on the model's context window, from 5 to 100
|
||||
percent: a turn that finds the prompt cache cold starts a fresh session once the
|
||||
context passes the left (green) handle, and the agent compacts at the end of a
|
||||
turn once it passes the right (purple) one, and a turn can run past it. The
|
||||
handles can't cross. A handle the swarm hasn't set sits at the harness's own
|
||||
value (50 and 75), dimmed; **use its own** on its line puts it back there, which
|
||||
leaves that field out of the `PUT`. **clear the swarm's setting** sends the
|
||||
`DELETE`. The model is a dropdown of the models the swarm already knows (`GET
|
||||
/api/models`: those in any agent's stored settings and those the agents report
|
||||
running on), with the agent's own as the empty choice; **other…** opens a box
|
||||
for any other model name, and a stored name the list lacks opens it too. The
|
||||
subagent models stay a typed list. The card reads `GET
|
||||
/api/agents/{agent}/inference`; before the agent's first report reaches the
|
||||
controller, it shows the swarm's stored values only.
|
||||
[inference](../swarm/inference.md) describes the settings themselves.
|
||||
|
||||
### Editing an agent's instructions
|
||||
|
||||
The **instructions** row of an agent's **settings** has an **edit** button. It
|
||||
The **instructions** section of an agent's details has an **edit** button. It
|
||||
opens `AGENTS.md`, the file the agent reads its instructions from, in a plain
|
||||
text box. The text is the copy the agent last published, so the box still
|
||||
opens for a stopped agent, but **save** needs the agent running.
|
||||
text box. The text is the copy the agent last published, so the box still opens
|
||||
for a stopped agent, but **save** needs the agent running.
|
||||
|
||||
Save sends the swarm a diff against the version you opened, and the agent
|
||||
applies it to its own file with git. When the agent changed the file in the
|
||||
|
|
@ -891,13 +921,13 @@ dialog keeps an unsaved edit for the next time you open it.
|
|||
|
||||
### Resource caps
|
||||
|
||||
An agent's detail pane shows, under **settings**, its CPU quota and memory max under **resource
|
||||
caps**. A cap is the swarm's, so it follows the agent to whichever hive runs
|
||||
it, and it replaces what the hive says for that field. A field the swarm
|
||||
leaves out shows as the hive deciding it. **edit** opens a dialog with the two
|
||||
fields, filled with what the swarm stores. A cpu quota is a percentage of one
|
||||
core (`400%` is four cores). A memory max is a size such as `512M` or `8G`, a
|
||||
percentage of the machine's memory, or `infinity`.
|
||||
An agent's detail pane shows, in its **inference** section, its CPU quota and
|
||||
memory max under **resource caps**. A cap is the swarm's, so it follows the
|
||||
agent to whichever hive runs it, and it replaces what the hive says for that
|
||||
field. A field the swarm leaves out shows as the hive deciding it. **edit**
|
||||
opens a dialog with the two fields, filled with what the swarm stores. A cpu
|
||||
quota is a percentage of one core (`400%` is four cores). A memory max is a size
|
||||
such as `512M` or `8G`, a percentage of the machine's memory, or `infinity`.
|
||||
|
||||
Saving does a `PUT /api/agents/{agent}/limits` of the filled fields. A `PUT`
|
||||
replaces the stored value whole, so an empty box clears that cap and the hive
|
||||
|
|
@ -932,13 +962,13 @@ reason and a **retry** button.
|
|||
|
||||
### Permissions
|
||||
|
||||
An agent's detail pane shows, under **settings**, what the swarm grants it under **permissions**:
|
||||
a badge reading the default set, none, or a count. A swarm
|
||||
grant is the agent's whole set, so it follows the agent to whichever hive runs
|
||||
it. Selecting the badge opens a box under it with one checkbox per permission the controller
|
||||
knows (`GET /api/permissions`), ticked as the grant stands, or on the default
|
||||
set when the swarm sets none. The box lists every permission at once, without a
|
||||
scroll area.
|
||||
An agent's detail pane shows, in its **access** section, what the swarm grants
|
||||
it under **permissions**: a badge reading the default set, none, or a count. A
|
||||
swarm grant is the agent's whole set, so it follows the agent to whichever hive
|
||||
runs it. Selecting the badge opens a box under it with one checkbox per
|
||||
permission the controller knows (`GET /api/permissions`), ticked as the grant
|
||||
stands, or on the default set when the swarm sets none. The box lists every
|
||||
permission at once, without a scroll area.
|
||||
|
||||
Each tick saves at once, as a `PUT /api/agents/{agent}/permissions` of the ticked boxes. A
|
||||
`PUT` replaces the stored list whole, so an unticked box revokes that
|
||||
|
|
@ -1003,13 +1033,13 @@ same grant from a shell.
|
|||
|
||||
### Allowed domains
|
||||
|
||||
An agent's detail pane lists, under **settings**, the destinations it may reach through its
|
||||
hive's egress proxy under **allowed domains**, beyond the base list every
|
||||
agent has: one badge per source with its count, **swarm-wide** (the entries for every
|
||||
agent), **this agent** (the ones for it alone) and **automatic**. Selecting a badge
|
||||
opens the names behind it. An entry matters
|
||||
to a restricted agent. One with the unrestricted internet flag reaches any
|
||||
name the proxy's private-range rules leave. **remove**, beside a name, drops one entry;
|
||||
An agent's detail pane lists, in its **access** section, the destinations it may
|
||||
reach through its hive's egress proxy under **allowed domains**, beyond the base
|
||||
list every agent has: one badge per source with its count, **swarm-wide** (the
|
||||
entries for every agent), **this agent** (the ones for it alone) and
|
||||
**automatic**. Selecting a badge opens the names behind it. An entry matters to
|
||||
a restricted agent. One with the unrestricted internet flag reaches any name the
|
||||
proxy's private-range rules leave. **remove**, beside a name, drops one entry;
|
||||
**add** opens a dialog with a domain box and a tick for every agent in the
|
||||
swarm. The tick is off by default, so an entry is for this agent alone.
|
||||
|
||||
|
|
@ -1135,14 +1165,13 @@ the form above. The row shows whether the store holds a key and never the key. A
|
|||
change reaches the agent at its next restart, and an agent with a key tries it
|
||||
instead of waiting for a claude login.
|
||||
|
||||
An agent's detail pane lists its linked accounts at the end of its **settings** section, one row
|
||||
per account: kind, name and host. Opening an agent makes one request,
|
||||
An agent's detail pane lists its linked accounts in its **accounts** section,
|
||||
one row per account: kind, name and host. Opening an agent makes one request,
|
||||
`GET /api/hives/{hive}/agents/{agent}/linked-accounts`, which returns every
|
||||
account of that agent as names and hosts and never a credential. When the card
|
||||
fails to read the accounts, the inference settings, the resource caps or the
|
||||
permissions, it
|
||||
shows the reason as text. A list the card already loaded stays on screen
|
||||
beneath the error.
|
||||
permissions, it shows the reason as text. A list the card already loaded stays
|
||||
on screen beneath the error.
|
||||
|
||||
| kind | one row per | name | host |
|
||||
| --------- | ------------------------------------------- | ------------- | ------------------------ |
|
||||
|
|
|
|||
Loading…
Reference in a new issue