Package akka.javasdk.agent
Interface AgentResponseGuardrail.CallContext
- Enclosing interface:
AgentResponseGuardrail
public static interface AgentResponseGuardrail.CallContext
Per-call context passed to an
AgentResponseGuardrail during AgentResponseGuardrail.decide(akka.javasdk.agent.AgentResponseGuardrail.CallContext).
For construction-time data that does not change per call, accept a GuardrailContext
parameter in the constructor. That data is the guardrail's configured name and its config
section.
-
Method Summary
Modifier and TypeMethodDescriptionagentId()The component id of the agent this interaction belongs to.The name of the model that produced the reply.reply()The final model reply.The id of the session this interaction belongs to.tracing()Provides access to tracing for custom application-specific tracing.
-
Method Details
-
agentId
String agentId()The component id of the agent this interaction belongs to. -
sessionId
String sessionId()The id of the session this interaction belongs to. -
modelName
String modelName()The name of the model that produced the reply. -
reply
Guardrail.Message.AiMessage reply()The final model reply. It carries no tool requests. -
tracing
Tracing tracing()Provides access to tracing for custom application-specific tracing.Spans started through this are parented to the agent response being checked, so work the guardrail performs (e.g. calling external or internal components) shows up under the interaction's trace.
- Returns:
- tracing interface for custom tracing
-