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.
🛑 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:
- Dig through logs.
- Reproduce the prompt.
- Edit your prompt template.
- 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.
[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
- Go to http://localhost:8000
- Click Teach on the active incident.
- Select "Strict JSON Mode" and save.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file steer_sdk-0.1.6.tar.gz.
File metadata
- Download URL: steer_sdk-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afbfb93db1ea34a623d6bc28514679c76a8496e918463f37f3b91c4a4132fb16
|
|
| MD5 |
d968672cf887dc9099a1372a00e69e83
|
|
| BLAKE2b-256 |
9ce834d71afeae242d576b4ab46f49de3cebba2cc476a4aec8c79ba354aa71ee
|
File details
Details for the file steer_sdk-0.1.6-py3-none-any.whl.
File metadata
- Download URL: steer_sdk-0.1.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21e8fd6419d3cb06fea7fea99c7887c948fc7d710d02a4acd697d6223079acf7
|
|
| MD5 |
40540cf5c521e2f06789123ac52754f9
|
|
| BLAKE2b-256 |
0a94442fd8cf6afad453a78597934d3a1544798b5d207c9e0b207d97c1c35bdc
|