A real-time simulation environment for AI agents with interactive visualization. This project provides a web interface to observe and control multiple AI agents interacting in various environments.
-
Real-time Simulation:
- Start, pause, and step-by-step simulation control
- Multiple environment support (House, Office, Park)
- Agent state tracking and visualization
- Event timeline and story generation
-
Web Interface:
- Interactive control panel
- Real-time state updates
- Multiple views (Timeline, Story, Environment)
- Agent status monitoring
- Install dependencies:
# Backend
cd backend
uv pip install -r requirements.txt
# Frontend
cd frontend
npm install- Start the servers:
# Backend (in backend directory)
python run.py
# Frontend (in frontend directory)
npm run dev- Open http://localhost:3000 in your browser
-
Select Environment:
- Choose from available environments (House, Office, Park)
- Each environment has unique objects and interaction possibilities
-
Control Simulation:
- Start/Pause: Control simulation flow
- Step: Advance simulation by specified steps
- Monitor events in Timeline view
-
Monitor Agents:
- View agent locations and status
- Track interactions between agents
- Follow generated story narrative
-
frontend/- Next.js web interfaceapp/- Next.js app router componentscomponents/- React componentslib/- Utility functions and API client
-
backend/- FastAPI serverapp/- FastAPI applicationmain.py- Server endpointsmodels.py- Data models
requirements.txt- Python dependencies
- Chronological list of events
- Agent actions and interactions
- System events and state changes
- Narrative description of simulation
- Agent interactions in natural language
- Environmental context and atmosphere
- Current simulation state
- Agent locations and status
- Object locations and properties
- Frontend: Next.js, TypeScript, Tailwind CSS
- Backend: FastAPI, Python
- Communication: REST API with real-time polling
- State Management: Server-side simulation state
- Adding New Environments:
# backend/app/main.py
ENVIRONMENTS = [
Environment(id="new_env", name="New Environment"),
# Add more environments
]- Customizing Agents:
# backend/app/main.py
AGENTS = [
Agent(id="1", name="CustomAgent", location="Room", status="Active"),
# Add more agents
]Contributions welcome! Please feel free to submit a Pull Request.
MIT License - See LICENSE file for details