Package com.google.genai.gaos
Class AsyncAgents
java.lang.Object
com.google.genai.gaos.AsyncAgents
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a new Agent (Typed version for SDK).Creates a new Agent (Typed version for SDK).Creates a new Agent (Typed version for SDK).delete()Deletes an Agent.Deletes an Agent.Deletes an Agent.get()Gets a specific Agent.Gets a specific Agent.Gets a specific Agent.list()Lists all Agents.Lists all Agents.Lists all Agents.sync()Switches to the sync SDK.
-
Method Details
-
sync
Switches to the sync SDK.- Returns:
- The sync SDK
-
list
Lists all Agents.- Returns:
- The async call builder
-
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
Creates a new Agent (Typed version for SDK).- Returns:
- The async call builder
-
create
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
Deletes an Agent.- Returns:
- The async call builder
-
delete
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
Gets a specific Agent.- Returns:
- The async call builder
-
get
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
-