Challenge 6: A2A: Remote Agent Power
Introduction
In the previous challenge we’ve learned that we can use tools developed by others, but what about agents? This is where Agent2Agent protocol comes in, it provides a standard way for discovering and utilizing agents developed by others.
Description
We have already provided a service called a2a-server
on Cloud Run. It has a single agent deployed that’s responsible for stopping the idle resources that have been marked with the janitor-scheduled
label.
Create a new agent resource_cleaner_agent
that uses A2A protocol to connect to the remote a2a-server
and add it to the orchestrator_agent
sequence as the last one.
Success Criteria
-
The Agent runs all the agents in sequence and stops all the idle resources that have been marked with the
janitor-scheduled
label where the date is in the past, leaving only the following running:- gce-dev-lnx-tomcat-001 - gce-dev-lnx-tomcat-002 - gce-prd-lnx-env-setup
-
The changes have been pushed to the remote Git repository.
Learning Resources
Tips
- You can use
adk web
UI to view the agents involved. - You can use a proxy to simplify the authentication for the Cloud Run service.
- For this challenge if you’re using the Cloud Run proxy, you need to stick to port
8080
. - You can verify the list of VMs and their state by navigating to the VM Instances page in the Google Cloud Console or by using the
gcloud compute instances list
command in Cloud Shell.