Expand description
G — Guard composition.
Combine output guards with +: every guard must pass
(G::pii() + G::length(1, 2000)).
§Wiring
A GuardComposite attached via AgentBuilder::guard is installed on the
compiled LlmTextAgent as an after_model middleware layer (see
GuardComposite::into_middleware). Every model response is checked against
all guards; if any guard rejects the output the agent run fails with an
AgentError enumerating the violations, vetoing the response.
Structs§
- G
- The
Gnamespace — static factory methods for guards. - Guard
Composite - A composite of guards — all must pass for output to be accepted.
- Guard
Rule - A guard that validates agent output.