Uses of Class
com.google.adk.agents.InvocationContext
Packages that use InvocationContext
Package
Description
-
Uses of InvocationContext in com.google.adk
Methods in com.google.adk with parameters of type InvocationContextModifier and TypeMethodDescriptionstatic voidTelemetry.traceCallLlm(InvocationContext invocationContext, String eventId, LlmRequest llmRequest, LlmResponse llmResponse) Traces a call to the LLM.static voidTelemetry.traceSendData(InvocationContext invocationContext, String eventId, List<com.google.genai.types.Content> data) Traces the sending of data (history or new content) to the agent/model.static voidTelemetry.traceToolResponse(InvocationContext invocationContext, String eventId, Event functionResponseEvent) Traces tool response event. -
Uses of InvocationContext in com.google.adk.agents
Fields in com.google.adk.agents declared as InvocationContextModifier and TypeFieldDescriptionprotected final InvocationContextReadonlyContext.invocationContextMethods in com.google.adk.agents that return InvocationContextModifier and TypeMethodDescriptionstatic InvocationContextInvocationContext.copyOf(InvocationContext other) static InvocationContextInvocationContext.create(BaseSessionService sessionService, BaseArtifactService artifactService, BaseAgent agent, Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig) Deprecated.static InvocationContextInvocationContext.create(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) Deprecated.Methods in com.google.adk.agents with parameters of type InvocationContextModifier and TypeMethodDescriptionCallbacks.AfterToolCallback.call(InvocationContext invocationContext, BaseTool baseTool, Map<String, Object> input, ToolContext toolContext, Object response) Async callback after tool runs.Callbacks.AfterToolCallbackSync.call(InvocationContext invocationContext, BaseTool baseTool, Map<String, Object> input, ToolContext toolContext, Object response) Callbacks.BeforeToolCallback.call(InvocationContext invocationContext, BaseTool baseTool, Map<String, Object> input, ToolContext toolContext) Async callback before tool runs.Callbacks.BeforeToolCallbackSync.call(InvocationContext invocationContext, BaseTool baseTool, Map<String, Object> input, ToolContext toolContext) static InvocationContextInvocationContext.copyOf(InvocationContext other) io.reactivex.rxjava3.core.Flowable<Event> BaseAgent.runAsync(InvocationContext parentContext) Runs the agent asynchronously.protected abstract io.reactivex.rxjava3.core.Flowable<Event> BaseAgent.runAsyncImpl(InvocationContext invocationContext) Agent-specific asynchronous logic.protected io.reactivex.rxjava3.core.Flowable<Event> LlmAgent.runAsyncImpl(InvocationContext invocationContext) protected io.reactivex.rxjava3.core.Flowable<Event> LoopAgent.runAsyncImpl(InvocationContext invocationContext) protected io.reactivex.rxjava3.core.Flowable<Event> ParallelAgent.runAsyncImpl(InvocationContext invocationContext) Runs sub-agents in parallel and emits their events.protected io.reactivex.rxjava3.core.Flowable<Event> SequentialAgent.runAsyncImpl(InvocationContext invocationContext) Runs sub-agents sequentially.io.reactivex.rxjava3.core.Flowable<Event> BaseAgent.runLive(InvocationContext parentContext) Runs the agent synchronously.protected abstract io.reactivex.rxjava3.core.Flowable<Event> BaseAgent.runLiveImpl(InvocationContext invocationContext) Agent-specific synchronous logic.protected io.reactivex.rxjava3.core.Flowable<Event> LlmAgent.runLiveImpl(InvocationContext invocationContext) protected io.reactivex.rxjava3.core.Flowable<Event> LoopAgent.runLiveImpl(InvocationContext invocationContext) protected io.reactivex.rxjava3.core.Flowable<Event> ParallelAgent.runLiveImpl(InvocationContext invocationContext) Not supported for ParallelAgent.protected io.reactivex.rxjava3.core.Flowable<Event> SequentialAgent.runLiveImpl(InvocationContext invocationContext) Runs sub-agents sequentially in live mode.Constructors in com.google.adk.agents with parameters of type InvocationContextModifierConstructorDescriptionCallbackContext(InvocationContext invocationContext, EventActions eventActions) Initializes callback context.ReadonlyContext(InvocationContext invocationContext) -
Uses of InvocationContext in com.google.adk.codeexecutors
Methods in com.google.adk.codeexecutors with parameters of type InvocationContextModifier and TypeMethodDescriptionBaseCodeExecutor.executeCode(InvocationContext invocationContext, CodeExecutionUtils.CodeExecutionInput codeExecutionInput) Executes code and return the code execution result.BuiltInCodeExecutor.executeCode(InvocationContext invocationContext, CodeExecutionUtils.CodeExecutionInput codeExecutionInput) ContainerCodeExecutor.executeCode(InvocationContext invocationContext, CodeExecutionUtils.CodeExecutionInput codeExecutionInput) VertexAiCodeExecutor.executeCode(InvocationContext invocationContext, CodeExecutionUtils.CodeExecutionInput codeExecutionInput) -
Uses of InvocationContext in com.google.adk.flows
Methods in com.google.adk.flows with parameters of type InvocationContextModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<Event> BaseFlow.run(InvocationContext invocationContext) Run this flow.default io.reactivex.rxjava3.core.Flowable<Event> BaseFlow.runLive(InvocationContext invocationContext) -
Uses of InvocationContext in com.google.adk.flows.llmflows
Methods in com.google.adk.flows.llmflows with parameters of type InvocationContextModifier and TypeMethodDescriptionFunctions.generateRequestConfirmationEvent(InvocationContext invocationContext, Event functionCallEvent, Event functionResponseEvent) Generates a request confirmation event from a function response event.static io.reactivex.rxjava3.core.Maybe<Event> Functions.handleFunctionCalls(InvocationContext invocationContext, Event functionCallEvent, Map<String, BaseTool> tools) Handles standard, non-streaming function calls.static io.reactivex.rxjava3.core.Maybe<Event> Functions.handleFunctionCalls(InvocationContext invocationContext, Event functionCallEvent, Map<String, BaseTool> tools, Map<String, ToolConfirmation> toolConfirmations) Handles standard, non-streaming function calls with tool confirmations.static io.reactivex.rxjava3.core.Maybe<Event> Functions.handleFunctionCallsLive(InvocationContext invocationContext, Event functionCallEvent, Map<String, BaseTool> tools) Handles function calls in a live/streaming context, supporting background execution and stream termination.protected io.reactivex.rxjava3.core.Flowable<Event> BaseLlmFlow.postprocess(InvocationContext context, Event baseEventForLlmResponse, LlmRequest llmRequest, LlmResponse llmResponse, AtomicReference<Optional<byte[]>> thoughtSignatureState) Post-processes the LLM response after receiving it from the LLM.protected io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> BaseLlmFlow.preprocess(InvocationContext context, LlmRequest llmRequest) Pre-processes the LLM request before sending it to the LLM.io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> AgentTransfer.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> Basic.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> Contents.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> Examples.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> Identity.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> Instructions.processRequest(InvocationContext context, LlmRequest request) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> RequestConfirmationLlmRequestProcessor.processRequest(InvocationContext invocationContext, LlmRequest llmRequest) io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult> RequestProcessor.processRequest(InvocationContext context, LlmRequest request) Process the LLM request as part of the pre-processing stage.io.reactivex.rxjava3.core.Single<ResponseProcessor.ResponseProcessingResult> ResponseProcessor.processResponse(InvocationContext context, LlmResponse response) Process the LLM response as part of the post-processing stage.io.reactivex.rxjava3.core.Flowable<Event> BaseLlmFlow.run(InvocationContext invocationContext) Executes the full LLM flow by repeatedly callingBaseLlmFlow.runOneStep(InvocationContext)until a final response is produced.io.reactivex.rxjava3.core.Flowable<Event> BaseLlmFlow.runLive(InvocationContext invocationContext) Executes the LLM flow in streaming mode. -
Uses of InvocationContext in com.google.adk.plugins
Methods in com.google.adk.plugins with parameters of type InvocationContextModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.CompletableBasePlugin.afterRunCallback(InvocationContext invocationContext) Callback executed after an ADK runner run has completed.io.reactivex.rxjava3.core.CompletableLoggingPlugin.afterRunCallback(InvocationContext invocationContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BasePlugin.beforeRunCallback(InvocationContext invocationContext) Callback executed before the ADK runner runs.io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.beforeRunCallback(InvocationContext invocationContext) io.reactivex.rxjava3.core.Maybe<Event> BasePlugin.onEventCallback(InvocationContext invocationContext, Event event) Callback executed after an event is yielded from runner.io.reactivex.rxjava3.core.Maybe<Event> LoggingPlugin.onEventCallback(InvocationContext invocationContext, Event event) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BasePlugin.onUserMessageCallback(InvocationContext invocationContext, com.google.genai.types.Content userMessage) Callback executed when a user message is received before an invocation starts.io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.onUserMessageCallback(InvocationContext invocationContext, com.google.genai.types.Content userMessage) io.reactivex.rxjava3.core.CompletablePluginManager.runAfterRunCallback(InvocationContext invocationContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.runBeforeRunCallback(InvocationContext invocationContext) io.reactivex.rxjava3.core.Maybe<Event> PluginManager.runOnEventCallback(InvocationContext invocationContext, Event event) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.runOnUserMessageCallback(InvocationContext invocationContext, com.google.genai.types.Content userMessage) -
Uses of InvocationContext in com.google.adk.tools
Methods in com.google.adk.tools with parameters of type InvocationContextModifier and TypeMethodDescriptionstatic ToolContext.BuilderToolContext.builder(InvocationContext invocationContext) FunctionTool.callLive(Map<String, Object> args, ToolContext toolContext, InvocationContext invocationContext) -
Uses of InvocationContext in com.google.adk.utils
Methods in com.google.adk.utils with parameters of type InvocationContextModifier and TypeMethodDescriptionstatic io.reactivex.rxjava3.core.Single<String> InstructionUtils.injectSessionState(InvocationContext context, String template) Populates placeholders in an instruction template string with values from the session state or loaded artifacts.
InvocationContext(BaseSessionService, BaseArtifactService, BaseMemoryService, Optional, Optional, String, BaseAgent, Session, Optional, RunConfig, boolean)constructor directly instead