Cross Cloud A2A Agent Benchmarking with Antigravity CLI —…
    Neura MarketNeura Market/Stable Diffusion
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityStable DiffusionStable Diffusion
    DeepSeekDeepSeekCoPilotCoPilotMidjourneyMidjourney
    View All Directories
    OverviewPromptsBlogVideosGuidesCoursesCommunityModelsLoRAsComfyUI WorkflowsTrending
    Stable DiffusionBlogCross Cloud A2A Agent Benchmarking with Antigravity CLI
    Back to Blog
    Cross Cloud A2A Agent Benchmarking with Antigravity CLI
    a2aprotocol

    Cross Cloud A2A Agent Benchmarking with Antigravity CLI

    xbill June 3, 2026
    0 views

    Building a Benchmarking Agent with A2A and MCP This tutorial aims to build and test...


    title: Cross Cloud A2A Agent Benchmarking with Antigravity CLI published: true series: agy date: 2026-06-02 20:54:53 UTC tags: a2aprotocol,gcp,aws,mcps canonical_url: https://xbill999.medium.com/cross-cloud-a2a-agent-benchmarking-with-antigravity-cli-4e40acfd0671

    Building a Benchmarking Agent with A2A and MCP

    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.

    Deja Vu — What is Old is New!

    This paper is a re-visiting of the original benchmark series with Gemini CLI over Node, GO, and Python:

    Cross Language A2A Agent Benchmarking with Gemini 3 and Gemini CLI

    In this updated version, the Antigravity CLI is used to push Rust Agents cross-cloud and co-ordinate Mersenne Prime Calculations.

    Why would I need Multi-Cloud Support? And Rust? Can’t I just use Python?

    Most 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.

    What is this Approach actually Benchmarking?

    The 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.

    What is the A2A protocol?

    The 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.

    A good overview of the A2A protocol can be found here:

    A2A Protocol

    Language Support For the A2A Protocol

    The 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.

    The main source for A2A Language support is the GitHub repo:

    GitHub - a2aproject/A2A: An open protocol enabling communication and interoperability between opaque agentic applications.

    Tool Chain Setup for A2A

    This 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.

    For GCP- this article provides some directions:

    Deploying a Rust A2A Agent to Google Cloud Run

    For Azure — this article provides some directions:

    Deploying a Rust MCP Server to Azure ACA

    For AWS — this article provides some directions:

    Deploying a Rust A2A Agent to AWS Lightsail

    Antigravity CLI

    Antigravity CLI is the follow-on successor to Gemini CLI- the terminal driven, agent assisted coding tool.

    Full details on installing Antigravity CLI are here:

    Getting Started with Antigravity CLI

    Testing the Antigravity CLI Environment

    Once you have all the tools in place- you can test the startup of Antigravity CLI.

    You will need to authenticate with a Google Cloud Project or your Google Account:

    agy
    

    This will start the interface:

    Checking the Developer Environment

    Verify that all the prerequisite packages and compilers are installed — and clone the sample Github repo:

    git clone https://github.com/xbill9/a2a-multicloud
    cd a2a-multicloud
    

    Once you have your Google Cloud Project and preferred authentication method — run the init.sh script to validate the setup:

    xbill@penguin:~/a2a-multicloud$ source init.sh
    WARNING: Your active project does not match the quota project in your local Application Default Credentials file. This might result in unexpected quota issues.
    
    To update your Application Default Credentials quota project, use the `gcloud auth application-default set-quota-project` command.
    [environment: Development]
    Updated property [core/project].
    ADC is valid.
    Environment setup
    GOOGLE_GENAI_USE_VERTEXAI=1
    GOOGLE_CLOUD_PROJECT=comglitn
    GOOGLE_CLOUD_LOCATION=us-central1
    IMAGEN_MODEL="imagen-3.0-fast-generate-001"
    GENAI_MODEL="gemini-2.5-flash"
    Cloud Login
      Credentialed Accounts
    ACTIVE ACCOUNT
    * [email protected]
    
    To set the active account, run:
        $ gcloud config set account `ACCOUNT`
    

    The set_env.sh script is provided to set common ADK environment variables:

    xbill@penguin:~/a2a-multicloud$ source set_env.sh
    Current Environment
    export GOOGLE_GENAI_USE_VERTEXAI=1
    export GOOGLE_CLOUD_PROJECT=comglitn
    export GOOGLE_CLOUD_LOCATION=us-central1
    export IMAGEN_MODEL="imagen-3.0-fast-generate-001"
    export GENAI_MODEL="gemini-2.5-flash"
    export GCP_AGENT_URL="https://bench-rust-289270257791.us-central1.run.app"
    export AWS_AGENT_URL="https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com"
    export AZURE_AGENT_URL="https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io"
    Cloud Login
      Credentialed Accounts
    ACTIVE ACCOUNT
    * [email protected]
    
    To set the active account, run:
        $ gcloud config set account `ACCOUNT`
    
    ADK Version
    adk, version 2.1.0
    

    Debugging API Permission Errors

    If your application default credentials expires or your Google Cloud Authentication expires you will get an error. The workaround is to re-authenticate:

    gcloud auth login
    gcloud auth application-default login
    

    Another 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:

    cd ~/a2a-multicloud
    source set_env.sh
    

    A2A Debugging Tools -A2A Inspector

    The A2A Inspector is a standalone tool that provides low level visibility into the A2A protocol. The GitHub is available here:

    GitHub - a2aproject/a2a-inspector: Validation Tools for A2A Agents

    A summary of the features of the A2A inspector can be found here:

    A2A Protocol Documentation

    To install the A2A Inspector:

    cd ~
    git clone https://github.com/a2aproject/a2a-inspector
    

    Then follow the build instructions — you need uv , and a recent version of node :

    a2a-inspector/README.md at main · a2aproject/a2a-inspector

    Staring the A2A Inspector

    Once the A2A inspector has been installed- you can validate the installation by using this URL:

    http://127.0.0.1:5001/

    Mersenne Primes

    In mathematics, a Mersenne prime is a prime number that is one less than a power of two. As of 2025, 52 Mersenne primes 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.

    A2A Cross Cloud Agents

    The 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:

    • benchmark-rust (Rust) Local A2A Server
    • benchmark-rust-gcp (Rust) Cloud run A2A Server
    • benchmark-rust-azure (Rust) Azure Hosted A2A Server
    • benchmark-rust-aws (Rust) AWS Hosted A2A server
    • rust-master (Rust) Local A2A Client / MCP Server

    A2A Mersenne Prime Number Agent (Rust Local)

    This agent provides a basic Agent that generates Mersenne prime numbers.

    The A2A inspector can be used to validate the Agent:

    The agent can be reviewed:

    xbill@penguin:~/a2a-multicloud/benchmark-rust$ make start
    Building the Rust project...
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
    Starting local agent on port 8104 in the background...
    Local agent started successfully (PID: 87753).
    
    xbill@penguin:~/a2a-multicloud/benchmark-rust$ make status
    Local agent is running (PID: 87753).
    Listening on port: 8104
    Testing endpoint health...
    OK
    

    and the agent card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust$ make card
    Fetching local benchmark agent card from http://localhost:8104...
    {
      "name": "Mersenne Prime Agent Rust",
      "description": "A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.",
      "protocolVersion": "0.3.0",
      "version": "0.1.0",
      "url": "http://0.0.0.0:8104",
      "skills": [
        {
          "id": "find-mersenne-rust",
          "name": "Find Mersenne Primes in rust",
          "description": "Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.",
          "tags": [
            "math",
            "benchmark"
          ]
        },
        {
          "id": "check-status-rust",
          "name": "Check calculation status in Rust",
          "description": "Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.",
          "tags": [
            "status",
            "health"
          ]
        }
      ],
      "capabilities": {},
      "defaultInputModes": [],
      "defaultOutputModes": []
    }
    

    and local A2A call:

    xbill@penguin:~/a2a-multicloud/benchmark-rust$ make a2a
    Sending A2A status request to http://localhost:8104/...
    {
      "id": 1,
      "jsonrpc": "2.0",
      "result": {
        "contextId": "status-context-id",
        "kind": "message",
        "messageId": "971ff86d-7bfc-4046-858a-16e7857ba9d0",
        "parts": [
          {
            "kind": "text",
            "text": "ready"
          }
        ],
        "role": "agent"
      }
    }
    

    A2A Mersenne Prime Number Agent (Rust GCP)

    This agent provides Rust agent that implements the Mersenne generation algorithm Hosted on GCP.

    xbill@penguin:~/a2a-multicloud/benchmark-rust-gcp
    make deploy
    
    xbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make endpoint
    https://bench-rust-fgasxpwzoq-uc.a.run.app
    

    Then get the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make status
    Checking Google Cloud Run service status for bench-rust...
    NAME STATUS URL
    bench-rust True https://bench-rust-fgasxpwzoq-uc.a.run.app
    Checking deployed agent health at https://bench-rust-fgasxpwzoq-uc.a.run.app/.well-known/agent.json ...
    Agent health check: PASSED (HTTP 200)
    

    To check the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make card
    Fetching agent card from https://bench-rust-fgasxpwzoq-uc.a.run.app/.well-known/agent-card.json ...
    {
      "name": "Mersenne Prime Agent Rust",
      "description": "A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.",
      "protocolVersion": "0.3.0",
      "version": "0.1.0",
      "url": "http://0.0.0.0:8080",
      "skills": [
        {
          "id": "find-mersenne-rust",
          "name": "Find Mersenne Primes in rust",
          "description": "Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.",
          "tags": [
            "math",
            "benchmark"
          ]
        },
        {
          "id": "check-status-rust",
          "name": "Check calculation status in Rust",
          "description": "Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.",
          "tags": [
            "status",
            "health"
          ]
        }
      ],
      "capabilities": {},
      "defaultInputModes": [],
      "defaultOutputModes": []
    }
    

    To check that that remote agent can support A2A:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-gcp$ make a2a
    Sending A2A status request to https://bench-rust-fgasxpwzoq-uc.a.run.app/ ...
    {
      "id": 1,
      "jsonrpc": "2.0",
      "result": {
        "contextId": "status-context-id",
        "kind": "message",
        "messageId": "108d0f7c-c2e6-4d1e-8306-843a6dcb999c",
        "parts": [
          {
            "kind": "text",
            "text": "ready"
          }
        ],
        "role": "agent"
      }
    }
    

    A2A Mersenne Prime Number Agent (Rust Azure)

    This agent provides Rust agent that implements the Mersenne generation algorithm Hosted on Azure:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make deploy
    All requirements met.
    Building the Docker image...
    
    xbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make endpoint
    https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io
    
    

    Then get the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make status
    mcp-aca-rust-azure is not running locally.
    Checking Azure Container App status for a2a-app-penguin...
    Name ProvisioningState FQDN
    --------------- ------------------- ---------------------------------------------------------------
    a2a-app-penguin Succeeded a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io
    Checking deployed agent health at https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/.well-known/agent.json ...
    Agent health check: PASSED (HTTP 200)
    

    To check the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make card
    Fetching agent card from https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/.well-known/agent-card.json ...
    {
      "name": "Mersenne Prime Agent Rust",
      "description": "A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.",
      "protocolVersion": "0.3.0",
      "version": "0.1.0",
      "url": "http://0.0.0.0:8080",
      "skills": [
        {
          "id": "find-mersenne-rust",
          "name": "Find Mersenne Primes in rust",
          "description": "Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.",
          "tags": [
            "math",
            "benchmark"
          ]
        },
        {
          "id": "check-status-rust",
          "name": "Check calculation status in Rust",
          "description": "Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.",
          "tags": [
            "status",
            "health"
          ]
        }
      ],
      "capabilities": {},
      "defaultInputModes": [],
      "defaultOutputModes": []
    }
    

    To check that that remote agent can support A2A:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-azure$ make a2a
    Sending A2A status request to https://a2a-app-penguin.icyplant-a768d75c.westus2.azurecontainerapps.io/...
    {
      "id": 1,
      "jsonrpc": "2.0",
      "result": {
        "contextId": "status-context-id",
        "kind": "message",
        "messageId": "5d6605f6-9926-481f-b807-8598b81b8cc1",
        "parts": [
          {
            "kind": "text",
            "text": "ready"
          }
        ],
        "role": "agent"
      }
    }
    

    A2A Mersenne Prime Number Agent (Rust AWS)

    This agent provides Rust agent that implements the Mersenne generation algorithm Hosted on AWS:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make deploy
    Building the Docker image...
    [+] Building 3.8s (10/13)    
    
    xbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make endpoint
    https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/
    

    Then get the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make status
    Checking AWS Lightsail service status for a2a-lightsail-rust-aws...
    ------------------------------------------------------------------------------------------------------------------------
    | GetContainerServices |
    +------------+--------+------------+-----------------------------------------------------------------------------------+
    | Deployment | Power | State | URL |
    +------------+--------+------------+-----------------------------------------------------------------------------------+
    | ACTIVE | nano | DEPLOYING | https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/ |
    +------------+--------+------------+-----------------------------------------------------------------------------------+
    Checking endpoint health at https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/health...
    Health status: HEALTHY (HTTP 200)
    

    To check the Agent Card:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make card
    Fetching agent card from https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/.well-known/agent-card.json ...
    {
      "name": "Mersenne Prime Agent Rust",
      "description": "A rust agent that builds a list of the first n Mersenne primes and reports the elapsed time. Configured with model: Not specified.",
      "protocolVersion": "0.3.0",
      "version": "0.1.0",
      "url": "http://0.0.0.0:8080",
      "skills": [
        {
          "id": "find-mersenne-rust",
          "name": "Find Mersenne Primes in rust",
          "description": "Finds the list of the first n Mersenne primes in Rust, or calculates a specific Mersenne prime for a given exponent parameter.",
          "tags": [
            "math",
            "benchmark"
          ]
        },
        {
          "id": "check-status-rust",
          "name": "Check calculation status in Rust",
          "description": "Returns 'ready' if no calculation is active, and 'not ready' if a calculation is live.",
          "tags": [
            "status",
            "health"
          ]
        }
      ],
      "capabilities": {},
      "defaultInputModes": [],
      "defaultOutputModes": []
    }
    

    To check that that remote agent can support A2A:

    xbill@penguin:~/a2a-multicloud/benchmark-rust-aws$ make a2a
    Sending A2A status request to https://a2a-lightsail-rust-aws.6wpv8vensby5c.us-east-1.cs.amazonlightsail.com/...
    {
      "id": 1,
      "jsonrpc": "2.0",
      "result": {
        "contextId": "status-context-id",
        "kind": "message",
        "messageId": "1245ea8c-e8d3-436a-8e27-0b25e90a8a42",
        "parts": [
          {
            "kind": "text",
            "text": "ready"
          }
        ],
        "role": "agent"
      }
    }
    

    MCP Master/Orchestrator Agent (Local Rust)

    The final agent follows a slightly different pattern. It provides a minimal agent with several functions (Tools/Skills).

    To build-

    make
    
    xbill@penguin:~/a2a-multicloud/rust-master$ make lint
    Linting the Rust project...
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.09s
    
    

    To get the local endpoint:

    xbill@penguin:~/a2a-multicloud/rust-master$ make endpoint
    http://localhost:8100
    

    Then use the A2A inspector:

    and check the A2A Agent card:

    xbill@penguin:~/a2a-multicloud/rust-master$ make card
    Fetching master agent card from http://localhost:8100...
    {
      "name": "master_agent",
      "description": "Master A2A Agent that coordinates prime agents (including rust_agent, gcp_agent, aws_agent, and azure_agent) using model: gemini-2.5-flash.",
      "protocolVersion": "0.3.0",
      "version": "0.1.0",
      "url": "http://0.0.0.0:8100/",
      "skills": [
        {
          "id": "coordinate-agents",
          "name": "Coordinate sub-agents",
          "description": "Delegates requests to appropriate sub-agents for weather, time, events, prime calculations, and general greetings.",
          "tags": [
            "coordinator",
            "a2a"
          ]
        },
        {
          "id": "calculate-mersenne-prime",
          "name": "Calculate Mersenne Prime",
          "description": "Calculates Mersenne prime of n using connected sub-agents.",
          "tags": [
            "mersenne",
            "prime",
            "a2a"
          ]
        }
      ],
      "capabilities": {},
      "defaultInputModes": [],
      "defaultOutputModes": []
    }
    

    and A2A status:

    xbill@penguin:~/a2a-multicloud/rust-master$ make a2a
    Sending A2A status request to http://localhost:8100/...
    

    Antigravity CLI with MCP Connection

    The Master Agent starts a FastMCP server interface. This allows Antigravity CLI to be used as a MCP client:

    xbill@penguin:~/a2a-multicloud/.agents$ more mcp_config
    {
      "mcpServers": {
        "rust-master": {
          "command": "cargo",
          "args": ["run", "--manifest-path", "/home/xbill/a2a-multicloud/rust-master/Cargo.toml", "--quiet", "--", "--stdio"],
          "env": {
            "GOOGLE_GENAI_USE_VERTEXAI": "1",
            "GOOGLE_CLOUD_PROJECT": "aisprint-491218",
            "GOOGLE_CLOUD_LOCATION": "us-central1",
            "GENAI_MODEL": "gemini-2.5-flash",
            "MODEL_NAME": "gemini-2.5-flash"
          }
        }
      }
    }
    

    The MCP tools can be reviewed:

    MCP Servers
    
    Plugins (~/.gemini/antigravity-cli/plugins)
       ✓ google-dev-knowledge Tools: search_documents, answer_query, get_documents
       ✓ rust-master Tools: ask_master_agent, calculate_mersenne_prime, check_agents_status
    

    The agent status can be checked with a MCP call to the Master Agent:

    ● rust-master/check_agents_status(Call check_agents_status MCP tool) (ctrl+o to expand)
    
      I ran the check_agents_status tool from the rust-master MCP server. The check succeeded, confirming that all sub-
      agents are healthy and online:
    
      • AWS (Remote): ✅ ONLINE (HTTP 200)
      • GCP (Remote): ✅ ONLINE (HTTP 200)
      • Azure (Remote): ✅ ONLINE (HTTP 200)
      • Rust (Local): ✅ ONLINE (HTTP 200)
    
      ### Summary of Work:
    
      1. Inspected Makefile & Scripts: Reviewed target definitions ( make status , make a2a ) and script configurations.
      2. Checked Endpoint Health: Verified the agent URL parameters and credentials from .env .
      3. Executed MCP Status Tool: Invoked the lazy-loaded MCP tool check_agents_status from the rust-master 
      coordinator, confirming all remote and local calculation sub-agents are online and ready to accept tasks.
    

    and the agent can be verified:

    > ask_master_agent what do you do
    
    ● rust-master/ask_master_agent(Call ask_master_agent MCP tool) (ctrl+o to expand)
    
      I called the ask_master_agent tool with the query "what do you do".
    
      Here is the response from the Master Agent:
    
      │ "I am a Master A2A Agent. I can delegate tasks to specialized sub-agents (Rust, GCP, AWS, or Azure agents) to
      │ calculate Mersenne primes or check exponents."
    
      ### Summary of Work:
    
      1. Invoked the MCP Tool: Called ask_master_agent on the rust-master server with the prompt what do you do .
      2. Presented the Results: Relayed the master agent's self-description as a coordinator for distributed multi-cloud
      Mersenne prime calculations.
    

    So What is all this Doing?

    All 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.

    Time to Starting Running some Numbers!

    Now that the individual Agents have been validated — open antigravity and use the MCP tool to start the session:

    > what does calculate_mersenne_prime do?
    
    ● Search(Grep search run_a2a_benchmark) (ctrl+o to expand)
    
      I will view the definition of run_a2a_benchmark (which implements calculate_mersenne_prime ) in rust-            
      master/src/main.rs .
    
    ● Read(/home/xbill/a2a-multicloud/rust-master/src/main.rs) (ctrl+o to expand)
    
      The calculate_mersenne_prime(n) tool executes a distributed benchmark to find and verify Mersenne primes (2ᵖ - 1)
      for exponents from 1 to n.
    
      ### How it Works:
    
      1. Assigns Tasks Round-Robin: It iterates through the exponents 1 ≤ i ≤ n and checks the readiness of the connected
      sub-agents (GCP, AWS, Azure, and Local) using a round-robin schedule.
      2. Delegates Computation: Once a ready agent is found, the master agent sends the exponent i to it via the A2A
      protocol. The sub-agent calculates whether 2ⁱ - 1 is prime.
      3. Aggregates Timings & Results: It measures the ready check time and the calculation time for each exponent.
      4. Saves Metrics: The benchmark results, including timing data and calculated primes, are compiled into a summary
      markdown table and persisted to disk (e.g., in benchmark_results.json).
    
      ### Summary of Work:
    
      1. Source Code Review: Inspected the main.rs function in rust-master/src/main.rs to extract the exact
      program flow and role of each agent.
      2. Explained Mechanics: Highlighted the round-robin task assignment, remote A2A calls, and metrics compilation
      features.
    
    

    Start the Benchmarking Session

    Once all the agents have been started — the Master agent on port 8100 is connected over MCP with Antigravity CLI:

    
    > run the calculate_mersenne_prime with 100
    
      I will execute the calculation of Mersenne primes up to exponent 100 by querying the Master Agent's HTTP MCP route.
    
    ● Bash(curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "id": 1, "method": ...) (ctrl+o to
    expand)
      I will wait for the distributed calculation up to exponent 100 to complete.
      The distributed calculation up to exponent n = 100 has completed successfully!
      ### Distributed Mersenne Prime Generation Report
      • Timestamp: 2026-06-02T13:40:04-04:00 
      • Cumulative Duration: 55,625.57 ms (~55.6 seconds)
      #### Generated Mersenne Primes
      • 2² - 1 = 3 (via AWS Lightsail)
      • 2³ - 1 = 7 (via Azure Container Apps)
      • 2⁵ - 1 = 31 (via GCP Cloud Run)
      • 2⁷ - 1 = 127 (via Azure Container Apps)
      • 2¹³ - 1 = 8,191 (via GCP Cloud Run)
      • 2¹⁷ - 1 = 131,071 (via GCP Cloud Run)
      • 2¹⁹ - 1 = 524,287 (via Azure Container Apps)
      • 2³¹ - 1 = 2,147,483,647 (via Azure Container Apps)
      • 2⁶¹ - 1 = 2,305,843,009,213,693,951 (via GCP Cloud Run)
      • 2⁸⁹ - 1 = 618,970,019,642,690,137,449,562,111 (via GCP Cloud Run)
      ──────
      ### Coordinated Exponent Assignments
       Exponent | Assigned Agent | Ready Check Time | Calc Time | Result
      --------------------|------------------------|----------------------|----------------------|----------------------
       1 | GCP (Cloud Run) | 662.32 ms | 658.00 ms | not prime
       2 | AWS (Lightsail) | 418.86 ms | 117.14 ms | 3
       3 | Azure (Container Apps) | 330.12 ms | 366.37 ms | 7
       4 | Rust (Local) | 30.34 ms | 12.07 ms | not prime
       5 | GCP (Cloud Run) | 651.16 ms | 667.50 ms | 31
       6 | AWS (Lightsail) | 119.91 ms | 103.80 ms | not prime
       7 | Azure (Container Apps) | 337.03 ms | 338.40 ms | 127
       8 | Rust (Local) | 30.31 ms | 13.20 ms | not prime
       9 | GCP (Cloud Run) | 628.36 ms | 621.74 ms | not prime
       10 | AWS (Lightsail) | 108.49 ms | 113.11 ms | not prime
       11 | Azure (Container Apps) | 336.13 ms | 324.22 ms | not prime
       12 | Rust (Local) | 21.45 ms | 15.00 ms | not prime
       13 | GCP (Cloud Run) | 629.91 ms | 662.56 ms | 8191
       14 | AWS (Lightsail) | 111.40 ms | 119.59 ms | not prime
       15 | Azure (Container Apps) | 325.95 ms | 336.56 ms | not prime
       16 | Rust (Local) | 36.22 ms | 13.74 ms | not prime
       17 | GCP (Cloud Run) | 678.16 ms | 635.27 ms | 131071
       18 | AWS (Lightsail) | 111.02 ms | 115.05 ms | not prime
       19 | Azure (Container Apps) | 343.99 ms | 306.91 ms | 524287
       20 | Rust (Local) | 24.83 ms | 25.15 ms | not prime
       21 | GCP (Cloud Run) | 612.20 ms | 610.21 ms | not prime
       22 | AWS (Lightsail) | 103.64 ms | 121.31 ms | not prime
       23 | Azure (Container Apps) | 362.88 ms | 361.34 ms | not prime
       24 | Rust (Local) | 25.12 ms | 14.09 ms | not prime
       25 | GCP (Cloud Run) | 646.72 ms | 641.75 ms | not prime
       26 | AWS (Lightsail) | 98.67 ms | 109.74 ms | not prime
       27 | Azure (Container Apps) | 380.92 ms | 319.36 ms | not prime
       28 | Rust (Local) | 24.17 ms | 17.71 ms | not prime
       29 | GCP (Cloud Run) | 596.21 ms | 615.23 ms | not prime
       30 | AWS (Lightsail) | 110.32 ms | 102.89 ms | not prime
       31 | Azure (Container Apps) | 393.16 ms | 325.54 ms | 2147483647
       32 | Rust (Local) | 20.81 ms | 14.46 ms | not prime
       33 | GCP (Cloud Run) | 616.02 ms | 610.53 ms | not prime
       34 | AWS (Lightsail) | 98.09 ms | 113.49 ms | not prime
       35 | Azure (Container Apps) | 331.80 ms | 396.37 ms | not prime
       36 | Rust (Local) | 27.76 ms | 26.81 ms | not prime
       37 | GCP (Cloud Run) | 626.58 ms | 641.85 ms | not prime
       38 | AWS (Lightsail) | 108.36 ms | 110.98 ms | not prime
       39 | Azure (Container Apps) | 343.18 ms | 341.17 ms | not prime
       40 | Rust (Local) | 30.80 ms | 21.23 ms | not prime
       41 | GCP (Cloud Run) | 606.28 ms | 637.02 ms | not prime
       42 | AWS (Lightsail) | 106.25 ms | 116.14 ms | not prime
       43 | Azure (Container Apps) | 339.94 ms | 318.64 ms | not prime
       44 | Rust (Local) | 21.90 ms | 12.41 ms | not prime
       45 | GCP (Cloud Run) | 628.11 ms | 640.00 ms | not prime
       46 | AWS (Lightsail) | 100.35 ms | 112.84 ms | not prime
       47 | Azure (Container Apps) | 343.33 ms | 323.55 ms | not prime
       48 | Rust (Local) | 19.90 ms | 28.04 ms | not prime
       49 | GCP (Cloud Run) | 643.14 ms | 664.11 ms | not prime
       50 | AWS (Lightsail) | 113.88 ms | 103.43 ms | not prime
       51 | Azure (Container Apps) | 364.66 ms | 317.36 ms | not prime
       52 | Rust (Local) | 22.84 ms | 14.70 ms | not prime
       53 | GCP (Cloud Run) | 617.28 ms | 651.10 ms | not prime
       54 | AWS (Lightsail) | 103.60 ms | 114.45 ms | not prime
       55 | Azure (Container Apps) | 340.59 ms | 323.87 ms | not prime
       56 | Rust (Local) | 26.55 ms | 11.62 ms | not prime
       57 | GCP (Cloud Run) | 635.30 ms | 625.28 ms | not prime
       58 | AWS (Lightsail) | 106.18 ms | 117.21 ms | not prime
       59 | Azure (Container Apps) | 328.18 ms | 336.98 ms | not prime
       60 | Rust (Local) | 16.18 ms | 17.11 ms | not prime
       61 | GCP (Cloud Run) | 621.01 ms | 642.30 ms | 2305843009213693951
       62 | AWS (Lightsail) | 106.05 ms | 115.97 ms | not prime
       63 | Azure (Container Apps) | 322.90 ms | 346.61 ms | not prime
       64 | Rust (Local) | 25.02 ms | 13.26 ms | not prime
       65 | GCP (Cloud Run) | 610.11 ms | 627.14 ms | not prime
       66 | AWS (Lightsail) | 105.60 ms | 107.45 ms | not prime
       67 | Azure (Container Apps) | 337.70 ms | 323.28 ms | not prime
       68 | Rust (Local) | 15.38 ms | 20.14 ms | not prime
       69 | GCP (Cloud Run) | 625.35 ms | 643.10 ms | not prime
       70 | AWS (Lightsail) | 108.00 ms | 108.02 ms | not prime
       71 | Azure (Container Apps) | 323.01 ms | 331.95 ms | not prime
       72 | Rust (Local) | 31.18 ms | 28.03 ms | not prime
       73 | GCP (Cloud Run) | 647.98 ms | 627.10 ms | not prime
       74 | AWS (Lightsail) | 107.88 ms | 112.41 ms | not prime
       75 | Azure (Container Apps) | 351.71 ms | 340.42 ms | not prime
       76 | Rust (Local) | 21.00 ms | 25.80 ms | not prime
       77 | GCP (Cloud Run) | 624.00 ms | 647.06 ms | not prime
       78 | AWS (Lightsail) | 97.09 ms | 111.97 ms | not prime
       79 | Azure (Container Apps) | 337.90 ms | 346.54 ms | not prime
       80 | Rust (Local) | 24.42 ms | 13.95 ms | not prime
       81 | GCP (Cloud Run) | 624.80 ms | 631.11 ms | not prime
       82 | AWS (Lightsail) | 108.87 ms | 107.81 ms | not prime
       83 | Azure (Container Apps) | 332.57 ms | 322.07 ms | not prime
       84 | Rust (Local) | 19.99 ms | 16.02 ms | not prime
       85 | GCP (Cloud Run) | 622.47 ms | 651.63 ms | not prime
       86 | AWS (Lightsail) | 112.12 ms | 107.24 ms | not prime
       87 | Azure (Container Apps) | 332.57 ms | 340.05 ms | not prime
       88 | Rust (Local) | 24.79 ms | 29.77 ms | not prime
       89 | GCP (Cloud Run) | 646.21 ms | 667.60 ms | 618970019642690137449562111
       90 | AWS (Lightsail) | 102.15 ms | 113.82 ms | not prime
       91 | Azure (Container Apps) | 343.99 ms | 342.82 ms | not prime
       92 | Rust (Local) | 29.97 ms | 13.91 ms | not prime
       93 | GCP (Cloud Run) | 661.59 ms | 662.92 ms | not prime
       94 | AWS (Lightsail) | 112.50 ms | 112.80 ms | not prime
       95 | Azure (Container Apps) | 328.13 ms | 337.41 ms | not prime
       96 | Rust (Local) | 26.83 ms | 24.57 ms | not prime
       97 | GCP (Cloud Run) | 636.67 ms | 601.39 ms | not prime
       98 | AWS (Lightsail) | 105.62 ms | 112.77 ms | not prime
       99 | Azure (Container Apps) | 327.66 ms | 327.75 ms | not prime
       100 | Rust (Local) | 31.73 ms | 18.09 ms | not prime
      ──────
      ### Summary of Work:
    
      1. Invoked Calculation via HTTP Endpoint: Executed the calculate_mersenne_prime call with n = 100 against the
      Master Agent's HTTP POST interface.
      2. Aggregated Results: Processed the response containing two additional large Mersenne primes (2⁶¹ - 1 and 2⁸⁹ - 1)
      and the complete assignment distribution.
    

    Review Performance

    The results of the benchmark are graphed:

    Results

    Antigravity CLI summarized the results of the Agent Benchmarking:

    > summarize key results cross cloud
    ▸ Thought Process
      Analyzing Cross-Cloud Results
      Here is a cross-cloud summary of the key findings, focusing on architecture, network latency, authentication overhead,
      and calculation behaviors:
    
      ### 1. Latency & Network Transit Comparison
    
      The total round-trip time (RTT) for a single round of checks and calculation varies heavily by cloud service model:
    
      • AWS (Lightsail): ~232 ms RTT (120ms Ready Check + 112ms Calculation)
          • Strengths: Lightsail container instances behave very similarly to standard VMs, offering quick, persistent HTTP
          response times and low network hops.
      • Azure (Container Apps): ~679 ms RTT (341ms Ready Check + 338ms Calculation)
          • Characteristics: Azure Container Apps run inside a managed Kubernetes framework (K8s/Envoy ingress), adding
          slight container routing and warm-up latency.
      • GCP (Cloud Run): ~1,275 ms RTT (635ms Ready Check + 640ms Calculation)
          • Characteristics: Serverless scaling latency, combined with authentication checks, leads to the highest round-
          trip time.
    
      ──────
      ### 2. The Authentication Overhead (The "Why")
    
      There is a massive latency difference between GCP and the other clouds, caused by security configurations:
    
      • GCP Cloud Run: Requires secure OIDC identity authentication. For every single network call, the master agent calls 
      gcloud auth print-identity-token as a local subprocess. Spawning this CLI subprocess on every check and call
      introduces an extra ~300ms to ~500ms of local delay.
      • AWS & Azure: These sub-agents are deployed with publicly accessible HTTP endpoints that do not require OIDC tokens,
      avoiding any local CLI token generation overhead.
      ──────
      ### 3. Latency Symmetry (Network vs. Compute)
    
      Across all cloud providers, the Ready Check Time and Calculation Time are nearly identical:
    
      • AWS: ~120 ms vs ~112 ms
      • Azure: ~341 ms vs ~338 ms
      • GCP: ~635 ms vs ~640 ms
    
      Insight: This symmetry proves that network transport and handshake/auth overhead (ping and TLS/IAM checks) constitute
      over 95% of the latency. The actual math workload (calculating exponent primality) is extremely fast and has
      negligible latency impact at these exponent sizes.
      ──────
      ### 4. Cross-Cloud Protocol Success
    
      • The master agent successfully coordinated with all three major cloud providers (GCP, AWS, Azure) and the local
      runner.
      • Multi-cloud work distribution successfully validated Mersenne prime candidates, returning identical results
      regardless of which cloud hosting provider did the execution.
    
      ### Summary of Work:
    
      1. Analyzed Authentication Mechanics: Explored the main.rs subprocess overhead in the coordinator codebase.
      2. Evaluated Latency Patterns: Compared ready checks vs. calculation times to deduce that network transit and
      security handshakes dominate overall duration.
    
    

    GCP Remediation

    To improve the GCP numbers- the Auth token is preset:

        export GCP_ID_TOKEN=$(gcloud auth print-identity-token)        
    

    Then the benchmark is re-run. There is a slight variance on each run:

      Here is a summary of the performance and distribution metrics comparing the cloud providers and the local environment
      from the Mersenne prime calculation run (exponents 1 to 100):
    
      ### Overall Performance Metrics
    
       Environment | Tasks Ass… | Cold Start Ready… | Avg Warm Ready T… | Avg Calculation T… | Compute Perform…
      ------------------------|------------|-------------------|-------------------|--------------------|------------------
       Rust (Local) | 25 | 12.23 ms | 21.63 ms | 11.37 ms | #1 (Fastest)
       AWS (Lightsail) | 25 | 544.26 ms | 107.94 ms | 110.79 ms | #2
       GCP (Cloud Run) | 25 | 484.59 ms | 127.31 ms | 135.49 ms | #3
       Azure (Container Apps) | 25 | 20,711.57 ms | 348.39 ms | 354.26 ms | #4 (Slowest)
      ──────
      ### Key Findings
    
      1. Cold Starts & Overhead (Ready Time):
          • Azure (Container Apps) experienced a significant initial cold start latency of ~20.7 seconds on its very first
          assignment (exponent 3). Even once warm, its ready time overhead (~348 ms) remained roughly 3x slower than AWS
          and GCP.
          • AWS (Lightsail) and GCP (Cloud Run) showed excellent and comparable warm ready times of 108 ms and 127 ms
          respectively, with minor startup penalties (~500 ms) on their first task execution.
      2. Compute Performance (Calculation Time):
          • Local Rust is the fastest (~11.4 ms average) because it runs bare metal without any network traversal, agent
          orchestration, or cloud virtualization overhead.
          • AWS outperformed both GCP and Azure, running calculations in 110.79 ms average.
          • GCP followed closely behind AWS at 135.49 ms average.
          • Azure was the slowest cloud computing node, taking 354.26 ms average—roughly 3x slower than AWS and 2.6x slower
          than GCP.
      3. Mersenne Primes Discovered by Agent:
          • GCP (Cloud Run): Discovered 5 primes (Exponents: 5, 13, 17, 61, 89)
          • Azure (Container Apps): Discovered 4 primes (Exponents: 3, 7, 19, 31)
          • AWS (Lightsail): Discovered 1 prime (Exponent: 2)
          • Rust (Local): Discovered 0 primes (Since tasks were assigned in a round-robin format, the local agent was
          assigned exponents that are multiples of 4 (4,8,12,…), none of which are prime).
    

    Final Results

    After adjusting the OIDC token for GCP- the benchmark was re-run:

    Summary

    The goal of the demo/article was to get basic Agents implemented across multiple clouds and benchmark the Agent performance finding Mersenne primes.

    The 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.

    Finally — 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.

    Tags

    a2aprotocolgcpawsmcps

    Comments

    More Blog

    View all
    Context bankruptcy: The case for strategic forgetting for AI Agentsai

    Context bankruptcy: The case for strategic forgetting for AI Agents

    Most of us have seen a coding agent fail to complete a task we know it can do. We just don't...

    J
    James O'Reilly
    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestrationgooglecloud

    Parallel Compliance Engine: Drive-to-Sheets Multi-Agent Orchestration

    When building Generative AI applications, developers often encounter a massive bottleneck: sequential...

    A
    Aryan Irani
    Is It Ethical to Post and Ask About Circuits on Dev.to?discuss

    Is It Ethical to Post and Ask About Circuits on Dev.to?

    I’ve been thinking about sharing some electronic circuit posts on Dev.to — small circuits, DIY...

    C
    codebunny20
    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limitsagents

    The One-Click Exporter: AI Studio Antigravity, Probed to Its Limits

    What nobody tells you about exporting your multi-agent prototype to a local workspace. Every...

    L
    leslysandra
    Guarding the till while autonomous data agents do the diggingagenticarchitect

    Guarding the till while autonomous data agents do the digging

    Autonomous agents are genuinely good at answering messy business questions. Give one an LLM and a set...

    S
    Sireesha Pulipati
    Return on Attention: Why AI Code Reviews Are Wearing Us Outai

    Return on Attention: Why AI Code Reviews Are Wearing Us Out

    PR volume went up, ticket quality didn't, and the gap got filled with LLMs on both sides of the review: bots reviewing, bots replying, bots occasionally arguing with bots about priorities that only existed in a teammate's head. Our CEO named the actual problem, and it's bigger than code review.

    C
    christine

    Stay up to date

    Get the latest Stable Diffusion prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Stable Diffusion and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Stable Diffusion resource

    • Automate Your Website Building with N8N: Unsubscribe Workflowmake · $6.62 · Related topic
    • Automate Google Sheets Triggered List Building Workflown8n · $9.53 · Related topic
    • Building Your First WhatsApp AI Sales Chatbotn8n · $19.99 · Related topic
    • Automated LLM Evaluation for Legal Benchmarkingn8n · $16.99 · Related topic
    Browse all workflows