examples/integrations/a2a-a2ui/README.md
This is a starter template for building AI agents that use A2UI and CopilotKit. It provides a modern Next.js application with an integrated restaurant finder agent that can find restaurants and book reservations
# Using npm (default)
npm install
# Using pnpm
pnpm install
# Using yarn
yarn install
# Using bun
bun install
Note: This will automatically setup the Python environment as well.
If you have manual issues, you can run:
shnpm run install:agent
Create a .env file inside the agent folder with the following content:
GEMENI_API_KEY=sk-...your-openai-key-here...
# Using npm (default)
npm run dev
# Using pnpm
pnpm dev
# Using yarn
yarn dev
# Using bun
bun run dev
This will start both the UI and agent servers concurrently.
The following scripts can also be run using your preferred package manager:
dev - Starts both UI and agent servers in development modedev:debug - Starts development servers with debug logging enableddev:ui - Starts only the Next.js UI serverdev:agent - Starts only the A2A agent serverbuild - Builds the Next.js application for productionstart - Starts the production serverinstall:agent - Installs Python dependencies for the agentThe main UI component is in app/page.tsx, but most of the UI comes from from the agent in the form of A2UI declarative components. To see and edit the components it can generate, look in agent/prompt_builder.py.
To generate new components, try the A2UI Composer
Feel free to submit issues and enhancement requests! This starter is designed to be easily extensible.
This project is licensed under the MIT License - see the LICENSE file for details.
If you see "I'm having trouble connecting to my tools", make sure:
If you encounter Python import errors:
cd agent
uv sync
uv run .