Check your agent's tool calls with the Amiril SDK
The Amiril SDK runs inside your agent and checks each tool call against your rules before the tool runs. Pick the guide for your framework and language.
Add the SDK to your agent and it checks each tool call against the rules you publish in Amiril. A blocked call never reaches the tool. Each framework guide ends with your agent connected to your workspace. Most start with a rule in a local file, so you can try the SDK before you have an API key.
The SDK reports to Amiril what each rule decided, but it sends no traces. A trace records what your agent did in a run. Amiril needs traces to find issues, the problems your runs share, and to test rules on past calls. For those, also send traces.
Google ADK
Add Amiril as the first plugin of an ADK app, in Python or TypeScript.
LangGraph
Add Amiril as middleware for create_agent, in Python or TypeScript.
LiveKit Agents
Wrap the function tools of a LiveKit voice agent in Python, then answer a phone number.
Your own agent loop
Wrap the tools of an agent loop you wrote yourself, in Python or TypeScript.
Another framework
Write an adapter that passes your framework's hooks to Amiril.
How rules reach your agent
Learn how often the SDK syncs and what it does while Amiril is unreachable.
SDK configuration
Look up every init option and environment variable, in Python and TypeScript.
Next steps
Block your first tool call
Run a rule that caps payments, then watch the Amiril SDK block a tool call on your laptop. You need no account and no API key to try it.
How rules work
A rule checks each tool call your agent makes and lets it run, flags it or blocks it. Rules run in your agent, and Shadow mode shows what one would do first.
Write your first rule
Start from a rule Amiril drafted for an issue, or from a blank rule. Save it, publish it in Shadow, then switch it to Enforce in one environment.
How rules reach your agent
The SDK keeps your published rules in the agent's process and checks each tool call there. It keeps checking when Amiril is unreachable or the agent restarts.
Last updated on