Package com.google.genkit.ai.agent
Class CustomAgentConfig<S>
java.lang.Object
com.google.genkit.ai.agent.CustomAgentConfig<S>
- Type Parameters:
S- the type of custom session state
Configuration for defining a custom agent via
AgentActions.defineCustomAgent.
Use the CustomAgentConfig.Builder to configure the agent. The only required field is getName().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> CustomAgentConfig.Builder<S> builder()Creates a builder for CustomAgentConfig.Returns the client-transform applied to session state before returning it to the caller in client-managed mode.Returns the agent's human-readable description.getName()Returns the agent's registered name.Returns the Java class for the agent's custom state type.getStore()Returns the session store for server-managed agents.Returns the options forwarded to store operations.
-
Method Details
-
builder
Creates a builder for CustomAgentConfig.- Type Parameters:
S- the type of custom session state- Returns:
- a new builder
-
getName
Returns the agent's registered name.- Returns:
- the agent name (never null)
-
getDescription
Returns the agent's human-readable description.- Returns:
- the description, or
nullif not set
-
getStateType
Returns the Java class for the agent's custom state type.- Returns:
- the state type class, or
nullif not specified
-
getStore
Returns the session store for server-managed agents.When
null, the agent operates in client-managed mode.- Returns:
- the session store, or
nullfor client-managed mode
-
getClientTransform
Returns the client-transform applied to session state before returning it to the caller in client-managed mode.- Returns:
- the client transform, or
nullif not set
-
getStoreOptions
Returns the options forwarded to store operations.- Returns:
- the store options, or
nullif not set
-