How chinanagooo/kallangflow works
KallangFlow combines an in-memory synthetic event crowd simulator, personalised journey recommendations, and a browser map/control interface; it also includes a scripted crowd-scale demo and shared attendee-profile persistence. The main web flow runs from attendee preferences and simulation controls through Flask, which supplies world/profile context to the agent and returns a route recommendation for display. The agent’s monitor–predict–recommend–act–adapt loop and the documented map, accessibility, and simulated-clock features are represented. Some Flask calls and frontend implementation details are omitted from excerpts, so those links rely on the README or SOURCE INDEX evidence.
Main entry points: app.py Flask API · agent.py Monitor conditions · index.html Web interface · demo.py Scripted demo
Components 18
Web experience
- Web interface
templates/index.html - Flask API
app.py - Journey map
templates/index.html
Crowd simulation
- World models
kallangflow/models.py - Crowd simulator
kallangflow/simulator.py
Journey agent
- Monitor conditions
kallangflow/agent.py - World-query tools
kallangflow/tools.py - Predict changes
kallangflow/agent.py - Personalised plan
kallangflow/agent.py - Guardian update
kallangflow/agent.py - Adapt loop
kallangflow/agent.py - Guardian log
kallangflow/tools.py
Profiles and scale demo
- Attendee profiles
kallangflow/db.py - Scripted demo
kallangflow/demo.py - Population model
kallangflow/population.py
Other components
- Attendee
- OpenStreetMap tiles
- Amazon Bedrock
Connections 28
- Attendee → Web interface: sets preferences
README.md - Web interface → Flask API: sends API requests
README.md - Flask API → Web interface: returns JSON
README.md - Flask API → Web interface: renders page
app.py - Web interface → Journey map: displays route
README.md - Journey map → OpenStreetMap tiles: loads map tiles
README.md - Flask API → Crowd simulator: advances or resets
app.py - Flask API → World models: serializes state
app.py - Crowd simulator → World models: updates state
kallangflow/simulator.py - Flask API → Attendee profiles: loads and saves
app.py - Flask API → Monitor conditions: starts planning
app.py - Monitor conditions → World-query tools: invokes tools
kallangflow/agent.py - World-query tools → Crowd simulator: projects congestion
kallangflow/tools.py - Monitor conditions → Predict changes: passes findings
kallangflow/agent.py - Predict changes → Personalised plan: passes forecast
kallangflow/agent.py - Personalised plan → Guardian update: passes recommendation
kallangflow/agent.py - Guardian update → Adapt loop: records milestone
kallangflow/agent.py - Adapt loop → Monitor conditions: repeats if needed
kallangflow/agent.py - Monitor conditions → Amazon Bedrock: queries model
kallangflow/agent.py - Predict changes → Amazon Bedrock: queries model
kallangflow/agent.py - Personalised plan → Amazon Bedrock: queries model
kallangflow/agent.py - Guardian update → Amazon Bedrock: writes message
kallangflow/agent.py - Guardian update → Guardian log: notifies
kallangflow/agent.py - Scripted demo → Attendee profiles: loads and saves
kallangflow/demo.py - Scripted demo → Crowd simulator: runs scenarios
kallangflow/demo.py - Scripted demo → Population model: generates scale
kallangflow/demo.py - Scripted demo → Monitor conditions: requests plans
kallangflow/demo.py - Population model → World models: weights by congestion
kallangflow/population.py