Skip to content

Repository files navigation

title NetOps
emoji 🌐
colorFrom blue
colorTo cyan
sdk docker
app_port 7860
license mit
tags
reinforcement-learning
networking
simulation
agents
short_description An RL gym where language models learn to be network engineers
pinned true

NetOps

A reinforcement learning environment for autonomous network operations.

Train language models to diagnose and repair network faults — from link failures to BGP hijacks — inside a simulated multi-AS topology running OSPF and BGP.

The interactive demo above is the environment. Select a fault on the topology, walk through an episode, and see real telemetry from the simulator. The five tabs cover:

  • Readme — how the Internet breaks and why this is hard
  • Playground — run episodes interactively with a guided walkthrough option
  • Leaderboard — zero-shot results across 13 models (0% to 44% solve rate)
  • Logs — reward design, training curves, and the hardest unsolved faults
  • Fleet — the scale problem: from 9 routers to 70,000+ autonomous systems

The environment

Each episode: the agent receives a NOC alert, queries network telemetry, diagnoses the fault, and issues remediation commands in natural language. 37 fault types across 4 difficulty levels. 7-component shaped reward signal in [-3.5, +3.0].

The simulator is pure Python — no root, no Mininet, no FRR daemons. OSPF modeled as a state machine with Dijkstra SPF. BGP modeled with session FSM, route selection, and policy enforcement. Startup in 0.1s (192× faster than Mininet). Cross-validated against real infrastructure.

Quick start

pip install -r requirements.txt
NETOPS_SIM=1 python frontend/app.py

Training

371 expert episodes distilled from Claude Sonnet 4. SFT on Qwen3-1.7B with LoRA (loss 0.84 → 0.01 in 120 steps). GRPO reinforcement learning against the live simulator.

pip install -r requirements-train.txt
python training/sft_toolcall_train.py --model Qwen/Qwen3-1.7B --epochs 3

Research grounding

The fault catalog draws from three studies of real infrastructure failures: Gill et al. (SIGCOMM 2011), Meza et al. (IMC 2018), Goldberg (CACM 2014). 15 of 37 fault types have zero-percent zero-shot solve rate across all models tested.

Repository structure

server/             Environment core + Python simulator
frontend/           Gradio app (this demo)
training/           SFT and GRPO scripts + 371 expert episodes
distillation/       Expert data collection via Claude
results/            Zero-shot eval results (13 models × 54 episodes)
tests/              116 fault tests, 14 episode tests
docs/               Fault catalog, reward design, sim architecture

See docs/FAULT_CATALOG.md for the full 37-fault specification.


From the creator of SQlab.

About

An RL gym where language models learn to be network engineers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages