Package akka.javasdk.agent
Interface Guardrail
- All Known Subinterfaces:
TextGuardrail
- All Known Implementing Classes:
SimilarityGuard
Guardrails can protect against harmful inputs and outputs to/from model and tool calls.
A Guardrail needs to implement TextGuardrail
, which extends this interface, have a
public constructor with optionally a GuardrailContext
parameter, which includes the name
and the config section for the specific guardrail.
Guardrails are enabled for agents with configuration, see agent documentation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Thrown when the text didn't pass the evaluation criteria, andreport-only
is true.static final record
The result of the guardrail evaluation.