--- title: SQL Query Environment emoji: 🗃️ colorFrom: blue colorTo: green sdk: docker app_port: 7860 tags: - openenv - sql - text-to-sql - reinforcement-learning pinned: false --- # SQL Query Environment An OpenEnv-compatible environment where AI agents learn to translate natural language questions into correct SQL queries. ## API Endpoints - `GET /health` — Health check - `POST /reset` — Start new episode: `{"task_id": "task_1"}` - `POST /step` — Submit SQL: `{"task_id": "task_1", "sql_query": "SELECT ..."}` - `GET /state` — Current episode state ## Tasks | ID | Difficulty | Description | |----|-----------|-------------| | task_1 | Easy | Single-table filtering + ordering | | task_2 | Medium | JOIN + GROUP BY + HAVING | | task_3 | Hard | Subquery + multi-JOIN + aggregation | Grading is fully deterministic with partial credit (0.0 to 1.0).