Agent decision API
Hold your own AI agents to the access their task needs. Before an agent uses a tool, it asks Aribot. Aribot answers allow or block from the rules your team set, records the verdict, and for an allowed call returns a short-lived signed permit your tool can check.
How it works
- In Aribot, open AI agent governance > Your agents and tools. Connect an agent, set its tool rules and create an agent key. The key starts with
agk_and is shown once. - Before each tool call, the agent calls the decision API with the tool name, the resource and the arguments.
- The agent proceeds only when
allowedistrue. Any error counts as blocked. - A tool that requires a permit checks it before acting, so a call that skipped the decision is refused.
Ask for a decision
curl -X POST https://aribot.ayurak.com/aribot-api/v2/gateway/decide \
-H "Authorization: Bearer $ARIBOT_AGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"tool": "crm.export_contacts", "resource": "accounts/eu", "args": {"limit": 500}}'Arguments are hashed for the record and never stored as sent.
{
"allowed": true,
"decision": "allow",
"reason": "allowed_by_rule",
"detail": "A rule allows this tool.",
"mode": "enforce",
"would_block": false,
"agent": "sales-assistant",
"tool": "crm.export_contacts",
"decision_id": 41,
"permit": "eyJ...",
"permit_expires_in": 60
}Other reasons include denied_by_rule, no_rule, agent_held, fleet_hold and needs_approval. Each comes with a plain-language detail.
Rules
- A rule allows or denies a tool name, or a prefix ending in
*. - An agent's own rule wins over a fleet rule, a longer pattern wins over a shorter one, and deny wins a tie.
- With no matching rule, the call is not permitted.
- A rule can also require approval by a person. The agent waits while a reviewer approves or denies the call in Aribot.
Modes
- Observe: every call is recorded, and calls that would be blocked are marked
would_block. Nothing is stopped. - Enforce: blocked calls are refused.
Paused agents, inactive agents and a fleet-wide hold block calls in both modes. An agent that keeps hitting blocks can be suspended automatically.
Check a permit in your tool
An allowed decision carries a permit: a signed token valid for 60 seconds, bound to the tool, the resource and a hash of the arguments.
- Offline: verify the signature with the public keys at
GET /aribot-api/v2/gateway/jwks. - Online:
POST /aribot-api/v2/gateway/permit/verifywith the permit, the tool, the resource and the arguments. Each permit is accepted once.
Check prompts and responses
POST /aribot-api/v2/gateway/inspect with {"direction": "prompt" | "response", "text": "..."} checks text against your content rules, which are pattern-based. A rule that cannot finish in time counts as a block.
From the SDKs
The Python, JavaScript and Go SDKs call the decision API with a separate agent key (ARIBOT_AGENT_KEY), never the company API key, and never retry a decision.