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, just add steer_rules to your function arguments.

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, steer_rules=""):
    
    # 3. Steer automatically injects rules here!
    # Pass 'steer_rules' to your system prompt.
    system_prompt = f"You are a helpful assistant.\n{steer_rules}"
    
    # ... Your LLM call ...
    return llm.call(system_prompt, user_input)

🔑 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.7.tar.gz (455.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.7-py3-none-any.whl (472.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steer_sdk-0.1.7.tar.gz
  • Upload date:
  • Size: 455.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.7.tar.gz
Algorithm Hash digest
SHA256 6ebb0066c231289f6e5291ad0076886558c10865ede25395a9b5f462bfa143f3
MD5 f37dd00de2daea186a3d1ea14a6a461b
BLAKE2b-256 dd796892cca5fe33c016aa808b68db17f895cbc676c093355b4133516f3b021b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steer_sdk-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 472.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 64f2959c5fb539f1d25289729ab2fa2da0ba6b0ef59334a0a5e2681302a8cf9b
MD5 c2d0058b68972856deef65386bbfaffd
BLAKE2b-256 759afbdfac7a9bf1e58fd8b7ddaff34a4a793b2a1eb3826d100f4c0e9ba5b4a6

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