Class ReadonlyContext
java.lang.Object
com.google.adk.agents.ReadonlyContext
- Direct Known Subclasses:
CallbackContext
Provides read-only access to the context of an agent run.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the agent currently running.branch()
Returns the branch of the current invocation, if present.events()
Returns an unmodifiable view of the events of the session.Returns the ID of the current invocation.Returns the session ID.state()
Returns an unmodifiable view of the state of the session.Optional
<com.google.genai.types.Content> Returns the user content that initiated this invocation.
-
Field Details
-
invocationContext
-
-
Constructor Details
-
ReadonlyContext
-
-
Method Details
-
userContent
Returns the user content that initiated this invocation. -
invocationId
Returns the ID of the current invocation. -
branch
-
agentName
Returns the name of the agent currently running. -
sessionId
Returns the session ID. -
events
-
state
-