Metadata-Version: 2.4
Name: steerplane
Version: 0.4.0
Summary: Agent Control Plane for Autonomous Systems — Runtime guards, loop detection, cost limits, and telemetry for AI agents.
Author-email: SteerPlane <hello@steerplane.ai>
License-Expression: MIT
Project-URL: Homepage, https://steerplane.ai
Project-URL: Documentation, https://docs.steerplane.ai
Project-URL: Repository, https://github.com/vijaym2k6/SteerPlane
Project-URL: Issues, https://github.com/vijaym2k6/SteerPlane/issues
Keywords: ai,agents,guard,safety,monitoring,telemetry,llm,steerplane
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Provides-Extra: cli
Requires-Dist: click>=8.1.0; extra == "cli"
Provides-Extra: yaml
Requires-Dist: pyyaml>=6.0; extra == "yaml"
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.30.0; extra == "crewai"
Provides-Extra: autogen
Requires-Dist: pyautogen>=0.2.0; extra == "autogen"
Provides-Extra: all
Requires-Dist: click>=8.1.0; extra == "all"
Requires-Dist: pyyaml>=6.0; extra == "all"
Requires-Dist: langchain-core>=0.1.0; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"

# SteerPlane SDK

**Agent Control Plane for Autonomous Systems**

> "Agents don't fail in the dark anymore."

## Quick Start

```bash
pip install steerplane
```

### Decorator API (Minimal Integration)

```python
from steerplane import guard

@guard(max_cost_usd=10, max_steps=50)
def run_agent():
    agent.run()
```

### Context Manager API (Full Control)

```python
from steerplane import SteerPlane

sp = SteerPlane(agent_id="my_bot")

with sp.run(max_cost_usd=10) as run:
    run.log_step("query_db", tokens=380, cost=0.002)
    run.log_step("generate_response", tokens=1240, cost=0.008)
```

## Features

- 🛡️ **Policy Engine (New in v0.4.0)** — Define strict allow/deny rules, rate limits (sliding windows), and human-in-the-loop approval workflows for agents.
- 🌉 **AI Gateway Proxy (New in v0.4.0)** — Zero-code integration. Point your default LangChain/OpenAI client to the SteerPlane gateway, and every LLM call gets token tracking, cost evaluation, and policy enforcement automatically.
- 🧩 **First-Class LangChain & CrewAI Support** — Drop in `SteerPlaneCallbackHandler` for total observability of your multi-agent networks without modifying agent chains.
- 🔄 **Infinite Loop Detection** — Automatically detects repeating agent behavior and breaks loops before they drain API budgets.
- 💰 **Hard Cost Limits** — Stop expensive agent runs the instant they cross a predefined USD ceiling. Tracks 25+ LLM models locally.
- 🚫 **Step Limits** — Cap maximum execution steps to prevent runway execution.
- 📊 **Deep Telemetry** — Full step-by-step execution tracking (tokens, latency, cost per step) synced instantly to the dashboard.

## Advanced Usage: Policy Engine

```python
from steerplane import guard

@guard(
    max_cost_usd=10, 
    denied_actions=["DROP TABLE*", "rm -rf *"],
    rate_limits=[{"pattern": "send_email", "max_count": 5, "window_seconds": 60}],
    require_approval=["execute_trade*"]
)
def autonomous_agent():
    agent.run()
```

## Documentation

See [docs.steerplane.ai](https://docs.steerplane.ai) for full documentation.

