Package com.google.genkit.ai.agent
Class AgentMetadata
java.lang.Object
com.google.genkit.ai.agent.AgentMetadata
AgentMetadata describes the capabilities and configuration of an agent endpoint.
stateManagement is the string "server" or "client".
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentMetadata.Builderbuilder()Creates a builder for AgentMetadata.Returns the state management mode.Returns the JSON schema for the agent state, if provided.booleanReturns whether the agent supports abort.voidsetAbortable(boolean abortable) Sets whether the agent supports abort.voidsetStateManagement(String stateManagement) Sets the state management mode.voidsetStateSchema(Map<String, Object> stateSchema) Sets the JSON schema for the agent state.
-
Constructor Details
-
AgentMetadata
public AgentMetadata()Default constructor.
-
-
Method Details
-
builder
Creates a builder for AgentMetadata.- Returns:
- a new builder
-
getStateManagement
Returns the state management mode.- Returns:
"server"or"client"
-
setStateManagement
Sets the state management mode.- Parameters:
stateManagement-"server"or"client"
-
isAbortable
public boolean isAbortable()Returns whether the agent supports abort.- Returns:
- true if abortable
-
setAbortable
public void setAbortable(boolean abortable) Sets whether the agent supports abort.- Parameters:
abortable- true if abortable
-
getStateSchema
Returns the JSON schema for the agent state, if provided.- Returns:
- the state schema, or null if not set
-
setStateSchema
Sets the JSON schema for the agent state.- Parameters:
stateSchema- the state schema
-