Fix errors: *[HELP] Unable to access generated image artifact from deployed ADK agent on Google Cloud** #561
I modified the logo generator to persist images to GCS and return a gs:// URI, and I added the google-cloud-storage dependency for the deployed environment. No linter issues were introduced.
Completed
- Add GCS persistence and return gcs_uri
- Include google-cloud-storage in deployment requirements
- Provide redeploy and retrieval steps
How to redeploy and retrieve images
- Ensure bucket and permissions
- Environment variable for deployment: GOOGLE_CLOUD_STORAGE_BUCKET=
- Grant the Vertex AI service agent access to the bucket: ~Get project number: gcloud projects describe $PROJECT_ID --format='value(projectNumber)' ~Service agent: [email protected] ~Grant on the bucket: at least roles/storage.objectCreator and roles/storage.objectViewer (or roles/storage.objectAdmin).
- Redeploy the remote agent
- From python/agents/marketing-agency:
export GOOGLE_CLOUD_PROJECT=
export GOOGLE_CLOUD_LOCATION= # e.g. us-central1 export GOOGLE_CLOUD_STORAGE_BUCKET= # same region as your agent python -m marketing_agency.deployment.deploy --create
- Call the agent and fetch the image
- After the tool runs, the response payload will include something like:
~artifact_delta: {"image.png": 1}
~tool result includes: {"filename": "image.png", "gcs_uri": "gs://
/adk-artifacts/logos/ .png"} - Download: gsutil cp "gs://
/adk-artifacts/logos/ .png" .
Please check PR. Contribution by Gittensor, learn more at https://gittensor.io/ thanks.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Please check PR. thanks.