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.

Intercept hallucinations and protocol drift in runtime.
Enforce deterministic truth on probabilistic model outputs.

PyPI License Twitter


Steer Mission Control

Mission Control: Enforcing deterministic protocols on frontier reasoning models.


Why Steer?

I built Steer because probability cannot fix probability. It provides the deterministic verification required to ship autonomous agents without performing an Agent Lobotomy (stripping features to ensure safety).

Steer functions as an Agent Service Mesh. It decouples your reliability policy from your application logic, allowing you to secure entire frameworks or specific functions with a unified protocol.

Operational Resilience

  • Low-Latency Sidecar: Verification adds <5ms overhead by running in-process.
  • Fail-Safe Design: Configurable behavior for internal errors to prioritize uptime.
  • 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.

Installation

pip install steer-sdk

Integration Paths

1. The Agent Service Mesh (Global Governance)

Steer provides zero-touch reliability for frameworks like PydanticAI. Patch the framework at your application entry point to enforce a central policy across all agents.

import steer
from pydantic_ai import Agent

# Initialize the Service Mesh via a central policy file
steer.init(patch=["pydantic_ai"], config="steer_policy.yaml")

# Steer auto-detects the agent name and introspects tools/types to apply locks.
agent = Agent('openai:gpt-5.2', name="finance_bot")
result = agent.run_sync("Query Q4 revenue")

2. Sidecar Dependency Injection (Manual Control)

For custom workflows or non-framework code, use the decorator pattern. Steer automatically injects taught rules into the steer_rules argument at runtime.

from steer import capture, JsonJudge, SlopJudge

locks = [JsonJudge(), SlopJudge(entropy_threshold=3.5)]

@capture(Judges=locks)
def finance_agent(query, steer_rules=""):
    # steer_rules is populated automatically from Mission Control.
    # Update 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)

Quickstart

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

steer init   # Generates interactive demo agents
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

The Steer workflow follows a simple loop: Catch → Teach → Fix.

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 Fix: Measures Shannon Entropy of the response. If the signal is too smooth (low entropy), Steer identifies it as an aesthetic lobotomy and blocks the output. Slop Filter Demo

Cookbook

Explore the cookbook/ directory for enterprise-grade implementations.

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 pairs ready for trl or unsloth
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.

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.4.3.tar.gz (462.0 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.4.3-py3-none-any.whl (480.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steer_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 462.0 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.4.3.tar.gz
Algorithm Hash digest
SHA256 7a601dfa7a389be26cea7491c1460996f5ad8719d562b5de1e20952dc3b2e050
MD5 29db26541d68b2bb6b98639861cdaf10
BLAKE2b-256 2f75b9c9082622178d71a5855729570ac6b995da25c9fcb1bd07dc2a52228150

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steer_sdk-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 480.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.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf75bb9d3f90b28625aeba4e29889668267160fd7024ad0f311bf028fe10174
MD5 0502be2766afefa3d7126262539e330f
BLAKE2b-256 c0790a4e3011a7b7034394ed5515521e9aeb6755e216138302904b22839b0c34

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