Fabric AIops
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by Cisco, Meraki, Arista, Ubiquiti, or any network-controller vendor. "Cisco", "Meraki", "Catalyst", "DNA Center", "Arista", "CloudVision", "Ubiquiti", "UniFi" and all product/trademark names belong to their respective owners. MIT licensed.
Governed AI-ops for network fabrics managed through a controller — the
Cisco Meraki Dashboard API (the reference platform, full read + write),
Cisco Catalyst Center (formerly DNA Center; read subset), Arista
CloudVision Portal (CVP) (read subset), and UniFi Network (self-hosted
controller or UniFi OS console; read subset + device restart) — with a
built-in governance
harness: unified audit log, policy engine, token/runaway budget guard,
undo-token recording, and graduated-autonomy risk tiers. Multi-platform by
construction: a registry keyed by platform maps every canonical operation
onto each controller's REST API (path templates + response adapters), so adding
a controller is a registry entry, never new ops/CLI/MCP surface. An operation a
platform doesn't map returns a clear teaching error ("not supported on X yet —
open an issue"), never a silent no-op. The test suite is mock-based; no
platform has yet been exercised against a live controller — see
docs/VERIFICATION.md.
What it does
Three flagship signature analyses, plus the guarded reads and writes around them:
- Uplink loss & latency RCA — pull MX WAN uplink loss + latency across an org, rank the worst uplinks by a composite of average loss and latency, and map each degraded uplink to a likely cause + recommended action. Every ranking carries its numbers, not a black-box verdict.
- Network health score — a composite 0-100 score per network from device online %, uplink health %, and an alert-severity penalty (weighted 0.5/0.3/0.2), with every component returned so the number is explainable.
- Config template drift — for networks bound to a config template, list the settings that have drifted from the template (expected vs actual).
What works
- CLI (
fabric-aiops ...):init,overview,org,network,device,client,health,remediate,secret,doctor,mcp. - MCP server (
fabric-aiops mcporfabric-aiops-mcp): 34 tools (25 read, 9 write), every one wrapped with the bundled@governed_toolharness. - Encrypted credentials: the controller secret (Meraki API key / Catalyst Center
username:password/ CVP service-account token / UniFi API key) lives in an encrypted store~/.fabric-aiops/secrets.enc(Fernet + scrypt) — never plaintext on disk. Unlock with a master password fromFABRIC_AIOPS_MASTER_PASSWORD(MCP/CI) or an interactive prompt (CLI). - Reversibility: mutating writes fetch the real before-state first and record a faithful inverse (
update_device/update_network_vlanrestore prior values;claim↔remove;bind↔unbind/rebind). Irreversible ops (reboot_device,blink_device_leds) record the prior state for audit but declare no undo. - Safety: every state-changing CLI op supports
--dry-runand requires double confirmation; every write MCP tool takes adry_runpreview.
Capability matrix (34 MCP tools)
| Domain | Tools | Count | R/W |
|---|---|---|---|
| Overview | overview |
1 | read |
| Organizations | org_list, org_get, org_licensing, org_admins, org_device_statuses, org_api_requests |
6 | read |
| Networks | network_list, network_get, network_vlans, network_alerts, network_traffic |
5 | read |
| Devices | device_inventory, device_status, device_uplinks, switch_ports, wireless_ssids |
5 | read |
| Clients | client_list, client_get, client_usage, client_connectivity |
4 | read |
| Health (flagship) | uplink_loss_and_latency_rca, network_health_score, config_template_drift |
3 | read |
| Remediation | reboot_device, claim_devices_into_network, remove_device_from_network, bind_network_to_template, unbind_network_from_template |
5 | write (high) |
update_device, update_network_vlan |
2 | write (medium) | |
blink_device_leds |
1 | write (low) | |
| Undo | undo_list |
1 | read |
undo_apply |
1 | write (medium) |
network_health_score and config_template_drift are injected-only (they score
data you already hold); uplink_loss_and_latency_rca accepts injected records
for offline analysis or pulls live from a configured target. Device models carry
a product-type prefix: MX appliance, MS switch, MR wireless AP, MV
camera, MG cellular gateway.
Platform support matrix
One tool, four controller platforms. The ops/CLI/MCP surface is identical
everywhere; each platform maps the canonical operations it supports and raises
a teaching error for the rest ("not supported on <platform> yet — open an
issue or PR").
| Canonical operation | meraki | catalyst | cvp | unifi |
|---|---|---|---|---|
overview (org/site/container rollup) |
✅ | ✅ | ✅ | ✅ |
org_list / org_get |
✅ | ✅ sites | ✅ containers | ✅ sites (list; get ❌) |
org_licensing, org_api_requests |
✅ | ❌ | ❌ | ❌ |
org_admins |
✅ | ❌ | ✅ users | ❌ |
org_device_statuses |
✅ | ✅ device-health | ✅ inventory + streaming status | ✅ stat/device (state, uptime, firmware) |
network_list / network_get |
✅ | ✅ site-health / site | ✅ containers | ✅ sites / stat/health (subsystem rollup) |
network_vlans, network_traffic |
✅ | ❌ | ❌ | ❌ |
network_alerts |
✅ | ✅ issues (P1→critical, P2→warning) | ✅ events | ✅ alarms (*_Lost_Contact→critical) |
device_inventory, device_status |
✅ | ✅ network-device | ✅ inventory (+ complianceCode drift signal) | ✅ stat/device (id = device MAC) |
device_uplinks |
✅ | ❌ | ❌ | ❌ |
switch_ports |
✅ | ✅ interface stats (pass the device uuid) | ❌ | ✅ device port_table (pass the device MAC) |
wireless_ssids |
✅ | ❌ | ❌ | ❌ |
client_list / client_get |
✅ | ✅ client-health (aggregate) / client-detail (by MAC) | ❌ | ✅ stat/sta (connected) / stat/user (by MAC) |
client_usage, client_connectivity |
✅ | ❌ | ❌ | ❌ |
uplink_loss_and_latency_rca (live pull) |
✅ | ❌ (injected records still work) |
❌ (injected records still work) |
❌ (injected records still work) |
network_health_score, config_template_drift (injected-only) |
✅ | ✅ | ✅ | ✅ |
reboot_device |
✅ | ❌ teaching error | ❌ teaching error | ✅ cmd/devmgr restart-device |
| The other 7 writes (blink/update/claim/remove/bind/unbind/VLAN) | ✅ | ❌ teaching error | ❌ teaching error | ❌ teaching error |
Concept mapping: canonical organizations/networks are Catalyst Center
sites, CVP containers, and UniFi sites (the canonical id is the
site's short name — the /api/s/{site}/ path segment); all have one global
tree, so the org scope does not filter their lists. On unifi, device-scoped
calls (device get / switch_ports / reboot) fill the site from the
target's default org_id — set it in config.yaml (or the init wizard). Writes
are Meraki-only except UniFi device restart — Catalyst Center and CVP
change models (task/configlet workflows) don't map cleanly onto these
canonical writes, so each write fails fast with a teaching error before any
controller call (never a silent no-op). CVP config-drift surfaces through
device_inventory (complianceCode/complianceIndication per device) and
network_alerts (events); configlet-content retrieval and deep pagination on
catalyst/cvp/unifi are known deferrals.
Per-platform auth
| Platform | platform: |
Secret stored (encrypted) | Auth on the wire | Base URL |
|---|---|---|---|---|
| Cisco Meraki Dashboard | meraki |
API key (Dashboard → Organization → Settings → API access) | Authorization: Bearer (or auth_style: meraki-key → X-Cisco-Meraki-API-Key) |
default https://api.meraki.com/api/v1 |
| Cisco Catalyst Center | catalyst |
username:password (one string) |
exchanged via POST /dna/system/api/v1/auth/token (HTTP Basic) for a ~1 h X-Auth-Token, auto-refreshed once on a 401 |
required, e.g. https://<catalyst-center-host> |
| Arista CloudVision Portal | cvp |
service-account token (Settings → Access Control → Service Accounts) | Authorization: Bearer |
required, e.g. https://<cvp-host> |
| UniFi Network | unifi |
API key (UniFi OS: Settings → Control Plane → Integrations; self-hosted Network Server 9.0+) | X-API-KEY (stateless; legacy cookie login is a known deferral) |
required — classic controller https://<host>:8443, or UniFi OS console https://<console>/proxy/network (keep the prefix) |
fabric-aiops init walks through the platform choice and stores the right kind
of secret; fabric-aiops doctor probes each target with the canonical
top-of-hierarchy read (organizations / sites / containers / UniFi sites),
exercising the full auth flow.
Security: read-only mode
This tool is meant to be handed to an AI agent, so its safety story is enforced by the server rather than requested in a prompt:
export FABRIC_READ_ONLY=1
With that set, the 9 write tools are never registered. An MCP client lists 25 tools instead of 34 — the writes are not hidden, not gated behind a flag, and not merely refused when called. They are absent from the session. A model cannot invoke a tool it was never offered, and cannot be argued into one.
That distinction is the whole point. A tool that exists but refuses still invites retry loops and "I'll describe the call instead" behaviour from smaller models, and it leaves a reviewer trusting a promise. An absent tool is a fact you can check: connect, list the tools, and see that the writes are not there.
Enforcement is two layers deep, so the switch cannot be sidestepped by changing entry point:
| Layer | What it does | Covers |
|---|---|---|
@governed_tool harness |
refuses every non-read operation outright | MCP, CLI, and in-process callers |
| MCP registration | write tools are removed from list_tools() |
anything speaking MCP |
Read operations are unaffected, and every call is still audited to
~/.fabric-aiops/audit.db.
The read/write split is derived from each tool's declared
risk_level, and a test asserts that this never disagrees with the[READ]/[WRITE]tag in the tool's own documentation — so a write can't quietly present itself as a read.
Running a smaller / local model? See agent-guardrails.md — it lists the guardrails this tool now enforces for you (so you don't spend prompt budget restating them) and gives a ready-made system prompt for what's left.
Quick start
uv tool install fabric-aiops # or: pipx install fabric-aiops
fabric-aiops init # wizard: choose platform (meraki/catalyst/cvp/unifi) + store the secret (encrypted)
fabric-aiops doctor # verify config, secrets, connectivity (per-platform auth probe)
fabric-aiops overview # one-shot fabric fleet health
fabric-aiops health uplink-rca # rank worst MX WAN uplinks + cause/action (meraki)
fabric-aiops device inventory --model MS # switches in the org
Run as an MCP server (stdio):
export FABRIC_AIOPS_MASTER_PASSWORD=... # unlock secrets non-interactively
fabric-aiops-mcp
Governance
Every MCP tool passes through the bundled @governed_tool harness:
- Audit — every call (params, result, status, duration, risk tier, approver,
rationale) is logged to
~/.fabric-aiops/audit.db(relocatable viaFABRIC_AIOPS_HOME). - Budget / runaway guard — token and call budgets trip a circuit breaker.
- Risk tiers — graduated autonomy; high-risk ops can require a named approver
(
FABRIC_AUDIT_APPROVED_BY/FABRIC_AUDIT_RATIONALE— the env-var names the bundled harness reads). - Undo recording — reversible writes record an inverse descriptor built from the fetched before-state.
Scope
This is the network-fabric / controller member of the AIops-tools family
(governed AI-ops with audit + budget + undo + risk tiers). Do NOT use it for
OT / industrial edge (Modbus, OPC-UA, PROFINET) — see the separate
industrial-aiops line — nor for device-level CLI/SSH network automation.
Missing a capability?
Coverage is intentionally a curated subset of each controller's API. Missing a call or a device family on Meraki? A ❌ in the support matrix you need on Catalyst Center, CloudVision Portal, or UniFi Network (writes included — e.g. the UniFi cookie-login fallback for pre-9.0 controllers)? Want another controller platform entirely? Open an issue or PR — contributions welcome (a platform is a single descriptor module: path templates + response adapters).
Status
The test suite is mock-based. No platform has yet been exercised against a live
Meraki organization, Catalyst Center appliance, CloudVision Portal instance, or
UniFi controller — all four platforms' API paths are modelled from the public
API shapes. docs/VERIFICATION.md defines the checklist
a live run must cover; fabric-aiops doctor is the fastest live check.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fabric_aiops-0.6.0.tar.gz.
File metadata
- Download URL: fabric_aiops-0.6.0.tar.gz
- Upload date:
- Size: 242.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af216722ff98f83fd44ffcd6ab1cdc83f5e606a01e383782efcd8d91bb11708e
|
|
| MD5 |
66a158be6542fa78a3e3044e242dc992
|
|
| BLAKE2b-256 |
3aad89b7693842969f9bff974b61ed0c0964f61c1bc00297a2fc020bc4de8de0
|
Provenance
The following attestation bundles were made for fabric_aiops-0.6.0.tar.gz:
Publisher:
publish.yml on AIops-tools/Fabric-AIops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_aiops-0.6.0.tar.gz -
Subject digest:
af216722ff98f83fd44ffcd6ab1cdc83f5e606a01e383782efcd8d91bb11708e - Sigstore transparency entry: 2205546043
- Sigstore integration time:
-
Permalink:
AIops-tools/Fabric-AIops@535ecf373162a944e71df6044109d7a396434b8b -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/AIops-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@535ecf373162a944e71df6044109d7a396434b8b -
Trigger Event:
release
-
Statement type:
File details
Details for the file fabric_aiops-0.6.0-py3-none-any.whl.
File metadata
- Download URL: fabric_aiops-0.6.0-py3-none-any.whl
- Upload date:
- Size: 127.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ad5a70e74fe94a9ef100ea788c9327a7f289a3d8178e7faf298f69e54678800
|
|
| MD5 |
43c656898e92dff580654e1a16df5ae3
|
|
| BLAKE2b-256 |
4acdfe959044e7e8ed7fb12bd5cf51925444c7781e38fe51935565aaf54905b8
|
Provenance
The following attestation bundles were made for fabric_aiops-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on AIops-tools/Fabric-AIops
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fabric_aiops-0.6.0-py3-none-any.whl -
Subject digest:
9ad5a70e74fe94a9ef100ea788c9327a7f289a3d8178e7faf298f69e54678800 - Sigstore transparency entry: 2205546070
- Sigstore integration time:
-
Permalink:
AIops-tools/Fabric-AIops@535ecf373162a944e71df6044109d7a396434b8b -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/AIops-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@535ecf373162a944e71df6044109d7a396434b8b -
Trigger Event:
release
-
Statement type: