Rotate Agent Secret
ledger_rotate_secretMint a NEW agent_secret for an agent_id your workspace already owns, invalidating the old one.
Use this to RECOVER an agent whose secret was lost: the previous credential stops working immediately. Requires the workspace_key that owns agent_id — an agent's own agent_secret cannot rotate itself, because a leaked agent credential must not be able to lock its real owner out. Unlike ledger_track this never claims a new agent_id: an unknown id returns agent_not_claimed.
The new secret is returned ONCE. Store it before you drop the response.
Returns {"agent_id", "agent_secret", "_note"}, or {"error", "error_code"}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | ||
| workspace_key | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||