> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plyra.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Policy enforcement middleware for AI agent tool calls

AI agents execute real actions — deleting records, calling APIs, sending
emails. There is no standard safety layer between the LLM's decision and
execution. plyra-guard is that layer.

It intercepts every tool call your agent makes, evaluates it against your
policy, and blocks, logs, or escalates — before anything irreversible happens.

<Note>
  plyra-guard runs **in-process** — no sidecar, no network hop.
  Every evaluation completes in under 2ms.
</Note>

<div style={{margin: '32px 0', borderRadius: '8px', overflow: 'hidden', border: '1px solid #1e2a38'}}>
  <img src="https://mintcdn.com/plyra/Lg9SA-tSj-CaqUyK/images/guard-architecture.svg?fit=max&auto=format&n=Lg9SA-tSj-CaqUyK&q=85&s=4b811c42dad82421669fab719ac94e70" alt="Plyra Guard Architecture" style={{width:'100%', background:'#0d1117'}} width="720" height="420" data-path="images/guard-architecture.svg" />
</div>

## How it works

Every tool call passes through plyra-guard before execution:

1. Your agent decides to call a tool
2. plyra-guard intercepts the call in-process
3. The call is evaluated against your policy — sub-2ms, no network hop
4. Verdict: **ALLOW**, **BLOCK**, **ESCALATE**, **DEFER**, or **WARN**
5. The decision is written to the audit log

<CardGroup cols={2}>
  <Card title="Zero latency overhead" icon="bolt">
    Evaluation runs in-process. No network hop. Sub-2ms per call.
  </Card>

  <Card title="Framework agnostic" icon="plug">
    Works with LangGraph, AutoGen, CrewAI, LangChain, OpenAI, Anthropic,
    and plain Python.
  </Card>

  <Card title="Policy as code" icon="file-code">
    Rules live in your repo, reviewed in PRs, tested in CI.
    YAML or Python — your choice.
  </Card>

  <Card title="Full audit log" icon="list-check">
    Every decision logged — allowed and blocked. Ships to OTEL,
    Datadog, or your own sink.
  </Card>
</CardGroup>

## What's available today

<CardGroup cols={3}>
  <Card title="v0.1.9 on PyPI" icon="box" color="#2dd4bf">
    Install with `pip install plyra-guard`. Stable beta API.
    Python 3.10+.
  </Card>

  <Card title="Apache 2.0" icon="scale-balanced" color="#2dd4bf">
    No telemetry. No usage tracking. Run it on-prem, in a container,
    or embedded in your agent loop.
  </Card>

  <Card title="LangGraph + 6 more" icon="plug" color="#2dd4bf">
    Native support for LangGraph, LangChain, AutoGen, CrewAI, OpenAI,
    Anthropic, and plain Python.
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Quickstart" href="/guard/quickstart" icon="rocket">
    Protect your first tool call in 60 seconds.
  </Card>

  <Card title="Policy reference" href="/guard/policy" icon="file-code">
    Write rules that match your threat model.
  </Card>
</CardGroup>
