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.1.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.1-py3-none-any.whl (471.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steer_sdk-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 846187563d9158a164ade2560ac0e52ca30017677cc2a49d8982ef133e510bf0
MD5 f973f54809dc01aebf88853833385474
BLAKE2b-256 323993099dd41cdbeccfce6814c86add7e566cf34a9ee2f17b035a4763c1512a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steer_sdk-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41f940d07fa1a48bef074240d06e329135f23f5966b8d267ae555c7753b8c70d
MD5 44a61e5b25eef692b998197a7eda11c7
BLAKE2b-256 fda4a48c1a65084a64c72034e8e493188680d6d0aaf93dd80d962d7d6c93a3dd

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