subagents publish their model and effort as headers on every row, and the swarm shows them
The subagent daemon stamps Swarm-Model and Swarm-Effort on each row it publishes. The list endpoint reads them off the newest row it already fetches, so a long-running subagent keeps them past the stream's 24 hour window, and the terminal page's menu and the agent panel's list show them beside the name.
This commit is contained in:
parent
ae9c3444bc
commit
da5fcbfd9b
1 changed files with 219 additions and 25 deletions
|
|
@ -63,6 +63,9 @@ 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 the connection badge and **expand**, so it stays clear
|
||||
of the text. What the agent is doing shows in the details table above it, in
|
||||
|
|
@ -433,7 +436,12 @@ into a stream named `term-sub-<agent>` that swarm-controller creates for every
|
|||
declared agent. The stream keeps rows for 24 hours. swarm-controller serves the list as
|
||||
`GET /api/agents/<name>/subagents`, the subagents named by the subjects in that
|
||||
stream, each with `last_row_unix`, the stream's publish time of its newest row,
|
||||
or `null` when that row isn't read within two seconds. The lookups run
|
||||
or `null` when that row isn't read within two seconds. Each row also carries
|
||||
the `Swarm-Model` and `Swarm-Effort` message headers, the model and effort the
|
||||
subagent runs with, and the list returns them from the newest row as
|
||||
`model` and `effort`. A subagent on the default model has no `Swarm-Model`
|
||||
header and lists `model: null`; every row has the headers, so a subagent that
|
||||
runs past the 24-hour window still shows them. The lookups run
|
||||
concurrently, sixteen at a time, so the list waits at most two seconds for
|
||||
each sixteen subagents.
|
||||
swarm-controller also relays one subagent's rows as SSE on
|
||||
|
|
|
|||
Loading…
Reference in a new issue