Real-time hotel operations forecasting using AI agent and WebSocket communication.
-
Set your Anthropic API key in
.env
file:ANTHROPIC_API_KEY=your-key-here
-
Run the application:
docker-compose up --build
-
Open browser:
- Frontend: http://localhost:3567
-
Try these commands:
- "Big UFC fight this Saturday"
- "Convention next Monday morning"
- "Pool party season starting"
AgentForecast-Hotel/
│ .env # Your Anthropic API key
│ .gitignore
│ LICENSE
│ README.md # This file
│ docker-compose.yml # Runs everything
│
├───backend/
│ agent.py # Anthropic AI agent (ForecastAgent)
│ data.py # Data generation utilities
│ Dockerfile # Backend container
│ main.py # WebSocket server (glue code)
│ model.py # RNN forecast model (ForecastModel)
│ requirements.txt # Python dependencies
│
└───frontend/
app.jsx # React application
Dockerfile # Frontend container
index.html # Main HTML
styles.css # Styling
- RNN Model generates a 7-day hourly forecast at startup
- WebSocket connects frontend to backend in real-time
- AI Agent interprets natural language and modifies forecast
- Live Updates broadcast changes to all connected clients
- Backend: Python WebSocket server on port 8567
- Frontend: React app served by nginx on port 3567
- AI: Anthropic Claude for natural language understanding
- State: Single shared forecast modified by agent
- Connection failed? Check if Docker is running
- Port conflict? Change ports in docker-compose.yml
- API key error? Verify .env file has correct key
- Import errors? All backend files should be in flat structure
MIT