--- title: OpenEnv Jayesh — Task Manager emoji: ✅ colorFrom: blue colorTo: green sdk: docker pinned: false app_port: 8000 tags: - openenv - task-manager base_path: /web --- # OpenEnv Task Manager Environment A real-world task management environment designed specifically for AI agent integration. This environment simulates a standard productivity hub where an agent must handle, prioritize, and complete objectives. It extensively tests an agent's capability to read system conditions, allocate correct arguments (like priority labels), and meet strict objective tracking mechanics. --- ## Difficulty Levels & Goals The environment handles progressive complexity by automatically cycling through three difficulty tiers each time `.reset()` is called. | Level | Scenario Goal Constraints | |--------|---------------------------| | **Easy** | Add exactly `2` tasks and successfully `list` them. | | **Medium** | Add `3` tasks (with mixed priorities), successfully assign at least `1` as `High` priority, and `complete` all `High` priority tasks. | | **Hard** | Add `4` tasks, ensure at least `2` are marked as `High` priority, and systematically `complete` at least `2` `High` priority tasks. | ## Action Space Agents securely interact using a strictly-typed Pydantic Action model. *(Note: Visual labels like 'add High' in the test script are just local print statements. The AI itself literally only passes the canonical fields below).* | Field | Type | Description | |-------|------|-------------| | `command` | `str` | The canonical action to execute: `"add"`, `"complete"`, or `"list"`. (Required) | | `title` | `str` | Name of the task to interact with. (Required for `"add"` / `"complete"`) | | `priority`| `str` | Task priority tier: `"Low"`, `"Normal"`, or `"High"`. (Optional for `"add"`, defaults to `"Normal"`) | | `deadline`| `str` | Task deadline stamp. (Optional for `"add"`) | **Example Action passed internally:** `TaskManagerAction(command="add", title="Bug Fix", priority="High")` ## Observation Space At each step, the model returns a dense, typed structure containing: | Field | Type | Description | |-------|------|-------------| | `success` | `bool` | Evaluation of whether the command formatted correctly. | | `message` | `str` | Internal readout explaining results or providing error insight. | | `tasks` | `List` | A compiled history of all local task blocks and their `completed` Booleans. | | `reward` | `float` | Cumulative partial progress score bounded gracefully between `0.0` and `1.0`. | | `done` | `bool` | Triggers internally to `True` when the difficulty constraints are solidly accomplished. | ## Reward Function & Partial Progress A core element of this Task Manager is the incredibly smooth, meaningful calculation of partial reward signals mapping exactly mapping up to a maximum threshold of `1.0`! * **Easy:** * Adding the 1st standard task: `+0.4` * Adding the 2nd standard task: `+0.4` * Submitting the `"list"` command: `+0.2` (Total `1.0`) * **Medium:** * Adding ordinary tasks sequentially stack: `+0.2` each. * Identifying priority constraints by intentionally adding a `"High"` priority task: extracts a `+0.1` logic bonus. * Fulfilling completion constraints (`"complete"` on High-priority targets): bridges the final `+0.3` to reach `1.0`. * **Hard:** * Adding ordinary tasks stack minimally: `+0.1` each. * Systematically adding the required `"High"` priority tasks correctly stack a `+0.1` logic bonus each. * Selectively completing the explicit `"High"` targets (ignoring low priorities) pulls powerful `+0.2` boosts each, landing mathematically at exactly `1.0`. --- ## Setup & Local Usage ```bash # 1. Install dependencies using uv uv sync # 2. Run the Environment Server uvicorn server.app:app # 3. Test the built-in scenario cycles in a new terminal uv run python inference.py ``` ### Scripted Example (`inference.py`) ```python from client import OpenenvJayeshEnv from models import TaskManagerAction # Connect to standard OpenEnv HTTP backend with Sync wrapper with OpenenvJayeshEnv(base_url="http://127.0.0.1:8000").sync() as client: res = client.reset() print(res.observation.message) # 1. Provide task with Priority parameters res = client.step(TaskManagerAction(command="add", title="Bugfix", priority="High")) print(f"Added Task | Reward Signal: {res.reward}") # 2. Complete the targeted subset res = client.step(TaskManagerAction(command="complete", title="Bugfix")) print(f"Goal Reached | Reward Signal: {res.reward} | Done: {res.done}") ``` ## Production Deployment to Hugging Face Spaces This application meets all structural limits and is fully deployable onto HF architectures. Directly push the folder by running: ```bash openenv push --repo-id jayeshpandey01/task-manager-openenv ``` # openenv_jayesh