learn-a2a-deepdive

A2A Demo Visualizer - React SPA

An interactive React Single-Page Application that visualizes the A2A Protocol Supply Chain Demo workflow.

Prerequisites

Setup

  1. Navigate to the SPA directory:
    cd spa
    
  2. Install dependencies:
    npm install
    

Running the Application

Start the development server:

npm start

The application will open automatically at http://localhost:3000.

Features

Workflow Steps Visualized

  1. Client sends request to Coordinator
  2. Coordinator discovers agents
  3. Coordinator delegates to Data Analysis
  4. Data Analysis streams progress
  5. Data Analysis sends results back
  6. Coordinator delegates to Report Generation
  7. Report Generation sends reports back
  8. Coordinator returns results to Client

Project Structure

spa/
├── public/
│   └── index.html          # HTML entry point
├── src/
│   ├── index.js            # React bootstrap
│   ├── index.css           # Global styles
│   ├── App.js              # Main application component
│   ├── App.css             # App-specific styles
│   └── components/
│       ├── AgentNode.js    # Agent visualization component
│       ├── AgentNode.css
│       ├── ConnectionLine.js  # Connection line component
│       ├── ConnectionLine.css
│       ├── WorkflowAnimation.js  # Step message overlay
│       └── WorkflowAnimation.css
├── package.json            # Dependencies and scripts
└── README.md               # This file

Available Scripts

Connecting to Backend Agents

This visualizer currently runs a simulated demo. To connect to the actual A2A Supply Chain Demo backend agents:

  1. Start the backend agents (see main project README)
  2. The SPA can be enhanced to make real API calls to:
    • Coordinator Agent: http://localhost:8000
    • Data Analysis Agent: http://localhost:8001
    • Report Generation Agent: http://localhost:8002

Technologies