Grant one agent run
gate_create_runGate Actions: give one agent session narrow, expiring permission. Actions are rules with {placeholders} bound by scope (e.g. "PATCH /customers/{customer}/tickets/:id" with scope {"customer":"A"}), each with an optional max and approval. Add a human approver with gate_add_approver before granting approval:true actions; without an active approver the grant is refused. Returns a run token (shown once) the agent sends as x-odile-run with its app key. Writes in a run need an Idempotency-Key. Give a write a check ("GET /bookings?idempotency_key={key}") and the agent can settle a lost answer with POST /g//_gate/recover.
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": {
"project_id": "<project_id>",
"admin_key": "<admin_key>",
"app": "<app>",
"actions": "<actions>"
},
"name": "gate_create_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | The app id (app_...) this run is for | |
| label | No | Optional: what the run is for, e.g. "triage ticket 4411" | |
| scope | No | Values for the {placeholders}, e.g. {"customer":"A"} | |
| actions | Yes | Rules, or {rule, max, approval, check} | |
| admin_key | Yes | The project admin key (ga_...). Read it from the .env; never print it. | |
| max_calls | No | Optional: calls allowed in the whole run | |
| project_id | Yes | The project id from gate_create_project, e.g. p1a2b3... | |
| ttl_seconds | No | How long the run lasts (default 3600) |