akullaganeshA/professional-coding-env
0
OpenEnv: Professional Coding Task Simulation
OpenEnv is a production-grade playground for evaluating AI software engineering agents on real-world coding tasks. It provides a session-isolated, high-performance environment with integrated graders and structured logging.
๐ Quick Start
Prerequisites
- Python 3.11+
- uv (recommended) or
pip
Setup
# Using uv (recommended)
uv sync
# Using pip
pip install -r requirements.txtRun Server Locally
uv run python3 server/app.py๐ API Documentation
The OpenEnv server exposes both REST and WebSocket interfaces for flexible integration.
REST Endpoints
GET /health: Health check and system metrics.POST /reset: Initialize a new session. Returnssession_idand the initialobservation.POST /step: Execute an action in an active session. Requiressession_idandaction_data.GET /state?session_id=<id>: Retrieve full internal state for auditing/debugging.
WebSocket Interface
Connect to ws://<host>:<port>/ws for persistent, low-latency session management.
- Protocol: JSON-based message exchange.
- Message Types:
reset,step,state.
๐ง Core Tasks
OpenEnv includes 3 distinct real-world tasks with automated graders:
- Email Triage (Easy): Filtering urgent tickets from a support stream.
- Data Pipeline (Medium): Cleaning and imputing customer datasets using pandas.
- Security Patch (Hard): Remediating SQL injection vulnerabilities via parameterized queries.
๐ Baseline Reproduction
To run the reference baseline and verify structured logging compliance:
export API_BASE_URL="https://api.openai.com/v1"
export MODEL_NAME="gpt-3.5-turbo"
export HF_TOKEN="your-api-key"
uv run python3 inference.py๐ Troubleshooting
- Connection Refused: Ensure the server is running and the port (default 7860) is exposed.
- ModuleNotFoundError: Ensure you are using
uv runor have activated your virtual environment. - Score is 0.0: Check the grader logic in
tasks.pyand ensure the agent response contains the expected patterns.
๐ก Security & Compliance
- Zero-knowledge Reset: State is wiped using cryptographically secure nonces to prevent leakage between episodes.
- Thread-safe: Session management utilizes asynchronous locks to ensure integrity under concurrent load.
- Non-root Docker: Containers run as a limited user to minimize attack surfaces.
