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, locationsIdpageSize, pageToken, orderByLists agents in a location.
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__description,
data__name,
data__metadata,
data__id,
data__base_environment,
data__tools,
data__base_agent,
data__system_instruction,
projectsId,
locationsId
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ metadata }}',
'{{ id }}',
'{{ base_environment }}',
'{{ tools }}',
'{{ base_agent }}',
'{{ system_instruction }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates an agent.

UPDATE google.aiplatform.agents
SET
data__description = '{{ description }}',
data__name = '{{ name }}',
data__metadata = '{{ metadata }}',
data__id = '{{ id }}',
data__base_environment = '{{ base_environment }}',
data__tools = '{{ tools }}',
data__base_agent = '{{ base_agent }}',
data__system_instruction = '{{ system_instruction }}'
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
;