Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: edit an agent's inference in place, and move the resource caps to access

The inference section was one wrapping line of badges, with the CPU and
memory caps among them, and an edit button that opened the same fields in
a dialog. The editor is now the section itself: a line says what the
agent runs on now and where it comes from, and the fields sit in one row
where there is room, with save, reset and clear below. Unsaved edits are
kept per agent. The claude login and API key row stays below. The caps
are not inference settings, so they become a row of the access section.
This commit is contained in:
iris 2026-11-23 18:11:05 +01:00 • committed by mara
commit e4cab003d1

View file

@ -111,9 +111,9 @@ 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.
has a **claude login** row: when the swarm stored the 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
@ -199,14 +199,13 @@ starts open, the other five folded:
shows its first five rows with a **show all N** button under them; expanded,
the rows scroll inside a box and **show fewer** folds them again.
- **instructions**: the agent's AGENTS.md, as an editor you can type in.
- **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).
- **inference**: how the agent thinks and what it costs, as an editor in place:
its model and effort, the subagent settings and the two context limits, then
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 and use: internet, allowed domains,
repositories, SSH, permissions and its resource caps. Each shows 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.
@ -321,13 +320,13 @@ with no icon keeps the hyperhive mark. Everywhere else the swarm UI shows an age
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 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.
**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
@ -882,29 +881,29 @@ text stays.
### Inference settings
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.
An agent's detail pane holds, in its **inference** section, the editor itself,
with no dialog: a line says what the agent runs on now and where the model and
the effort come from (the swarm, its agent.nix, its own pick, or the default),
and below it the fields sit in one row where there is room, filled with what the
swarm stores: model, effort, the subagent model list and the subagent cap.
**save** does a `PUT /api/agents/{agent}/inference` of the whole value, and is
off until a field changes. **reset** puts the boxes back to the stored value.
Unsaved edits stay when you switch to another agent and come back. 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 editor reads `GET /api/agents/{agent}/inference`; before the
agent's first report reaches the controller, it shows no running line.
[inference](../swarm/inference.md) describes the settings themselves.
### Editing an agent's instructions
@ -927,7 +926,7 @@ meanwhile. A reload of the page drops it.
### Resource caps
An agent's detail pane shows, in its **inference** section, its CPU quota and
An agent's detail pane shows, in its **access** 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**
@ -1164,10 +1163,10 @@ reads back and its box starts with the stored text. The secrets never read back,
so their box starts empty and replaces the stored secrets only when filled and
saved.
The **claude login** row of an agent's details also sets the API key: **set API key**
(or **replace API key**) sends the key as `ANTHROPIC_API_KEY=<key>` to the
agent's secrets, **remove API key** deletes them, and **advanced** opens
the form above. The row shows whether the store holds a key and never the key. A
The **claude login** row of an agent's details also sets the API key: **set API
key** (or **replace API key**) sends the key as `ANTHROPIC_API_KEY=<key>` to the
agent's secrets, **remove API key** deletes them, and **advanced** opens 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.