Agent fleet management
Provision agents at scale, scope their vaults, then rotate a key and deactivate an agent.
When you run dozens or hundreds of agents you need repeatable patterns for enrollment, vault layout, and lifecycle. Bulk provisioning plus tight policies keeps the blast radius small.
- Shared vault with path-scoped policies: api-keys/** shared, agents/{name}/** per-agent
- Per-agent vaults for strict isolation in multi-tenant or compliance setups
- Vault binding via vault_ids limits which vaults an agent JWT can touch even if a policy is too broad
- Conditional policies add ip_allowlist and time_window on sensitive paths
This lesson uses CLI agent commands. Make sure you completed 'Install the CLI' in Foundations and are logged in with 1claw login.
- 1
All steps below use the CLI session from
1claw login. The TOKEN export is not needed.bash# Verify you are logged in: 1claw whoami - 2
Bulk provision agents with the CLI. The --scopes flag sets OAuth-style scopes. Fine-grained access is controlled by vault policies (see Agents & Access Control track).
bashfor name in worker-1 worker-2 worker-3; do 1claw agent create "$name" --scopes "vaults:read" done - 3
List agents and pick one to configure further.
bash1claw agent list export AGENT_ID="paste-worker-1-uuid-here" - 4
List or create vaults and export their IDs.
bash1claw vault list export VAULT_1="first-vault-uuid" export VAULT_2="second-vault-uuid" - 5
Bind each agent to just its intended vaults so a stray policy cannot widen access.
bash1claw agent update $AGENT_ID --vault-ids "$VAULT_1,$VAULT_2" - 6
Set transaction guardrails for any agent using the Intents API.
bash1claw agent update $AGENT_ID \ --tx-max-value-eth 0.05 --tx-daily-limit-eth 0.5 --tx-allowed-chains "base" - 7
Rotate an agent's API key, which invalidates the old credential. There is no CLI subcommand for this one:
1claw agent keys rotaterotates a per-chain signing key, which is a different thing. Use the API or the SDK.bash# The CLI rotates signing keys, not the agent API key. # Rotate the API key through the API or SDK: curl -s -X POST https://api.1claw.co/v1/agents/$AGENT_ID/rotate-key \ -H "Authorization: Bearer $ONECLAW_TOKEN" # SDK equivalent: # await client.agents.rotateKey(agentId); - 8
Deactivate the agent when its task is done. This keeps the audit trail, unlike delete.
bash1claw agent update $AGENT_ID --active false
Prefer deactivate over delete. A deactivated agent cannot exchange tokens or read secrets, but its records and audit events are preserved for review.
You now rotate a key and deactivate an agent while keeping its audit trail, and you can scope a fleet with vault binding and conditional policies.
Where this goes wrong in practice. Fleets fail by accumulation. No single agent is a problem and the set becomes one.
- Agents are created and never retired. Deactivation preserves the audit trail where deletion does not, and the absence of a retirement step leaves a growing population of live identities nobody owns.
- Policies drift between agents that should match. Three agents doing the same job diverge one exception at a time, and the widest one becomes the effective posture.
- Blocked events are unmonitored. Denials are the cheapest signal available precisely because nothing breaks when they fire, and they indicate either a broken client or a steered agent.
- Environment tags are set but not enforced. Tagging without env.enforce_agent_environment_scope is documentation, not a control.
Run a quarterly review that lists every agent, its owner, its last activity and its effective scope. Anything with no owner or no recent activity should be deactivated by default.
Decide
Across a fleet of forty agents you see a steady trickle of agent.delegation.blocked events from one agent, roughly twice a day for a week. Nothing has failed and no alert fired.
How do you read this?
Check your understanding
3 questionsWhat does vault binding (vault_ids) add on top of policies?
Why deactivate an agent instead of deleting it?
For a common set of secrets shared by all fleet agents, what layout is recommended?