Package com.google.genkit.ai.agent
Class AgentInput
java.lang.Object
com.google.genkit.ai.agent.AgentInput
AgentInput represents the input to an agent turn.
The detach field is omitted when false (default).
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentInput.Builderbuilder()Creates a builder for AgentInput.booleanGets the detach flag (alias for isDetach).Returns the input message.Returns the tool resume data.booleanisDetach()Returns whether the agent should detach.voidsetDetach(boolean detach) Sets the detach flag.voidsetMessage(Message message) Sets the input message.voidsetResume(ToolResume resume) Sets the tool resume data.
-
Constructor Details
-
AgentInput
public AgentInput()Default constructor.
-
-
Method Details
-
builder
Creates a builder for AgentInput.- Returns:
- a new builder
-
getMessage
Returns the input message.- Returns:
- the message
-
setMessage
Sets the input message.- Parameters:
message- the message
-
getResume
Returns the tool resume data.- Returns:
- the resume, or null if not resuming
-
setResume
Sets the tool resume data.- Parameters:
resume- the resume
-
isDetach
public boolean isDetach()Returns whether the agent should detach.- Returns:
- true if detaching, false otherwise
-
getDetach
public boolean getDetach()Gets the detach flag (alias for isDetach).- Returns:
- true if detaching, false otherwise
-
setDetach
public void setDetach(boolean detach) Sets the detach flag. Omitted from JSON when false.- Parameters:
detach- true to detach
-