Class AsyncAgents

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

public class AsyncAgents extends Object
  • Method Details

    • sync

      public Agents sync()
      Switches to the sync SDK.
      Returns:
      The sync SDK
    • list

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

      public CompletableFuture<ListAgentsResponse> listDirect()
      Lists all Agents.
      Returns:
      CompletableFuture<ListAgentsResponse> - The async response
    • list

      public CompletableFuture<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:
      CompletableFuture<ListAgentsResponse> - The async response
    • create

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

      public CompletableFuture<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:
      CompletableFuture<CreateAgentResponse> - The async response
    • create

      public CompletableFuture<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:
      CompletableFuture<CreateAgentResponse> - The async response
    • delete

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

      public CompletableFuture<DeleteAgentResponse> delete(@Nonnull String id)
      Deletes an Agent.
      Parameters:
      id -
      Returns:
      CompletableFuture<DeleteAgentResponse> - The async response
    • delete

      public CompletableFuture<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:
      CompletableFuture<DeleteAgentResponse> - The async response
    • get

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

      public CompletableFuture<GetAgentResponse> get(@Nonnull String id)
      Gets a specific Agent.
      Parameters:
      id -
      Returns:
      CompletableFuture<GetAgentResponse> - The async response
    • get

      public CompletableFuture<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:
      CompletableFuture<GetAgentResponse> - The async response