Class InvocationContext
java.lang.Object
com.google.adk.agents.InvocationContext
The context for an agent invocation.
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationContext(BaseSessionService sessionService, BaseArtifactService artifactService, BaseMemoryService memoryService, PluginManager pluginManager, Optional<LiveRequestQueue> liveRequestQueue, Optional<String> branch, String invocationId, BaseAgent agent, Session session, Optional<com.google.genai.types.Content> userContent, RunConfig runConfig, boolean endInvocation) InvocationContext(BaseSessionService sessionService, BaseArtifactService artifactService, BaseMemoryService memoryService, Optional<LiveRequestQueue> liveRequestQueue, Optional<String> branch, String invocationId, BaseAgent agent, Session session, Optional<com.google.genai.types.Content> userContent, RunConfig runConfig, boolean endInvocation) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionagent()voidappName()branch()voidstatic InvocationContextcopyOf(InvocationContext other) static InvocationContextcreate(BaseSessionService sessionService, BaseArtifactService artifactService, BaseAgent agent, Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig) Deprecated.static InvocationContextcreate(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) Deprecated.booleanbooleaninthashCode()voidstatic Stringsession()voidsetEndInvocation(boolean endInvocation) Optional<com.google.genai.types.Content> userId()
-
Constructor Details
-
InvocationContext
public InvocationContext(BaseSessionService sessionService, BaseArtifactService artifactService, BaseMemoryService memoryService, PluginManager pluginManager, Optional<LiveRequestQueue> liveRequestQueue, Optional<String> branch, String invocationId, BaseAgent agent, Session session, Optional<com.google.genai.types.Content> userContent, RunConfig runConfig, boolean endInvocation) -
InvocationContext
@InlineMe(replacement="this(sessionService, artifactService, memoryService, new PluginManager(), liveRequestQueue, branch, invocationId, agent, session, userContent, runConfig, endInvocation)", imports="com.google.adk.plugins.PluginManager") @Deprecated public InvocationContext(BaseSessionService sessionService, BaseArtifactService artifactService, BaseMemoryService memoryService, Optional<LiveRequestQueue> liveRequestQueue, Optional<String> branch, String invocationId, BaseAgent agent, Session session, Optional<com.google.genai.types.Content> userContent, RunConfig runConfig, boolean endInvocation) Deprecated.Use theInvocationContext(com.google.adk.sessions.BaseSessionService, com.google.adk.artifacts.BaseArtifactService, com.google.adk.memory.BaseMemoryService, java.util.Optional<com.google.adk.agents.LiveRequestQueue>, java.util.Optional<java.lang.String>, java.lang.String, com.google.adk.agents.BaseAgent, com.google.adk.sessions.Session, java.util.Optional<com.google.genai.types.Content>, com.google.adk.agents.RunConfig, boolean)constructor with PluginManager directly instead
-
-
Method Details
-
create
@InlineMe(replacement="new InvocationContext(sessionService, artifactService, null, new PluginManager(), Optional.empty(), Optional.empty(), invocationId, agent, session, Optional.ofNullable(userContent), runConfig, false)", imports={"com.google.adk.agents.InvocationContext","com.google.adk.plugins.PluginManager","java.util.Optional"}) @Deprecated public static InvocationContext create(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) Deprecated. -
create
@InlineMe(replacement="new InvocationContext(sessionService, artifactService, null, new PluginManager(), Optional.ofNullable(liveRequestQueue), Optional.empty(), InvocationContext.newInvocationContextId(), agent, session, Optional.empty(), runConfig, false)", imports={"com.google.adk.agents.InvocationContext","com.google.adk.plugins.PluginManager","java.util.Optional"}) @Deprecated public static InvocationContext create(BaseSessionService sessionService, BaseArtifactService artifactService, BaseAgent agent, Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig) Deprecated. -
copyOf
-
sessionService
-
artifactService
-
memoryService
-
pluginManager
-
activeStreamingTools
-
liveRequestQueue
-
invocationId
-
branch
-
branch
-
agent
-
agent
-
session
-
userContent
-
runConfig
-
endInvocation
public boolean endInvocation() -
setEndInvocation
public void setEndInvocation(boolean endInvocation) -
appName
-
userId
-
newInvocationContextId
-
incrementLlmCallsCount
- Throws:
LlmCallsLimitExceededException
-
equals
-
hashCode
-
InvocationContext(com.google.adk.sessions.BaseSessionService, com.google.adk.artifacts.BaseArtifactService, com.google.adk.memory.BaseMemoryService, java.util.Optional<com.google.adk.agents.LiveRequestQueue>, java.util.Optional<java.lang.String>, java.lang.String, com.google.adk.agents.BaseAgent, com.google.adk.sessions.Session, java.util.Optional<com.google.genai.types.Content>, com.google.adk.agents.RunConfig, boolean)constructor with PluginManager directly instead