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

# Guards: BeyondGuard's Five Core AI Protection Units

> A Guard is a purpose-built security module deployed at a specific AI stack layer, making security decisions independently from the models it protects.

A Guard is a purpose-built security module deployed at a specific node of the AI value chain. Unlike bolt-on filters or model-level fine-tuning, each Guard operates structurally independently from the models it protects — its security decisions are made outside the model's own reasoning process, so a compromised or manipulated model cannot talk its way past a Guard. BeyondGuard's five Guards together cover every layer of your AI stack, from the moment data enters your retrieval pipeline to the moment a response reaches your users.

## How Guards Work

Every Guard follows the same core pipeline: **inspect → evaluate → act**.

When an interaction reaches a protected layer, the Guard intercepts it before it proceeds. It evaluates the interaction against your configured policies — checking for known threat signatures, contextual anomalies, scope boundaries, and compliance rules. Based on that evaluation, the Guard takes one of three actions: it allows the interaction to proceed, flags it for review while letting it through, or blocks it entirely. In Enforcement Mode, blocking happens in real time. In Observation Mode, the Guard logs what it would have blocked without interrupting the flow.

This pipeline runs at every node independently. A Guard at the MCP/Tool layer does not rely on the Prompt Guard having already caught a threat upstream — it makes its own determination based on what it can observe at its own layer.

## The Five Guards

<CardGroup cols={2}>
  <Card title="Prompt Guard" icon="shield" href="/guards/prompt-guard">
    Inspects and filters all inputs before they reach the model. Detects prompt injection, jailbreaks, and system prompt extraction attempts.
  </Card>

  <Card title="Agent Guard" icon="robot" href="/guards/agent-guard">
    Monitors autonomous agent behavior, including plan execution, memory integrity, and action scope. Catches plan deviations, memory poisoning, and infinite loops.
  </Card>

  <Card title="MCP Guard" icon="wrench" href="/guards/mcp-guard">
    Validates every tool call and MCP server interaction. Blocks tool poisoning, parameter injection, and schema violations before they reach external systems.
  </Card>

  <Card title="Data Guard" icon="database" href="/guards/data-guard">
    Protects your retrieval pipeline and embedding infrastructure. Detects RAG poisoning and malicious content injected into your knowledge base.
  </Card>

  <Card title="Output Guard" icon="arrow-right" href="/guards/output-guard">
    Screens model responses before they reach users. Filters toxic output, prevents data leakage and PII exposure, and flags IP violations.
  </Card>
</CardGroup>

## Guard Modes

Each Guard can operate in one of two modes, and you can set them independently per Guard.

**Observation Mode** logs and reports every detection without blocking any interaction. Traffic flows through uninterrupted, but every threat event is captured, categorized, and surfaced in your control plane dashboard. Observation Mode is the right starting point for any new deployment — it lets you understand your threat surface, tune your policies, and build confidence in detections before you commit to enforcement.

**Enforcement Mode** actively blocks or rewrites interactions that violate policy. A blocked prompt injection never reaches the model. A flagged agent plan is halted before any action is taken. A toxic response is filtered before the user sees it. Switching a Guard to Enforcement Mode should follow a period of Observation Mode calibration so that your policies accurately reflect your environment and you're not blocking legitimate traffic.

## Combining Guards

Guards work together across the value chain, but each one makes its security decisions independently. This structural independence is intentional: it means a threat that slips through one layer — whether due to a novel attack technique or a misconfigured policy — still faces inspection at every subsequent layer. Defense in depth is built into the architecture.

You do not need to deploy all five Guards at once. Start with the layers that carry the most risk for your specific deployment. Many teams begin with Prompt Guard and Output Guard to secure the input and output boundaries, then expand inward to Agent Guard and MCP Guard as their agent and tool integrations mature.

<Tip>
  Start with Prompt Guard in Observation Mode to baseline your threat surface before moving to enforcement. The detections you collect in the first few days will give you the data you need to write accurate, low-noise policies.
</Tip>
