Resource: Agent
A Vertex agent contains instructions and configurations for the LLM to execute a certain task.
namestring
Identifier. The resource name of the agent. Format: projects/{project}/locations/{location}/agents/{agent}.
idstring
Immutable. The user-specified id for the agent. This id becomes the final component of the agent resource name. If not provided, Agent Platform 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])?.
Output only. The time the agent was created.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Output only. The time the agent was last updated.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
objectstring
Output only. The object type of the resource. For agents, the value is agent.
base_agentstring
Required. Immutable. The base agent for the agent. Supported values: * antigravity-preview-05-2026
Immutable: agents.patch rejects a change, including clearing it. The kind of agent this is gets derived from this field when the agent is created and is recorded then; nothing recomputes it afterwards, so a later change would leave the agent described as one kind and behaving as another. Create a new agent instead.
metadatamap (key: string, value: string)
Optional. The metadata for the agent.
descriptionstring
Optional. The description of the agent.
system_instructionstring
Optional. The instructions for the agent to follow. These instructions are passed to the LLM as a system instruction.
Optional. The tools available to the agent.
environmentUnion type
Optional. The base environment configuration for the agent. Valid types:
- A string value for the environment id, or
remotefor the default. - A struct value for the
environment_config.
| JSON representation |
|---|
{
"name": string,
"id": string,
"created": string,
"updated": string,
"object": string,
"base_agent": string,
"metadata": {
string: string,
...
},
"description": string,
"system_instruction": string,
"tools": [
{
object ( |
AgentTool
A tool provides a list of actions available to the Agent during the process of executing a task.
typestring
Required. The type of the tool. Supported types:
code_executionendpointfilesystemgoogle_searchmcp_serverurl_context
namestring
Optional. The tool's Google Cloud resource name, used to resolve the tool. Applicable when type is mcp_server or endpoint (a tool registered in Agent Registry), for example projects/{project}/locations/{location}/.../mcpServers/{id} or projects/{project}/locations/{location}/.../endpoints/{id}.
urlstring
Optional. Temporary: the tool's runtime reference, consumed by agents.create to create the downstream AI App. Applicable when type is mcp_server or endpoint. It is duplicated here (the resource name is already in name) only because the Agent service is not yet connected to Agent Registry to derive it from name; the Task service instead resolves it from Agent Registry (GetMcpServer / GetEndpoint) at task creation.
headersmap (key: string, value: string)
Optional. The headers for the MCP server, such as for authentication. Only applicable when type is mcp_server.
| JSON representation |
|---|
{ "type": string, "name": string, "url": string, "headers": { string: string, ... } } |
Methods |
|
|---|---|
|
Creates an agent. |
|
Deletes an agent. |
|
Retrieves an agent. |
|
Lists the agents in a location that belong to the caller. |
|
Updates an agent. |