Class AgentInit<S>

java.lang.Object
com.google.genkit.ai.agent.AgentInit<S>
Type Parameters:
S - the type of custom state

public class AgentInit<S> extends Object
AgentInit represents the initialization data for an agent session.
  • Constructor Details

    • AgentInit

      public AgentInit()
      Default constructor.
  • Method Details

    • builder

      public static <S> AgentInit.Builder<S> builder()
      Creates a builder for AgentInit.
      Type Parameters:
      S - the type of custom state
      Returns:
      a new builder
    • getSnapshotId

      public String getSnapshotId()
      Returns the snapshot ID.
      Returns:
      the snapshot ID
    • setSnapshotId

      public void setSnapshotId(String snapshotId)
      Sets the snapshot ID.
      Parameters:
      snapshotId - the snapshot ID
    • getSessionId

      public String getSessionId()
      Returns the session ID.
      Returns:
      the session ID
    • setSessionId

      public void setSessionId(String sessionId)
      Sets the session ID.
      Parameters:
      sessionId - the session ID
    • getState

      public SessionState<S> getState()
      Returns the initial session state.
      Returns:
      the session state
    • setState

      public void setState(SessionState<S> state)
      Sets the initial session state.
      Parameters:
      state - the session state