Interface AgentResponseGuardrail

All Superinterfaces:
Guardrail

public non-sealed interface AgentResponseGuardrail extends Guardrail
A guardrail that decides whether the agent's final reply may be returned. The runtime evaluates it once per agent interaction.

An implementation has a public constructor, optionally taking a GuardrailContext parameter, which gives access to the guardrail's configured name and config section. The per-call data is delivered to decide(akka.javasdk.agent.AgentResponseGuardrail.CallContext) via AgentResponseGuardrail.CallContext.

The runtime shares one instance across concurrent calls from different sessions and agents. An implementation must be thread safe.

To bind this guardrail to an agent that returns Agent.StreamEffect, set report-only = true on the entry. Otherwise, the service fails to start.