Autonomous Network Administration using Agents

Can AI agents manage network infrastructure through natural language? This project explores how Large Language Models (LLMs), combined with the Model Context Protocol (MCP), can configure Nokia SR Linux devices translating plain English into vendor-specific network commands.

System architecture showing network topology and AI agent components
Overview of the system: Containerlab network topology and AI agent architecture with MCP integration.

Initial situation

Network configuration remains a complex and error-prone task that requires vendor-specific knowledge. Each network operating system whether Cisco IOS, Juniper Junos, or Nokia SR Linux uses its own syntax and conventions. This makes network configuration time-consuming and demands specialized expertise for every platform. With recent advances in Large Language Models (LLMs), which show great capabilities in understanding and generating natural language, a new question arises: can we use natural language to configure network devices? If network administrators could describe their intent in natural language, using their acquired general networking knowledge, this could significantly reduce the time required to learn vendor-specific commands.

Problem statement / Project goal

The goal of this project is to design and implement an AI agent that can configure network devices in a Containerlab-emulated environment using natural language instructions. The system should translate high-level configuration requests into concrete CLI commands for Nokia SR Linux devices. Key objectives include: evaluating whether LLMs can reliably generate correct and safe network configurations, investigating how different LLMs (varying in cost and capability) affect task success rates.

System Architecture

System architecture diagram showing AI Agent, MCP Server, and network devices

The system combines a Containerlab network topology with an AI agent architecture. The MCP Server provides 9 network tools, while the AI Agent orchestrates LLM with device management via SSH.

AI agent interacting with the user

AI agent

The AI agent gets input from the user and request for approval via MCP elicitation primitive

Evaluation Results

AI agent run details

Detailed steps of AI agent and MCP server for the following prompt: "All ports where a client is connected, set the description of the ports on the switches to "to (client name)""

Results

The developed AI agent demonstrates that LLMs can configure network devices through natural language. The AI agent, built with Pydantic AI and FastMCP, provides MCP tools for network configuration, backup, restoration, and topology exploration. Three LLMs were evaluated using three test scenarios of increasing complexity:

  • All three LLMs (Claude Opus 4.5, Qwen3 Max, Ministral 3 14B) achieved 100% success rates on simple and normal-complexity tasks.
  • For complex multi-device configurations (VLAN segmentation + static routing across 4 devices), only Claude Opus 4.5 maintained a 100% success rate.
  • A good cost-optimized strategy is: route simple tasks to cheaper LLMs while reserving bigger / more expensive LLMs for complex operations.
  • Server-enforced safety via MCP Elicitation, configuration changes cannot be applied without explicit human approval, regardless of LLM behavior.

Safety mechanisms are enforced at the protocol level rather than relying on LLM to follow instructions, making the system robust against prompt manipulation or unwanted actions. Automatic configuration validation and backup creation provide additional safety for production use.

Key terms

  • AI AgentSoftware that uses an LLM as reasoning engine to fulfill tasks
  • Model Context Protocol (MCP)Open-source standard enabling AI applications to connect to external tools and data sources
  • MCP ElicitationMCP primitive for servers to request user approval during critical operations
  • Pydantic AIPython framework for building AI agents
  • FastMCPFramework for implementing the MCP standard
  • Nokia SR LinuxContainer-based network operating system used as target platform
  • ContainerlabTool for deploying network topologies using container images
  • NetmikoPython SSH library for network device communication
  • OpenRouterAPI platform providing access to multiple LLM models
  • LLM Function CallingMechanism allowing LLMs to invoke external tools and functions

Team

Dominik Krebs

Advisors
Prof. Dr. Christopher Scherb
Luc Heitz