The Active Reliability Layer for AI Agents
Project description
Steer
The Active Reliability Layer for AI Agents.
Stop debugging. Start teaching.
Steer turns runtime hallucinations into permanent fixes—instantly.
Mission Control: Catching hallucinations locally and fixing them with one click.
⚡ Quickstart
Get running in 30 seconds. No API keys required.
pip install steer-sdk
steer init # Generates 3 interactive demo agents
steer ui # Launches Mission Control dashboard
Then run a demo:
python 01_structure_guard.py
🧠 Why Steer?
Most AI tools are passive. Steer is active.
| Feature | The Old Way (Observability) | The Steer Way (Reliability) |
|---|---|---|
| Reaction | Alerts you after the user crashes. | Blocks the crash before it happens. |
| Fixing | You edit code, re-prompt, and re-deploy. | You "Teach" the agent a fix in the UI. |
| Privacy | Sends your prompts to a cloud logger. | Local-First. Data stays on your machine. |
🛑 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.
Steer creates a "Teaching Layer" around your agent.
- Catch: Intercept the failure in real-time.
- Teach: Provide a correction in the Dashboard.
- Fix: Steer injects that "memory" into the agent immediately.
⚡ The 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 return.
[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 (steer ui).
- 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. |
🛠️ 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)
🔮 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.
🔑 Configuration (Optional)
The Quickstart demos run locally and require no API keys.
To use advanced LLM-based verifiers (like FactConsistencyVerifier) in production, set your keys:
export GEMINI_API_KEY=AIzaSy...
# OR
export OPENAI_API_KEY=sk-...
🧩 Creating Custom Verifiers
Steer is designed to be extensible. You can write your own logic guards in plain Python.
from steer.verifiers import BaseVerifier, VerificationResult, TeachingOption
class MyCustomGuard(BaseVerifier):
def __init__(self, name: str):
self.name = name
def verify(self, inputs: dict, output: str) -> VerificationResult:
# 1. Your Custom Logic
# e.g. Check if output contains forbidden words
is_safe = "competitor_name" not in str(output).lower()
# 2. Return Result
return VerificationResult(
verifier_name=self.name,
passed=is_safe,
reason="Mentioned competitor name" if not is_safe else None,
# 3. Define the Fix (that appears in the Dashboard)
suggested_fixes=[
TeachingOption(
title="Remove Competitor Mentions",
description="Detected competitor name.",
logic_change="Rule: Never mention competitors. Focus on our product strengths."
)
]
)
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.9.tar.gz.
File metadata
- Download URL: steer_sdk-0.1.9.tar.gz
- Upload date:
- Size: 457.2 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 |
06216543039a7fdca3526ebf5366bce325b056144db8ef0f0494512d45637ec8
|
|
| MD5 |
b567a95fd39157f1865c7d48b69f4ae4
|
|
| BLAKE2b-256 |
3200419e83bc0ab8bd2746da5682d7bc06f4e889d88397ce9e1058c9e52f30ba
|
File details
Details for the file steer_sdk-0.1.9-py3-none-any.whl.
File metadata
- Download URL: steer_sdk-0.1.9-py3-none-any.whl
- Upload date:
- Size: 473.6 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 |
5c13f9fdce920057e46f0675fbef2a5da05281261f7c264c96f800425784fcde
|
|
| MD5 |
4fc5a902cdf3f36bbb1e1d9c3863ae8c
|
|
| BLAKE2b-256 |
6baef860ef83a8ffec6f2f30f3e7968356c85df9ffc3a048e2bd741fe54ac7d4
|