Skip to main content

agents

Creates, updates, deletes, gets or lists an agents resource.

Overview​

Nameagents
TypeResource
Idgoogle.aiplatform.agents

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringImmutable. The user-specified ID for the agent. This ID becomes the final component of the agent resource name. If not provided, Vertex AI will generate a value for this ID. The ID can be up to 63 characters and must match the regular expression [a-z]([a-z0-9-]{0,61}[a-z0-9])?.
namestringIdentifier. The resource name of the agent. Format: projects/{project}/locations/{location}/agents/{agent}.
base_agentstringRequired. The base agent for the agent. Supported values: * antigravity-preview-05-2026
base_environmentanyOptional. The base environment configuration for the agent. Valid types: * A string value for the environment ID, or remote for the default. * A struct value for the environment_config.
createdstring (google-datetime)Output only. The time the agent was created.
descriptionstringOptional. The description of the agent.
metadataobjectOptional. The metadata for the agent.
objectstringOutput only. The object type of the resource. For agents, the value is agent.
system_instructionstringOptional. The instructions for the agent to follow. These instructions are passed to the LLM as a system instruction.
toolsarrayOptional. The tools available to the agent.
updatedstring (google-datetime)Output only. The time the agent was last updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, agentsIdRetrieves an agent.
listselectprojectsId, locationsIdorderBy, pageSize, pageTokenLists the agents in a location that belong to the caller. An agent belongs to the end user recorded as its owner when it was created, so the response holds that caller's agents and no others. It is empty for a caller that is not an end user, and an agent with no recorded owner is listed for nobody.
createinsertprojectsId, locationsIdCreates an agent.
patchupdateprojectsId, locationsId, agentsIdupdateMaskUpdates an agent.
deletedeleteprojectsId, locationsId, agentsIdDeletes an agent.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
agentsIdstring
locationsIdstring
projectsIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples​

Retrieves an agent.

SELECT
id,
name,
base_agent,
base_environment,
created,
description,
metadata,
object,
system_instruction,
tools,
updated
FROM google.aiplatform.agents
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
;

INSERT examples​

Creates an agent.

INSERT INTO google.aiplatform.agents (
data__base_agent,
data__base_environment,
data__description,
data__id,
data__metadata,
data__name,
data__system_instruction,
data__tools,
projectsId,
locationsId
)
SELECT
'{{ base_agent }}',
'{{ base_environment }}',
'{{ description }}',
'{{ id }}',
'{{ metadata }}',
'{{ name }}',
'{{ system_instruction }}',
'{{ tools }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates an agent.

UPDATE google.aiplatform.agents
SET
data__base_agent = '{{ base_agent }}',
data__base_environment = '{{ base_environment }}',
data__description = '{{ description }}',
data__id = '{{ id }}',
data__metadata = '{{ metadata }}',
data__name = '{{ name }}',
data__system_instruction = '{{ system_instruction }}',
data__tools = '{{ tools }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
id,
name,
base_agent,
base_environment,
created,
description,
metadata,
object,
system_instruction,
tools,
updated;

DELETE examples​

Deletes an agent.

DELETE FROM google.aiplatform.agents
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
;