CoolFace
Apppublic

UtkarshTheAIMaster/openenv-ticket-routing-ai

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

title: OpenEnv Ticket Routing AI emoji: ๐Ÿš€ colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 pinned: false


๐Ÿš€ Ticket Routing Environment (OpenEnv)

๐Ÿ“Œ 1. Overview

This project implements a real-world AI environment where an agent performs customer support ticket triaging and resolution.

The agent must:

  • โ€”Understand user complaints
  • โ€”Classify tickets into categories
  • โ€”Assign priority levels
  • โ€”Generate a response
  • โ€”Decide whether escalation is required

This environment follows the OpenEnv specification and is designed for training and evaluating intelligent agents (LLMs/RL agents).


๐ŸŽฏ 2. Motivation

Customer support automation is a real-world high-impact problem. This environment simulates realistic workflows used in:

  • โ€”SaaS companies
  • โ€”E-commerce platforms
  • โ€”Tech support systems

It helps evaluate how well an AI agent can make multi-step decisions under constraints.


๐Ÿง  3. Environment Design

๐Ÿ”น Action Space

FieldTypeDescription
categorystrbilling / tech / complaint
prioritystrlow / medium / high
responsestrtext reply to the user
escalateboolwhether to escalate issue

๐Ÿ”น Observation Space

FieldTypeDescription
ticket_idintunique identifier
messagestrcustomer complaint
historystroptional conversation

๐Ÿ”น Reward Function

  • โ€”Range: 0.0 โ†’ 1.0
  • โ€”Partial rewards for:
  • โ€”Correct category
  • โ€”Correct priority
  • โ€”Correct escalation decision
  • โ€”Meaningful response
  • โ€”Penalizes incorrect or poor actions

๐Ÿงช 4. Tasks (Difficulty Progression)

TaskDifficultyDescription
1EasyBilling issue (double charge)
2MediumTechnical issue (app crash)
3HardEmotional complaint with repeated failure

โœ” Tasks increase in complexity and require better reasoning.


โš™๏ธ 5. API Endpoints

EndpointMethodDescription
/resetGETStart a new task
/stepPOSTTake an action
/stateGETGet current state
/baselineGETRun baseline agent
/tasksGETList all tasks
/graderGETShow expected output
/healthGETServer status check

๐Ÿ–ฅ๏ธ 6. How to Run (Local Setup)

Step 1: Clone Repository

bash
git clone <your-repo-link>
cd ticket-routing-env

Step 2: Install Dependencies

bash
pip install fastapi uvicorn pydantic requests

Step 3: Start Server

bash
uvicorn my_env.server.my_env_environment:app --reload

Step 4: Open in Browser

http://127.0.0.1:8000/docs

๐Ÿ‘‰ Use Swagger UI to test endpoints interactively.