Package com.google.adk.agents
Class CallbackContext
java.lang.Object
com.google.adk.agents.ReadonlyContext
com.google.adk.agents.Context
com.google.adk.agents.CallbackContext
- Direct Known Subclasses:
ToolContext
The context of various callbacks for an agent invocation.
Extends Context for backward compatibility; agent and model callback signatures still
use this type.
-
Field Summary
Fields inherited from class com.google.adk.agents.Context
eventActionsFields inherited from class com.google.adk.agents.ReadonlyContext
invocationContext -
Constructor Summary
ConstructorsConstructorDescriptionCallbackContext(InvocationContext invocationContext, @Nullable EventActions eventActions) Initializes callback context.CallbackContext(InvocationContext invocationContext, @Nullable EventActions eventActions, @Nullable String eventId) Initializes callback context. -
Method Summary
Methods inherited from class com.google.adk.agents.Context
actions, attemptCount, eventActions, eventAuthor, eventAuthor, eventId, functionCallId, functionCallId, listArtifacts, loadArtifact, loadArtifact, output, requestConfirmation, requestConfirmation, requestConfirmation, requireNodeState, resumeInputs, routes, routes, runNode, runNode, runNode, saveArtifact, searchMemory, state, toolConfirmation, toolConfirmationMethods inherited from class com.google.adk.agents.ReadonlyContext
agentName, branch, events, invocationContext, invocationId, sessionId, userContent, userId
-
Constructor Details
-
CallbackContext
Initializes callback context.- Parameters:
invocationContext- Current invocation context.eventActions- Callback event actions, or null for new empty ones.
-
CallbackContext
public CallbackContext(InvocationContext invocationContext, @Nullable EventActions eventActions, @Nullable String eventId) Initializes callback context.- Parameters:
invocationContext- Current invocation context.eventActions- Callback event actions, or null for new empty ones.eventId- The ID of the event associated with this context, or null if there is none.
-