opschain admin agent assignments
packs:agents
opschain admin agent assignments <agent-id> [--server <url>] [--auth-token <token>]
Lists one agent's assets-under-management assignments
(v2 AgentService.GetAgentAssignments) — the subset of
opschain admin trust assignments whose subject is this agent's
service-account principal. An assignment names a node-path subtree the
agent manages: it is the agent's SME inventory, the scope its configurable
ADVISE floor rides, and the natural scope to hang higher-tier grants on.
<agent-id> is the agent's member id — the ID column of
opschain admin agents list.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL. Default: the active context, then OPSCHAIN_SERVER. |
--auth-token <token> | Admin bearer token override. Default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login for that server. |
Output
Always a machine document (JSON unless -o yaml) with agent_id and the
agent's assignments.
Exit codes
| Code | Meaning |
|---|---|
| 0 | The assignments were printed. |
| 1 | The server refused or failed the request (including a rejected admin token, or an unknown id). |
| 2 | Usage — wrong arguments, or no server / admin token resolvable. |
Named errors
a server is required — pass --server <url>, set OPSCHAIN_SERVER, or 'opschain context use <name>'— exit 2.this command needs a login or an admin token — run 'opschain login', pass --auth-token, set OPSCHAIN_ADMIN_TOKEN, or store one with 'opschain admin login'— exit 2.the server rejected the credential — run 'opschain login' again, or check the admin token— exit 1.agent <id> is not known to this estate — admin agent verbs take the ocr_ member id from 'opschain admin agents list' (a UUID is usually the identity-side service_account_id, not the member id)— the unknown, revoked or runner id 404, exit 1.
Related settings
agents.assignment_floor— what an assignment confers with no matching grant:advise(default) ordeny.
See also
opschain docs cli/admin-trust-assign— create an assignment.opschain docs cli/admin-trust-assignments— every assignment, all agents.opschain docs cli/admin-agent-trust-review— assignments in the context of the agent's full posture.