Grants
Grants authorize a caller to invoke a specific agent.
Create Grant
POST /grantjson
{
"callerId": "my_app",
"targetAgentId": "agt_flight_master",
"type": "session",
"quota": 10
}| Field | Type | Required | Description |
|---|---|---|---|
callerId | string | Yes | Who is requesting access |
targetAgentId | string | Yes | Agent to access |
type | string | Yes | one_time, session, or persistent |
quota | number | No | Max invocations |
Response:
json
{
"status": "created",
"grant": {
"id": "grt_abc123",
"callerId": "my_app",
"targetAgentId": "agt_flight_master",
"type": "session",
"status": "active",
"quota": 10,
"used": 0,
"createdAt": "..."
}
}Get Grant
GET /grant/:idList Grants
GET /grants
GET /grants?callerId=my_app
GET /grants?targetAgentId=agt_flight_master
GET /grants?status=active
GET /grants?page=1&pageSize=20Revoke Grant
POST /grant/:id/revokeGrant Statuses
| Status | Description |
|---|---|
active | Grant is valid and usable |
expired | Grant has passed its expiration time |
revoked | Grant was manually revoked |
exhausted | Grant has used all its quota |