A customizable Next.js UI for ElizaOS agents. Each BioAgent has its own UI instance (this repo) which can be easily customized to match the agent's branding and functionality.
- Agent-Specific UI: Each agent gets its own customizable interface
- Real-time Communication: Full Socket.IO integration with ElizaOS messaging system
- Speech-to-Text: Built-in voice input with ElevenLabs transcription
- Easy Customization: Configure branding, prompts, and behavior via environment variables
- Responsive Design: Works seamlessly on desktop and mobile devices
- Error Handling & Recovery: Robust connection management with proper error states
All customization is done through environment variables in your .env file:
NEXT_PUBLIC_AGENT_NAME="Your Agent Name"
NEXT_PUBLIC_AGENT_LOGO="/assets/your-logo_simple.png"
NEXT_PUBLIC_AGENT_BANNER_LOGO="/assets/your-banner.png"
NEXT_PUBLIC_AGENT_SHORT_DESCRIPTION="Brief description of your agent"NEXT_PUBLIC_AGENT_X_USERNAME="your_twitter_handle"
NEXT_PUBLIC_AGENT_DISCORD_SERVER="https://discord.gg/your-server"NEXT_PUBLIC_EXAMPLE_PROMPTS="What is gene therapy?,Explain CRISPR technology,How do vaccines work?"NEXT_PUBLIC_APP_URL=http://localhost:4000
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
NEXT_PUBLIC_AGENT_ID=your-agent-id-here
NEXT_PUBLIC_WORLD_ID=00000000-0000-0000-0000-000000000000# Enable speech-to-text with ElevenLabs
ELEVENLABS_API_KEY=sk_...
# Enable debug mode for development
NEXT_PUBLIC_DEBUG=true
# Repository context for agent knowledge
REPO_DIR_NAME=your-repo-name
REPO_URL=https://github.com/your-org/your-repo.git
REPO_BRANCH=maingit clone <your-repo-url>
cd eliza-nextjs-ui
bun install # or npm installCopy .env.example to .env and customize:
cp .env.example .envEdit .env with your agent's details:
- Set
NEXT_PUBLIC_AGENT_IDto your agent's ID - Customize
NEXT_PUBLIC_AGENT_NAMEand description - Add your logos to the
public/assets/folder - Configure example prompts relevant to your agent
bun run dev # or npm run devVisit http://localhost:4000
This UI implements the complete ElizaOS messaging flow:
[Next.js Client] β [API Proxy] β [ElizaOS Server] β [Message Bus] β [Agent Runtime]
β β
[Socket.IO UI] β [ElizaOS Socket.IO] β [Message Bus] β [Agent Response] β [Agent Processing]
- Agent Participation Management: Automatic agent registration to channels
- CORS-Friendly Architecture: API proxy pattern for seamless communication
- Real-time Updates: Socket.IO integration for instant message delivery
- Session Management: Persistent chat sessions with history
- Node.js 18+ or Bun
- ElizaOS Server running on localhost:3000 (or configured URL)
- Active ElizaOS Agent with valid agent ID
-
Add your logos to
public/assets/:- Agent logo (square format recommended)
- Banner logo (wide format for header)
-
Configure agent details in
.env:NEXT_PUBLIC_AGENT_NAME="Dr. BioBot" NEXT_PUBLIC_AGENT_SHORT_DESCRIPTION="AI assistant specializing in biotechnology and life sciences research."
-
Set relevant example prompts:
NEXT_PUBLIC_EXAMPLE_PROMPTS="Explain gene editing,What is synthetic biology?,How do mRNA vaccines work?"
The UI uses Tailwind CSS for easy customization. You can:
- Modify colors in
tailwind.config.js - Add custom CSS in
src/app/globals.css - Update component styles in individual component files
# Development
bun run dev # Start development server
bun run build # Build for production
bun start # Start production server
# Code Quality
bun run lint # Format code with Prettier
bun run format # Same as lint
bun run format:check # Check formatting without changesCause: Agent not added to channel or incorrect agent ID
Solution: Check NEXT_PUBLIC_AGENT_ID in .env and ensure ElizaOS server is running
Cause: Direct browser-to-ElizaOS requests blocked
Solution: All requests automatically proxied via /api/eliza/*
Cause: Missing ElevenLabs API key
Solution: Add ELEVENLABS_API_KEY to your .env file
Cause: Incorrect logo paths
Solution: Ensure logos are in public/assets/ and paths match .env configuration
Enable debug mode for development:
NEXT_PUBLIC_DEBUG=trueDebug mode provides:
- Connection status indicators
- Agent participation status
- Message flow logs in browser console
- Environment variable display
NEXT_PUBLIC_APP_URL=https://your-agent-domain.com
NEXT_PUBLIC_SERVER_URL=https://your-elizaos-server.com
NEXT_PUBLIC_AGENT_ID=your-production-agent-id
NEXT_TELEMETRY_DISABLED=true
NEXT_PUBLIC_NODE_ENV="production"- Push your customized code to GitHub
- Connect to Vercel
- Set environment variables in Vercel dashboard
- Deploy
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ElizaOS - The agent framework this integrates with
- Next.js - React framework
- Socket.IO - Real-time communication
- Tailwind CSS - Styling framework
- ElevenLabs - Speech-to-text functionality
Built with β€οΈ for the BioAgents community