Skip to main content

Module query

Module query 

Source
Expand description

The parameters of Agents list and Agents status (spec ยง5): which groups, which agents, which page; and the two answers built from them. Filters run on the cheap facts (state, model, provider, runtime, account) for every agent; the groups asked for are read only for the agents of the page.

Structsยง

Cheap
What a filter reads of one agent.
Filter
The agents a caller wants.
Kept ๐Ÿ”’
One kept agent: its row, and what was read to keep it.
Params

Constantsยง

DEFAULT_MAX_BYTES ๐Ÿ”’
A list that asks for groups or a page stops at this many bytes (a default call keeps every agent, as it always has); Agents status is the compact way to see them all.

Functionsยง

agent_of ๐Ÿ”’
The agent a discovery row describes, when it has a runtime row to say its state.
apply
The rows of Agents list: filtered, paged, each with its short model and the groups asked for; and the pageโ€™s note.
contains_ci ๐Ÿ”’
decorate_page ๐Ÿ”’
The page of kept, their groups read now, and a note of what was cut.
filtered ๐Ÿ”’
The rows that pass the filter, each with its model answer (an agent with no runtime row passes an empty filter only).
key_of ๐Ÿ”’
How the compact answer groups its counts.
names_model ๐Ÿ”’
Whether model is the one wanted names: part of its id or its label.
seat_words ๐Ÿ”’
What a seat says, as words to match against: its role, qualifier, lead (name and id) and area. Not its JSON, whose key names would match every agent that has a seat.
short_duration
โ€œ4mโ€, โ€œ2h 5mโ€, โ€œ30sโ€: a duration a person reads at a glance.
status
Agents status: one line per agent, the counts by state, model and host, and, with group_by, the agents grouped.
status_line
name | state (turn 4m), quiet 22m | Sonnet 5.5 high | ctx 62% | account | 5h 60% 7d 44% | #1234: what a leader reads to see the fleet. A fact that is not known is left out, not guessed.
string_at ๐Ÿ”’
text ๐Ÿ”’
usage_short ๐Ÿ”’
โ€œ5h 60% 7d 44%โ€: the accountโ€™s windows, the one that resets first first.
wanted
Whether the agent is wanted. !model keeps an agent whose model is not known too: it is not shown to be that model.