chore: prepare Round-1 OpenEnv submission (validator, evaluator, tests, CI, docs)
Browse filesFiles changed (16)
- .github/workflows/openenv-validation.yml+40-10
- .gitignore+1-1
- CONTRIBUTING.mdAdded+20
- LICENSEAdded+18
- MANIFEST.inAdded+8
- README.md+29
- env/__init__.pyAdded
- env/environment.pyAdded+110
- env/graders.pyAdded+69
- env/models.pyAdded+37
- env/tasks.pyAdded+66
- evaluate.pyAdded+51
- inference.py+72-24
- server/app.py+26-16
- tests/conftest.pyAdded+7
- tests/test_environment.pyAdded+81
17 unmodified lines181920212223242526272829303132333435363717 unmodified linesuses: actions/setup-python@v4with:python-version: '3.11'- name: Install dependencies and uvrun: |python -m pip install --upgrade pippip install uvpip install openenv-core>=0.2.0- name: Lock dependenciesrun: uv lock- name: Run OpenEnv Validaterun: |openenv validate .- name: Verify Docker Buildsrun: |docker build -t test-openenv .17 unmodified lines181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666717 unmodified linesuses: actions/setup-python@v4with:python-version: '3.11'- name: Install dependenciesrun: |python -m pip install --upgrade pippip install -r requirements.txtpip install -e .- name: Install OpenEnv validatorrun: |python -m pip install --upgrade pippip install openenv-core- name: Run OpenEnv validatorrun: |openenv validate .- name: Run testsrun: |python -m pip install pytestpytest -qlint:runs-on: ubuntu-latestneeds: validatesteps:- name: Checkout Repositoryuses: actions/checkout@v4- name: Set up Pythonuses: actions/setup-python@v4with:python-version: '3.11'- name: Install lint toolsrun: |python -m pip install --upgrade pippip install ruff mypy- name: Run ruffrun: ruff check .- name: Run mypyrun: mypy --ignore-missing-imports . || echo "mypy found issues"- name: Verify Docker Builds (optional)run: |docker build -t test-openenv . || echo "Docker build failed or not available on runner"
1234567# Virtual Environments.venv/venv/env/# Python caching__pycache__/1234567# Virtual Environments.venv/venv/# Note: `env/` is the package source directory for this project and must NOT be ignored# Python caching__pycache__/
1234567891011121314151617181920## Contributing
Run tests:
```bashpython -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpip install -e .pip install pytestpytest -q```
To run the API locally:
```bashuvicorn server.app:app --host 0.0.0.0 --port 7860```
Please open PRs against `main`. Add tests for new behavior and keep changes small and focused.123456789101112131415161718MIT License
Copyright (c) 2026
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.12345678include README.mdinclude PRD.mdinclude openenv.yamlinclude LICENSEinclude CONTRIBUTING.mdrecursive-include env *.pyrecursive-include server *.pyrecursive-include tests *.py38 unmodified lines39404138 unmodified linesexport MODEL_NAME="gpt-4o"python inference.py```38 unmodified lines394041424344454647484950515253545556575859606162636465666768697038 unmodified linesexport MODEL_NAME="gpt-4o"python inference.py```Evaluation harness------------------To reproduce grader outputs for Round 1, run the lightweight evaluator which executes the canonical correct action sequences:```bashsource .venv/bin/activatepip install -r requirements.txtpip install -e .python evaluate.py```Packaging notes---------------This project includes `env/` as the package containing the OpenEnv environment. We include `openenv.yaml` and `PRD.md` in the source distribution to ensure validator and reviewers can find metadata.Developer setup (recommended)-----------------------------For reviewers or contributors, it's helpful to install the package in editable mode so imports resolve and tests run without extra environment variables:```bashpython -m venv .venvsource .venv/bin/activatepip install -r requirements.txtpip install -e .```This ensures `pytest` and local imports work out-of-the-box.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110from typing import Tuple, Dict, Any, Optionalfrom .models import Action, Observation, EnvironmentState, TicketInfo, UserDatafrom .tasks import TASKSfrom .graders import grade
class SupportTicketEnv: def __init__(self, task_id: str = "task_easy_1"): self.task_id = task_id if task_id not in TASKS: raise ValueError(f"Unknown task_id: {task_id}") self.task_data = TASKS[task_id] self.state = None self.max_steps = 10 self.reset() def reset(self) -> Observation: ticket_data = self.task_data["ticket"] self.state = EnvironmentState( current_task_id=self.task_id, step_count=0, ticket=TicketInfo(**ticket_data), action_history=[], is_done=False, final_reward=0.0, task_difficulty=self.task_data["difficulty"] ) return self._get_observation("System initialized. Ticket assigned.") def _get_observation(self, system_message: str, tool_output: Optional[str] = None) -> Observation: return Observation( ticket=self.state.ticket, available_actions=[ "fetch_user_data", "check_policy", "issue_refund", "reply_to_customer", "escalate", "close_ticket" ], system_message=system_message, history=[f"{a.action_type}({a.parameters})" for a in self.state.action_history], tool_output=tool_output, step_count=self.state.step_count ) def step(self, action: Action) -> Tuple[Observation, float, bool, Dict[str, Any]]: if self.state.is_done: return self._get_observation("Episode is over."), 0.0, True, {} self.state.step_count += 1 self.state.action_history.append(action) tool_output = None system_message = f"Action {action.action_type} executed." # Execute action logic if action.action_type == "fetch_user_data": user_id = action.parameters.get("user_id") if user_id == self.state.ticket.user_id: self.state.user_data = UserData(**self.task_data["user_data"]) tool_output = f"User Data: Tier = {self.state.user_data.account_tier}, Joined = {self.state.user_data.join_date}" else: tool_output = "Error: Invalid user_id." system_message = "Failed to fetch user data." elif action.action_type == "check_policy": issue_type = action.parameters.get("issue_type", self.state.ticket.issue_type) policy = self.task_data["policy"].get(issue_type, "No specific policy found.") tool_output = f"Policy for {issue_type}: {policy}" elif action.action_type == "issue_refund": amount = action.parameters.get("amount", "fully") tool_output = f"Refund issued for {amount}." elif action.action_type == "reply_to_customer": msg = action.parameters.get("message", "") tool_output = f"Replied: '{msg}'" elif action.action_type == "escalate": reason = action.parameters.get("reason", "support_tier2") tool_output = f"Escalated to {reason}." self.state.ticket.status = "escalated" self.state.is_done = True elif action.action_type == "close_ticket": res = action.parameters.get("resolution", "") tool_output = f"Ticket closed. Resolution: {res}" self.state.ticket.status = "closed" self.state.is_done = True else: tool_output = "Invalid action." system_message = "Action unrecognized." # Check termination if self.state.step_count >= self.max_steps: self.state.is_done = True system_message = "Max steps reached." # Calculate intermediate/final reward reward = 0.0 if self.state.is_done: reward = grade(self.state) self.state.final_reward = reward info = { "current_reward": reward, "step_count": self.state.step_count } return self._get_observation(system_message, tool_output), reward, self.state.is_done, info
def get_state(self) -> EnvironmentState: return self.state123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869from .models import EnvironmentState
def grade_easy(state: EnvironmentState) -> float: # Requires: check_policy, issue_refund, close_ticket reward = 0.0 actions = [a.action_type for a in state.action_history] if "check_policy" in actions: reward += 0.2 if "issue_refund" in actions: reward += 0.5 if "close_ticket" in actions: reward += 0.3
if "escalate" in actions: reward -= 0.5 # penalty for unnecessary escalation return max(0.0, min(1.0, reward))
def grade_medium(state: EnvironmentState) -> float: # Requires: check_policy, reply_to_customer (explaining policy), close_ticket # NO refund should be issued. reward = 0.0 actions = [a.action_type for a in state.action_history] if "check_policy" in actions: reward += 0.3 if "reply_to_customer" in actions: reward += 0.4 if "close_ticket" in actions: reward += 0.3 if "issue_refund" in actions: # fatal mistake return 0.0 return max(0.0, min(1.0, reward))
def grade_hard(state: EnvironmentState) -> float: # Requires: fetch_user_data, escalate to "billing_tier2", reply_to_customer reward = 0.0 actions = [a.action_type for a in state.action_history] if "fetch_user_data" in actions: reward += 0.2 escalated = False for a in state.action_history: if a.action_type == "escalate" and a.parameters.get("reason") == "billing_tier2": escalated = True if escalated: reward += 0.5 if "reply_to_customer" in actions: reward += 0.3 if "issue_refund" in actions: reward -= 0.5 # can't refund enterprise double charges directly if "close_ticket" in actions: reward -= 0.3 # can't close without resolving escalate return max(0.0, min(1.0, reward))
def grade(state: EnvironmentState) -> float: if state.task_difficulty == "easy": return grade_easy(state) elif state.task_difficulty == "medium": return grade_medium(state) elif state.task_difficulty == "hard": return grade_hard(state) return 0.012345678910111213141516171819202122232425262728293031323334353637from pydantic import BaseModel, Fieldfrom typing import List, Optional, Literal, Dict, Any
class TicketInfo(BaseModel): ticket_id: str user_id: str issue_type: str subject: str body: str status: str
class UserData(BaseModel): user_id: str account_tier: str join_date: str
class Action(BaseModel): action_type: Literal["fetch_user_data", "check_policy", "issue_refund", "reply_to_customer", "escalate", "close_ticket"] parameters: Dict[str, Any] = Field(default_factory=dict)
class Observation(BaseModel): ticket: TicketInfo available_actions: List[str] system_message: str history: List[str] tool_output: Optional[str] = None step_count: int
class EnvironmentState(BaseModel): current_task_id: str step_count: int ticket: TicketInfo user_data: Optional[UserData] = None action_history: List[Action] is_done: bool final_reward: float task_difficulty: str123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566from enum import Enum
class Difficulty(Enum): EASY = "easy" MEDIUM = "medium" HARD = "hard"
TASKS = { "task_easy_1": { "difficulty": Difficulty.EASY.value, "ticket": { "ticket_id": "TKT-1001", "user_id": "USR-A1", "issue_type": "refund_request", "subject": "Accidental purchase", "body": "I clicked buy by mistake on the Premium plan today. Can I get a refund?", "status": "open" }, "user_data": { "user_id": "USR-A1", "account_tier": "premium", "join_date": "2023-01-15" }, "policy": { "refund_request": "If requested within 7 days of accidental purchase, issue full refund." } }, "task_medium_1": { "difficulty": Difficulty.MEDIUM.value, "ticket": { "ticket_id": "TKT-2002", "user_id": "USR-B2", "issue_type": "refund_request", "subject": "Refund for last year", "body": "I didn't use my account much last year, please refund the annual fee.", "status": "open" }, "user_data": { "user_id": "USR-B2", "account_tier": "standard", "join_date": "2021-05-20" }, "policy": { "refund_request": "Strictly no refunds for unused time from previous billing cycles. Explain policy and close ticket." } }, "task_hard_1": { "difficulty": Difficulty.HARD.value, "ticket": { "ticket_id": "TKT-3003", "user_id": "USR-C3", "issue_type": "billing_discrepancy", "subject": "Double charged again!", "body": "This is the third month in a row I've been charged twice! Fix this or I'm leaving.", "status": "open" }, "user_data": { "user_id": "USR-C3", "account_tier": "enterprise", "join_date": "2019-11-01" }, "policy": { "billing_discrepancy": "For enterprise clients with recurring double charges, fetch user data, escalate immediately to billing_tier2, and reply to customer apologizing for the delay." } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051"""Small evaluation harness that executes the expected action sequence for each taskand prints a JSON summary of grader scores. Use this to reproduce Round-1 evaluation outputs."""import jsonfrom env.environment import SupportTicketEnvfrom env.models import Action
EXPECTED_ACTIONS = { "task_easy_1": [ Action(action_type="check_policy", parameters={}), Action(action_type="issue_refund", parameters={"amount": "full"}), Action(action_type="close_ticket", parameters={"resolution": "refunded"}), ], "task_medium_1": [ Action(action_type="check_policy", parameters={}), Action(action_type="reply_to_customer", parameters={"message": "Policy explained - no refund"}), Action(action_type="close_ticket", parameters={"resolution": "policy_explained"}), ], "task_hard_1": [ Action(action_type="fetch_user_data", parameters={"user_id": "USR-C3"}), Action(action_type="escalate", parameters={"reason": "billing_tier2"}), Action(action_type="reply_to_customer", parameters={"message": "We're escalating this to billing tier 2 and will follow up."}), ],}
def run_sequence(task_id: str, actions): env = SupportTicketEnv(task_id=task_id) env.reset() final_reward = 0.0 done = False for a in actions: obs, reward, done, info = env.step(a) final_reward = info.get("current_reward", final_reward) if done: break return final_reward
def main(): results = {} for task_id, actions in EXPECTED_ACTIONS.items(): score = run_sequence(task_id, actions) results[task_id] = {"score": score}
print(json.dumps({"results": results}, indent=2))
if __name__ == "__main__": main()123456789101114 unmodified lines2627282930313233343536373839404142434411 unmodified lines5657585960616263646566676869707172737475import osimport jsonimport asynciofrom typing import List, Optionalfrom openai import OpenAIfrom env.environment import SupportTicketEnvfrom env.models import ActionAPI_BASE_URL = os.getenv("API_BASE_URL", "https://api.openai.com/v1")MODEL_NAME = os.getenv("MODEL_NAME", "gpt-4o-mini")HF_TOKEN = os.getenv("HF_TOKEN")14 unmodified linesprint(f"[END] success={success} steps={steps} score={score} rewards={rewards}", flush=True)def parse_action(text: str) -> Action:try:start_idx = text.find('{')end_idx = text.rfind('}') + 1if start_idx != -1 and end_idx != -1:json_str = text[start_idx:end_idx]data = json.loads(json_str)return Action(action_type=data.get("action_type", "close_ticket"),parameters=data.get("parameters", {}))except Exception:passreturn Action(action_type="close_ticket", parameters={"resolution": "invalid"})def get_model_message(client, step: int, env_state: str, history: List[str]) -> str:system_prompt = (11 unmodified lineshistory_str = "\n".join(history)user_prompt = f"History:\n{history_str}\n\nCurrent Observation:\n{env_state}\n\nWhat is your next action JSON?"try:completion = client.chat.completions.create(model=MODEL_NAME,messages=[{"role": "system", "content": system_prompt},{"role": "user", "content": user_prompt}],temperature=0.1)text = (completion.choices[0].message.content or "").strip()return text if text else "{}"except Exception as exc:print(f"[DEBUG] Model request failed: {exc}", flush=True)return "{}"async def run_task(task_id: str, client: OpenAI) -> None:env = SupportTicketEnv(task_id=task_id)12345678910111213141514 unmodified lines3031323334353637383940414243444546474849505152535455565758596011 unmodified lines72737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123import osimport jsonimport loggingimport asynciofrom typing import List, Optionalfrom openai import OpenAIfrom env.environment import SupportTicketEnvfrom env.models import Actionlogger = logging.getLogger(__name__)logging.basicConfig(level=logging.INFO)API_BASE_URL = os.getenv("API_BASE_URL", "https://api.openai.com/v1")MODEL_NAME = os.getenv("MODEL_NAME", "gpt-4o-mini")HF_TOKEN = os.getenv("HF_TOKEN")14 unmodified linesprint(f"[END] success={success} steps={steps} score={score} rewards={rewards}", flush=True)def parse_action(text: str) -> Action:# Robustly extract the first JSON object from text and validate with Pydantictry:decoder = json.JSONDecoder()idx = 0while True:idx = text.find('{', idx)if idx == -1:breaktry:obj, end = decoder.raw_decode(text, idx)if isinstance(obj, dict):try:return Action.model_validate(obj)except Exception as val_err:logger.warning("Action validation failed: %s", val_err)# fallback to manual constructionreturn Action(action_type=obj.get("action_type", "close_ticket"), parameters=obj.get("parameters", {}))except json.JSONDecodeError:idx += 1continueexcept Exception as exc:logger.exception("Unexpected error while parsing action: %s", exc)# Safe default when parsing/validation failsreturn Action(action_type="close_ticket", parameters={"resolution": "invalid_parse"})def get_model_message(client, step: int, env_state: str, history: List[str]) -> str:system_prompt = (11 unmodified lineshistory_str = "\n".join(history)user_prompt = f"History:\n{history_str}\n\nCurrent Observation:\n{env_state}\n\nWhat is your next action JSON?"import time# retry/backoff parametersmax_retries = 3backoff_base = 0.5try:# Support a few possible client interfaces (chat.completions or responses)for attempt in range(1, max_retries + 1):try:if hasattr(client, "chat") and hasattr(client.chat, "completions"):completion = client.chat.completions.create(model=MODEL_NAME,messages=[{"role": "system", "content": system_prompt},{"role": "user", "content": user_prompt}],temperature=0.1)text = (completion.choices[0].message.content or "").strip()return text if text else "{}"if hasattr(client, "responses") and hasattr(client.responses, "create"):completion = client.responses.create(model=MODEL_NAME, input=user_prompt, temperature=0.1)text = getattr(completion, "output_text", None)if text:return text.strip()out = []for item in getattr(completion, "output", []) or []:for c in item.get("content", []):if c.get("type") == "output_text":out.append(c.get("text", ""))if out:return "".join(out).strip()raise RuntimeError("No supported model client method available")except Exception as exc:logger.warning("Model request attempt %d failed: %s", attempt, exc)if attempt == max_retries:breaksleep_time = backoff_base * (2 ** (attempt - 1))time.sleep(sleep_time)except Exception as exc:logger.exception("Unexpected error in get_model_message: %s", exc)return "{}"async def run_task(task_id: str, client: OpenAI) -> None:env = SupportTicketEnv(task_id=task_id)
1 unmodified line234567891011121314151617181920212223242526272829303132333435362 unmodified lines39404142434445464748491 unmodified linefrom pydantic import BaseModelfrom env.environment import SupportTicketEnvfrom env.models import Actionapp = FastAPI(title="OpenEnv Support Ticket API")CURRENT_ENV_SESSION = Noneclass InitRequest(BaseModel):task_id: str = "task_easy_1"@app.get("/")def read_root():return {"status": "ok", "message": "Support Ticket OpenEnv is live."}@app.post("/reset")def reset_env(req: InitRequest):global CURRENT_ENV_SESSIONtry:CURRENT_ENV_SESSION = SupportTicketEnv(task_id=req.task_id)obs = CURRENT_ENV_SESSION.reset()return {"observation": obs.model_dump()}except ValueError as e:raise HTTPException(status_code=400, detail=str(e))@app.post("/step")def step_env(action: Action):global CURRENT_ENV_SESSIONif not CURRENT_ENV_SESSION:raise HTTPException(status_code=400, detail="Environment not initialized. Call /reset first.")obs, reward, done, info = CURRENT_ENV_SESSION.step(action)return {"observation": obs.model_dump(),"reward": reward,2 unmodified lines}@app.get("/state")def state_env():global CURRENT_ENV_SESSIONif not CURRENT_ENV_SESSION:raise HTTPException(status_code=400, detail="Environment not initialized.")return CURRENT_ENV_SESSION.get_state().model_dump()def main():import uvicorn1 unmodified line23456789101112131415161718192021222324252627282930313233343536373839404142434445462 unmodified lines49505152535455565758591 unmodified linefrom pydantic import BaseModelfrom env.environment import SupportTicketEnvfrom env.models import Actionfrom typing import Dictfrom uuid import uuid4app = FastAPI(title="OpenEnv Support Ticket API")# Store sessions keyed by UUID to allow concurrent sessionsSESSIONS: Dict[str, SupportTicketEnv] = {}class InitRequest(BaseModel):task_id: str = "task_easy_1"class StepRequest(BaseModel):session_id: straction: Action@app.get("/")def read_root():return {"status": "ok", "message": "Support Ticket OpenEnv is live."}@app.post("/reset")def reset_env(req: InitRequest):try:env = SupportTicketEnv(task_id=req.task_id)obs = env.reset()session_id = str(uuid4())SESSIONS[session_id] = envreturn {"session_id": session_id, "observation": obs.model_dump()}except ValueError as e:raise HTTPException(status_code=400, detail=str(e))@app.post("/step")def step_env(req: StepRequest):env = SESSIONS.get(req.session_id)if not env:raise HTTPException(status_code=400, detail="Invalid or expired session_id. Call /reset to create a session.")obs, reward, done, info = env.step(req.action)return {"observation": obs.model_dump(),"reward": reward,2 unmodified lines}@app.get("/state")def state_env(session_id: str):env = SESSIONS.get(session_id)if not env:raise HTTPException(status_code=400, detail="Invalid or expired session_id. Call /reset to create a session.")return env.get_state().model_dump()def main():import uvicorn
1234567import osimport sys
# Ensure project root is on sys.path so tests can import the `env` packagePROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))if PROJECT_ROOT not in sys.path: sys.path.insert(0, PROJECT_ROOT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081import pytest
from env.environment import SupportTicketEnvfrom env.models import Action
def test_reset_and_initial_observation(): env = SupportTicketEnv(task_id="task_easy_1") obs = env.reset() assert obs.ticket.ticket_id == "TKT-1001" assert obs.step_count == 0 assert "fetch_user_data" in obs.available_actions
def test_fetch_user_data_success_and_failure(): env = SupportTicketEnv(task_id="task_easy_1") env.reset()
# correct user_id action = Action(action_type="fetch_user_data", parameters={"user_id": "USR-A1"}) obs, reward, done, info = env.step(action) assert not done assert "User Data" in (obs.tool_output or "")
# incorrect user_id action_bad = Action(action_type="fetch_user_data", parameters={"user_id": "WRONG"}) obs2, reward2, done2, info2 = env.step(action_bad) assert "Invalid user_id" in (obs2.tool_output or "") or "Failed to fetch" in obs2.system_message
def test_easy_flow_grader_rewards(): env = SupportTicketEnv(task_id="task_easy_1") env.reset()
# follow expected sequence for easy task a1 = Action(action_type="check_policy", parameters={}) obs, r, done, info = env.step(a1)
a2 = Action(action_type="issue_refund", parameters={"amount": "full"}) obs, r, done, info = env.step(a2)
a3 = Action(action_type="close_ticket", parameters={"resolution": "refunded"}) obs, r, done, info = env.step(a3)
# reward should be > 0 and final assert done is True assert info.get("current_reward", 0.0) > 0.0
def test_medium_flow_no_refund_penalty(): env = SupportTicketEnv(task_id="task_medium_1") env.reset()
a1 = Action(action_type="check_policy", parameters={}) obs, r, done, info = env.step(a1)
a2 = Action(action_type="reply_to_customer", parameters={"message": "Sorry, no refunds for prior billing."}) obs, r, done, info = env.step(a2)
a3 = Action(action_type="close_ticket", parameters={"resolution": "policy_explained"}) obs, r, done, info = env.step(a3)
assert done is True assert info.get("current_reward", 0.0) > 0.0
def test_hard_flow_requirements(): env = SupportTicketEnv(task_id="task_hard_1") env.reset()
# fetch user data a1 = Action(action_type="fetch_user_data", parameters={"user_id": "USR-C3"}) obs, r, done, info = env.step(a1)
# escalate with correct reason a2 = Action(action_type="escalate", parameters={"reason": "billing_tier2"}) obs, r, done, info = env.step(a2)
# reply should be present in history or tool_output assert done is True assert info.get("current_reward", 0.0) >= 0.0.github/workflows/openenv-validation.yml+40-10
.gitignore+1-1
CONTRIBUTING.mdAdded+20
LICENSEAdded+18
MANIFEST.inAdded+8
README.md+29
env/__init__.pyAdded
env/environment.pyAdded+110
env/graders.pyAdded+69
env/models.pyAdded+37
env/tasks.pyAdded+66
evaluate.pyAdded+51
inference.py+72-24
server/app.py+26-16
tests/conftest.pyAdded+7
tests/test_environment.pyAdded+81