A full-stack Next.js application that enables multiple AI agents from different providers (Ollama, OpenAI, Google Gemini) to connect, collaborate, and communicate in real-time.
- Landing Page - Hero section with animated agent network visualization
- Dashboard - Real-time monitoring of agent network topology, metrics, and activity
- Meeting Room - Interactive chat interface where multiple AI agents can converse
- Agent Management - Create, configure, and manage AI agents from different providers
- Settings - User profile, notifications, security, and API key management
- Multi-Provider Support - Integrate Ollama (local), OpenAI, and Google Gemini
- Real-time Communication - WebSocket server for live agent responses
- Database Persistence - SQLite with Prisma ORM (upgradeable to PostgreSQL)
- Streaming Responses - Real-time token streaming from AI providers
- RESTful API - Full CRUD operations for agents and conversations
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS 4 + shadcn/ui
- Animations: Framer Motion
- Icons: Lucide React
- TypeScript: Full type safety
- Runtime: Node.js with custom Next.js server
- Database: Prisma ORM + SQLite (dev) / PostgreSQL (prod)
- WebSocket: ws library for real-time communication
- AI Providers:
- Ollama (local OSS models)
- OpenAI SDK (GPT-4, GPT-3.5)
- Google Generative AI SDK (Gemini Pro)
- Node.js 18+
- npm or yarn
# Navigate to the project
cd my-app
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys (optional - Ollama works without keys)
# Initialize database
DATABASE_URL="file:./dev.db" npx prisma migrate dev
DATABASE_URL="file:./dev.db" npx prisma db seed
# Run development server
DATABASE_URL="file:./dev.db" npm run devOpen http://localhost:3001 to view the site.
Note: The server now runs on port 3001 with WebSocket support.
npm run build
DATABASE_URL="your-production-db" npm startProduction Tip: Use PostgreSQL for production deployments.
my-app/
βββ app/ # Next.js app directory
β βββ api/ # API routes (NEW!)
β β βββ agents/ # Agent CRUD endpoints
β β βββ invoke/ # Agent invocation endpoint
β βββ page.tsx # Landing page
β βββ dashboard/ # Dashboard page
β βββ meeting/ # Meeting room page
β βββ agents/ # Agent management page
β βββ settings/ # Settings page
βββ components/ # React components
β βββ ui/ # shadcn/ui components
β βββ agent-network.tsx # Animated network visualization
β βββ agent-topology.tsx # Dashboard topology view
β βββ navigation.tsx # Site navigation
β βββ ...
βββ lib/ # Utility functions
β βββ db/ # Database (NEW!)
β β βββ prisma.ts # Prisma client
β βββ agents/ # Agent providers (NEW!)
β βββ types.ts # TypeScript interfaces
β βββ provider-factory.ts
β βββ providers/
β βββ ollama.ts # Ollama integration
β βββ openai.ts # OpenAI integration
β βββ gemini.ts # Gemini integration
βββ prisma/ # Database (NEW!)
β βββ schema.prisma # Database schema
β βββ seed.ts # Database seeding
βββ server.ts # Custom Next.js + WebSocket server (NEW!)
βββ .env.local # Environment variables (create this)
βββ public/ # Static assets
See BACKEND_README.md for comprehensive backend documentation including:
- AI provider setup (Ollama, OpenAI, Gemini)
- API endpoint reference
- WebSocket event documentation
- Database schema details
- Production deployment guide
# Test agents endpoint
curl http://localhost:3001/api/agents
# Test agent invocation (requires Ollama running)
curl -X POST http://localhost:3001/api/invoke \
-H "Content-Type: application/json" \
-d '{"agentId": "YOUR_AGENT_ID", "message": "Hello!"}'- Interactive SVG-based network diagram
- Animated data packets flowing between nodes
- Real-time status indicators
- Hover tooltips with agent details
- Multi-agent chat interface with real AI responses π€
- WebSocket-based real-time communication
- Streaming responses from AI providers
- Message types: regular messages, thoughts, actions
- Participant management sidebar with live agent status
- Live metrics cards with animated numbers
- Network topology visualization
- System health monitoring
- Recent activity feed
- Agent status list
- Grid and list view modes
- Filter by provider (Ollama, OpenAI, Google Gemini)
- Create new agents via UI or API
- Live database-backed agent persistence
- Status management and configuration
The project uses CSS variables for theming. Edit app/globals.css to customize colors.
Create agents via:
- UI: Use the Agent Management page
- API: POST to
/api/agents - Database: Add directly via Prisma Studio (
npx prisma studio) - Seed: Modify
prisma/seed.ts
- Create a new provider class in
lib/agents/providers/ - Implement the
AgentProviderinterface - Update
provider-factory.tsto include the new provider
MIT License - feel free to use this for your own projects!