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