Design LLM-powered NetOps workflows with Python, Ollama, MCP, and tool calling
Sif Baksh

#AI
#CLI
#Network
#Python
#Ollama
#MCP
#NetOps
#BGP
🤖 ساخت ورکفلوهای عیبیابی شبکه با کمک AI
🌐 ورکفلوهای عیبیابی شبکه مبتنی بر AI بساز که خروجی CLI رو Parse کنن، فقط Toolهای تاییدشده رو فراخوانی کنن، از MCP استفاده کنن و شواهد رو برای بررسی انسانی کاملا قابلمشاهده نگه دارن.
✨ ویژگیهای کلیدی
🧠 ورکفلوهای Local LLM برای NetOps رو با Python، Ollama و دادههای اعتبارسنجیشده CLI میسازی
🛠️ Agentهای عیبیابی طراحی میکنی که از Memory، Toolهای تاییدشده و شواهد روشن استفاده میکنن
🔌 Toolهای قابلاستفاده مجدد شبکه رو با MCP Package میکنی و برای Pilotهای کنترلشده و Read-Only برنامهریزی میکنی
📘 توضیح کتاب
🔍 عیبیابی شبکه پر از سرنخه، اما این سرنخها معمولا زیر انبوه Alertهای پرنویز، خروجیهای طولانی CLI، نبود Context مربوط به Topology و Handoffهای ناقص پنهان میشن. کتاب Building AI Agents for Network Operations نشون میده چطور از AI Agentها، LLMها و Network Automation بهشکل کنترلشده استفاده کنی تا مهندسها بدون کنار گذاشتن Validation یا کنترل عملیاتی، به شواهد روشنتر و قابلاعتمادتر برسن.
🧠 کار رو با ورکفلوهای Local LLM با استفاده از Ollama و Python شروع میکنی و بعد از یک ساختار Prompt ساده با نام RACE استفاده میکنی تا تسکهای تکرارشونده NetOps شفافتر، امنتر و قابلبررسیتر بشن.
📊 خروجی Interfaceها و BGP رو به دادههای ساختاریافته Parse میکنی، یک Chatbot میسازی که Context عیبیابی رو حفظ میکنه و مدل رو به Toolهای تاییدشده برای بررسی وضعیت Device، Interfaceها، Reachability، Topology و سلامت BGP متصل میکنی.
🤖 در ادامه یک Agentic Troubleshooting Loop میسازی، Toolهای قابلاستفاده مجدد شبکه رو با MCP Package میکنی و یاد میگیری این ورکفلوها رو از نظر Logging، Approvalها، Observability، Runbookها، Feature Flagها و آمادگی برای Pilotهای Read-Only ارزیابی کنی.
🎯 تا پایان کتاب، یک مسیر عملی برای تبدیل ایدههای AI به ورکفلوهای NetOps در اختیار داری؛ ورکفلوهایی که میشه اونها رو در Lab تست کرد، توسط تیم بررسی کرد و با Controlهای مناسب برای عملیات واقعی شبکه تطبیق داد.
🎯 چیزهایی که یاد میگیری
🧠 ورکفلوهای Local LLM رو با Ollama و Python اجرا میکنی
📝 Promptهای قابلاعتماد NetOps رو با ساختار RACE طراحی میکنی
📦 خروجی CLI و BGP رو به JSON ساختاریافته تبدیل میکنی
💬 Chatbotهایی میسازی که Context عیبیابی رو به خاطر میسپارن
🔌 AI Agentها رو به Toolهای تاییدشده شبکه متصل میکنی
🔍 Troubleshooting Loopهای مبتنی بر شواهد میسازی
🧩 Toolهای قابلاستفاده مجدد شبکه رو از طریق MCP ارائه میدی
🔐 Pilotهای Read-Only رو با کنترلهای امنیتی مناسب برنامهریزی میکنی
👤 این کتاب برای چه کسانیه؟
🌐 این کتاب برای Network Engineerها، NetOps Engineerها، NOC Engineerها، SREها، DevOps Engineerها و متخصصهای Network Automation نوشته شده که میخوان AI رو وارد عیبیابی شبکه کنن، بدون اینکه کنترل سیستم رو از دست بدن.
📌 آشنایی پایه با شبکه و CLI کمک میکنه مطالب رو راحتتر دنبال کنی و داشتن دانش ابتدایی Python برای انجام Labهای کتاب مفیده.
📖 فهرست مطالب
فصل ۱. درک AI Agentها برای عملیات شبکه
فصل ۲. مبانی LLM و راهاندازی Local
فصل ۳. Prompt Engineering برای Network Automation
فصل ۴. تبدیل خروجیهای شبکه به دادههای ساختاریافته
فصل ۵. ساخت Network Chatbot با Memory
فصل ۶. طراحی Toolها و Agentic Workflowها
فصل ۷. ساخت Agent اصلی عیبیابی شبکه
فصل ۸. از Agentهای آزمایشگاهی تا Toolهای قابلاستفاده مجدد با MCP
فصل ۹. حرکت به سمت Network Agentهای آماده پروداکشن
👤 درباره نویسنده
👨💻 سیف بخش Network Automation Architect، Solutions Engineer و مدرس فنی با بیش از ۱۵ سال تجربه در حوزههای Networking، Security، Infrastructure و Automation است.
🧩 تمرکز اصلی کار او کمک به تیمهای مهندسی برای ساخت ورکفلوهای Governedیه که دادههای شبکه، Infrastructure APIها، Toolهای عملیاتی و Approvalهای انسانی رو به سیستمهایی عملی، Observable و امن برای اجرا متصل میکنن.
🔐 پیشزمینه فنی او شامل Automation در DNS/DHCP/IPAM، عملیات شبکه و امنیت، Threat Intelligence Enrichment، ورکفلوهای Compliance، Incident Response و Tool Integration میشه.
⚙️ او با تیمهای مختلف کار کرده تا فرایندهای دستی و Ticket-Driven رو با Patternهای Automation قابلتکرار و مناسب محیط پروداکشن جایگزین کنن.
🤖 فعالیت فعلی او روی این موضوع متمرکزه که AI Agentها، Local LLMها، Prompt Design، Tool Calling، MCP Serverها و Agentic Troubleshooting Loopها چطور میتونن بدون از دست رفتن Validation یا کنترل وارد عملیات شبکه بشن.
🎓 سیف از طریق نوشتهها، Workshopها، ویدئوها و پروژههای کامیونیتی به مهندسها آموزش میده چطور ایدههای AI رو به ورکفلوهای NetOps تبدیل کنن که قابلتست، قابلبررسی و قابلاعتماد باشن.
Build AI-assisted network troubleshooting workflows that parse CLI output, call approved tools, use MCP, and keep evidence visible for review
Network troubleshooting is full of clues, but they are often buried in noisy alerts, long CLI output, missing topology context, and incomplete handoffs. Building AI Agents for Network Operations shows how to use AI agents, LLMs, and network automation in a controlled way, so engineers can get clearer evidence without giving up validation or operational control.
You will start with local LLM workflows using Ollama and Python, then use a simple RACE prompt structure to make repeatable NetOps tasks clearer, safer, and easier to review. You will parse interface and BGP output into structured data, build a chatbot that keeps troubleshooting context, and connect the model to approved tools for device status, interfaces, reachability, topology, and BGP health. You will then build an agentic troubleshooting loop, package reusable network tools with MCP, and learn how to evaluate these workflows against logging, approvals, observability, runbooks, feature flags, and read-only pilot readiness.
By the end of this book, you will have a practical path for turning AI ideas into NetOps workflows that can be tested in a lab, reviewed by your team, and adapted toward real-world network operations with the right controls.
This book is for network engineers, NetOps engineers, NOC engineers, SREs, DevOps engineers, and network automation professionals who want to apply AI to troubleshooting without losing control. Basic networking and CLI familiarity will help, beginner Python knowledge is useful for following the labs.
About the Author
Sif Baksh is a network automation architect, solutions engineer, and technical educator with more than 15 years of experience across networking, security, infrastructure, and automation. His work focuses on helping engineering teams build governed workflows that connect network data, infrastructure APIs, operational tools, and human approvals into systems that are practical, observable, and safe to operate. His technical background includes DNS/DHCP/IPAM automation, network and security operations, threat intelligence enrichment, compliance workflows, incident response, and tool integration. He has worked with teams to replace manual, ticket-driven processes with repeatable automation patterns designed for production environments. His current work explores how AI agents, local LLMs, prompt design, tool calling, MCP servers, and agentic troubleshooting loops can be applied to network operations without losing validation or control. Through his writing, workshops, videos, and community projects, he teaches engineers how to turn AI ideas into NetOps workflows that can be tested, reviewed, and trusted.









