A beautiful user interface for managing and invoking remote agents using the A2A (Agent-to-Agent) protocol, built with Next.js and Cloudscape Design.
- Agent Management: Add, list, and delete remote agents
- Beautiful UI: Built with AWS Cloudscape Design components
- Real-time Communication: Stream responses from remote agents using SSE
- Multi-agent Support: Invoke multiple agents simultaneously
- Responsive Design: Works on desktop and mobile devices
- Frontend: Next.js 14 with TypeScript and Cloudscape Design
- Backend: FastAPI with A2A protocol support
- Communication: RESTful API with Server-Sent Events (SSE) for streaming
- Node.js 18+
- Python 3.13+
- uv (Python package manager)
- A2A SDK and Strands agents dependencies
-
Install Frontend Dependencies
npm install
-
Install Backend Dependencies
cd backend uv sync
-
Backend Configuration
- The FastAPI server will run on port 8000
- CORS is configured to allow frontend access
- The frontend uses Next.js API routes to proxy requests to the backend
-
Environment Variables (Optional)
- Set
BACKEND_URLenvironment variable if backend runs on a different URL - Default backend URL is
http://localhost:8000
- Set
chmod +x start.sh
./start.sh-
Start Backend Server
cd backend uv run uvicorn main:app --host 0.0.0.0 --port 8000 --reload -
Start Frontend Server (in another terminal)
npm run dev
- Access the UI: Open http://localhost:3000
- Add Remote Agents: Use the "Add Agent" functionality to register agents by URL
- View Agents: See all registered agents in the table with their details
- Invoke Agents: Select agents and send queries with streaming responses
The backend provides the following REST API endpoints:
GET /list_agents- List all registered remote agentsPOST /add_agent- Register a new remote agent by URLDELETE /delete_agent- Remove a registered agentPOST /invoke_stream- Invoke agents with streaming SSE responseGET /health- Health check endpoint
a2a-demo-ui/
├── src/
│ ├── app/
│ │ ├── api/ # Next.js API routes (proxy to backend)
│ │ │ ├── list_agents/
│ │ │ ├── add_agent/
│ │ │ ├── delete_agent/
│ │ │ ├── update_agent_enabled/
│ │ │ └── invoke_stream/
│ │ ├── chat/ # Chat page
│ │ └── page.tsx # Home page
│ ├── components/ # React components
│ ├── services/ # API service layer
│ └── types/ # TypeScript type definitions
├── backend/
│ ├── main.py # FastAPI application
│ └── pyproject.toml # Python dependencies
├── public/ # Static assets
└── README.md
- Frontend runs on http://localhost:3000
- Backend API runs on http://localhost:8000
- API documentation available at http://localhost:8000/docs
- Frontend: Next.js 14, TypeScript, Cloudscape Design
- Backend: FastAPI, Python, A2A SDK
- Communication: REST API, Server-Sent Events (SSE)
- Styling: Cloudscape Design System
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.