Package akka.javasdk.agent
Interface TextGuardrail
- All Superinterfaces:
Guardrail
- All Known Implementing Classes:
SimilarityGuard
@Deprecated(since="3.6.0",
forRemoval=true)
public non-sealed interface TextGuardrail
extends Guardrail
Deprecated, for removal: This API element is subject to removal in a future version.
Guardrails can protect against harmful inputs and outputs to/from model and tool calls.
A Guardrail needs to implement 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 classes/interfaces inherited from interface akka.javasdk.agent.Guardrail
Guardrail.GuardrailException, Guardrail.Message, Guardrail.Result -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Evaluates if the text passes the guardrail or not.
-
Method Details
-
evaluate
Deprecated, for removal: This API element is subject to removal in a future version.Evaluates if the text passes the guardrail or not.
-
ToolCallGuardrail,ModelCallGuardrailorAgentResponseGuardrailinstead. The new interfaces return aDecision(Allow/Deny/Fail) and receive a per-call context. For MCP tool calls,TextGuardrailis still the only guardrail type.