Class AgentResult

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

public class AgentResult extends Object
AgentResult represents the final result of an agent execution.
  • Constructor Details

    • AgentResult

      public AgentResult()
      Default constructor.
  • Method Details

    • builder

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

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

      public void setMessage(Message message)
      Sets the result message.
      Parameters:
      message - the message
    • getArtifacts

      public List<Artifact> getArtifacts()
      Returns the result artifacts.
      Returns:
      the artifacts
    • setArtifacts

      public void setArtifacts(List<Artifact> artifacts)
      Sets the result artifacts.
      Parameters:
      artifacts - the artifacts
    • getFinishReason

      public AgentFinishReason getFinishReason()
      Returns the finish reason.
      Returns:
      the finish reason
    • setFinishReason

      public void setFinishReason(AgentFinishReason finishReason)
      Sets the finish reason.
      Parameters:
      finishReason - the finish reason