Ayushmaan03/log-analysis-agent
Log Analysis & Incident Diagnosis Agent (OpenEnv)
Description
This OpenEnv environment simulates a real-world Site Reliability Engineering (SRE) task. An agent is presented with a stream of server logs and telemetry metrics (CPU, memory, latency). The agent must use a progressive log reveal mechanism to read through the logs, detect anomalies, classify the root cause, and deploy the correct mitigation strategy.
Motivation
Incident response and log analysis are critical tasks for modern SREs. This environment provides a safe, deterministic, and reproducible sandbox for evaluating LLM agents on their reasoning, debugging, and log-interpretation capabilities.
Action Space
The agent can take 4 discrete categorical actions: | Action | Description | |---|---| | request_more_logs() | Reveals the next 2 lines of logs (mimics pagination/log scrolling). | | detect('anomaly'\|'normal') | Predicts whether the system has an anomaly or is operating normally. | | classify('<issue_type>') | Classifies the root cause. Valid values: cpu_spike, memory_leak, disk_full, network_latency, service_crash. | | mitigate('<action>') | Attempts a fix. Valid values: restart_service, scale_up, clear_cache, rollback, no_action. |
Observation Space
Tasks & Difficulties
Reward Function
Setup Instructions
# 1. Install dependencies
pip install -r requirements.txt
# 2. Start the FastAPI server
uvicorn server.app:app --port 8000
# 3. Validate (in a separate terminal, from the project root)
openenv validateBaseline Evaluation
Environment variables required (copy .env.example .env and fill in):
API_BASE_URL— LLM API endpoint (default: Groq)MODEL_NAME— Model identifier (default:llama-3.3-70b-versatile)HF_TOKENorGROQ_API_KEY— Your API key
python inference.pyBaseline Scores (llama-3.3-70b-versatile, 10 seeded episodes, seeds 42–51)
Scores are reproducible by running python inference.py with the same model and seeds.Docker
docker build -t log-analysis-agent .
docker run -p 8000:8000 log-analysis-agent