Class CallbackContext
java.lang.Object
com.google.adk.agents.ReadonlyContext
com.google.adk.agents.CallbackContext
- Direct Known Subclasses:
ToolContext
The context of various callbacks for an agent invocation.
-
Field Summary
FieldsFields inherited from class com.google.adk.agents.ReadonlyContext
invocationContext
-
Constructor Summary
ConstructorsConstructorDescriptionCallbackContext
(InvocationContext invocationContext, EventActions eventActions) -
Method Summary
Modifier and TypeMethodDescriptionReturns the EventActions associated with this context.io.reactivex.rxjava3.core.Maybe
<com.google.genai.types.Part> loadArtifact
(String filename, Optional<Integer> version) Loads an artifact from the artifact service associated with the current session.void
saveArtifact
(String filename, com.google.genai.types.Part artifact) Saves an artifact and records it as a delta for the current session.state()
Returns the delta-aware state of the current callback.Optional
<com.google.genai.types.Content> Returns the user content that initiated this invocation.Methods inherited from class com.google.adk.agents.ReadonlyContext
agentName, invocationId
-
Field Details
-
eventActions
-
-
Constructor Details
-
CallbackContext
-
-
Method Details
-
state
Returns the delta-aware state of the current callback.- Overrides:
state
in classReadonlyContext
-
userContent
Returns the user content that initiated this invocation. -
eventActions
Returns the EventActions associated with this context. -
loadArtifact
-
saveArtifact
Saves an artifact and records it as a delta for the current session.
-