PixelCraftLab/sysadmin_troubleshooter
0
1---2title: Sysadmin Troubleshooter3emoji: ๐4colorFrom: blue5colorTo: indigo6sdk: docker7app_port: 80008pinned: false9base_path: /web10---11# SysAdmin Troubleshooting Environment12 13A real-world OpenEnv environment where an RL agent acts as a Junior System Administrator. The agent interacts with a mock Linux shell to identify and resolve common server issues.14 15## Environment Details16 17### Action Space18**SysAdminAction**: A single shell command string.19- `command` (str): The shell command to execute (e.g., `ps aux`, `systemctl start nginx`, `kill 1024`).20 21### Observation Space22**SysAdminObservation**: Returns the result of the command and the current system state.23- `stdout` (str): Standard output from the command.24- `stderr` (str): Standard error from the command.25- `exit_code` (int): Return code of the command.26- `system_state` (dict): Summary of active services and running processes.27- `tasks_status` (dict): Boolean status of the three target tasks.28- `reward` (float): Partial progress reward (0.0 to 1.0 cumulative).29- `done` (bool): True if all tasks are complete or max steps reached.30 31## Tasks32 33The environment includes three tasks of increasing difficulty:34 351. **[Easy] Rogue Process Cleanup**: Identify a high-CPU process (`rogue_app`) using `ps` and terminate it using `kill` or `killall`.362. **[Medium] Service Recovery**: The `nginx` service is currently inactive. The agent must identify this and start the service using `systemctl start nginx`.373. **[Hard] Configuration Fix**: The `nginx` configuration has a typo (`liten` instead of `listen`). The agent must read the config file (`cat /etc/nginx/nginx.conf`), fix the typo (e.g., using `sed`), and restart the service.38 39## Reward Function40 41The reward is based on task completion:42- **Task 1**: +0.243- **Task 2**: +0.344- **Task 3**: +0.545Total potential reward: **1.0**.46 47## Quick Start48 49### 1. Build and Start the Environment50 51```bash52# Build the Docker image53docker build -t sysadmin-env:latest -f server/Dockerfile .54 55# Run the container56docker run -p 8000:8000 sysadmin-env:latest57```58 59### 2. Run Inference60 61Ensure you have the required environment variables set:62 63```bash64export API_BASE_URL="your-api-endpoint"65export MODEL_NAME="your-model-name"66export HF_TOKEN="your-hf-token"67 68python inference.py69```70 71## Spec Compliance72 73This environment implements the full OpenEnv spec:74- Typed Pydantic models for Actions and Observations.75- Standard `step()`, `reset()`, and `state()` endpoints.76- Valid `openenv.yaml` manifest.77- reproducible `inference.py` with mandatory `[START]`, `[STEP]`, and `[END]` logging.78 