Class AgentInput

java.lang.Object
com.google.genkit.ai.agent.AgentInput

public class AgentInput extends Object
AgentInput represents the input to an agent turn.

The detach field is omitted when false (default).

  • Constructor Details

    • AgentInput

      public AgentInput()
      Default constructor.
  • Method Details

    • builder

      public static AgentInput.Builder builder()
      Creates a builder for AgentInput.
      Returns:
      a new builder
    • getMessage

      public Message getMessage()
      Returns the input message.
      Returns:
      the message
    • setMessage

      public void setMessage(Message message)
      Sets the input message.
      Parameters:
      message - the message
    • getResume

      public ToolResume getResume()
      Returns the tool resume data.
      Returns:
      the resume, or null if not resuming
    • setResume

      public void setResume(ToolResume resume)
      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