Class InvocationContext
java.lang.Object
com.google.adk.agents.InvocationContext
The context for an agent invocation.
-
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) static InvocationContextcreate(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) booleanbooleaninthashCode()voidstatic Stringsession()voidsetEndInvocation(boolean endInvocation) Optional<com.google.genai.types.Content> userId()
-
Method Details
-
create
public static InvocationContext create(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) -
create
public static InvocationContext create(BaseSessionService sessionService, BaseArtifactService artifactService, BaseAgent agent, Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig) -
copyOf
-
sessionService
-
artifactService
-
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
-