cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
136
Views
0
Helpful
0
Replies

Leveraging LLMs for AI-Driven Network Devices Emulation with SSH and

yassinecherair
Level 1
Level 1

an AI-driven network emulation agent that mimics real network device behavior using LangChain, LangGraph, and GPT-based LLMs. The goal is to provide a transparent experience where CLI and API interactions feel like a real network device.

Core Components
Responder Agent
Processes user queries such as:

CLI Command: show interfaces

API Request: GET /restconf/data/ietf-interfaces:interfaces


State Agent
️ Tracks the emulator’s state to ensure responses reflect real-time configuration changes.

Execution Interfaces (Management Plane)
SSH Server – Built with Paramiko, allowing users to execute Ansible playbooks seamlessly.
REST API Server – Developed using FastAPI, supporting Python or Terraform execution via RESTCONF.
AI Agent Integration – Wraps around the management plane to handle user commands intelligently, making automation interactions appear transparent and realistic, just like a real device.

AI Stack Used
LangChain + LangGraph – For structured orchestration of command execution.
GPT-based LLMs – For generating realistic CLI and RESTCONF API responses.

Challenges Faced
State Accuracy – Ensuring responses align with real-time config changes.
Realistic Response Timing – Simulating device processing delays accurately.
Precision in CLI & API Responses – Making outputs match real network devices.
RAG with cisco if it is not illegal docs & Prompt Engineering – Fixing retrieval-augmented generation inconsistencies.

 

0 Replies 0