Hard Rails for
Autonomous Agents.

Guardrails are suggestions. Hard rails are physics. Enforce deterministic spend caps and real‑time kill switches on your LangChain/CrewAI fleet with zero code changes.

hardrails — budget-enforcement-demo
Agent blocked by HardRails budget limit

Agent burns through $0.50 budget in 12 turns → hard block at turn 13 → kill switch → revive

The Problem

Agents are shipping. Controls aren't.

Every AI platform is deploying autonomous agents. Those agents make API calls, spend budget, touch production systems. There is no standard layer to ask: who authorized this? how much has been spent? what exactly happened?

// Incident Log — Uncontrolled Agent Actions Live Feed
02:14:38 UTC Critical Agent spent $4,200 on API calls in 8 min — no budget ceiling enforced
11:07:22 UTC Critical Autonomous action taken by unverified agent identity — no source attribution
15:44:01 UTC Warning Agent accessed prod database — action not in audit log, compliance flag raised
23:59:17 UTC Critical Prompt injection via external tool output — agent behavior deviated from policy

The Wedge

One environment variable. That's it.

HardRails is a local HTTP proxy that sits between your agent framework and the upstream LLM API. It intercepts, meters, and blocks before the API call leaves your server.

~/.bashrc

# Before — agent talks directly to OpenAI

export OPENAI_BASE_URL=https://api.openai.com/v1


# After — HardRails sits in the middle

export OPENAI_BASE_URL=http://localhost:4100/v1

Your Agent

LangChain / CrewAI / raw

HARDRAILS

intercept · meter · block

OpenAI API

or any compatible endpoint

Why HardRails

Four enforcement primitives. One layer.

HardrailsAI wraps any agent framework. You define the rules — we enforce them deterministically, before the action executes.

01 / IDENTITY
Agent Identity

Cryptographic identity for every agent instance. Know exactly which agent took which action — across frameworks, clouds, and teams.

02 / BUDGET
Spend Control

Hard ceilings on token spend, API calls, and compute per agent, per session, per policy class. No surprises on your cloud bill.

03 / ACCESS
Action Gating

Declarative allow/deny policies evaluated before execution. Define what each agent is permitted to do — and enforce it at the boundary.

04 / AUDIT
Execution Audit

Tamper-proof, structured logs of every agent decision and action. Compliance-ready export. Human-reviewable reasoning traces.

Architecture

Deterministic pipeline. Zero ambiguity.

Extract
Parse intent & proposed action from agent output
Detect
Evaluate against identity, budget & access policies
Gate
Allow, block, or require human approval before execution
Audit
Write structured, immutable record — every decision logged

Under the Hood

Real code. Real enforcement.

Not a pitch deck — production Python running between your agents and the upstream API. Every intercept is deterministic. Every decision is logged.

proxy.py — OpenAI-compatible governance intercept
@app.post("/v1/chat/completions")
async def chat_completions(request: Request):
    body = await request.json()

    # Extract governance context from headers
    agent_id   = request.headers.get("X-Agent-Id", DEFAULT_AGENT_ID)
    session_id = request.headers.get("X-Session-Id")
    prompt_text = _extract_prompt(body.get("messages", []))

    # ── Governance intercept ─────────────────────────────
    decision = _gateway.intercept(
        agent_id     = agent_id,
        request_body = prompt_text,
        session_id   = session_id,
    )

    # Hard block — request never reaches the upstream API
    if decision and decision.verdict in ("KILL", "SOFT_KILL"):
        return _governance_error(decision)

    # ── Forward to upstream ──────────────────────────────
    # Agent only changed one env var. Everything else is invisible.
    return await _forward(body, upstream_headers, stream)

Zero code changes. Agents set OPENAI_BASE_URL=localhost:4100 — governance is invisible.

Pricing

Built to scale with your fleet.

Every plan includes the full governance proxy, budget enforcement, and kill switch. Choose the tier that fits your team.

MOST POPULAR

Pro

$49 /month

Full governance stack with War Room dashboard and compliance exports.

  • Full governance proxy + kill switch
  • War Room dashboard
  • HMAC-signed compliance receipts
  • Drift radar + alignment scoring
  • Email support
Get Early Access

Enterprise

Custom

Managed deployment, fleet-wide governance, and dedicated onboarding.

  • Everything in Pro
  • Managed cloud proxy
  • SSO + team roles
  • Custom constitution rules
  • Dedicated Slack channel
Talk to Us