Skip to main content

The Active Reliability Layer for AI Agents

Project description

Steer Labs Logo

Steer

steer-labs.com

The Active Reliability Layer for AI Agents.

Stop fixing probability with more probability.
Intercept hallucinations, malformed JSON, and protocol drift in runtime.

PyPI License Twitter


Steer Mission Control

Mission Control: Enforcing deterministic truth on probabilistic model outputs.


The Problem: The Agent Lobotomy

Most developers are forced to cripple their agents in production (stripping autonomy and hardcoding paths) because they cannot verify probabilistic output. When an agent fails, simply logging the error is insufficient. You are stuck in a prompt-deploy death loop:

  1. Grep production logs for specific input/output pairs.
  2. Manually adjust prompts and hope for no regressions.
  3. Redeploy the entire application for a single instruction update.

The Solution: Reality Locks

Steer wraps agent functions with deterministic Reality Locks. When a failure is detected (JSON syntax error, PII leak, or logic violation), Steer blocks the output and triggers a local "Teachable Moment" UI. You provide a correction, and Steer injects that rule into the agent context at runtime without a code redeploy.

Stop lobotomizing your agents. Reality Locks allow you to keep the intelligence while the code enforces the boundaries.

Operational Resilience

Steer is architected for mission-critical production environments:

  • Low-Latency Sidecar: Verification adds <5ms overhead by running in-process.
  • Fail-Safe Design: Configurable behavior for internal library errors to prioritize uptime.
  • Stateless by Design: Compatible with serverless (Lambda) and containerized (K8s) environments.

Privacy & Security

  • Zero Data Exfiltration: Local-first architecture. Traces and prompts never leave your network.
  • Audit-Ready Logging: Every blocked response is logged with a deterministic reason code for compliance.
  • No Vibe-Checks: Verification is code-based (Regex, AST, Pydantic), eliminating verifier hallucinations.

Installation

pip install steer-sdk

Quickstart

Ensure you run all commands from the same directory to keep the local database synced.

steer init   # Generates 01_structure_guard.py, 02_safety_guard.py, etc.
steer ui     # Launches Mission Control at http://localhost:8000
  1. Fail: Run python 01_structure_guard.py. Output shows [-] Status: Blocked.
  2. Teach: Go to the UI. Click the incident, select Teach, and save the rule.
  3. Fix: Run the script again. Output shows [+] Status: Passed.

Reality Locks in Action

1. Structure Guard (JSON)

Problem: Agent wraps JSON in Markdown backticks, breaking your parser. Fix: Block the output and enforce raw JSON formatting via the dashboard. Structure Guard Demo

2. Safety Guard (PII)

Problem: Agent accidentally leaks customer emails or internal keys despite system instructions. Fix: Block the response and enforce redaction protocols across all agent outputs. Safety Guard Demo

3. Logic Guard (Ambiguity)

Problem: Agent guesses an ambiguous city (e.g., Springfield, IL) instead of asking for clarification. Fix: Force the agent to ask the user clarifying questions when tool results are non-unique. Logic Guard Demo

4. Slop Filter (Brand Voice)

Problem: Agent uses sycophantic "AI-voice" (emojis, em-dashes, apologies) that pollutes data protocols. The Tech: Uses Shannon Entropy to measure signal density. If the response is over-smoothed (low entropy), Steer identifies it as an aesthetic lobotomy and blocks the signal. Slop Filter Demo

Cookbook

Explore the cookbook/ directory for enterprise-grade implementations.

  • RAG Reliability: Enforcing strict schemas and grounding citations.
  • SQL Security: Enforcing read-only protocols and preventing destructive injections.

Integration: Sidecar Dependency Injection

Add steer_rules to your function arguments. Steer populates this automatically at runtime.

from steer import capture
from steer.verifiers import JsonVerifier, SlopVerifier

locks = [JsonVerifier(), SlopVerifier(entropy_threshold=3.5)]

@capture(verifiers=locks)
def finance_agent(query, steer_rules=""):
    # Rules are injected automatically. 
    # Update agent behavior via local UI without a code redeploy.
    system = f"You are a read-only SQL analyst.\n{steer_rules}"
    return model.generate(system, query)

Data Engine: Synthetic Data for DPO

Steer transforms runtime failures into a training asset. By capturing the delta between a Blocked Response (Rejected) and a Taught Response (Chosen), Steer generates contrastive pairs for Direct Preference Optimization (DPO).

Export Training Data

# Export successful runs for SFT
steer export --format openai

# Export contrastive pairs (Rejected vs Chosen) for DPO
steer export --format dpo

Production-Ready Checklist

  • Pydantic v2 Compatible: Built on high-performance serialization.
  • Thread-Safe: Tested for high-concurrency production environments.
  • Zero Dependencies: Minimal footprint to reduce supply-chain risk.
  • Local-First: No external API dependencies for core verification logic.

What is the "Confident Idiot" Problem?

The Confident Idiot is a failure mode where an LLM generates a factually incorrect or structurally broken response with high probability (confidence). Because LLMs fail silently and plausibly, traditional observability is insufficient. Steer provides the verification layer to catch these failures before they hit your users.

Read the viral discussion on Hacker News.

Star History

Star History Chart

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.3.5.tar.gz (461.2 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.3.5-py3-none-any.whl (477.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steer_sdk-0.3.5.tar.gz
  • Upload date:
  • Size: 461.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

Hashes for steer_sdk-0.3.5.tar.gz
Algorithm Hash digest
SHA256 6764cc0f0fbe87d7817213bd5b631e1e98c66ddb2ccc6307e7d3c8838c6e76ea
MD5 35202b5015bf930106f169471edfb2ef
BLAKE2b-256 8dfa7ae00825cded2f5db60eb2b9cf3a95ac7b3eeb94311a4172793f6de2b574

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steer_sdk-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 477.8 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.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 09974589815c2bd3607bbff1c89a419e8fd91ba67ec99d8835e773f1e41cd508
MD5 c36df321ed354e7fda95b8b0ddff66c7
BLAKE2b-256 c2149d15bcc2ed5d673ca99bddd037e5bd6992ba3178fdf2c75cefd6a1614466

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