SteerPlane is the AI agent safety layer for the AGI era, providing runtime guardrails that constrain agent behavior through fixed rules in code (rather than relying on AI model judgment). It primarily addresses problems such as agents potentially looping infinitely, continuously incurring model-call costs, and calling dangerous tools.
Key capabilities
- Spend limits: Calculate costs based on token usage returned by the model or on passed-in costs, and block subsequent calls once the limit is reached.
- Loop detection: Enabled by default in the SDK, based on action-name matching, it can detect repeated steps; it can be disabled via a parameter.
- Action rules: Supports allow, deny, and approval rules, matched by action name, which can come from code, configuration files, or policies saved in the dashboard.
- Step and time limits: Limit the number of steps or the time an agent runs.
- Gateway: Provides an OpenAI-compatible gateway proxy that can enforce checks such as model allowlists, session cost limits, monthly budgets, requests per minute, and duplicate-prompt detection on model calls, and supports Claude model conversion.
- Dashboard and CLI: Provides a local dashboard for real-time viewing of runs, and a CLI for managing keys and installing hooks.
Usage
- Python SDK: Install via
pip install steerplane. You can use the@guarddecorator to automatically trace OpenAI and Anthropic client calls (sync, async, streaming), checking steps, costs, and tool calls; you can also use a context manager or manuallylog_step/check_before_step. - TypeScript SDK: Install via
npm install steerplane.guard()traces OpenAI and Anthropic SDK calls,SteerPlane.run()requires manually reporting steps. - Framework integrations: Supports OpenAI Agents SDK, CrewAI, LangChain, AG2, etc., with each model call and tool call counting as one step.
- Gateway proxy: Point the OpenAI client at the SteerPlane gateway to enforce checks without modifying agent code; it also supports Anthropic-format routing for use with Claude Code and the Anthropic SDK.
- Claude Code hooks: Install hooks via
steerplane claude-code installto check and count tokens and costs before tool calls. - Deployment: Docker deployment is recommended (including API, dashboard, and PostgreSQL); manual setup is also supported.
Use cases
Suitable for developers and teams that need to control the runtime behavior of AI agents, especially in scenarios where agents may call external APIs, execute code, or modify real data, to prevent unexpected spending, infinite loops, and dangerous operations.
Limitations
- The SDK does not cover the tool's own work, other HTTP clients or providers, threads started within a run, some streaming helper methods, etc.
- The gateway does not apply action rules, and agents can bypass the gateway if they hold provider keys.
- Session and loop state are kept in memory, and the gateway must run as a single worker.
- Parallel tool calls may exceed the step limit; calls that cross the cost limit have already incurred costs.
- The built-in price table covers 106 models; unlisted models use default estimates, and prices may change.
- Hosted plans provide additional protections (such as human approval), while the free self-hosted API terminates the run directly when a limit is triggered.