java.lang.Object
com.google.genai.gaos.models.agents.Agent

public class Agent extends Object
Agent

An agent definition for the CreateAgent API. This message is the target for annotation-parser-based JSON parsing. New format: { "id": "customer-sentinel", "base_agent": "", "system_instruction": "...", "base_environment": { "type": "remote", "sources": [...] }, "tools": [ {"type": "code_execution"} ] }

  • Constructor Details

  • Method Details

    • agentConfig

      public Optional<AgentConfig> agentConfig()
      Configuration parameters for the agent.
    • baseAgent

      public Optional<String> baseAgent()
      The base agent to extend.
    • baseEnvironment

      public Optional<BaseEnvironment> baseEnvironment()
      The environment configuration for the agent.
    • description

      public Optional<String> description()
      Agent description for developers to quickly read and understand.
    • id

      public Optional<String> id()
      The unique identifier for the agent.
    • systemInstruction

      public Optional<String> systemInstruction()
      System instruction for the agent.
    • tools

      public Optional<List<AgentTool>> tools()
      The tools available to the agent.
    • builder

      public static Agent.Builder builder()
    • withAgentConfig

      public Agent withAgentConfig(@Nullable AgentConfig agentConfig)
      Configuration parameters for the agent.
    • withBaseAgent

      public Agent withBaseAgent(@Nullable String baseAgent)
      The base agent to extend.
    • withBaseEnvironment

      public Agent withBaseEnvironment(@Nullable BaseEnvironment baseEnvironment)
      The environment configuration for the agent.
    • withDescription

      public Agent withDescription(@Nullable String description)
      Agent description for developers to quickly read and understand.
    • withId

      public Agent withId(@Nullable String id)
      The unique identifier for the agent.
    • withSystemInstruction

      public Agent withSystemInstruction(@Nullable String systemInstruction)
      System instruction for the agent.
    • withTools

      public Agent withTools(@Nullable List<AgentTool> tools)
      The tools available to the agent.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object