Expand description
Agents env_get and Agents env_set: an agent, host or container, reads and edits the
extra environment variables a definition launches with (its env content,
backend::agent_env), its own or another’s. The change applies at that
agent’s next launch.
The caller is the agent its token names; a request without one (the UI has
setagentcontent for this) is refused, so the change is never attributed
to the operator. Each change, and each refused attempt, is recorded in the
audit log under the calling agent’s slug and in the identity log with
its UID.
Structs§
- Actor 🔒
- The agent making the request.
- Agent
EnvRequest 🔒 - Refusal 🔒
Constants§
- AUDIT_
ACTION 🔒 - The audit entry’s action for a change.
Statics§
- ENV_
WRITE 🔒 - Held from reading an environment to writing it, so two agents changing the
same definition at once don’t lose one change. (A save from My Agents goes
through
setagentcontentand isn’t serialized with this.)
Functions§
- actor_
of 🔒 - audit 🔒
- current_
text 🔒 - endpoint_
refusal 🔒 - Why this change to
target’s model endpoint is refused, if it is. Not for what it does (the notice and its undo window answer that) but for where it would not work: an agent on a model route keeps the route’s server and keys, a container agent gets the person’s account mounted in its image, which a custom server must not receive, and a key must be a Vault entry the person opened to that agent. A key is also one the acting agent could use itself: srv does not put a key in a server’s hands for an agent that could not have read it. (An agent on another machine names none: it has no agent here.) The answer is the same for an entry that is missing, of another kind or closed to an agent, so it never says which entries exist. - handle_
agent_ 🔒env POST /api/v1/agent/env- key_
refusal 🔒 - Why the keys the new environment holds may not go to its server. When the call moves the address, every
key in the environment goes with it, so every one is checked, the ones already there as well as the
ones the call writes: a
vault:reference must be usable by the acting agent and by the target, and a key written in the clear (the operator’s, from My Agents) is never handed to an address an agent chose. When only a key changes, that key is checked. A key is only written for a server of its own: with no address, or Anthropic’s, the launch passes it through next to the person’s login and the CLI would send that string to Anthropic as its key; so a call that takes the address away takes those keys with it. - proposed 🔒
- The text
reqwould leave, refused when it breaks a rule. - refuse 🔒
- run 🔒
- run_as 🔒
- run_
remote 🔒 env_getorenv_setfor an agent on another machine (remote_ops::agent_ops): the same rules and write a local call has, recorded underwho(slug@machine). The agent must be named: a remote caller has no definition here to default to.- target_
of 🔒 - The definition
agentnames, the caller’s own when it names none. - undo_
endpoint 🔒 - Undo a model-server change within its window, for the person’s Undo on the notice: puts the environment
back as it was.
byis who pressed it, for the record.