create_scoped_key
Create a key scoped to one agent for self-provisioning or rotating per-agent credentials. Store the plaintext key immediately; it is returned only once.
Instructions
Create an Agent key (chr_ak_*) that can only act on behalf of a single agent. Use this to self-provision or rotate per-agent credentials. The plaintext key is returned exactly once in the response — store it immediately, it cannot be retrieved later. Requires an Organization key.
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": {
"agent_id": "<agent_id>"
},
"name": "create_scoped_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Human-readable label for the key | |
| agent_id | Yes | Agent ID this key is scoped to | |
| expires_in | No | When the key stops working, from now. Omit for a key that never expires. After it expires, requests fail with 401 key_expired. |