# MediRoute OpenEnv configuration # Compatible with the OpenEnv specification env_id: mediroute-openenv-v1 version: "1.0.0" name: "MediRoute OpenEnv" description: > A medical triage and hospital routing simulation environment where an AI agent analyses patient symptoms and lab results, determines severity, recommends the correct specialist, selects the best nearby hospital, books appointments, and escalates emergencies with ambulance dispatch. author: "MediRoute Team" license: MIT # ── Environment entry-point ──────────────────────────────────────────────── entrypoint: module: environment class: MediRouteEnv # ── Task definitions ─────────────────────────────────────────────────────── tasks: - id: easy difficulty: easy description: "Mild illness — fever and sore throat. Classify low severity, recommend GP, book appointment." max_steps: 6 passing_score: 0.5 - id: medium difficulty: medium description: "Cardiology case — chest pain, high BP, ECG abnormality. Recommend cardiologist, select cardiac hospital." max_steps: 8 passing_score: 0.6 - id: hard difficulty: hard description: "Life-threatening emergency — severe chest pain, SpO₂ crash, unresponsive. Dispatch ambulance immediately." max_steps: 6 passing_score: 0.5 # ── Action space ─────────────────────────────────────────────────────────── action_space: type: discrete actions: - analyze_symptoms - request_more_info - recommend_specialist - select_hospital - book_appointment - call_ambulance - provide_temp_guidance # ── Observation space ────────────────────────────────────────────────────── observation_space: symptoms: type: string description: "Free-text patient complaints" lab_report_summary: type: object description: "Key lab / vital results" severity_score: type: float range: [0.0, 1.0] description: "Numeric severity score" location: type: string description: "Patient geographic area" nearby_hospitals: type: list[string] description: "Candidate hospitals sorted by proximity/quality" available_specialists: type: list[string] description: "On-call specialists" previous_actions: type: list[string] description: "Action history for this episode" # ── Reward structure ─────────────────────────────────────────────────────── reward: range: [0.0, 1.0] components: correct_severity_classification: +0.30 correct_specialist_recommendation: +0.30 correct_hospital_selection: +0.20 successful_appointment_booking: +0.20 correct_emergency_escalation: +0.50 wrong_department: -0.20 duplicate_action: -0.30 unnecessary_ambulance: -0.30 ambulance_missed_in_emergency: -0.30 # ── Inference configuration ──────────────────────────────────────────────── inference: script: inference.py env_vars: - OPENAI_API_KEY - API_BASE_URL - MODEL_NAME - HF_TOKEN max_runtime_minutes: 20 supports_hf_spaces: true # ── Runtime constraints ──────────────────────────────────────────────────── runtime: cpu_only: true max_ram_gb: 8 max_vcpu: 2