neerxj10/support-inbox-ops
Support Inbox Ops
Support Inbox Ops is a real-world OpenEnv environment that simulates customer support triage work. The agent operates an inbox containing billing issues, incidents, security reports, legal requests, and routine customer messages. This is the kind of workflow support teams, trust and safety analysts, and technical operations staff actually perform every day, which makes it useful for training and evaluating agents on practical coordination, prioritization, and policy-sensitive decision making.
Why this environment
Most agent benchmarks over-focus on coding, web navigation, or toy planning tasks. This environment targets a different but common operational problem: reading a queue, routing work correctly, choosing when to escalate, and avoiding unsafe closure of sensitive tickets. It rewards partial progress over the full trajectory instead of only final success, so it can train both reactive and deliberative agents.
Domain
The simulator models a B2B SaaS support operation with realistic inbox tickets:
- Authentication and password reset issues
- Billing disputes
- Product bugs requiring engineering escalation
- Production incidents
- Security and account takeover reports
- Legal and compliance data requests
- VIP product feedback
OpenEnv API
The environment implements the standard reset(), step(), and state() workflow through both Python and HTTP.
POST /resetreturns an initial typedObservationPOST /stepaccepts a typedAgentActionand returnsobservation,reward,done, andinfoGET /statereturns the full current typed environment stateGET /taskslists tasks and the action schemaGET /graderreturns the deterministic grader score for the current episodeGET /healthzexposes a simple health check for deployment probesPOST /baselineruns the OpenAI baseline over all tasks
The metadata lives in openenv.yaml.
Observation Space
Each observation includes:
task_id,task_title, and task instructionsstep_countandmax_steps- Full visible ticket objects for the current queue
allowed_actionsprogress_scorein[0.0, 1.0]recent_events
Each ticket includes:
- Customer metadata:
customer_name,customer_tier - Ticket content:
subject,message - Current routing fields:
priority,queue,status - Signals and history:
sentiment,tags,internal_notes,responses_sent,escalation_target,resolution_code
Action Space
The action schema is defined by the typed AgentAction Pydantic model in models.py.
Supported action_type values:
classify_ticketrespond_ticketescalate_ticketresolve_ticketfinish
Common fields:
ticket_idpriorityqueuesentimentresponse_templateresponse_textescalate_toreasonresolution_code
Tasks
Three tasks are included with deterministic graders and increasing difficulty:
easy_password_resetA single VIP password reset request. The agent must triage correctly, send the right template, resolve safely, and finish.medium_billing_bug_mixA mixed queue with a duplicate charge dispute, an engineering bug, and a shipment delay complaint. The agent must selectively resolve or escalate.hard_incident_security_queueA step-constrained queue that includes an outage, account takeover alert, legal data export request, and a VIP feature request. The agent must prioritize sensitive issues, route to the right specialists, and avoid unsafe closures.
Reward Function
Rewards are dense and meaningful over the full episode:
- Positive reward for correct classification, escalation, response selection, and safe resolution
- Negative reward for invalid actions, unsafe closure of specialist tickets, repeated low-value work, and spending too many steps
- Progress shaping from rubric improvement after every action
- Finish bonus for ending only after strong progress
This design gives partial credit for useful intermediate work instead of using a single binary terminal reward.
Graders
Each task has a deterministic grader that returns a score in [0.0, 1.0]. The grader checks:
- Final priority assignment
- Final queue assignment
- Required customer response template
- Correct escalation target when needed
- Correct resolution code when needed
- Final ticket status
- Light efficiency signal
Implementation: graders.py
Setup
Local Python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.server:app --reloadDocker
docker build -t support-inbox-ops .
docker run --rm -p 7860:7860 support-inbox-opsHugging Face Spaces
Create a Docker Space, add this repository, and tag it with openenv. The included Dockerfile starts the FastAPI app on port 7860, which is the standard port for HF Spaces. The YAML frontmatter at the top of this README is compatible with Hugging Face Spaces metadata.
Usage
Reset to a task:
curl -X POST http://localhost:7860/reset \
-H "Content-Type: application/json" \
-d '{"task_id":"medium_billing_bug_mix"}'Take a step:
curl -X POST http://localhost:7860/step \
-H "Content-Type: application/json" \
-d '{
"action_type":"classify_ticket",
"ticket_id":"T-210",
"priority":"high",
"queue":"billing"
}'Inspect grader output:
curl http://localhost:7860/graderList tasks and schema:
curl http://localhost:7860/tasksBaseline Inference
The baseline uses the OpenAI API client and reads credentials from OPENAI_API_KEY.
export OPENAI_API_KEY=your_key_here
python -m app.baseline --model gpt-4.1-miniThe /baseline endpoint triggers the same logic:
curl -X POST "http://localhost:7860/baseline?model=gpt-4.1-mini"Reproducibility
- Tasks are deterministic and have no hidden randomness
- The baseline uses fixed prompts and
temperature=0 - The grader is deterministic
Baseline scores
Recorded baseline on gpt-4.1-mini with temperature=0:
easy_password_reset:0.2000medium_billing_bug_mix:0.5000hard_incident_security_queue:0.3125- Average:
0.3375
These scores are generated by the checked-in baseline script and deterministic task graders. Re-running the same script with the same model should follow the same scoring procedure.
Validation
Recommended checks before submission:
make test
make smoke
python scripts/smoke_test.py
python -m compileall app scriptsIf you have the OpenEnv validator installed in your environment, run:
openenv validateProject Structure
- app/env.py: core environment implementation
- app/models.py: typed OpenEnv models
- app/tasks.py: task definitions and rubrics
- app/graders.py: deterministic scoring
- app/baseline.py: OpenAI baseline runner
- app/server.py: FastAPI endpoints
- scripts/smoke_test.py: local smoke test
- Makefile: common local commands
