Package akka.javasdk.agent
Interface ToolCallGuardrail.CallContext
- Enclosing interface:
ToolCallGuardrail
public static interface ToolCallGuardrail.CallContext
Per-call context passed to a
ToolCallGuardrail during ToolCallGuardrail.decide(akka.javasdk.agent.ToolCallGuardrail.CallContext).
Carries data about the specific tool call being checked.
For construction-time data that doesn't change per call (the guardrail's configured name and
its config section) accept a GuardrailContext parameter in the constructor.
-
Method Summary
Modifier and TypeMethodDescriptionagentId()The id of the agent performing the tool call.The raw JSON arguments the model produced for the tool call.The session id of the interaction.The id of the tool call, correlating it with the model's tool-call request.toolName()The name of the tool about to be called.tracing()Provides access to tracing for custom application-specific tracing.
-
Method Details
-
agentId
String agentId()The id of the agent performing the tool call. -
toolName
String toolName()The name of the tool about to be called. -
toolCallId
String toolCallId()The id of the tool call, correlating it with the model's tool-call request. Never null, but empty when the model provider does not assign one. -
arguments
String arguments()The raw JSON arguments the model produced for the tool call. -
sessionId
String sessionId()The session id of the interaction. -
tracing
Tracing tracing()Provides access to tracing for custom application-specific tracing.Spans started through this are parented to the tool call 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
-