Skip to content

TheCanCell/Room-CanCell

Repository files navigation

Hackaton-All Stack

Room demo GIF (click to open MP4)

Three small apps run together to demo the AI room orchestration loop:

  • Agents (Flask) — decides light/music plans from vitals, can push updates to the room API.
  • Room-Simulator (Express/Three.js) — renders the room UI + REST API, proxies vitals to the agents.
  • FitBit-Simulator (Node static) — slider UI that streams vitals to the room API.

Run locally (default)

  1. Copy .env.example to .env if you want to change ports/URLs.
  2. ./run_all.sh (needs Python 3.11+ and Node 18+). The script creates a Python venv, installs deps, and starts all three services:
    • Agents at http://localhost:${AGENTS_PORT:-8080}
    • Room at http://localhost:${ROOM_PORT:-8787}
    • FitBit UI at http://localhost:${FITBIT_PORT:-3000}

Run with Docker

cp .env.example .env   # optional tweaks
MODE=compose ./run_all.sh
# or: docker compose up --build

The compose file wires URLs automatically (roomagents; fitbit default targets http://localhost:8787).

Data flow

FitBit ➜ POST /api/vitals on the room ➜ room normalizes & calls ORCHESTRATOR_URL ➜ agents return light/music plan ➜ room applies it. Agents can also push vitals/light/music back to the room via ROOM_API_BASE when ROOM_API_ENABLED=1.

Repo map

  • Agents/ — Flask API, orchestration logic (app.py, agents/, utils/).
  • Room-Simulator/ — Express API + Three.js UI (server.js, index.html).
  • FitBit-Simulator/ — Vitals slider UI (server.js, public/).
  • run_all.sh — unified local runner (also supports MODE=compose).
  • .env.example — shared config surface; copy to .env to override.
  • docker-compose.yml — containerized stack.
  • Vertex AI is optional; run_all.sh and .env.example default VERTEX_ENABLED=0 to avoid GCP setup. Set your GCP_PROJECT_ID, GCP_LOCATION, and credentials + flip VERTEX_ENABLED=1 to use Gemini.
  • Agents no longer push light/music to the room by default (ROOM_API_ENABLED=0); the room applies interventions itself when it calls the orchestrator. Turn it on only if you need agents to drive a remote room API directly.

Key environment knobs

  • Ports: AGENTS_PORT, ROOM_PORT, FITBIT_PORT
  • URLs: ORCHESTRATOR_URL (room ➜ agents), ROOM_API_BASE (agents ➜ room), ROOM_BASE_URL (FitBit ➜ room)
  • Flags: ORCHESTRATE_ON_VITALS (room auto-calls agents), ROOM_API_ENABLED (agents push to room), MANUAL_HOLD_MS (room manual override hold), DEFAULT_PATIENT_AGE_YEARS

About

A simulated 3D hospital room controlled by AI via sythetic watch data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors