Interface AgentResponseGuardrail

All Superinterfaces:
Guardrail

public non-sealed interface AgentResponseGuardrail extends Guardrail
A guardrail that decides whether an agent reply may be returned. The runtime evaluates it on the final reply, once per agent interaction. On an autonomous agent, the runtime also evaluates it on the message of each broadcast, direct, and submit_turn tool call.

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.