Class InvocationContext
java.lang.Object
com.google.adk.agents.InvocationContext
The context for an agent invocation.
-
Method Summary
Modifier and TypeMethodDescriptionagent()
void
appName()
branch()
void
static InvocationContext
copyOf
(InvocationContext other) static InvocationContext
create
(BaseSessionService sessionService, BaseArtifactService artifactService, BaseAgent agent, Session session, LiveRequestQueue liveRequestQueue, RunConfig runConfig) static InvocationContext
create
(BaseSessionService sessionService, BaseArtifactService artifactService, String invocationId, BaseAgent agent, Session session, com.google.genai.types.Content userContent, RunConfig runConfig) boolean
boolean
int
hashCode()
void
static String
session()
protected BaseSessionService
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() -
appName
-
userId
-
newInvocationContextId
-
incrementLlmCallsCount
- Throws:
LlmCallsLimitExceededException
-
equals
-
hashCode
-