{"slug": "cross-cloud-a2a-agent-benchmarking", "title": "Cross Cloud A2A Agent Benchmarking", "summary": "A developer benchmarked A2A (Agent2Agent) protocol agents across Google Cloud, Azure, and AWS by deploying Rust-based agents using the Antigravity CLI. The cross-cloud test measured native language execution time for Mersenne Prime calculations, comparing performance of agents implemented in different languages.", "body_md": "This tutorial aims to build and test benchmarking Agents using the A2A protocol across several mainstream Cloud providers. A Master Orchestrator Agent is exposed via MCP to allow Antigravity CLI to be used as a MCP client to co-ordinate the benchmarks.\n\nThis paper is a re-visiting of the original benchmark series with Gemini CLI over Node, GO, and Python:\n\n[Cross Language A2A Agent Benchmarking with Gemini 3 and Gemini CLI](https://medium.com/google-cloud/cross-language-a2a-agent-benchmarking-with-gemini-3-and-gemini-cli-930eb3fd8507)\n\nIn this updated version, the Antigravity CLI is used to push Rust Agents cross-cloud and co-ordinate Mersenne Prime Calculations.\n\nMost mature Agent development tools and libraries are Python based. Python allows for rapid prototyping and evaluation of approaches. Python is also an interpreted language- which has trade-offs in memory safety, and performance. Other languages like GO and Rust offer high performance and memory safe operations. With a language neutral communication protocol — the actual Agent implementation of each Agent can be coded in the most appropriate language.\n\nThe high level goal was to measure the actual time spent running an algorithm in the native language code inside the A2A agent. Each language had a slightly different implementation due to the language syntax. After running the algorithm- each Agent was instructed to calculate and return the elapsed time for cross cloud comparison.\n\nThe Agent2Agent (A2A) protocol, an open communication standard for AI agents, was initially introduced by Google in April 2025. It is specifically engineered to facilitate seamless interoperability within multi-agent systems, enabling AI agents developed by diverse providers or built upon disparate AI agent frameworks to communicate and collaborate effectively.\n\nA good overview of the A2A protocol can be found here:\n\nThe official ADK for Python, GO, and Java provide built-in support for working with the A2A protocol. For other programming languages like JS, Rust, and .NET — 3rd party libraries are available to add support for the protocol.\n\nThe main source for A2A Language support is the GitHub repo:\n\nThis article targets a local, GCP, Azure, and AWS environment. The build tools for each language and cloud environment need to be in place. For building with Rust, the Rust tool chain is required.\n\nFor GCP- this article provides some directions:\n\n[Deploying a Rust A2A Agent to Google Cloud Run](https://medium.com/google-cloud/deploying-a-rust-a2a-agent-to-google-cloud-run-b4767a441d3c)\n\nFor Azure — this article provides some directions:\n\n[Deploying a Rust MCP Server to Azure ACA](https://xbill999.medium.com/deploying-a-rust-mcp-server-to-azure-aca-3665889dff1c)\n\nFor AWS — this article provides some directions:\n\n[Deploying a Rust A2A Agent to AWS Lightsail](https://blog.stackademic.com/deploying-a-rust-a2a-agent-to-aws-lightsail-26348f2b65da)\n\nAntigravity CLI is the follow-on successor to Gemini CLI- the terminal driven, agent assisted coding tool.\n\nFull details on installing Antigravity CLI are here:\n\n[Getting Started with Antigravity CLI](https://medium.com/google-cloud/getting-started-with-antigravity-cli-26c5da90951f)\n\nOnce you have all the tools in place- you can test the startup of Antigravity CLI.\n\nYou will need to authenticate with a Google Cloud Project or your Google Account:\n\n```\nagy\n```\n\nThis will start the interface:\n\nVerify that all the prerequisite packages and compilers are installed — and clone the sample Github repo:\n\n```\ngit clone https://github.com/xbill9/a2a-multicloud\ncd a2a-multicloud\n```\n\nOnce you have your Google Cloud Project and preferred authentication method — run the **init.sh** script to validate the setup:\n\n``` bash\nxbill@penguin:~/a2a-multicloud$ source init.sh\nWARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.\n\nTo update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.\n[environment: Development]\nUpdated property [core/project].\nADC is valid.\nEnvironment setup\nGOOGLE_GENAI_USE_VERTEXAI=1\nGOOGLE_CLOUD_PROJECT=comglitn\nGOOGLE_CLOUD_LOCATION=us-central1\nIMAGEN_MODEL=\"imagen-3.0-fast-generate-001\"\nGENAI_MODEL=\"gemini-2.5-flash\"\nCloud Login\n  Credentialed Accounts\nACTIVE ACCOUNT\n* xbill@glitnir.com\n\nTo set the active account, run:\n    $ gcloud config set account `ACCOUNT`\n```\n\nThe **set_env.sh** script is provided to set common ADK environment variables:\n\n``` bash\nxbill@penguin:~/a2a-multicloud$ source set_env.sh\nCurrent Environment\nexport GOOGLE_GENAI_USE_VERTEXAI=1\nexport GOOGLE_CLOUD_PROJECT=comglitn\nexport GOOGLE_CLOUD_LOCATION=us-central1\nexport IMAGEN_MODEL=\"imagen-3.0-fast-generate-001\"\nexport GENAI_MODEL=\"gemini-2.5-flash\"\nexport GCP_AGENT_URL=\"https://bench-rust-289270257791.us-central1.run.app\"\nexport AWS_AGENT_URL=\"https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com\"\nexport AZURE_AGENT_URL=\"https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io\"\nCloud Login\n  Credentialed Accounts\nACTIVE ACCOUNT\n* xbill@glitnir.com\n\nTo set the active account, run:\n    $ gcloud config set account `ACCOUNT`\n\nADK Version\nadk, version 2.1.0\n```\n\nIf your application default credentials expires or your Google Cloud Authentication expires you will get an error. The workaround is to re-authenticate:\n\n```\ngcloud auth login\ngcloud auth application-default login\n```\n\nAnother common error is that the environment variables are not set correctly. Go the the root directory and re-run the **set_env.sh** to set the variables:\n\n```\ncd ~/a2a-multicloud\nsource set_env.sh\n```\n\nThe A2A Inspector is a standalone tool that provides low level visibility into the A2A protocol. The GitHub is available here:\n\n[GitHub - a2aproject/a2a-inspector: Validation Tools for A2A Agents](https://github.com/a2aproject/a2a-inspector)\n\nA summary of the features of the A2A inspector can be found here:\n\nTo install the A2A Inspector:\n\n```\ncd ~\ngit clone https://github.com/a2aproject/a2a-inspector\n```\n\nThen follow the build instructions — you need ** uv** , and a recent version of\n\n[a2a-inspector/README.md at main · a2aproject/a2a-inspector](https://github.com/a2aproject/a2a-inspector/blob/main/README.md)\n\nOnce the A2A inspector has been installed- you can validate the installation by using this URL:\n\nIn [mathematics](https://en.wikipedia.org/wiki/Mathematics), a **Mersenne prime** is a [prime number](https://en.wikipedia.org/wiki/Prime_number) that is one less than a [power of two](https://en.wikipedia.org/wiki/Power_of_two). As of 2025, [52 Mersenne primes](https://en.wikipedia.org/wiki/List_of_Mersenne_primes_and_perfect_numbers) are known. An interesting thing about Mersenne primes is that they are the easiest natural numbers to prove to be primes, so they make up the largest category on the list of known prime numbers. This example was chosen as a good problem as the computation is CPU bound and gets exponentially longer for each higher number.\n\nThe a2a-multicloud Repo has sample scripts for running the agents across cloud environments. Each agent implements a Mersenne Prime Number generator with only basic optimization. The root directory of the a2a-multicloud directory contains several common agent development languages. These include:\n\nThis agent provides a basic Agent that generates Mersenne prime numbers.\n\nThe A2A inspector can be used to validate the Agent:\n\nThe agent can be reviewed:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust$ make start\nBuilding the Rust project...\n    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s\nStarting local agent on port 8104 in the background...\nLocal agent started successfully (PID: 87753).\n\nxbill@penguin:~/a2a-multicloud/benchmark-rust$ make status\nLocal agent is running (PID: 87753).\nListening on port: 8104\nTesting endpoint health...\nOK\n```\n\nand the agent card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust$ make card\nFetching local benchmark agent card from http://localhost:8104...\n{\n  \"name\": \"Mersenne Prime Agent Rust\",\n  \"description\": \"A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.\",\n  \"protocolVersion\": \"0.3.0\",\n  \"version\": \"0.1.0\",\n  \"url\": \"http://0.0.0.0:8104\",\n  \"skills\": [\n    {\n      \"id\": \"find-mersenne-rust\",\n      \"name\": \"Find Mersenne Primes in rust\",\n      \"description\": \"Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.\",\n      \"tags\": [\n        \"math\",\n        \"benchmark\"\n      ]\n    },\n    {\n      \"id\": \"check-status-rust\",\n      \"name\": \"Check calculation status in Rust\",\n      \"description\": \"Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.\",\n      \"tags\": [\n        \"status\",\n        \"health\"\n      ]\n    }\n  ],\n  \"capabilities\": {},\n  \"defaultInputModes\": [],\n  \"defaultOutputModes\": []\n}\n```\n\nand local A2A call:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust$ make a2a\nSending A2A status request to http://localhost:8104/...\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": {\n    \"contextId\": \"status-context-id\",\n    \"kind\": \"message\",\n    \"messageId\": \"971ff86d-7bfc-4046-858a-16e7857ba9d0\",\n    \"parts\": [\n      {\n        \"kind\": \"text\",\n        \"text\": \"ready\"\n      }\n    ],\n    \"role\": \"agent\"\n  }\n}\n```\n\nThis agent provides Rust agent that implements the Mersenne generation algorithm Hosted on GCP.\n\n```\nxbill@penguin:~/a2a-multicloud/benchmark-rust-gcp\nmake deploy\n\nxbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make endpoint\nhttps://bench-rust-fgasxpwzoq-uc.a.run.app\n```\n\nThen get the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make status\nChecking Google Cloud Run service status for bench-rust...\nNAME STATUS URL\nbench-rust True https://bench-rust-fgasxpwzoq-uc.a.run.app\nChecking deployed agent health at https://bench-rust-fgasxpwzoq-uc.a.run.app/.well-known/agent.json ...\nAgent health check: PASSED (HTTP 200)\n```\n\nTo check the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make card\nFetching agent card from https://bench-rust-fgasxpwzoq-uc.a.run.app/.well-known/agent-card.json ...\n{\n  \"name\": \"Mersenne Prime Agent Rust\",\n  \"description\": \"A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.\",\n  \"protocolVersion\": \"0.3.0\",\n  \"version\": \"0.1.0\",\n  \"url\": \"http://0.0.0.0:8080\",\n  \"skills\": [\n    {\n      \"id\": \"find-mersenne-rust\",\n      \"name\": \"Find Mersenne Primes in rust\",\n      \"description\": \"Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.\",\n      \"tags\": [\n        \"math\",\n        \"benchmark\"\n      ]\n    },\n    {\n      \"id\": \"check-status-rust\",\n      \"name\": \"Check calculation status in Rust\",\n      \"description\": \"Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.\",\n      \"tags\": [\n        \"status\",\n        \"health\"\n      ]\n    }\n  ],\n  \"capabilities\": {},\n  \"defaultInputModes\": [],\n  \"defaultOutputModes\": []\n}\n```\n\nTo check that that remote agent can support A2A:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make a2a\nSending A2A status request to https://bench-rust-fgasxpwzoq-uc.a.run.app/ ...\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": {\n    \"contextId\": \"status-context-id\",\n    \"kind\": \"message\",\n    \"messageId\": \"108d0f7c-c2e6-4d1e-8306-843a6dcb999c\",\n    \"parts\": [\n      {\n        \"kind\": \"text\",\n        \"text\": \"ready\"\n      }\n    ],\n    \"role\": \"agent\"\n  }\n}\n```\n\nThis agent provides Rust agent that implements the Mersenne generation algorithm Hosted on Azure:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make deploy\nAll requirements met.\nBuilding the Docker image...\n\nxbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make endpoint\nhttps://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io\n```\n\nThen get the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make status\nmcp-aca-rust-azure is not running locally.\nChecking Azure Container App status for a2a-app-penguin...\nName ProvisioningState FQDN\n--------------- ------------------- ---------------------------------------------------------------\na2a-app-penguin Succeeded a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io\nChecking deployed agent health at https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/.well-known/agent.json ...\nAgent health check: PASSED (HTTP 200)\n```\n\nTo check the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make card\nFetching agent card from https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/.well-known/agent-card.json ...\n{\n  \"name\": \"Mersenne Prime Agent Rust\",\n  \"description\": \"A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.\",\n  \"protocolVersion\": \"0.3.0\",\n  \"version\": \"0.1.0\",\n  \"url\": \"http://0.0.0.0:8080\",\n  \"skills\": [\n    {\n      \"id\": \"find-mersenne-rust\",\n      \"name\": \"Find Mersenne Primes in rust\",\n      \"description\": \"Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.\",\n      \"tags\": [\n        \"math\",\n        \"benchmark\"\n      ]\n    },\n    {\n      \"id\": \"check-status-rust\",\n      \"name\": \"Check calculation status in Rust\",\n      \"description\": \"Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.\",\n      \"tags\": [\n        \"status\",\n        \"health\"\n      ]\n    }\n  ],\n  \"capabilities\": {},\n  \"defaultInputModes\": [],\n  \"defaultOutputModes\": []\n}\n```\n\nTo check that that remote agent can support A2A:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make a2a\nSending A2A status request to https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/...\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": {\n    \"contextId\": \"status-context-id\",\n    \"kind\": \"message\",\n    \"messageId\": \"5d6605f6-9926-481f-b807-8598b81b8cc1\",\n    \"parts\": [\n      {\n        \"kind\": \"text\",\n        \"text\": \"ready\"\n      }\n    ],\n    \"role\": \"agent\"\n  }\n}\n```\n\nThis agent provides Rust agent that implements the Mersenne generation algorithm Hosted on AWS:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make deploy\nBuilding the Docker image...\n[+] Building 3.8s (10/13)    \n\nxbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make endpoint\nhttps://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/\n```\n\nThen get the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make status\nChecking AWS Lightsail service status for a2a-lightsail-rust-aws...\n------------------------------------------------------------------------------------------------------------------------\n| GetContainerServices |\n+------------+--------+------------+-----------------------------------------------------------------------------------+\n| Deployment | Power | State | URL |\n+------------+--------+------------+-----------------------------------------------------------------------------------+\n| ACTIVE | nano | DEPLOYING | https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/ |\n+------------+--------+------------+-----------------------------------------------------------------------------------+\nChecking endpoint health at https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/health...\nHealth status: HEALTHY (HTTP 200)\n```\n\nTo check the Agent Card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make card\nFetching agent card from https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/.well-known/agent-card.json ...\n{\n  \"name\": \"Mersenne Prime Agent Rust\",\n  \"description\": \"A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.\",\n  \"protocolVersion\": \"0.3.0\",\n  \"version\": \"0.1.0\",\n  \"url\": \"http://0.0.0.0:8080\",\n  \"skills\": [\n    {\n      \"id\": \"find-mersenne-rust\",\n      \"name\": \"Find Mersenne Primes in rust\",\n      \"description\": \"Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.\",\n      \"tags\": [\n        \"math\",\n        \"benchmark\"\n      ]\n    },\n    {\n      \"id\": \"check-status-rust\",\n      \"name\": \"Check calculation status in Rust\",\n      \"description\": \"Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.\",\n      \"tags\": [\n        \"status\",\n        \"health\"\n      ]\n    }\n  ],\n  \"capabilities\": {},\n  \"defaultInputModes\": [],\n  \"defaultOutputModes\": []\n}\n```\n\nTo check that that remote agent can support A2A:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make a2a\nSending A2A status request to https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/...\n{\n  \"id\": 1,\n  \"jsonrpc\": \"2.0\",\n  \"result\": {\n    \"contextId\": \"status-context-id\",\n    \"kind\": \"message\",\n    \"messageId\": \"1245ea8c-e8d3-436a-8e27-0b25e90a8a42\",\n    \"parts\": [\n      {\n        \"kind\": \"text\",\n        \"text\": \"ready\"\n      }\n    ],\n    \"role\": \"agent\"\n  }\n}\n```\n\nThe final agent follows a slightly different pattern. It provides a minimal agent with several functions (Tools/Skills).\n\nTo build-\n\n``` bash\nmake\n\nxbill@penguin:~/a2a-multicloud/rust-master$ make lint\nLinting the Rust project...\n    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s\n```\n\nTo get the local endpoint:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/rust-master$ make endpoint\nhttp://localhost:8100\n```\n\nThen use the A2A inspector:\n\nand check the A2A Agent card:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/rust-master$ make card\nFetching master agent card from http://localhost:8100...\n{\n  \"name\": \"master_agent\",\n  \"description\": \"Master A2A Agent that coordinates prime agents (including rust_agent, gcp_agent, aws_agent, and azure_agent) using model: gemini-2.5-flash.\",\n  \"protocolVersion\": \"0.3.0\",\n  \"version\": \"0.1.0\",\n  \"url\": \"http://0.0.0.0:8100/\",\n  \"skills\": [\n    {\n      \"id\": \"coordinate-agents\",\n      \"name\": \"Coordinate sub-agents\",\n      \"description\": \"Delegates requests to appropriate sub-agents for weather, time, events, prime calculations, and general greetings.\",\n      \"tags\": [\n        \"coordinator\",\n        \"a2a\"\n      ]\n    },\n    {\n      \"id\": \"calculate-mersenne-prime\",\n      \"name\": \"Calculate Mersenne Prime\",\n      \"description\": \"Calculates Mersenne prime of n using connected sub-agents.\",\n      \"tags\": [\n        \"mersenne\",\n        \"prime\",\n        \"a2a\"\n      ]\n    }\n  ],\n  \"capabilities\": {},\n  \"defaultInputModes\": [],\n  \"defaultOutputModes\": []\n}\n```\n\nand A2A status:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/rust-master$ make a2a\nSending A2A status request to http://localhost:8100/...\n```\n\nThe Master Agent starts a FastMCP server interface. This allows Antigravity CLI to be used as a MCP client:\n\n``` bash\nxbill@penguin:~/a2a-multicloud/.agents$ more mcp_config\n{\n  \"mcpServers\": {\n    \"rust-master\": {\n      \"command\": \"cargo\",\n      \"args\": [\"run\", \"--manifest-path\", \"/home/xbill/a2a-multicloud/rust-master/Cargo.toml\", \"--quiet\", \"--\", \"--stdio\"],\n      \"env\": {\n        \"GOOGLE_GENAI_USE_VERTEXAI\": \"1\",\n        \"GOOGLE_CLOUD_PROJECT\": \"aisprint-491218\",\n        \"GOOGLE_CLOUD_LOCATION\": \"us-central1\",\n        \"GENAI_MODEL\": \"gemini-2.5-flash\",\n        \"MODEL_NAME\": \"gemini-2.5-flash\"\n      }\n    }\n  }\n}\n```\n\nThe MCP tools can be reviewed:\n\n```\nMCP Servers\n\nPlugins (~/.gemini/antigravity-cli/plugins)\n   ✓ google-dev-knowledge Tools: search_documents, answer_query, get_documents\n   ✓ rust-master Tools: ask_master_agent, calculate_mersenne_prime, check_agents_status\n```\n\nThe agent status can be checked with a MCP call to the Master Agent:\n\n```\n● rust-master/check_agents_status(Call check_agents_status MCP tool) (ctrl+o to expand)\n\n  I ran the check_agents_status tool from the rust-master MCP server. The check succeeded, confirming that all sub-\n  agents are healthy and online:\n\n  • AWS (Remote): ✅ ONLINE (HTTP 200)\n  • GCP (Remote): ✅ ONLINE (HTTP 200)\n  • Azure (Remote): ✅ ONLINE (HTTP 200)\n  • Rust (Local): ✅ ONLINE (HTTP 200)\n\n  ### Summary of Work:\n\n  1. Inspected Makefile & Scripts: Reviewed target definitions ( make status , make a2a ) and script configurations.\n  2. Checked Endpoint Health: Verified the agent URL parameters and credentials from .env .\n  3. Executed MCP Status Tool: Invoked the lazy-loaded MCP tool check_agents_status from the rust-master \n  coordinator, confirming all remote and local calculation sub-agents are online and ready to accept tasks.\n```\n\nand the agent can be verified:\n\n```\n> ask_master_agent what do you do\n\n● rust-master/ask_master_agent(Call ask_master_agent MCP tool) (ctrl+o to expand)\n\n  I called the ask_master_agent tool with the query \"what do you do\".\n\n  Here is the response from the Master Agent:\n\n  │ \"I am a Master A2A Agent. I can delegate tasks to specialized sub-agents (Rust, GCP, AWS, or Azure agents) to\n  │ calculate Mersenne primes or check exponents.\"\n\n  ### Summary of Work:\n\n  1. Invoked the MCP Tool: Called ask_master_agent on the rust-master server with the prompt what do you do .\n  2. Presented the Results: Relayed the master agent's self-description as a coordinator for distributed multi-cloud\n  Mersenne prime calculations.\n```\n\nAll of the setup and configuration allows you to start debugging and visualizing Agent flows using the A2A protocol. The remote Agents haven been validated using the A2A Inspector. The Master Agent acts as a co-ordinator to delegate Mersenne Prime Calculations to remote A2A agents cross cloud.\n\nNow that the individual Agents have been validated — open antigravity and use the MCP tool to start the session:\n\n```\n> what does calculate_mersenne_prime do?\n\n● Search(Grep search run_a2a_benchmark) (ctrl+o to expand)\n\n  I will view the definition of run_a2a_benchmark (which implements calculate_mersenne_prime ) in rust-            \n  master/src/main.rs .\n\n● Read(/home/xbill/a2a-multicloud/rust-master/src/main.rs) (ctrl+o to expand)\n\n  The calculate_mersenne_prime(n) tool executes a distributed benchmark to find and verify Mersenne primes (2ᵖ - 1)\n  for exponents from 1 to n.\n\n  ### How it Works:\n\n  1. Assigns Tasks Round-Robin: It iterates through the exponents 1 ≤ i ≤ n and checks the readiness of the connected\n  sub-agents (GCP, AWS, Azure, and Local) using a round-robin schedule.\n  2. Delegates Computation: Once a ready agent is found, the master agent sends the exponent i to it via the A2A\n  protocol. The sub-agent calculates whether 2ⁱ - 1 is prime.\n  3. Aggregates Timings & Results: It measures the ready check time and the calculation time for each exponent.\n  4. Saves Metrics: The benchmark results, including timing data and calculated primes, are compiled into a summary\n  markdown table and persisted to disk (e.g., in benchmark_results.json).\n\n  ### Summary of Work:\n\n  1. Source Code Review: Inspected the main.rs function in rust-master/src/main.rs to extract the exact\n  program flow and role of each agent.\n  2. Explained Mechanics: Highlighted the round-robin task assignment, remote A2A calls, and metrics compilation\n  features.\n```\n\nOnce all the agents have been started — the Master agent on port 8100 is connected over MCP with Antigravity CLI:\n\n```\n> run the calculate_mersenne_prime with 100\n\n  I will execute the calculation of Mersenne primes up to exponent 100 by querying the Master Agent's HTTP MCP route.\n\n● Bash(curl -s -X POST -H \"Content-Type: application/json\" -d '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": ...) (ctrl+o to\nexpand)\n  I will wait for the distributed calculation up to exponent 100 to complete.\n  The distributed calculation up to exponent n = 100 has completed successfully!\n  ### Distributed Mersenne Prime Generation Report\n  • Timestamp: 2026-06-02T13:40:04-04:00 \n  • Cumulative Duration: 55,625.57 ms (~55.6 seconds)\n  #### Generated Mersenne Primes\n  • 2² - 1 = 3 (via AWS Lightsail)\n  • 2³ - 1 = 7 (via Azure Container Apps)\n  • 2⁵ - 1 = 31 (via GCP Cloud Run)\n  • 2⁷ - 1 = 127 (via Azure Container Apps)\n  • 2¹³ - 1 = 8,191 (via GCP Cloud Run)\n  • 2¹⁷ - 1 = 131,071 (via GCP Cloud Run)\n  • 2¹⁹ - 1 = 524,287 (via Azure Container Apps)\n  • 2³¹ - 1 = 2,147,483,647 (via Azure Container Apps)\n  • 2⁶¹ - 1 = 2,305,843,009,213,693,951 (via GCP Cloud Run)\n  • 2⁸⁹ - 1 = 618,970,019,642,690,137,449,562,111 (via GCP Cloud Run)\n  ──────\n  ### Coordinated Exponent Assignments\n   Exponent | Assigned Agent | Ready Check Time | Calc Time | Result\n  --------------------|------------------------|----------------------|----------------------|----------------------\n   1 | GCP (Cloud Run) | 662.32 ms | 658.00 ms | not prime\n   2 | AWS (Lightsail) | 418.86 ms | 117.14 ms | 3\n   3 | Azure (Container Apps) | 330.12 ms | 366.37 ms | 7\n   4 | Rust (Local) | 30.34 ms | 12.07 ms | not prime\n   5 | GCP (Cloud Run) | 651.16 ms | 667.50 ms | 31\n   6 | AWS (Lightsail) | 119.91 ms | 103.80 ms | not prime\n   7 | Azure (Container Apps) | 337.03 ms | 338.40 ms | 127\n   8 | Rust (Local) | 30.31 ms | 13.20 ms | not prime\n   9 | GCP (Cloud Run) | 628.36 ms | 621.74 ms | not prime\n   10 | AWS (Lightsail) | 108.49 ms | 113.11 ms | not prime\n   11 | Azure (Container Apps) | 336.13 ms | 324.22 ms | not prime\n   12 | Rust (Local) | 21.45 ms | 15.00 ms | not prime\n   13 | GCP (Cloud Run) | 629.91 ms | 662.56 ms | 8191\n   14 | AWS (Lightsail) | 111.40 ms | 119.59 ms | not prime\n   15 | Azure (Container Apps) | 325.95 ms | 336.56 ms | not prime\n   16 | Rust (Local) | 36.22 ms | 13.74 ms | not prime\n   17 | GCP (Cloud Run) | 678.16 ms | 635.27 ms | 131071\n   18 | AWS (Lightsail) | 111.02 ms | 115.05 ms | not prime\n   19 | Azure (Container Apps) | 343.99 ms | 306.91 ms | 524287\n   20 | Rust (Local) | 24.83 ms | 25.15 ms | not prime\n   21 | GCP (Cloud Run) | 612.20 ms | 610.21 ms | not prime\n   22 | AWS (Lightsail) | 103.64 ms | 121.31 ms | not prime\n   23 | Azure (Container Apps) | 362.88 ms | 361.34 ms | not prime\n   24 | Rust (Local) | 25.12 ms | 14.09 ms | not prime\n   25 | GCP (Cloud Run) | 646.72 ms | 641.75 ms | not prime\n   26 | AWS (Lightsail) | 98.67 ms | 109.74 ms | not prime\n   27 | Azure (Container Apps) | 380.92 ms | 319.36 ms | not prime\n   28 | Rust (Local) | 24.17 ms | 17.71 ms | not prime\n   29 | GCP (Cloud Run) | 596.21 ms | 615.23 ms | not prime\n   30 | AWS (Lightsail) | 110.32 ms | 102.89 ms | not prime\n   31 | Azure (Container Apps) | 393.16 ms | 325.54 ms | 2147483647\n   32 | Rust (Local) | 20.81 ms | 14.46 ms | not prime\n   33 | GCP (Cloud Run) | 616.02 ms | 610.53 ms | not prime\n   34 | AWS (Lightsail) | 98.09 ms | 113.49 ms | not prime\n   35 | Azure (Container Apps) | 331.80 ms | 396.37 ms | not prime\n   36 | Rust (Local) | 27.76 ms | 26.81 ms | not prime\n   37 | GCP (Cloud Run) | 626.58 ms | 641.85 ms | not prime\n   38 | AWS (Lightsail) | 108.36 ms | 110.98 ms | not prime\n   39 | Azure (Container Apps) | 343.18 ms | 341.17 ms | not prime\n   40 | Rust (Local) | 30.80 ms | 21.23 ms | not prime\n   41 | GCP (Cloud Run) | 606.28 ms | 637.02 ms | not prime\n   42 | AWS (Lightsail) | 106.25 ms | 116.14 ms | not prime\n   43 | Azure (Container Apps) | 339.94 ms | 318.64 ms | not prime\n   44 | Rust (Local) | 21.90 ms | 12.41 ms | not prime\n   45 | GCP (Cloud Run) | 628.11 ms | 640.00 ms | not prime\n   46 | AWS (Lightsail) | 100.35 ms | 112.84 ms | not prime\n   47 | Azure (Container Apps) | 343.33 ms | 323.55 ms | not prime\n   48 | Rust (Local) | 19.90 ms | 28.04 ms | not prime\n   49 | GCP (Cloud Run) | 643.14 ms | 664.11 ms | not prime\n   50 | AWS (Lightsail) | 113.88 ms | 103.43 ms | not prime\n   51 | Azure (Container Apps) | 364.66 ms | 317.36 ms | not prime\n   52 | Rust (Local) | 22.84 ms | 14.70 ms | not prime\n   53 | GCP (Cloud Run) | 617.28 ms | 651.10 ms | not prime\n   54 | AWS (Lightsail) | 103.60 ms | 114.45 ms | not prime\n   55 | Azure (Container Apps) | 340.59 ms | 323.87 ms | not prime\n   56 | Rust (Local) | 26.55 ms | 11.62 ms | not prime\n   57 | GCP (Cloud Run) | 635.30 ms | 625.28 ms | not prime\n   58 | AWS (Lightsail) | 106.18 ms | 117.21 ms | not prime\n   59 | Azure (Container Apps) | 328.18 ms | 336.98 ms | not prime\n   60 | Rust (Local) | 16.18 ms | 17.11 ms | not prime\n   61 | GCP (Cloud Run) | 621.01 ms | 642.30 ms | 2305843009213693951\n   62 | AWS (Lightsail) | 106.05 ms | 115.97 ms | not prime\n   63 | Azure (Container Apps) | 322.90 ms | 346.61 ms | not prime\n   64 | Rust (Local) | 25.02 ms | 13.26 ms | not prime\n   65 | GCP (Cloud Run) | 610.11 ms | 627.14 ms | not prime\n   66 | AWS (Lightsail) | 105.60 ms | 107.45 ms | not prime\n   67 | Azure (Container Apps) | 337.70 ms | 323.28 ms | not prime\n   68 | Rust (Local) | 15.38 ms | 20.14 ms | not prime\n   69 | GCP (Cloud Run) | 625.35 ms | 643.10 ms | not prime\n   70 | AWS (Lightsail) | 108.00 ms | 108.02 ms | not prime\n   71 | Azure (Container Apps) | 323.01 ms | 331.95 ms | not prime\n   72 | Rust (Local) | 31.18 ms | 28.03 ms | not prime\n   73 | GCP (Cloud Run) | 647.98 ms | 627.10 ms | not prime\n   74 | AWS (Lightsail) | 107.88 ms | 112.41 ms | not prime\n   75 | Azure (Container Apps) | 351.71 ms | 340.42 ms | not prime\n   76 | Rust (Local) | 21.00 ms | 25.80 ms | not prime\n   77 | GCP (Cloud Run) | 624.00 ms | 647.06 ms | not prime\n   78 | AWS (Lightsail) | 97.09 ms | 111.97 ms | not prime\n   79 | Azure (Container Apps) | 337.90 ms | 346.54 ms | not prime\n   80 | Rust (Local) | 24.42 ms | 13.95 ms | not prime\n   81 | GCP (Cloud Run) | 624.80 ms | 631.11 ms | not prime\n   82 | AWS (Lightsail) | 108.87 ms | 107.81 ms | not prime\n   83 | Azure (Container Apps) | 332.57 ms | 322.07 ms | not prime\n   84 | Rust (Local) | 19.99 ms | 16.02 ms | not prime\n   85 | GCP (Cloud Run) | 622.47 ms | 651.63 ms | not prime\n   86 | AWS (Lightsail) | 112.12 ms | 107.24 ms | not prime\n   87 | Azure (Container Apps) | 332.57 ms | 340.05 ms | not prime\n   88 | Rust (Local) | 24.79 ms | 29.77 ms | not prime\n   89 | GCP (Cloud Run) | 646.21 ms | 667.60 ms | 618970019642690137449562111\n   90 | AWS (Lightsail) | 102.15 ms | 113.82 ms | not prime\n   91 | Azure (Container Apps) | 343.99 ms | 342.82 ms | not prime\n   92 | Rust (Local) | 29.97 ms | 13.91 ms | not prime\n   93 | GCP (Cloud Run) | 661.59 ms | 662.92 ms | not prime\n   94 | AWS (Lightsail) | 112.50 ms | 112.80 ms | not prime\n   95 | Azure (Container Apps) | 328.13 ms | 337.41 ms | not prime\n   96 | Rust (Local) | 26.83 ms | 24.57 ms | not prime\n   97 | GCP (Cloud Run) | 636.67 ms | 601.39 ms | not prime\n   98 | AWS (Lightsail) | 105.62 ms | 112.77 ms | not prime\n   99 | Azure (Container Apps) | 327.66 ms | 327.75 ms | not prime\n   100 | Rust (Local) | 31.73 ms | 18.09 ms | not prime\n  ──────\n  ### Summary of Work:\n\n  1. Invoked Calculation via HTTP Endpoint: Executed the calculate_mersenne_prime call with n = 100 against the\n  Master Agent's HTTP POST interface.\n  2. Aggregated Results: Processed the response containing two additional large Mersenne primes (2⁶¹ - 1 and 2⁸⁹ - 1)\n  and the complete assignment distribution.\n```\n\nThe results of the benchmark are graphed:\n\nAntigravity CLI summarized the results of the Agent Benchmarking:\n\n```\n> summarize key results cross cloud\n▸ Thought Process\n  Analyzing Cross-Cloud Results\n  Here is a cross-cloud summary of the key findings, focusing on architecture, network latency, authentication overhead,\n  and calculation behaviors:\n\n  ### 1. Latency & Network Transit Comparison\n\n  The total round-trip time (RTT) for a single round of checks and calculation varies heavily by cloud service model:\n\n  • AWS (Lightsail): ~232 ms RTT (120ms Ready Check + 112ms Calculation)\n      • Strengths: Lightsail container instances behave very similarly to standard VMs, offering quick, persistent HTTP\n      response times and low network hops.\n  • Azure (Container Apps): ~679 ms RTT (341ms Ready Check + 338ms Calculation)\n      • Characteristics: Azure Container Apps run inside a managed Kubernetes framework (K8s/Envoy ingress), adding\n      slight container routing and warm-up latency.\n  • GCP (Cloud Run): ~1,275 ms RTT (635ms Ready Check + 640ms Calculation)\n      • Characteristics: Serverless scaling latency, combined with authentication checks, leads to the highest round-\n      trip time.\n\n  ──────\n  ### 2. The Authentication Overhead (The \"Why\")\n\n  There is a massive latency difference between GCP and the other clouds, caused by security configurations:\n\n  • GCP Cloud Run: Requires secure OIDC identity authentication. For every single network call, the master agent calls \n  gcloud auth print-identity-token as a local subprocess. Spawning this CLI subprocess on every check and call\n  introduces an extra ~300ms to ~500ms of local delay.\n  • AWS & Azure: These sub-agents are deployed with publicly accessible HTTP endpoints that do not require OIDC tokens,\n  avoiding any local CLI token generation overhead.\n  ──────\n  ### 3. Latency Symmetry (Network vs. Compute)\n\n  Across all cloud providers, the Ready Check Time and Calculation Time are nearly identical:\n\n  • AWS: ~120 ms vs ~112 ms\n  • Azure: ~341 ms vs ~338 ms\n  • GCP: ~635 ms vs ~640 ms\n\n  Insight: This symmetry proves that network transport and handshake/auth overhead (ping and TLS/IAM checks) constitute\n  over 95% of the latency. The actual math workload (calculating exponent primality) is extremely fast and has\n  negligible latency impact at these exponent sizes.\n  ──────\n  ### 4. Cross-Cloud Protocol Success\n\n  • The master agent successfully coordinated with all three major cloud providers (GCP, AWS, Azure) and the local\n  runner.\n  • Multi-cloud work distribution successfully validated Mersenne prime candidates, returning identical results\n  regardless of which cloud hosting provider did the execution.\n\n  ### Summary of Work:\n\n  1. Analyzed Authentication Mechanics: Explored the main.rs subprocess overhead in the coordinator codebase.\n  2. Evaluated Latency Patterns: Compared ready checks vs. calculation times to deduce that network transit and\n  security handshakes dominate overall duration.\n```\n\nTo improve the GCP numbers- the Auth token is preset:\n\n```\n    export GCP_ID_TOKEN=$(gcloud auth print-identity-token)\n```\n\nThen the benchmark is re-run. There is a slight variance on each run:\n\n```\n  Here is a summary of the performance and distribution metrics comparing the cloud providers and the local environment\n  from the Mersenne prime calculation run (exponents 1 to 100):\n\n  ### Overall Performance Metrics\n\n   Environment | Tasks Ass… | Cold Start Ready… | Avg Warm Ready T… | Avg Calculation T… | Compute Perform…\n  ------------------------|------------|-------------------|-------------------|--------------------|------------------\n   Rust (Local) | 25 | 12.23 ms | 21.63 ms | 11.37 ms | #1 (Fastest)\n   AWS (Lightsail) | 25 | 544.26 ms | 107.94 ms | 110.79 ms | #2\n   GCP (Cloud Run) | 25 | 484.59 ms | 127.31 ms | 135.49 ms | #3\n   Azure (Container Apps) | 25 | 20,711.57 ms | 348.39 ms | 354.26 ms | #4 (Slowest)\n  ──────\n  ### Key Findings\n\n  1. Cold Starts & Overhead (Ready Time):\n      • Azure (Container Apps) experienced a significant initial cold start latency of ~20.7 seconds on its very first\n      assignment (exponent 3). Even once warm, its ready time overhead (~348 ms) remained roughly 3x slower than AWS\n      and GCP.\n      • AWS (Lightsail) and GCP (Cloud Run) showed excellent and comparable warm ready times of 108 ms and 127 ms\n      respectively, with minor startup penalties (~500 ms) on their first task execution.\n  2. Compute Performance (Calculation Time):\n      • Local Rust is the fastest (~11.4 ms average) because it runs bare metal without any network traversal, agent\n      orchestration, or cloud virtualization overhead.\n      • AWS outperformed both GCP and Azure, running calculations in 110.79 ms average.\n      • GCP followed closely behind AWS at 135.49 ms average.\n      • Azure was the slowest cloud computing node, taking 354.26 ms average—roughly 3x slower than AWS and 2.6x slower\n      than GCP.\n  3. Mersenne Primes Discovered by Agent:\n      • GCP (Cloud Run): Discovered 5 primes (Exponents: 5, 13, 17, 61, 89)\n      • Azure (Container Apps): Discovered 4 primes (Exponents: 3, 7, 19, 31)\n      • AWS (Lightsail): Discovered 1 prime (Exponent: 2)\n      • Rust (Local): Discovered 0 primes (Since tasks were assigned in a round-robin format, the local agent was\n      assigned exponents that are multiples of 4 (4,8,12,…), none of which are prime).\n```\n\nAfter adjusting the OIDC token for GCP- the benchmark was re-run:\n\nThe goal of the demo/article was to get basic Agents implemented across multiple clouds and benchmark the Agent performance finding Mersenne primes.\n\nThe key to the solution was the A2A (Agent to Agent) protocol. One local and three remote agents were presented — covering various combinations of deployment clouds.\n\nFinally — a Master/Orchestrator agent was started to connect and delegate to the other agents via the A2A protocol. Antigravity CLI was used to connect to the Master Agent over MCP and execute the benchmarks.", "url": "https://wpnews.pro/news/cross-cloud-a2a-agent-benchmarking", "canonical_source": "https://dev.to/aws-builders/cross-cloud-a2a-agent-benchmarking-4ab7", "published_at": "2026-06-03 15:30:33+00:00", "updated_at": "2026-06-03 15:42:05.921087+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-tools", "artificial-intelligence", "mlops"], "entities": ["A2A", "Antigravity CLI", "Gemini CLI", "Google Cloud", "MCP", "Rust", "GO", "Python"], "alternates": {"html": "https://wpnews.pro/news/cross-cloud-a2a-agent-benchmarking", "markdown": "https://wpnews.pro/news/cross-cloud-a2a-agent-benchmarking.md", "text": "https://wpnews.pro/news/cross-cloud-a2a-agent-benchmarking.txt", "jsonld": "https://wpnews.pro/news/cross-cloud-a2a-agent-benchmarking.jsonld"}}