from openenv.core.env_server import create_fastapi_app from models import SupportAction, SupportObservation from server.environment import SupportEnvironment from fastapi.responses import HTMLResponse import uvicorn dashboard_content = r""" Support Ticket Routing | OpenEnv Dashboard
API Status: Active & Online

Customer Support Ticket Routing

Scaler Meta PyTorch Hackathon Submission

๐ŸŽฏ Environment Architecture

A specialized Reinforcement Learning environment designed to measure LLM agent accuracy in organizational triage. This environment facilitates high-precision routing of complex support tickets.

Action Space:
  • route: Direct ticket to a department.
  • search: Query internal knowledge base.
Departments:
  • Billing: Invoices & Payments
  • Tech: Debugging & API Errors
  • Sales: Enterprise Pricing

๐Ÿงช Technical Specs (For Judges)

Integration with this environment is standard via openenv-core. The following endpoint structure is exposed:

  • WebSocket: /ws (Main interaction loop)
  • State: /state (Retrieve SupportState)
  • Reset: /reset (Initialize task)
# Connect using Python SDK
client = SupportEnvClient(base_url='YOUR_SPACE_URL').sync()
obs = client.reset(task_name='hard')
result = client.step(SupportAction(action_type='route', department='Tech'))

๐Ÿ† Difficulty & Rewards

Tasks are weighted by the complexity of ticket content and required lookups.

  • Easy: High confidence keywords (1 ticket).
  • Medium: Conversational support language (2 tickets).
  • Hard: Raw API logs and technical stack traces (3 tickets).

Reward Signaling: This environment utilizes a [0.01, 0.99] bounded reward system to provide a clean signal for RL training while maintaining strict judge-compliant bounds.

""" app = create_fastapi_app(SupportEnvironment, SupportAction, SupportObservation) @app.get('/', response_class=HTMLResponse) @app.get('/web', response_class=HTMLResponse) async def root(): return dashboard_content def main(): uvicorn.run(app, host='0.0.0.0', port=8000) if __name__ == '__main__': main()