DEV Community
Follow
The A2A CLI on Azure: One Client for Container Apps, Agent Framework and Localhost
This article details running A2A agents, a Rust agent and an Agent Framework agent, on Azure Container Apps and locally. The A2A CLI is used to interact with all four agent endpoints, demonstrating seamless communication across different environments. Both agents adhere to the A2A 1.0 protocol, utilizing JSON-RPC and REST interfaces.The core functionality involves a Lucas-Lehmer test to find Mersenne primes, with the Rust agent performing the computation and timing. The Agent Framework agent, powered by Azure OpenAI, orchestrates the process and calls the Rust agent using the A2A Python client. Azure security is implemented through Entra ID, eliminating the need for API keys and standardizing authentication for model access, registry pulls, and token management.Deployment on Azure Container Apps involves creating necessary resources like a container registry and a Container Apps environment. The Rust agent is deployed as a container app with external ingress, authenticated via a managed identity. The Agent Framework coordinator is also deployed as a container app, but with Entra ID authentication enabled, requiring a bearer token for access.The A2A CLI's ability to test all four agent configurations with identical commands highlights the interoperability and standardization of the A2A protocol. The setup leverages Azure's managed identity and Entra ID for secure and keyless operations. The agents provide structured replies containing timing information and the results of the prime number calculations. The article emphasizes the use of specific component versions for this demonstration.