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 SDK that turns runtime failures into permanent fixes.

Most reliability tools just log errors and send you an alert.
Steer intercepts the error, lets you "Teach" the agent the correct behavior, and fixes it instantly.

PyPI version


🛑 The Problem: Logging isn't Enough

When an agent fails in production (e.g., outputs bad JSON or leaks PII), seeing a log doesn't help the user who just got a crash. You have to:

  1. Dig through logs.
  2. Reproduce the prompt.
  3. Edit your prompt template.
  4. Redeploy.

Steer creates a "Teaching Layer" around your agent. You catch the failure in real-time, provide a correction in the UI, and Steer injects that "memory" into the agent immediately—no code changes required.


⚡ The Teaching Loop: Catch → Teach → Fix

Steer provides a Human-in-the-Loop workflow to fix "Confident Idiot" agents.

1. Catch (The Guard)

Steer wraps your agent and blocks bad outputs before they reach the user.

JSON Structure Guard Demo

[Steer] 🤖 Agent generating profile...
[Steer] 🚨 BLOCKED: Structure Guard (Detected Markdown wrapping).
[Steer] 🛡️ Execution halted.

2. Teach (The Fix)

Instead of editing code, go to Steer Mission Control.

  • Click the blocked incident.
  • Click "Teach".
  • Select the fix (e.g., "Strict JSON Mode").

Steer now remembers this rule for this agent.

3. Fix (The Result)

Run the agent again. Steer automatically injects your teaching instruction. The agent self-corrects.

[Steer] 🧠 Context loaded: "Strict JSON" rule found. Applying fix...
[Steer] ✅ SUCCESS: Agent output valid JSON.

🛡️ Supported Guardrails

Steer comes with 3 "Teach-Ready" verifiers out of the box:

Verifier The Problem The "Teaching" Fix
JsonVerifier Agent wraps code in ```json blocks "Force JSON": Inject system instruction to output raw JSON only.
RegexVerifier Agent leaks PII (Emails/Keys) "Redact PII": Force agent to replace sensitive patterns with [REDACTED].
AmbiguityVerifier Agent guesses ambiguous answers "Ask Clarification": Force agent to ask user questions if >3 results found.

🔮 Roadmap: From Verification to Learning

Steer v0.1 provides the "Fast Path" (Runtime Guardrails + Human Teaching). Steer v0.2+ will introduce the "Slow Path" (Automated Model Improvement).

Coming Soon:

  • Query by Committee: Automated consensus checks for ambiguous prompts.
  • Automated Fine-Tuning: A pipeline to turn your accumulated (Incident -> Fix) logs into a fine-tuned model that stops making those mistakes entirely.
  • CI/CD Integration: Block Pull Requests if an agent fails a reliability test suite.

📦 Installation

pip install steer-sdk

⚡ Quickstart

The fastest way to experience the Teaching Loop 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. Run & Fail

Run the Structure Guard demo. It will fail on purpose.

python 01_structure_guard.py
# 🚨 BLOCKED: Detected Markdown code blocks.

3. Teach the Agent

Open the dashboard.

steer ui

4. Run & Succeed

Run the script again. The agent detects the new rule and fixes itself.

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, get_context
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):
    
    # 3. (Optional) Inject Teaching Context
    # This allows the agent to read rules you added in the Dashboard
    teaching_context = get_context("my_agent_name")
    
    # ... Your LLM call (pass teaching_context to system prompt) ...
    return llm_response

🔑 Configuration (Optional)

The Quickstart demos run locally and require no API keys.

To use advanced LLM-based verifiers (like FactConsistencyVerifier), set your keys:

export GEMINI_API_KEY=AIzaSy...
# OR
export OPENAI_API_KEY=sk-...

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.5.tar.gz (455.4 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.5-py3-none-any.whl (472.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steer_sdk-0.1.5.tar.gz
  • Upload date:
  • Size: 455.4 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.5.tar.gz
Algorithm Hash digest
SHA256 6d198eba2bef0f7039c8907da94607c37f7b3d7e7835ce8a0ac8caf815354220
MD5 0d5c72f8223ec60d63a0b4922d2dd498
BLAKE2b-256 eaa2dda748bcb672ce9c87df8c9de6335493cb5de76f22735f419f8f7c5e1b79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steer_sdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 472.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 75f86e4c46c75f94da297550cd71be0df7f83732060ac07bc3ca4c3b0b2a726f
MD5 eaa8c07dce8435116a6d8a2d35a58624
BLAKE2b-256 203a64522c5c59771ace9a889a8d31be17d22752b697afa69eed5945236f5387

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