Steven Johnston
← Work
№ 04 · Network Digital Twin · 2026

PARITY

A digital twin of your network built from live pyATS snapshots, analysed by a tiered swarm of AI agents (Ollama → Haiku → Sonnet → Opus on escalation). Fixes are proposed, human-approved, executed via pyATS, then verified closed-loop.

Context
Personal project
Role
Sole architect / engineer
Status
Active build
Topology · 5 devices · last snap 2m
rtr-01 rtr-02 core-1 edge-1 edge-2
Approval queue · 1 pending
HIGH rtr-02 · link flap
Interface Gi0/2 has flapped 7× in 24h. Sonnet recommends shutting and re-routing via core-1.
model
Sonnet 4.6
confidence
0.87
Approve
Deny
Open in Slack
Fig. 01 · stylised interface preview

The problem

Per-device audits (like Gladius) tell you a single device is broken. They don't tell you the network is broken. Cross-device reasoning, historical change tracking, and 'should we shut this interface or re-route the traffic?' need a different shape: a digital twin that watches the whole estate continuously.

The approach

01

Pulled inventory straight from the Grafana API. Single source of truth, no separate inventory to maintain. Parity generates the pyATS testbed on the fly and learns full operational state (interfaces, routing, BGP, OSPF, VLANs, STP) into PostgreSQL JSONB snapshots.

02

A LangGraph state machine runs a cost-tiered pipeline: Ollama normalises for free, Haiku classifies findings with severity and confidence, Sonnet drafts remediation with CLI, risk, and rollback, and Opus is called only when Haiku confidence on a critical finding drops below 0.7. Cheapest model that can do the job wins.

03

Every recommendation lands in an approval queue, web UI or Slack interactive buttons, and auto-creates a Jira ticket with finding, commands, rollback, and risk. States sync both ways. Nothing touches the network until a human says yes.

04

Approved commands execute via pyATS with pre-staged rollback, then a fresh snapshot and closed-loop verification: the originating finding is re-evaluated as confirmed fixed, still present, or new collateral damage.

Outcome

Snapshot scope
Whole network
via pyATS
Model tiers
4
Ollama → Haiku → Sonnet → Opus
Approval paths
3
web UI, Slack, Jira
Design note

Gladius tells you a device has vulnerabilities. Parity tells you the network has problems, which fix to ship first, and checks its own work after the change.

Built with

PythonFastAPIpyATSLangGraphPostgreSQLChromaDBClaude Haiku/Sonnet/OpusOllamaReactSlackJiraDocker

More tools

05 ARCHIE AI Network Design Studio 06 CLOUDFORGE Chat-to-Azure IaC 07 DOCKERMATE Docker Dashboard + AI Ops
← Back to tools
Get in touch
stevie.johnston@gmail.com
Glasgow, Scotland
UTC+0 / UTC+1