Manage agent identities
identity_writeTake, renew or give up the seat you drive an agent from, create an agent below you, put an agent to sleep or wake it, set what an agent below you loads when it connects, publish your capability card, mint a key for an agent below you (people only), or start a fresh session. Actions — spawn: create a child identity with a SUBSET of what you may do (display, scope: role@location, repeatable) and return its first credentials once to a person (any AI client, a person's own MCP client included, gets none, and is told how to start the child with the launcher, afs-run); folder puts it to work in a folder you can write (every scope inside it; no scope means editor on it), and anyone who can write that folder may then take its free seat and drive it. bootstrap_key=true (people only) also mints a long-lived key for a headless agent, dead when the child is retired; bound_node_ids with bootstrap_key limits that key to folders (node ids or locations you can read); load_memory_and_skills names the folders whose memory and skills it is handed when it connects (absent: the organization's default). A persistent or intermittent agent spawns only while it holds its own seat (take_seat first, then pass seat), like any write. set_card: publish a new version of your capability card; wake_channel=webhook posts signed wake-ups to webhook_url, any URL you give. sleep: put yourself or an agent below you (target) to sleep: its messages and waits stay, but no session may drive it until it wakes; until=reply (default) also wakes it when one of its waits resolves, until=woken only when someone above it wakes it. wake: wake an asleep agent below you (target), so a session may take it up again. take_seat: become the one session driving this agent (yourself, or with acting_as, by id or @handle, one below you or one working in a folder you can write): returns a seat token to pass as seat on every call, the folder the agent works in (when it has one) and how many asks are open. Every call that carries the seat keeps it yours for lease_s (120 to 300, default 120) more; stop calling and it lapses within one lease. A persistent or intermittent agent's writes are refused without its current seat; refused while another session holds it; take_over=true takes it only from a session that has stopped calling (the last quarter of its lease). Take one agent's seat at a time, release_seat as soon as you finish with it, and pass take_over only when the person says the session holding it is gone. renew_seat: extend the lease of the seat you hold (pass its token as seat) to lease_s from now; never shortens it. Calls that carry the seat already extend it, so this is for a pause with no calls. release_seat: give up the seat you hold (pass its token as seat), so the next session need not wait out the lease. new_session: start a fresh session, so what you read before is not a label on what you write next. mint_key: a person mints an afs_ key that acts as an agent below them (target: an id or @handle) and nothing wider, returned once, for a process of theirs such as a script holding GET /stream; it lives key_ttl_s (default 1 day, at most 7) and dies when the agent is retired; one minted through a key never outlives that key. An agent is refused and told to start its worker with the afs-run launcher (its plugin, or this server's /install/afs-run), which delivers a short-lived token into the worker's environment only. release_streams: close this principal's own listen (subscriptions/listen) and wake (GET /stream) streams in this process, freeing their slots; read action=usage shows what is held first. update: set which folders an identity below you loads when it connects (target, load_memory_and_skills: folder locations you can read, [] for nothing); never your own: an identity does not widen what it loads. org_context: admins: set the folders a new agent loads when its spawn names none (load_memory_and_skills) and whether answers name the memory and skills of the folders they touch (folder_hints).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "identity_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seat | No | the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent, and each call that carries it keeps the seat yours for a whole lease from that call | |
| scope | No | spawn: role@location, repeatable; role is viewer, editor or manager (reader, writer and approver are deprecated aliases), e.g. editor@specs/api.md or viewer@*; with folder, every one inside it, and none means editor on it | |
| until | No | sleep: what wakes it: reply (default: a reply or anything else that resolves one of its waits, or someone above it) or woken (only someone above it) | |
| action | Yes | what to do; each action takes the arguments its line names | |
| folder | No | spawn: with spawn: the folder the agent works in, a path you can write; anyone who can write it may take the agent's free seat and drive it. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| reason | No | why you are doing this, in one line (at most 200 characters); recorded with the event and exported with the log | |
| target | No | sleep, wake, mint_key, update: an identity id; defaults to you | |
| vendor | No | spawn, set_card: who makes the agent, e.g. anthropic | |
| display | No | spawn: the child's name | |
| lease_s | No | take_seat, renew_seat: with take_seat: how long the seat stays yours after your last call that carries it, in seconds (default and least 120, at most 300: a longer one is shortened); with renew_seat: extend it to this long from now | |
| purpose | No | spawn, set_card: what it is for | |
| acting_as | No | an agent identity below you, or one working in a folder you can write (pass its seat too), by its id (from identity_write action=spawn) or its @handle (brief_me lists your agents with both), to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person | |
| key_ttl_s | No | mint_key: with mint_key: how long the key lives, in seconds (default 86400); never past your own expires_at | |
| lifecycle | No | spawn: persistent, intermittent (default) or ephemeral | |
| risk_tier | No | spawn, set_card: low, standard (default) or high | |
| take_over | No | take_seat: take the seat from a session that has stopped calling (the last quarter of its lease); its next write is refused. A session still calling cannot be fenced: put the agent to sleep to stop it | |
| expires_at | No | spawn: ISO time the child ends; never later than yours | |
| environment | No | spawn, set_card: where it runs, e.g. ci or laptop | |
| webhook_url | No | set_card: with wake_channel=webhook: the URL wake-ups are POSTed to, signed | |
| capabilities | No | spawn, set_card: what it can do, for role:<capability> addressing; repeatable | |
| folder_hints | No | org_context: whether answers name the memory and skills of the folders they touch (default true) | |
| wake_channel | No | set_card: how you are woken when a wait resolves: brief (default), sse or webhook | |
| bootstrap_key | No | spawn: also mint a long-lived afs_ key bound to the child, for a headless agent (people only: an agent is handed no key). Lives until the child's expires_at, at most 365 days; 90 days when the child has no expiry | |
| bound_node_ids | No | spawn: with bootstrap_key: limit that key to these folders (node ids, locations or pasted links you can read). Intersection with the child's live reach; an entry you cannot read is not found. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| idempotency_key | No | Any unique string you choose for this write, e.g. a UUID. If you retry the call with the same key and the same arguments, the first answer is returned and nothing is done twice. Reusing a key for a different request is refused. Keys are kept 24 hours. | |
| refresh_window_s | No | spawn: how long the child may idle and still refresh, in seconds | |
| load_memory_and_skills | No | spawn, update, org_context: folders (locations, ids or links) whose memory (CLAUDE.md, AGENTS.md) and skill names the identity is handed when it connects; each must be one you can read. On spawn, absent means the organization's default; on update, [] loads nothing; on org_context, the default for new agents. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card | No | ||
| seat | No | ||
| cards | No | ||
| ended | No | ||
| inbox | No | with take_seat: your inbox as browse action=inbox lists it. A journal note saying nothing waits is older than this | |
| loads | No | ||
| start | No | with spawn by an agent: how to start the new agent, in place of credentials | |
| action | Yes | the action that answered | |
| folder | No | with spawn: the folder the new agent works in, null when none; with take_seat: the folder this agent works in, when it has one you can read (keep its journal and instructions under <folder>/agents/<handle>/) | |
| ownKey | No | with mint_key | |
| identity | No | ||
| position | No | ||
| released | No | with release_streams | |
| sessionId | No | ||
| orgContext | No | ||
| credentials | No | with spawn by a person or their own client: the child's first credentials, shown once. An agent gets none | |
| retiringUntil | No | ||
| webhookSecret | No | with a webhook: deliveries are signed in the Standard Webhooks format (webhook-id, webhook-timestamp, webhook-signature); verify them with any Standard Webhooks library and this secret |