Adarsh2004/real_world_task_sim
0
Real-World Task Simulation Environment (OpenEnv)
A standardized, containerized environment for evaluating AI agents on real-world tasks. This environment implements the OpenEnv specification and provides three tasks with incremental difficulty.
Tasks & Difficulty
- Email Triage (Easy): Classify a set of emails into categories: Work, Personal, or Spam.
- Data Cleaning (Medium): Clean a CSV file by normalizing date formats, removing duplicates, and handling missing values.
- Code Review (Hard): Identify and fix a common Python bug (mutable default argument) in a code snippet.
Action & Observation Spaces
Action Space (RealWorldTaskAction)
task_id: The ID of the task being addressed.action_type: The operation being performed (e.g., "submit").payload: A dictionary containing task-specific results (e.g.,{ "predictions": { "1": "Work" } }).
Observation Space (RealWorldTaskObservation)
current_task: The ID of the active task.prompt: Instructions for the agent.data: The raw data for the task (JSON list, CSV string, or Python code).done: Boolean indicating if all tasks are complete.reward: Cumulative score (0.0 to 1.0 per task).last_reward: Detailed feedback and score for the previous action.
Reward Function
- Incremental: Agents receive rewards at each step (one step per task).
- Programmatic Graders: Success is measured by deterministic logic (regex for dates, exact match for categories, code analysis for fixes).
- Penalties: Incorrect task IDs or invalid payloads result in zero reward for that step.
Usage
Local Development
- Install dependencies:
pip install openenv-core pandas openai
uv lock- Run the environment:
python -m server.appBaseline Inference
Run the baseline script to evaluate an agent (requires OPENAI_API_KEY or HF_TOKEN):
python inference.pyDeployment
Deploy to Hugging Face Spaces using the OpenEnv CLI:
openenv pushSpecification Compliance
Validated using openenv validate.
- Typed Pydantic models.
- Standard
reset(),step(),state()interface. openenv.yamlmanifest.- Containerized execution via
Dockerfile.
