AI in Networking: From Insight to Action
Artificial Intelligence (AI) is rapidly transforming the networking world. What once required teams of engineers sifting through logs, running scripts, and checking configurations can now be accelerated, enhanced, and even autonomously handled by AI agents.
In this blog post, weβll explore the role of AI in networking, how it can interact with modern systems like Nautobot (as a CMDB and automation platform), and what it takes to build AI agents that can query network data and interact with real devices.
π€ What Can AI Do in Networking?
At a high level, AI in networking can be applied to the following areas:
- Observability & Monitoring: AI can detect anomalies in traffic, predict failures, and surface insights from logs and metrics.
- Intent Verification: AI can continuously validate that the network is behaving as intended based on policy.
- Natural Language Querying: Users can ask questions like "Which switches in Site A are running outdated firmware?"
- Automated Troubleshooting: AI agents can run diagnostic commands and summarize results.
- Autonomous Configuration: Based on input or learned behavior, AI can generate and apply configurations safely.
π Interacting with Nautobot (CMDB)
Nautobot is a powerful source of truth for network infrastructure. With its robust API and plugin architecture, it becomes an ideal partner for AI-driven systems.
Use Case: AI Agent to Query Nautobot
Imagine a conversational AI agent that can answer questions like:
- "List all devices at the Berlin site."
- "Which devices havenβt been backed up in the last 24 hours?"
- "Are there any devices with a lifecycle end-of-support date within the next 6 months?"
How It Works
- Natural Language Parsing: The AI model parses user input and identifies intent and entities (e.g., site name, device type).
- Nautobot API Interaction: The agent translates this into a Nautobot GraphQL or REST API query.
- Response Generation: The AI formats and returns the response in a human-readable way, optionally with links to Nautobot UI.
Bonus: With plugins like Nautobot ChatOps, AI can even interact via Slack or MS Teams!
βοΈ Interacting with Network Devices
While Nautobot tells us what should be, interacting with devices reveals what is.
AI can connect to devices using SSH, NETCONF, or REST APIs to:
- Check software versions
- Verify interface statuses
- Review BGP neighbors
- Collect configuration snippets
Use Case: AI Agent for Device Inspection
You could create an AI agent with the ability to:
- Connect to a switch via SSH
- Run commands like
show version
orshow interface status
- Compare the output against Nautobotβs intended state
- Flag mismatches or recommend actions
Tooling Options
- NAPALM: Multi-vendor abstraction for reading from devices
- Scrapli: Flexible Python library for interacting with CLI devices
- Netmiko / Paramiko: Lower-level SSH options
Pro Tip: Create reusable prompt templates to tell your AI agent what commands to run based on device type or vendor.
π§ Building AI Agents for Networking
Architecture Overview
- Frontend Interface (optional): A chatbot or web UI for input/output
- LLM Core: A language model like GPT-4, Claude, or open-source LLM
- Toolset Plugins: Custom functions that allow the LLM to call APIs or connect to devices
- Memory Store (optional): Save past interactions, common queries, device state snapshots
Popular Frameworks
- LangChain / LlamaIndex: For building tool-using agents with memory
- Semantic Kernel: For .NET/C# ecosystems
- AutoGen: Agent-to-agent collaboration framework from Microsoft
π Example Prompts for Your AI Agent
> What devices are in site "NYC-Core"?
β [AI agent calls Nautobot GraphQL API]
> Login to router R1 and check if interface Gi0/1 is up.
β [AI agent calls a function that uses Scrapli to connect and parse output]
> Create a summary of all devices with CVEs in the last 90 days.
β [Agent queries Nautobot Software Inventory + CVE plugins]
π Security Considerations
While AI adds power and flexibility, it also introduces risk:
- Never give unrestricted shell access to an LLM
- Use strict function calling with clearly scoped permissions
- Validate all input/output when interacting with devices
𧩠Final Thoughts
AI in networking isnβt about replacing engineers β itβs about amplifying their abilities. By combining natural language understanding, structured APIs like Nautobotβs, and secure device communication, we can build intelligent agents that answer questions, identify issues, and even take action.
The future is already here. It's time to start experimenting.