Expand description
Agents update, bundles, hide and unhide (POST /api/v1/agent/{update,bundles,hide,unhide}):
an agent edits an agent’s definition, sets its Bundles list and hides or shows a picker template
without the operator’s window, by the code the window’s updateagent, setagentbundles and
agentdefhide/agentdefunhide run.
- update: only the fields given change, and only ones that say how the agent is listed or when it runs:
description, icon, auto_start, restart_on_crash, idle_timeout_minutes, the model route’s model and the agent’s
daily spend cap (spend_cap_usd, and reset_spend_today for a spend that was wrong; see below). What decides what an agent runs, or
where its traffic goes or which project files it reads (shell, provider_flags, working_directory,
model_vendor_base_url) is not taken, as
env_setrefuses the same: the operator sets those in My Agents. The name has its own action (rename), the provider is fixed when an agent is made, and environment variables, accounts, container settings and the seat have their own actions. - spend cap: the agent’s leader may set or reset another agent’s cap; an agent may only lower its own. Each change
is recorded with the cap before and after (
docs/specs/SPEC_ROUTE_AGENT_BRAKES_2026_11_10.mdsection 3.2). - bundles: with
bundle_ids, replaces the agent’s picked bundles, in order; without, reads them. - hide, unhide: a seeded picker template; an agent you made is removed with
delete.
Each acts as the agent its token names; a request without one is refused, so a change is never attributed to the operator, and each one, and each refusal, is recorded in the audit log under the calling agent.
Structs§
- Bundles
Request 🔒 - Hide
Request 🔒 - Spend
Plan 🔒 - What
spend_cap_usdandreset_spend_todayofAgents updateask for, once allowed. - Update
Request 🔒 - A field outside the list above is refused by name (
deny_unknown_fields), never ignored. - Updated 🔒
- What
updatedid: the agent, the definition fields changed, what the spend change did, and what a model or effort pick did.
Constants§
- MAX_
IDLE_ 🔒MINUTES - A week: the longest idle timeout.
- MAX_
TEXT_ 🔒CHARS - The longest description or text field: what the definition form accepts in practice.
- RESUMED_
WARNING 🔒 - Said when a model change resumes the conversation: the one case where the new model reads what another wrote.
Functions§
- bad 🔒
- bundles 🔒
- fresh_
message 🔒 - The first message of the fresh session
fresh: trueasks for, once it is known to be possible: None when the request does not ask for one. Checked before the agent moves, so a refusal leaves it where it was. - handle_
agent_ 🔒bundles - handle_
agent_ 🔒hide - handle_
agent_ 🔒unhide - handle_
agent_ 🔒update - hide 🔒
- hide_
or_ 🔒show - named_
or_ 🔒absent valuetrimmed,Nonewhen the caller left it out; an empty or blank one is refused, namingfield.- publish_
changed 🔒 - restart_
on_ 🔒new_ model - The choice is read at every launch, so the agent’s panes are restarted, with their conversation, at the end of
the turn they are in. A pane that cannot be restarted starts on it the next time it opens. With
fresh_messagethey start a new session instead, its first message that one. - route_
change 🔒 routeandmodelofAgents update: leave a model route (route: ""), or change the model on the route the agent is already on. Putting an agent onto a route spends the person’s key, so that is asked of them when the agent is made or in the composer’s model panel, not done by a call that names no one to ask.- run 🔒
- Run
opas the calling agent, and record the outcome under it. - run_
remote 🔒 updatefor an agent on another machine (remote_ops::agent_ops): the same checks and change a local call has, recorded underwho(slug@machine). A caller from another machine is nobody’s leader, so it cannot raise a spend cap.- spend_
apply 🔒 - Does what
spend_planallowed. Returns what was done, for the audit row. - spend_
plan 🔒 - Checks
spend_cap_usdandreset_spend_todaybefore anything else in the request changes. The leader of an agent sets and resets its cap; an agent may only lower its own, and not reset it, since a cap it could lift or clear would stop nothing. - text_
field 🔒 - update 🔒
- Apply the fields
reqgives to the agent’s stored definition. Returns the names of the fields changed, and what the audit row says beyond them. - update_
response 🔒 Agents update: the change, and what the answer and the audit row say about it.