Package com.google.genkit.ai.agent
Class AgentInit<S>
java.lang.Object
com.google.genkit.ai.agent.AgentInit<S>
- Type Parameters:
S- the type of custom state
AgentInit represents the initialization data for an agent session.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> AgentInit.Builder<S> builder()Creates a builder for AgentInit.Returns the session ID.Returns the snapshot ID.getState()Returns the initial session state.voidsetSessionId(String sessionId) Sets the session ID.voidsetSnapshotId(String snapshotId) Sets the snapshot ID.voidsetState(SessionState<S> state) Sets the initial session state.
-
Constructor Details
-
AgentInit
public AgentInit()Default constructor.
-
-
Method Details
-
builder
Creates a builder for AgentInit.- Type Parameters:
S- the type of custom state- Returns:
- a new builder
-
getSnapshotId
Returns the snapshot ID.- Returns:
- the snapshot ID
-
setSnapshotId
Sets the snapshot ID.- Parameters:
snapshotId- the snapshot ID
-
getSessionId
Returns the session ID.- Returns:
- the session ID
-
setSessionId
Sets the session ID.- Parameters:
sessionId- the session ID
-
getState
Returns the initial session state.- Returns:
- the session state
-
setState
Sets the initial session state.- Parameters:
state- the session state
-