Skip to content

Network Engineer AI: A Self-Hosted Assistant with Guardrails

By Bikram Bhujel

AI project · November 2026

Network Engineer AI: A Self-Hosted Assistant Built Around Guardrails

An assistant for network engineers that reviews FortiOS and Cisco IOS configurations, searches a knowledge base of uploaded documents, and answers with exact commands plus risk and rollback notes. It runs on a small virtual machine in my homelab.

StackPython · FastAPI · PostgreSQL · React
HostingDocker on a Proxmox VM, 2 vCPU and 8 GB RAM, no GPU
AccessCloudflare Tunnel and Cloudflare Access
StatusPhase 1 running; Phase 2 built, switched off
24 checksConfiguration rules that run without AI, at no cost
Secrets removedBefore any configuration is stored
Every action auditedAllowlist, risk check, approval and log
01 · Why build it

Useful AI help, without handing over the keys.

AI is good at explaining configurations and drafting changes. It is risky when it can see passwords, run commands on devices, or spend money without limits. This project starts from those risks.

02 · What it does

Review, search and answer.

01
Configuration analysis

FortiOS and Cisco IOS, with 24 local rules such as insecure admin access, any-to-any policies, Telnet, default SNMP communities and missing logging or time sync.

No AI cost
02
Assistant with tools

Searches the knowledge base, reads and compares uploaded configurations, and answers with exact commands plus risk and rollback notes.

AI
03
Knowledge base

PDF and text upload with PostgreSQL full-text search; no vector database needed.

Search
03 · Guardrails

Every AI action goes through the same pipeline.

01
Tool registry and allowlists.

The assistant can only call tools that are registered and allowed.

02
Role check and risk classification.

Each action is checked against the user's role and given a risk level.

03
Approval.

Risky actions wait for a person to approve them.

04
Execution and verification.

The result is checked before it is reported.

05
Audit log.

Every step is recorded.

SecretsRemoved from configurations before storage; credentials kept in an encrypted vault.
Sign-inMulti-factor authentication on every login.
Device accessRead-only SSH access to lab devices is built but switched off until it has been tested in the lab.
04 · Cost control

A fixed budget, enforced by the software.

  • Token use tracked for every call
  • Monthly and per-task budgets, plus step limits
  • Automatic switch to cheaper models at 70% and 90% of the budget
  • Prompt caching to avoid paying twice for the same context
05 · Architecture

Small enough for a homelab VM.

Browser └── Cloudflare Access → Cloudflare Tunnel └── nginx + React front end └── FastAPI back end ├── Orchestrator and policy engine ├── Tool registry and audit pipeline ├── AI provider layer (Anthropic or OpenAI-compatible) └── PostgreSQL 16

Container memory limits keep idle use under about 1 GB.

Comments

Questions and corrections are welcome. I read every comment before it appears, and remove spam and promotional links.