Getting started
Route your first agent tool call through the AxioRank gateway.
This guide takes a tool call from "the agent calls the tool directly" to "the call passes through AxioRank first." The gateway authenticates the agent with its API key, scores the call, applies your policies, and returns a decision, then records a redacted audit log.
0. See it work first (no account)
Before any signup, run the real detectors against a tool call locally:
npx @axiorank/sdk demoIn code, inspect() (TypeScript) and inspect() (Python) run in-process with no
key and no network, and return an advisory verdict under the default posture:
// TypeScript
import { inspect } from "@axiorank/sdk";
const r = inspect("db.query", { sql: "DROP TABLE users" });
console.log(r.decision, r.risk); // "deny" 81# Python
from axiorank import inspect
r = inspect("db.query", {"sql": "DROP TABLE users"})
print(r.decision, r.risk) # "deny" 81The steps below take you from that local read to enforcing centrally, which adds your own policy, an audit trail, approvals, and kill-chain correlation.
1. Create an agent
In the dashboard, go to Outbound → Agents → Create Agent and copy the API key
(axr_live_…). It's shown once.
2. Install the SDK
# Python
pip install axiorank# TypeScript / JavaScript
npm install @axiorank/sdk3. Guard a tool call
enforce raises when the gateway denies the call, so you guard a tool in one
line. Use tool_call / toolCall instead if you'd rather inspect the decision
yourself.
# Python
from axiorank import AxioRank, AxioRankDeniedError
axio = AxioRank(api_key="axr_live_...")
try:
axio.enforce("aws.delete_bucket", {"name": "prod-data"})
delete_bucket("prod-data") # only runs if AxioRank allowed it
except AxioRankDeniedError as e:
print(f"Blocked: {e.result.reason} (risk {e.result.risk})")// TypeScript
import { AxioRank, AxioRankDeniedError } from "@axiorank/sdk";
const axio = new AxioRank({ apiKey: process.env.AXIORANK_API_KEY! });
try {
await axio.enforce({ tool: "aws.delete_bucket", arguments: { name: "prod-data" } });
await deleteBucket("prod-data"); // only runs if AxioRank allowed it
} catch (e) {
if (e instanceof AxioRankDeniedError) {
console.warn(`Blocked: ${e.result.reason} (risk ${e.result.risk})`);
}
}4. Read the decision
Every call resolves to one of two outcomes the caller sees:
allow: no blocking policy matched; proceed.deny: a policy blocked the call; surfacereasonto the operator.
A require_approval policy holds the call for a human. The SDK waits out the
hold transparently and resolves to the final allow / deny. You don't handle
a third state. Secrets found in the arguments are redacted before the call is
written to the audit log.
Next steps
- Python quickstart · TypeScript quickstart
- Framework integrations: guard every tool an agent runs (Anthropic, Vercel AI SDK, OpenAI Agents, LangChain, and more).
- Gateway API: the raw HTTP contract for any language.
- Content-inspection engine: what the scanner looks for.