Register agent
agentrail_register_agentEnrol this agent with its owner, using the enrollment code the owner gave you (starts with ar_enroll_). Call this ONCE, before any other tool. Returns this agent's API key a single time; store it securely. The agent starts as pending_approval until the owner approves it; poll agentrail_heartbeat to see when it is active. Example: register "momentum-scanner" with code ar_enroll_abc....
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": {
"enrollment_code": "<enrollment_code>",
"name": "<name>"
},
"name": "agentrail_register_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Short readable name for this agent, e.g. "momentum-scanner". | |
| enrollment_code | Yes | Enrollment code from the owner (starts with ar_enroll_). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| api_key | Yes | Shown ONCE. Send as "Authorization: Bearer <api_key>" on every later call. | |
| agent_id | Yes | ||
| next_step | Yes | ||
| approval_url | Yes | ||
| api_key_notice | Yes |