Blog Post

Apps on Azure Blog
5 MIN READ

Building Agent-to-Agent (A2A) Applications on Azure App Service

jordanselig's avatar
jordanselig
Icon for Microsoft rankMicrosoft
Jul 14, 2025

A Semantic Kernel Travel Agent App Demo

The world of AI agents is evolving rapidly, with new protocols and frameworks emerging to enable sophisticated multi-agent communication. Google's Agent-to-Agent (A2A) protocol represents one of the most promising approaches for building distributed AI systems that can coordinate tasks across different platforms and services.

I'm excited to share how you can leverage Azure App Service to build, deploy, and scale A2A applications. Today, I'll walk you through a practical example that combines Microsoft Semantic Kernel with the A2A protocol to create an intelligent travel planning assistant.

What We Built: An A2A Travel Agent on App Service

I've taken an existing A2A travel planning sample and enhanced it to run seamlessly on Azure App Service. This demonstrates how A2A concepts can be adapted and hosted on one of Azure's platform-as-a-service offerings. What started as a sample implementation has been transformed into a full-featured web application with a modern interface, real-time streaming, and production-ready deployment automation.

Acknowledgments and Attribution

Before diving into the technical details, I want to give proper credit where it's due. This application was adapted and enhanced from excellent foundational work by the Microsoft Semantic Kernel team and the A2A project community:

This contribution builds upon these samples to demonstrate how you can take A2A concepts and create a complete, deployable application that runs seamlessly on Azure App Service with enterprise-grade features like managed identity authentication, monitoring, and infrastructure as code.

Why A2A on Azure App Service?

Azure App Service provides the perfect foundation for A2A applications because it handles the infrastructure complexity while giving you the flexibility to implement cutting-edge AI protocols. Here's what makes this combination powerful:

πŸš€Rapid Deployment & Scaling

  • Deploy A2A agents with a single azd up command
  • Auto-scaling based on demand without managing servers
  • Built-in load balancing for high-availability agent endpoints

πŸ”Enterprise Security

  • Managed identity authentication eliminates API key management
  • Built-in SSL/TLS termination for secure agent communication
  • Network isolation and private endpoint support for sensitive workloads

πŸ”„Real-time Capabilities

  • WebSocket support for streaming A2A protocol responses
  • Always-on availability for agent discovery and task coordination
  • Low-latency communication between distributed agents

πŸ“ŠObservability & Monitoring

  • Application Insights integration for comprehensive telemetry
  • Built-in logging and diagnostics for debugging agent interactions
  • Performance monitoring to optimize multi-agent workflows

Understanding the A2A Travel Agent Architecture

Our sample demonstrates a multi-agent system where a main travel manager coordinates with specialized agents:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     Web Browser     β”‚ ──── β”‚    FastAPI App       β”‚ ──── β”‚  Semantic Kernel    β”‚
β”‚                     β”‚      β”‚                      β”‚      β”‚   Travel Agent      β”‚
β”‚ β€’ Modern UI         β”‚      β”‚ β€’ REST API           β”‚      β”‚                     β”‚
β”‚ β€’ Chat Interface    β”‚      β”‚ β€’ A2A Protocol       β”‚      β”‚ β€’ Currency API      β”‚
β”‚ β€’ Responsive        β”‚      β”‚ β€’ Session Management β”‚      β”‚ β€’ Activity Planning β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        β”‚
                                        β–Ό
                             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                             β”‚    A2A Protocol      β”‚
                             β”‚                      β”‚
                             β”‚ β€’ Agent Discovery    β”‚
                             β”‚ β€’ Task Streaming     β”‚
                             β”‚ β€’ Multi-Agent Coord  β”‚
                             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Components

  1. TravelManagerAgent: The orchestrator that analyzes user requests and delegates to specialized agents
  2. CurrencyExchangeAgent: Handles real-time currency conversion using the Frankfurter API
  3. ActivityPlannerAgent: Creates personalized itineraries and activity recommendations
  4. A2A Protocol Layer: Manages agent discovery, task coordination, and streaming responses

Practical Example: Multi-Agent Travel Planning

Let's see this in action with a real user scenario:

User Request: "I'm traveling to Seoul, South Korea for 2 days with a budget of $100 USD per day. How much is that in Korean Won, and what can I do and eat?"
 
A2A Workflow:
  1. TravelManager receives the request and identifies it needs both currency and activity planning
  2. CurrencyExchangeAgent is invoked to fetch live USD→KRW rates
  3. ActivityPlannerAgent generates budget-friendly recommendations
  4. Response Compilation combines results into a comprehensive travel plan
  5. Streaming Delivery provides real-time updates to the user interface
 
Result: The user gets current exchange rates (~$100 USD = 130,000 KRW), daily budget breakdowns, recommended activities within budget, and restaurant suggestionsβ€”all coordinated seamlessly between multiple specialized agents.

Implementation Highlights

Modern Web Interface

The application includes a responsive web interface built with modern HTML/CSS/JavaScript that provides:

  • Real-time chat with typing indicators
  • Streaming responses for immediate feedback
  • Mobile-responsive design
  • Session management for conversation context

A2A Protocol Compliance

Full implementation of Google's A2A specification including:

  • Agent Discovery: Structured Agent Cards advertising capabilities
  • Task Coordination: Multi-agent task delegation and handoffs
  • Streaming Support: Real-time progress updates during complex workflows
  • Session Management: Persistent conversation context

Azure-Native Features

  • Managed Identity: Secure authentication without API key management
  • Bicep Templates: Infrastructure as code for reproducible deployments
  • Azure Developer CLI: One-command deployment with azd up

Getting Started: Deploy Your Own A2A Agent

Ready to try it yourself? Here's how to deploy this A2A travel agent to Azure App Service:

Prerequisites

  • Azure CLI and Azure Developer CLI (azd)
  • Python 3.10+ for local development
  • An Azure subscription

Deployment Steps

1. Clone the repository:
git clone https://github.com/Azure-Samples/app-service-a2a-travel-agent
cd app-service-a2a-travel-agent
 
2. Authenticate with Azure:
azd auth login
 
3. Deploy to Azure:
azd up
 

That's it! The Azure Developer CLI will:

  • Create an Azure App Service and App Service Plan
  • Deploy an Azure OpenAI resource with GPT-4 model
  • Configure managed identity authentication
  • Deploy your application code
  • Provide the live application URL

Beyond This Example: A2A Possibilities

While Semantic Kernel was chosen for this sample, we recognize that developers have many options for building A2A applications. The A2A protocol is framework-agnostic, and Azure App Service can host agents built with:

  • LangChain for comprehensive LLM application development
  • LlamaIndex for data-augmented agent workflows
  • AutoGen for multi-agent conversation frameworks
  • Custom implementations using OpenAI, Anthropic, or other AI APIs
  • Any Python web framework (FastAPI, Django, Flask, etc.)
  • And many more!

The key insight is that Azure App Service provides a robust, scalable platform that adapts to whatever AI framework or protocol you choose.

Why This Matters for the Future

The AI agent ecosystem is evolving rapidly. New protocols, frameworks, and integration patterns emerge regularly. What excites me most about Azure App Service in this context is our platform's adaptability:

  • πŸ”„Framework Flexibility: Host basically any AI framework or custom implementation
  • 🌐Protocol Support: WebSocket, HTTP/2, and custom protocols for agent communication
  • πŸ”Security Evolution: Managed identity and certificate management that scales with new auth patterns
  • πŸ“ˆPerformance Optimization: Auto-scaling and performance monitoring that adapts to AI workload patterns
  • πŸ› οΈDevOps Integration: CI/CD pipelines and deployment automation for rapid iteration

Looking Ahead

As A2A protocols mature and new agent frameworks emerge, Azure App Service will continue evolving to support the latest innovations in AI application development. Our goal is to provide a platform where you can focus on building intelligent agent experiences while we handle the infrastructure complexity.

We're particularly excited about upcoming enhancements in:

  • Integration with Azure AI services for even richer agent capabilities
  • Streamlined deployment patterns for AI application architectures
  • Improved monitoring and observability for multi-agent workflows

Try It Today

The A2A travel agent sample is available now on GitHub and ready for deployment. Whether you're exploring multi-agent architectures, evaluating A2A protocols, or looking to modernize your AI applications, this sample provides a practical starting point.

 

πŸš€ Deploy the A2A Travel Agent

We'd love to hear about the A2A applications you're building on Azure App Service. Share your experiences, challenges, and innovations with the communityβ€”together, we're shaping the future of distributed AI systems.


Questions about this sample or Azure App Service for AI applications? Connect with us in the comments below.

Updated Jul 15, 2025
Version 2.0

1 Comment

  • Radoslav's avatar
    Radoslav
    Copper Contributor

    Any port of the application to c# in progress?
    Any recent a2a samples for c#.net?