Expand description
An Anthropic API key as an account a Claude agent can be moved onto
(docs/specs/SPEC_AGENT_PANE_API_KEY_ACCOUNT_SWITCH_2026_11_16.md).
A key account is stored under provider anthropic, not claude, and its link stays under anthropic: the spawn
then carries it through the gateway’s key route (identity::resolver::inject_steps::inject_key_route), so the agent
never holds the key. An agent has exactly one payer: moving it onto a key removes its plan link, and moving it onto a
plan removes the key link. Nothing here is reached by the automatic moves: a failover picks only accounts of the
agent’s own provider, and machine::scan leaves a pane on a key out of the episodes.
Functions§
- can_
take_ 🔒a_ key - Why
def_idcannot be moved onto a key account now, orOk. An agent on a model route is billed to the route. A container agent can take a key: its container reaches the gateway, never the key (container::key_route), and a container with no way to the gateway says so at the turn, with what to do instead. - is_key
- An Anthropic API key: provider
anthropic, kindapi_key. - is_
link_ 🔒of - Whether a link stored under
link_provideris one of the account links of an agent whose provider isprovider. - left_
the_ 🔒key - The agent just left its API key: its gateway token stops working now, whatever a running process still holds.
- link_
provider 🔒 - The provider a link to
tois stored under for an agent ofprovider: a key’s own, else the agent’s. - serves 🔒
- Whether
acan be the account of an agent whose (canonical) provider isprovider: an account of that provider, or, for a Claude agent, an Anthropic API key.