# agentsea_guardrails v0.1.0 - Table of Contents

> AgentSea guardrails: an input/output validation pipeline with rule-based and LLM moderation guardrails.

## Modules

- [AgentSea.Guardrail](AgentSea.Guardrail.md): A check applied to text entering or leaving an agent. Each guardrail either
passes (`:ok`), rewrites the content (`{:transform, new}` — e.g. redaction), or
blocks it (`{:block, reason}`). `AgentSea.Guardrails` chains them.
- [AgentSea.Guardrail.Blocklist](AgentSea.Guardrail.Blocklist.md): Blocks content containing any banned `:terms` (case-insensitive substrings) —
handy for prompt-injection phrases or disallowed topics.

- [AgentSea.Guardrail.LLMGuard](AgentSea.Guardrail.LLMGuard.md): An LLM-as-moderator guardrail: asks a model whether the content violates a
policy and blocks it if so. Runs over any `AgentSea.Provider` (so it can go
through the gateway).
- [AgentSea.Guardrail.MaxLength](AgentSea.Guardrail.MaxLength.md): Blocks content longer than `:max` characters.
- [AgentSea.Guardrail.PIIRedactor](AgentSea.Guardrail.PIIRedactor.md): Redacts personally-identifiable information by rewriting the content (a
`{:transform, _}` outcome). Redacts emails, US SSNs, and phone numbers by
default; configure with `:types` (any of `:email`, `:ssn`, `:phone`).

- [AgentSea.Guardrails](AgentSea.Guardrails.md): Run a pipeline of `AgentSea.Guardrail`s over text. Apply it to user input
before `AgentSea.Agent.run/3` and/or to the agent's output before returning

