Class Agent<S>

java.lang.Object
com.google.genkit.ai.agent.Agent<S>
Type Parameters:
S - the type of custom session state
All Implemented Interfaces:
AgentApi<S>, Action<AgentInput,AgentOutput<S>,AgentStreamChunk>, BidiAction<AgentInput,AgentOutput<S>,AgentStreamChunk,AgentInit<S>>, Registerable

public final class Agent<S> extends Object implements BidiAction<AgentInput,AgentOutput<S>,AgentStreamChunk,AgentInit<S>>, AgentApi<S>
Agent is a bidirectional streaming agent action that manages session state and provides typed facades for snapshot retrieval and abort.

Instances are created via AgentActions.defineCustomAgent. Do not instantiate directly.