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

# Tenet Guardrails

> Tenet Guardrails for agent harnesses — every tool call judged by the Judge API for compliance risk before it runs, and after it returns.

## Choose a product

> [card] [Tenet Guardrails](https://docs.tenetlabs.com/quickstart.md)
>
> Hosted guardrails for agent tool calls, served by the Judge API. This page and the **Tenet Guardrails** tabs.

> [card] [PII Engine](https://docs.tenetlabs.com/pii-engine/overview.md)
>
> De-identification that runs in your AWS account. Self-hosted, sold through AWS Marketplace.

**Tenet Guardrails** sits at your agent's tool boundary. Every call goes to **the Judge** — an independent, purpose-built compliance model — and comes back as a verdict your harness acts on: `allow` | `caveat` | `review` | `block`, with severity and evidence. You reach the Judge through the **Judge API** or the SDKs.

| | What it is |
| - | - |
| **Tenet Guardrails** | Our core product to enhance your agent's compliance posture, accessed via SDK or LangChain middleware |
| **The Judge** | The service that decides — a purpose-built compliance model, separate from your agent's model |
| **Judge API** | How you call the Judge — `judge.tenetlabs.com` |

Before a tool runs (`tool_pre`) and after it returns (`tool_post`), call `POST /decide` — the Judge evaluates the call across every domain your API key is entitled to and returns one verdict telling your harness what to do: proceed, rewrite, route to a human, or block. EEO/HR compliance is the core domain. Deterministic injection/exfil guards and high-severity PII (card numbers, SSNs, credentials) enforce alongside it; the LLM safety rails and other PII types report as `audit_only` — see [Multi-verdict responses](https://docs.tenetlabs.com/concepts/multi-verdict.md).

> [!NOTE]
>
> **For AI agents**: a machine-readable index of these docs is at `/llms.txt`; the full text is at `/llms-full.txt`; every page resolves as markdown with a `.md` suffix. These docs are also an MCP server at `/mcp` (search + filesystem tools) — connect it and query instead of crawling. To integrate Tenet into a harness, fetch [`/agent-integration.md`](https://docs.tenetlabs.com/agent-integration) and execute it.

## Start building

> [card] [Quickstart](https://docs.tenetlabs.com/quickstart.md)
>
> Install the SDK, set your API key, gate your first tool call. Under five minutes.

> [card] [Agent integration](https://docs.tenetlabs.com/agent-integration.md)
>
> Building with an AI agent? Hand it this page — a self-contained integration spec.

> [card] [LangChain middleware](https://docs.tenetlabs.com/guides/langchain.md)
>
> One line in `create_agent` — `TenetJudgeMiddleware` gates every tool call automatically.

> [card] [API Reference](https://docs.tenetlabs.com/api-reference/introduction.md)
>
> Raw HTTP at `judge.tenetlabs.com` — for harnesses that aren't Python or LangChain.

## How it works

Your agent proposes a tool call → the SDK sends it to the judge → the judge returns a verdict with per-domain findings → your policy maps the verdict to an action.

```text theme={null}
agent → tool_pre ─────────► judge ──► allow | caveat | review | block
              │                            │
              │  (tool runs if allowed)    ├─ severity
              ▼                            ├─ findings[] (per-domain rule IDs + evidence)
        tool_post ────────► judge          └─ route_reason (why it routed, on review)
```

Every verdict carries per-domain `rule_ids` + `evidence_span` on each finding, so a `block` is always explainable to your users and your auditors.

## Three ways in

| Integration | Shape | Use when |
| - | - | - |
| [`tenet-langchain`](https://docs.tenetlabs.com/guides/langchain) | LangChain `AgentMiddleware` | You build agents with `create_agent`. The default. |
| [`tenet-client`](https://docs.tenetlabs.com/guides/framework-free) | Python SDK + `@judged` decorator | Any Python harness — no framework dependency. |
| [HTTP API](https://docs.tenetlabs.com/api-reference/introduction.md) | REST + SSE at `judge.tenetlabs.com` | Non-Python harnesses, or you want the wire protocol. |

## Built for the failure case

* **Fail-closed by default** — if the judge is unreachable, the SDK raises `JudgeUnavailableError` and your policy decides. Nothing slips through silently.
* **Verdict-first streaming** — the verdict is the first event on the stream, ahead of PII and safety findings. Block at verdict; allow side effects at `done`.
* **Explainable always** — every decision ships per-domain rule IDs, risk labels, and the evidence span that triggered them.

## Links

* [What is Tenet — why guardrails, and for whom](https://docs.tenetlabs.com/what-is-tenet.md)
* [Quickstart](https://docs.tenetlabs.com/quickstart.md)
* [Authentication](https://docs.tenetlabs.com/authentication.md)
* [Surfaces — tell the judge which recruiting action it's judging](https://docs.tenetlabs.com/concepts/surfaces.md)
* [How the Judge decides](https://docs.tenetlabs.com/concepts/decisions.md)
* [API Reference](https://docs.tenetlabs.com/api-reference/introduction.md)
* [`tenet-client` on PyPI](https://pypi.org/project/tenet-client/)
* [`tenet-langchain` on PyPI](https://pypi.org/project/tenet-langchain/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.