Skip to main content

The Active Reliability Layer for AI Agents

Project description

⚡ Steer

The Active Reliability Layer for AI Agents.

Stop debugging. Start teaching.
Steer is an open-source telemetry and verification SDK designed to catch "Confident Idiot" agents in production before they break trust with your users.

PyPI version


🛑 The Problem

Agents fail in dangerous ways that standard evaluations miss:

  1. Strict JSON failures: Wrapping output in markdown.
  2. Safety leaks: Outputting PII despite system prompts.
  3. Ambiguity: Guessing "Springfield, IL" when the user didn't specify a state.

Steer wraps your agent in a Verification Layer that catches these logic, context, and format failures in real-time.


🚀 See Steer in Action

The Steer workflow is simple: Catch → Teach → Fix.

1. Fix Broken JSON

The Problem: Agents often wrap JSON in Markdown (```json), breaking your app. The Fix: Steer blocks the bad output. You click "Strict JSON" in the UI. The agent learns.

# Run 1: Failure
[Steer] 🤖 Generating profile...
[Steer] 🚨 BLOCKED: Structure Guard Triggered (Detected Markdown).
[Steer] 👉 Go to 'steer ui' to teach the agent.

# Run 2: Success (After Teaching)
[Steer] 🧠 Context loaded: Rules found! Applying fix...
[Steer] ✅ SUCCESS: Agent output valid JSON.

2. Prevent Data Leaks

The Problem: Agents accidentally output PII (emails/keys) despite system prompts. The Fix: Steer's regex guard halts the execution before data leaves the server.

[Steer] 🤖 Summarizing ticket...
[Steer] 🚨 BLOCKED: PII Shield Triggered (Visible email address).
[Steer] 🛡️ Action Blocked.

3. Enforce Business Logic

The Problem: An agent guesses an ambiguous answer (e.g., "Springfield") instead of asking the user. The Fix: Steer forces the agent to ask clarifying questions when search results are ambiguous.

# Run 1: Failure
[Steer] 🤖 Searching for 'Springfield'...
[Steer] 🚨 BLOCKED: Business Logic Guard (34 results found, expected clarification).

# Run 2: Success (After Teaching)
[Steer] 🧠 Context loaded: Ambiguity rules active.
[Steer] ✅ SUCCESS: Agent asked: "Which state are you interested in?"

🔮 Roadmap: From Verification to Learning

Steer v0.1 provides deterministic guardrails (The "Fast Path"). Steer v0.2+ will provide probabilistic improvement (The "Slow Path").

Coming Soon:

  • Query by Committee: Automated consensus checks for ambiguous prompts.
  • The Teaching Dashboard: A UI to review failures and provide human corrections.
  • Automated Fine-Tuning: A pipeline to turn your (failure, correction) logs into a fine-tuned model that stops making those mistakes.

📦 Installation

pip install steer-sdk

⚡ Quickstart

The fastest way to see Steer in action is to generate the interactive examples.

1. Generate Demos

Run this in your terminal to create 3 example agents:

steer init

> Created 01_structure_guard.py > Created 02_safety_guard.py > Created 03_logic_guard.py

2. The Workflow (Fail → Teach → Fix)

Steer is designed to be interactive. Try the Structure Guard demo:

  1. Run & Fail: The agent attempts to output JSON but wraps it in Markdown (a common LLM error). Steer blocks it.

    python 01_structure_guard.py
    # 🚨 BLOCKED: Detected Markdown code blocks.
    
  2. Teach: Open the dashboard to see the incident and provide a fix.

    steer ui
    
    • Go to http://localhost:8000
    • Click Teach on the active incident.
    • Select "Strict JSON Mode" (or write a custom rule) and click Save.
  3. Run & Succeed: Run the script again. The agent detects the new rule and self-corrects.

    python 01_structure_guard.py
    # 🧠 Context loaded: Rules found! Applying fix...
    # ✅ SUCCESS: Agent output valid JSON.
    

🛠️ Integration

To add Steer to your own existing agent:

from steer import capture
from steer.verifiers import JsonVerifier

# 1. Define Verifiers
json_check = JsonVerifier(name="Strict JSON")

# 2. Decorate your Agent Function
@capture(verifiers=[json_check])
def my_agent(user_input):
    # Your LLM call here
    return llm_response

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steer_sdk-0.1.2.tar.gz (454.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steer_sdk-0.1.2-py3-none-any.whl (471.7 kB view details)

Uploaded Python 3

File details

Details for the file steer_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: steer_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 454.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/24.6.0

File hashes

Hashes for steer_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8481a7380f12f0a67f2aa265ba0440c4cdda249401723ea4ea0512dea78396d0
MD5 01a771d1e7bd846ddd2d91d8c16436c1
BLAKE2b-256 dcacb25c4fcdb712633928f5c999f6d71a6f16ed45ff8b60854cde18f17c1cef

See more details on using hashes here.

File details

Details for the file steer_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: steer_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 471.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.9 Darwin/24.6.0

File hashes

Hashes for steer_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 07e06ba145dc43399b45c8246e6ebeb954574cbce27e6e9baf8a56b7720a5e1a
MD5 e0c1b60613b500c35c8fb962acc1f16e
BLAKE2b-256 908e99035d117166d6654536e09eca971bbb3c52758d20a7b533e00bd87640c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page