Guardrails
A guardrail is a rule an agent's turn must satisfy. It's a check, a function you write over the turn (its answer, its tool calls and their results), and an action: what happens when the check fails. Kindgi runs an agent's guardrails once per turn, on its final answer, before the answer is stored.
- Write a guardrail: the check, the declaration, and wiring it onto an agent.
- Configure a guardrail: settings the check runs with, and their schema.
- Stop a turn or record a violation:
haltversuslog-only, severity, which agents a guardrail covers, and how a guardrail is doing: how often it passed, was violated, blocked a turn or couldn't run. - Use a built-in check: name one of Kindgi's seven checks instead of writing your own, and the settings each reads.
The examples use the quickstarts' pack, my-pack, whose agent answers with
dev-echo until you connect a model.