Skip to content

a2a-community/a2a-ui

Repository files navigation

A2A UI - Agent-to-Agent Platform

License: MIT TypeScript Next.js React

Modern, production-ready UI for Google A2A (Agent-to-Agent) platform built with Next.js, TypeScript, and shadcn/ui. Features real-time chat, Phoenix tracing integration, and comprehensive agent management.

A2A UI Dashboard

✨ Features

πŸ€– Agent Management

  • Complete CRUD operations for AI agents
  • Agent configuration and settings
  • Real-time agent status monitoring
  • Integration with various AI providers

πŸ’¬ Chat Interface

  • Telegram-style chat interface with auto-scrolling
  • Streaming message support
  • Message history and persistence
  • Context-aware conversations
  • File and media support

πŸ“Š Phoenix Tracing

  • Real-time trace visualization
  • Jaeger-style timeline view
  • Graph-based trace relationships
  • Project-based filtering
  • Session-specific trace filtering

🎨 User Experience

  • Dark/Light theme with system preference detection
  • Responsive design optimized for all devices
  • Modern component architecture with clear separation of concerns
  • Error boundaries for graceful error handling
  • Loading states and smooth animations

πŸ”§ Developer Experience

  • TypeScript with strict type checking
  • ESLint configuration for code quality
  • Production-ready build pipeline
  • Centralized logging system
  • Environment validation

πŸš€ Quick Start

Prerequisites

  • Node.js 18.0.0 or higher
  • npm 8.0.0 or higher

Installation

  1. Clone the repository

    git clone https://github.com/your-org/a2a-ui.git
    cd a2a-ui
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env.local
    # Edit .env.local with your configuration
  4. Start the development server

    npm run dev
  5. Open your browser Navigate to http://localhost:3000

Production Build

npm run build
npm start

βš™οΈ Configuration

Environment Variables

Create a .env.local file in the root directory:

# App Configuration
NEXT_PUBLIC_APP_NAME=A2A UI
NEXT_PUBLIC_APP_VERSION=1.0.0

# Phoenix Configuration (optional)
NEXT_PUBLIC_ARIZE_PHOENIX_URL=http://localhost:6006

Agent Server Configuration

Configure your A2A agent server with CORS policies:

from starlette.middleware.cors import CORSMiddleware

server = A2AServer(
    agent_card=agent_card,
    task_manager=AgentTaskManager(agent=QAAgent()),
    host=host,
    port=port,
)

# Add CORS middleware for development
server.app.add_middleware(
    CORSMiddleware,
    allow_origins=["http://localhost:3000"],  # Your UI URL
    allow_methods=["*"],
    allow_headers=["*"],
)

server.start()

🎨 Theme System

The application features a comprehensive theme system:

  • Light Theme: Clean, modern light interface
  • Dark Theme: Eye-friendly dark interface
  • System Theme: Automatically follows OS preference

Theme Switching

Access the theme menu via the toggle button in the header:

  • β˜€οΈ Light mode
  • πŸŒ™ Dark mode
  • πŸ–₯️ System preference

Preferences are automatically saved and persist across sessions.

πŸ“Š Phoenix Integration

Setup Phoenix Tracing

  1. Install Phoenix (if not already running)

    pip install arize-phoenix
    phoenix serve
  2. Configure in UI

    • Navigate to Settings
    • Enable "Arize Phoenix Integration"
    • Set Phoenix URL (default: http://localhost:6006)
  3. View Traces

    • Start a conversation with an agent
    • Open the Phoenix sidebar to view real-time traces
    • Switch between Jaeger timeline and graph views

πŸ—οΈ Architecture

Project Structure

src/
β”œβ”€β”€ app/                 # Next.js App Router pages
β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ ui/             # shadcn/ui components
β”‚   β”œβ”€β”€ chat/           # Chat-related components
β”‚   β”œβ”€β”€ layout/         # Layout components
β”‚   └── common/         # Shared components
β”œβ”€β”€ hooks/              # Custom React hooks
β”œβ”€β”€ lib/                # Utility libraries
β”œβ”€β”€ types/              # TypeScript type definitions
β”œβ”€β”€ contexts/           # React contexts
└── a2a/                # A2A-specific logic
    β”œβ”€β”€ client.ts       # A2A API client
    β”œβ”€β”€ schema.ts       # Data schemas
    └── state/          # State management

Key Technologies

  • Framework: Next.js 15.3.3 with App Router
  • Language: TypeScript with strict type checking
  • Styling: Tailwind CSS + shadcn/ui
  • State: React Context + localStorage
  • Icons: Lucide React
  • Validation: Custom validation utilities

πŸ”§ Development

Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint
npm run lint:fix     # Fix ESLint issues
npm run type-check   # Run TypeScript check
npm run clean        # Clean build artifacts

Code Quality

  • ESLint: Configured with Next.js recommended rules
  • TypeScript: Strict mode enabled for better type safety
  • Error Boundaries: Comprehensive error handling
  • Logging: Environment-aware logging system

πŸš€ Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Deploy with zero configuration

Docker

# Build the image
docker build -t a2a-ui .

# Run the container
docker run -p 3000:3000 a2a-ui

Docker Compose

docker-compose up

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages