Class Agents

java.lang.Object
com.google.genai.gaos.Agents

public class Agents extends Object
  • Method Details

    • async

      public AsyncAgents async()
      Switches to the async SDK.
      Returns:
      The async SDK
    • list

      public ListAgentsRequestBuilder list()
      Lists all Agents.
      Returns:
      The call builder
    • listDirect

      public ListAgentsResponse listDirect()
      Lists all Agents.
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • list

      public ListAgentsResponse list(@Nullable String apiVersion, @Nullable Integer pageSize, @Nullable String pageToken, @Nullable String parent, @Nullable Options options)
      Lists all Agents.
      Parameters:
      apiVersion - Which version of the API to use.
      pageSize -
      pageToken -
      parent -
      options - additional options
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • create

      public CreateAgentRequestBuilder create()
      Creates a new Agent (Typed version for SDK).
      Returns:
      The call builder
    • create

      public CreateAgentResponse create(@Nonnull Agent body)
      Creates a new Agent (Typed version for SDK).
      Parameters:
      body - 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"} ] }
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • create

      public CreateAgentResponse create(@Nullable String apiVersion, @Nonnull Agent body, @Nullable Options options)
      Creates a new Agent (Typed version for SDK).
      Parameters:
      apiVersion - Which version of the API to use.
      body - 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"} ] }
      options - additional options
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • delete

      public DeleteAgentRequestBuilder delete()
      Deletes an Agent.
      Returns:
      The call builder
    • delete

      public DeleteAgentResponse delete(@Nonnull String id)
      Deletes an Agent.
      Parameters:
      id -
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • delete

      public DeleteAgentResponse delete(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options)
      Deletes an Agent.
      Parameters:
      apiVersion - Which version of the API to use.
      id -
      options - additional options
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • get

      public GetAgentRequestBuilder get()
      Gets a specific Agent.
      Returns:
      The call builder
    • get

      public GetAgentResponse get(@Nonnull String id)
      Gets a specific Agent.
      Parameters:
      id -
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails
    • get

      public GetAgentResponse get(@Nullable String apiVersion, @Nonnull String id, @Nullable Options options)
      Gets a specific Agent.
      Parameters:
      apiVersion - Which version of the API to use.
      id -
      options - additional options
      Returns:
      The response from the API call
      Throws:
      RuntimeException - subclass if the API call fails