---
title: Concepts
description: Architecture, policy model, agent profiles, and the plugin contract.
---

TrustLoopGuard is a runtime safety layer for production agents. The important
moment is the boundary before an agent speaks, sends, writes, or takes another
externally visible action.

```text
agent drafts output
  -> TrustLoopGuard check
  -> allow | block | rewrite | escalate
  -> trace for audit and dashboard
```

## Core Ideas

| Concept | Meaning |
| --- | --- |
| Check | One request asking whether a proposed output is safe to deliver. |
| Decision | The typed response from TrustLoopGuard. It includes verdict, reason, latency, trace id, and triggered policies. |
| Verdict | One of `allow`, `block`, `rewrite`, or `escalate`. |
| Policy | A YAML rule that scopes when it applies, what it matches, and which action to take. |
| Agent profile | Context about the agent's domain, authority, tone, and constraints. |
| Trace | The persisted record that lets operators inspect what happened later. |

## Runtime Shape

The Rust backend is the source of truth. SDKs call the Rust server directly for
runtime checks, especially `POST /v1/check`. The web dashboard may proxy and
display data, but it does not own policy evaluation or trace storage.

```text
SDK / agent runtime
  -> tl-server
  -> tl-engine
  -> tl-storage
  -> Decision + trace
```

## Latency Model

TrustLoopGuard is designed around channel budgets:

| Channel | Target |
| --- | --- |
| Voice | deterministic checks under the realtime budget |
| Chat | synchronous guardrail decisions before the message is shown |
| Email and jobs | slower checks are acceptable because delivery is asynchronous |
| Replay | offline analysis can spend more time for richer evaluation |

The hot path starts with deterministic policies because that is the only layer
that can be consistently fast enough for voice.

## Source Of Truth

The deeper concept docs live in `docs/concept/` in the repo:

- `architecture.md` explains request flow and ownership.
- `crates.md` explains each Rust crate and dependency boundary.
- `glossary.md` defines domain terms once.
- `plugin-contract.md` describes extension boundaries.
- `v0-design-decisions.md` records why the current runtime shape exists.
