Spaces:
Configuration error
Office Workflow OpenEnv Environment
office_workflow_env simulates three realistic office tasks humans do and exposes them via OpenEnv’s standard reset() / step() / state() API.
It supports deterministic grading (0.0–1.0) for:
email_triage(easy)data_cleaning(medium)support_escalation(hard)
At the end of each episode, the environment writes the final task score to observation.info.final_score and the structured breakdown to observation.info.final_breakdown.
Task / Episode API
Reset
Call reset(task_id=..., seed=..., episode_id=...).
task_id: one ofemail_triage,data_cleaning,support_escalationseed: integer seed for deterministic shuffling
Step
Call step(action) where action is an OfficeAction.
The server returns:
observation: anOfficeObservationreward: scalar float (shaped with partial progress)done: boolean when the task is finished ormax_stepsis reached
The info field is carried inside observation.info.
State
Call state() to retrieve OfficeState (progress + action trace; no hidden ground truth answers).
Action Space (OfficeAction)
Single action schema for all tasks, discriminated by type:
type="triage_email"email_id: stringcategory: one ofbilling,technical,spam,otherpriority: int in[0, 5]
type="correct_cell"row_id: stringcolumn: one ofemail,phone,datevalue: proposed cleaned value
type="support_decision"ticket_id: stringintent: one ofask_for_information,resolve,escalatereply: draft reply text- plus intent-specific fields:
requested_info(whenask_for_information)resolution_steps(whenresolve)escalation_reason(whenescalate)
Optional helper actions:
type="request_status"type="noop"
Observation Space (OfficeObservation)
Common fields:
task_id,status,max_steps,step_index
Task-specific fields:
email_triage:emails,triageddata_cleaning:dataset,cleaned_cellssupport_escalation:tickets,handled_tickets
Grader-facing info:
info.objective,info.completion_rule(task instructions)info.reward_breakdown(per-step reward component breakdown)- final episode results in
info.final_scoreandinfo.final_breakdown
Reward Shaping (partial progress)
Rewards are not binary: they increase as the agent makes correct partial progress.
All tasks:
- progress component grows with corrected/handled items
- correctness component rewards correct submissions
- stalling/wrong actions are penalized by driving reward toward
0.0
Local Setup
Step-by-step (Windows / PowerShell)
- Open a terminal in
c:\Users\hp\Desktop\hackathon - Install dependencies:
python -m pip install -U pip
python -m pip install "openenv-core[core]>=0.2.1" openai requests uvicorn
- Validate OpenEnv structure:
openenv validate
- Start the server:
uvicorn server.app:app --host 0.0.0.0 --port 8000
Confirm it responds:
http://localhost:8000/healthhttp://localhost:8000/docs
Run the connectivity smoke test (expected score 0.0 because it sends only
noop):
python scripts/smoke_test.py
- Run a “real” local demo baseline (no OpenAI key required; rule-based):
python scripts/baseline_inference.py
Baseline Inference (OpenAI)
The baseline script runs a model against all 3 tasks and prints reproducible scores.
Environment variables:
OPENAI_API_KEYOPENAI_MODEL(optional, defaultgpt-4o-mini)OPENENV_BASE_URL(optional, defaulthttp://localhost:8000)BASELINE_SEED(optional, default123)
Run:
python scripts/baseline_inference.py
Hugging Face Spaces Deployment
This repo includes a server/Dockerfile suitable for Hugging Face Spaces.
When you’re ready to deploy:
openenv validate
openenv push --repo-id YOUR_HF_USERNAME/office-workflow-env
openenv push will package the environment and build the Docker image for Spaces.
After it deploys, validate the running Space:
openenv validate https://YOUR_HF_USERNAME-office-workflow-env.hf.space