> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# A2A Financial Trading Agents - Google ADK / MCP / Llama

> This tutorial demonstrates how to build a multi-agent system using Google Cloud's Agent Development Kit (ADK), the Agent-to-Agent (A2A) protocol, and the Model Context Protocol (MCP) together with Meta's Llama model. You'll create a trading analysis platform where specialized AI agents collaborate to provide balanced market insights. Observability is provided through Arize tracing, allowing you to monitor agent behavior, tool usage, and performance.

The system features two specialized agents: a Bear Agent (risk-focused) built with Pydantic AI, and a Bull Agent (opportunity-focused) built with Google ADK. Both agents communicate using the A2A protocol and are enhanced with custom tools through MCP.

The purpose of this tutorial is to  highlight A2A observability and associated opentelemetry traces in Arize AX and Phoenix platforms. Agent-to-Agent (A2A) Protocol is an open standard for AI agents to communicate and collaborate. Its purpose is to enable interoperability between various AI agents, regardless of their underlying framework or vendor, allowing them to share tasks, data, and partial results. For more information on A2A, see links below:

<Card title="A2A Documentation" icon="sparkles" color="#20f3c6" horizontal href="https://a2a-protocol.org/latest/" />

<Card title="A2A Overview Video" icon="video" color="#17daf4" horizontal href="https://www.youtube.com/watch?v=Fbr_Solax1w&t=11s" />

There are 2 notebook examples provided that send opentelemetry traces to either Phoenix or Arize AX endpoints:

<Card title="Colab - Phoenix Tracing" icon="https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/cookbooks/gc.png" horizontal href="https://colab.research.google.com/drive/1LALKqt8uQY6qv4BMNMEzi2FQ68yhGfz0#scrollTo=sfZkhtTDT94p" />

<Card title="Colab - Arize Tracing" icon="https://storage.googleapis.com/arize-phoenix-assets/assets/images/arize-docs-images/cookbooks/gc.png" horizontal href="https://colab.research.google.com/github/Arize-ai/tutorials/blob/main/python/llm/agents/A2A_multi_agent_systems_vertexai_llama_Arize.ipynb" />

## Architecture Overview

The multi-agent system consists of three main components:

* Bear Agent (Pydantic AI + MCP): Focuses on risk analysis, identifying downside catalysts and warning signals
* Bull Agent (ADK + MCP): Focuses on growth opportunities, bullish patterns, and upside potential
* Orchestrator Agent (ADK): Coordinates both agents to provide balanced market analysis

The agents communicate using the A2A protocol, which enables standardized agent-to-agent communication with capabilities for:

* Agent discovery through agent cards
* Asynchronous task execution
* Structured message passing
* Transport protocol negotiation

Observability is provided through Arize tracing, allowing you to monitor agent behavior, tool usage, and performance.

### Prerequisites

* Before starting this tutorial, ensure you have:
* Arize Phoenix Cloud or Arize AX account
* A Google Cloud project with Vertex AI API enabled
* Appropriate permissions to deploy agents to Vertex AI Agent Engine
