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. 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.
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) |