Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions docs/deploy/agent-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ remote_app = agent_engines.create(

This step may take several minutes to finish.

## Grant the deployed agent permissions

Before proceeding to query your agent on Agent Engine, your deployed agent must first be granted additional permissions before it can use managed sessions. Managed sessions are a built-in component of Agent Engine that enables agents to keep track of the state of a conversation. Without granting the deploy agent the permissions below, you may see errors when querying your deployed agent.

You can follow the instructions in [Set up your service agent permissions](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/set-up#service-agent) to grant the following permissions via the [IAM admin page](https://console.cloud.google.com/iam-admin/iam):

* Vertex AI User (`roles/aiplatform.user`) to your `service-PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com` service account

### Try your agent on Agent Engine

#### Create session (remote)
Expand Down Expand Up @@ -201,12 +209,7 @@ Expected output for `stream_query` (remote):
{'parts': [{'text': 'The weather in New York is sunny with a temperature of 25 degrees Celsius (41 degrees Fahrenheit).'}], 'role': 'model'}
```

## (Optional) Grant the deployed agent permissions

If the deployed agent needs to be granted any additional permissions, you can follow the instructions in [Set up your service agent permissions](https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/set-up#service-agent).

Deployed ADK agents need to be granted the following permissions to use managed sessions:
* Vertex AI User (`roles/aiplatform.user`)

## Clean up

Expand Down