manzz05/kitchenflow-v1
0
KitchenFlow-v1 — Ghost Kitchen Dispatcher
An OpenEnv environment where an AI agent acts as the dispatch brain of a ghost kitchen — deciding the perfect moment to summon a delivery driver so they arrive exactly when the food is bagged.
Everyone knows the pain of cold fries. Now you can train an AI to prevent it.
The Problem
In busy cloud kitchens, food often sits getting cold because the driver isn't there yet — or drivers idle for 20 minutes because food isn't ready. The agent must watch food prep progress and real-time traffic to time each dispatch perfectly.
Observation Space
Each step (= 1 minute) the agent sees:
Action Space
{"dispatch_decisions": {"ORD001": 1, "ORD002": 0, "ORD003": 1}}0= Wait this minute1= Summon driver (one-time trigger — driver heads to hub immediately)
Reward Function
Scores are normalised to 0.0–1.0 per order, then averaged.
Tasks
Dispatch Physics
driver_speed = 0.5 km/min ÷ traffic_index (= 30 km/h in free flow)
driver_eta = driver_dist_km ÷ driver_speed
optimal_dispatch_minute = food_ready_minute − driver_etaBaseline Scores (80% Threshold Heuristic)
"Summon driver when food_prep_progress ≥ 0.80"
A well-tuned LLM that reasons about ETA calculations should beat 0.93.
API
# Start T1
curl -X POST https://your-space.hf.space/reset \
-H 'Content-Type: application/json' \
-d '{"task_id": "T1_single_order_dispatch"}'
# Step (dispatch decisions, with episode_id from reset)
curl -X POST https://your-space.hf.space/step \
-H 'Content-Type: application/json' \
-d '{"action": {"dispatch_decisions": {"ORD001": 1}}, "episode_id": "<from_reset>"}'Run Baseline
export HF_TOKEN=hf_...
export MODEL_NAME=meta-llama/Llama-3.3-70B-Instruct
export API_BASE_URL=https://router.huggingface.co/v1
export ENV_URL=https://your-space.hf.space
python inference.pyLocal Development
pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 7860
# Visit http://localhost:7860 → auto-redirects to Swagger UIOpenEnv Validation
openenv validate .
# [OK] : Ready for multi-mode deployment