Send feedback
Manage deployed agents
Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to manage agents that have been deploy to the Agent Engine
managed runtime. Deployed agents are resources of type reasoningEngine
in Vertex AI.
List deployed agents
List all deployed agents for a given project and location:
Vertex AI SDK for Python
from vertexai import agent_engines
agent_engines . list ()
To filter the list of by display_name
:
from vertexai import agent_engines
agent_engines . list ( filter = 'display_name="Demo Langchain Agent"' )
REST Call the reasoningEngines.list
method.
Before using any of the request data,
make the following replacements:
PROJECT_ID
: your GCP project ID
LOCATION
: a supported region
HTTP method and URL:
GET https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note:
The following command assumes that you have logged in to
the gcloud
CLI with your user account by running
gcloud init
or
gcloud auth login
, or by using Cloud Shell ,
which automatically logs you into the gcloud
CLI
.
You can check the currently active account by running
gcloud auth list
.
Execute the following command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines"
PowerShell (Windows)
Execute the following command:
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method GET ` -Headers $headers ` -Uri "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines" | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
Get a deployed agent
Each deployed agent has a unique RESOURCE_ID
identifier.
To learn more, see Deploy an agent .
Vertex AI SDK for Python The following code lets you get a specific deployed agent:
from vertexai import agent_engines
remote_agent = agent_engines . get ( "RESOURCE_ID " )
Alternately, you can provide the fully qualified resource name:
from vertexai import agent_engines
remote_agent = agent_engines . get (
"projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID "
)
REST Call the reasoningEngines.get
method.
Before using any of the request data,
make the following replacements:
PROJECT_ID
: your GCP project ID
LOCATION
: a supported region
RESOURCE_ID
: the resource ID of the deployed agent
HTTP method and URL:
GET https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note:
The following command assumes that you have logged in to
the gcloud
CLI with your user account by running
gcloud init
or
gcloud auth login
, or by using Cloud Shell ,
which automatically logs you into the gcloud
CLI
.
You can check the currently active account by running
gcloud auth list
.
Execute the following command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID "
PowerShell (Windows)
Execute the following command:
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method GET ` -Headers $headers ` -Uri "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID " | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
Update a deployed agent
You can update one or more fields of the deployed agent at the same time,
but you have to specify at least one of the fields to be updated. The amount
of time it takes to update the deployed agent depends on the update being
performed, but it generally takes between a few seconds to a few minutes.
Vertex AI SDK for Python To update a deployed agent (corresponding to RESOURCE_NAME
)
to an updated agent (corresponding to UPDATED_AGENT
):
from vertexai import agent_engines
agent_engines . update (
resource_name = RESOURCE_NAME , # Required.
agent_engine = UPDATED_AGENT , # Optional.
requirements = REQUIREMENTS , # Optional.
display_name = "DISPLAY_NAME " , # Optional.
description = "DESCRIPTION " , # Optional.
extra_packages = EXTRA_PACKAGES , # Optional.
)
The arguments are the same as when you are deploying an agent .
You can find details in the API reference .
REST Call the reasoningEngines.patch
method and provide an update_mask
to specify which fields to update.
Before using any of the request data,
make the following replacements:
PROJECT_ID
: your GCP project ID
LOCATION
: a supported region
RESOURCE_ID
: the resource ID of the deployed agent
update_mask
: a list of comma-separated fields to update
HTTP method and URL:
PATCH https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID ?update_mask="display_name,description"
Request JSON body:
{
"displayName": "DISPLAY_NAME ",
"description": "DESCRIPTION "
}
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note:
The following command assumes that you have logged in to
the gcloud
CLI with your user account by running
gcloud init
or
gcloud auth login
, or by using Cloud Shell ,
which automatically logs you into the gcloud
CLI
.
You can check the currently active account by running
gcloud auth list
.
Save the request body in a file named request.json
,
and execute the following command:
curl -X PATCH \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID ?update_mask="display_name,description""
PowerShell (Windows)
Save the request body in a file named request.json
,
and execute the following command:
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method PATCH ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID ?update_mask="display_name,description"" | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
Delete a deployed agent
Vertex AI SDK for Python If you already have an existing instance of the deployed agent
(as remote_agent
), you can run the following command:
remote_agent . delete ()
Alternatively, you can call agent_engines.delete()
to delete the deployed
agent corresponding to RESOURCE_NAME
in the following way:
from vertexai import agent_engines
agent_engines . delete ( RESOURCE_NAME )
REST Call the reasoningEngines.delete
method.
Before using any of the request data,
make the following replacements:
PROJECT_ID
: your GCP project ID
LOCATION
: a supported region
RESOURCE_ID
: the resource ID of the deployed agent
HTTP method and URL:
DELETE https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID
Request JSON body:
{
"displayName": "DISPLAY_NAME ",
"description": "DESCRIPTION "
}
To send your request, expand one of these options:
curl (Linux, macOS, or Cloud Shell)
Note:
The following command assumes that you have logged in to
the gcloud
CLI with your user account by running
gcloud init
or
gcloud auth login
, or by using Cloud Shell ,
which automatically logs you into the gcloud
CLI
.
You can check the currently active account by running
gcloud auth list
.
Save the request body in a file named request.json
,
and execute the following command:
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d @request.json \ "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID "
PowerShell (Windows)
Save the request body in a file named request.json
,
and execute the following command:
$cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" } Invoke-WebRequest ` -Method DELETE ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -InFile request.json ` -Uri "https://LOCATION -aiplatform.googleapis.com/v1/projects/PROJECT_ID /locations/LOCATION /reasoningEngines/RESOURCE_ID " | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[],[]]