Welcome to the Network Automation Forum (NAF) 2025 Workshop! In this hands-on workshop, you'll learn to build intelligent AI agents for network operations using the NCP SDK (Network Copilot Software Development Kit).
Before starting the workshop, ensure you have:
- ✅ Python 3.9+ installed on your system
- ✅ Git installed
- ✅ Code editor (VS Code recommended, or your preferred editor)
- ✅ NCP platform account (pre-configured for workshop attendees)
git clone https://github.com/AvizNetworks/NAF-Workshop-2025
cd NAF-Workshop-2025Create and activate a virtual environment to isolate workshop dependencies:
On Linux/macOS:
python -m venv .venv
source .venv/bin/activateOn Windows:
python -m venv .venv
.venv\Scripts\activateYou should see (.venv) prefix in your terminal prompt, indicating the virtual environment is active.
Install the NCP SDK package from PyPI:
pip install ncp-sdkCheck that the NCP SDK is installed correctly:
ncp --helpYou should see the NCP CLI help output with available commands.
The NCP SDK provides a streamlined workflow for developing, testing, and deploying AI agents. Here's the standard development cycle:
Create a new agent project using the NCP SDK:
ncp init weather-agent
cd weather-agentThis creates the standard NCP SDK project structure with all necessary files.
Authenticate with the NCP platform (run this from inside your agent directory):
ncp authenticateYou'll be prompted for:
- Platform URL: Provided by workshop instructor
- Username: Your registered email address
- Password:
NAF@2025
Your authentication credentials are stored locally and used for subsequent deployments.
Before deploying, validate that your agent is properly configured:
ncp validate .This checks:
- Project structure (agents/, tools/, ncp.toml)
- Configuration file syntax
- Entry point exists and is valid
- Dependencies are specified correctly
Expected output:
✓ Project structure validated
✓ Configuration file valid
✓ Entry point found: agents.main_agent:agent
✓ Validation passed!
Package your agent into a .ncp file for deployment:
ncp packageThis creates a .ncp archive containing:
- All Python code (agents/, tools/)
- Configuration (ncp.toml)
- Dependencies (requirements.txt, apt-requirements.txt)
- Knowledge base files (if present)
Deploy your packaged agent to the NCP platform:
ncp deploy <agent-name>.ncpExample:
ncp deploy weather-agent.ncpFirst-time deployment: This command registers your agent on the platform.
Updating an existing agent:
ncp deploy <agent-name>.ncp --updateTest your deployed agent interactively using the CLI playground:
Basic interactive mode:
ncp playground --agent weather-agentWith tool call visibility:
ncp playground --agent weather-agent --show-toolsThe --show-tools flag shows:
- Which tools the LLM is calling
- Tool parameters
- Tool results
- Agent reasoning process
This is invaluable for debugging and understanding how your agent works.
Focus: Network inventory analytics with natural language and visualizations
Build an AI-powered analytics agent that transforms NetBox inventory data into actionable insights through conversational queries and automated chart generation using the Charts MCP Server.
See lab-01-netbox-agent/README.md for detailed instructions and example queries.
Focus: End-to-end network troubleshooting workflow with multi-system orchestration
Build an intelligent agent that orchestrates network incident resolution by integrating ServiceNow for ticket management, Splunk for log analysis, and SONiC MCP for device remediation. Includes knowledge base integration for historical pattern matching.
See lab-02-netops-agent/README.md for detailed instructions and use case walkthrough.
Focus: Network fabric automation and multi-tenancy management
Build an AI-powered fabric management agent that automates network operations across entire fabrics or individual devices. Manage interfaces, VLANs, host allocation, and multi-tenancy through natural language commands using a specialized Fabric Management MCP server.
See lab-03-fabric-agent/README.md for detailed instructions and example commands.
| Command | Description |
|---|---|
ncp --help |
Show all available commands and options |
ncp authenticate |
Authenticate with the NCP platform |
ncp validate . |
Validate current project structure and configuration |
ncp package . |
Create a .ncp deployment package |
ncp deploy <file>.ncp |
Deploy agent to platform (first time) |
ncp deploy <file>.ncp --update |
Update an existing deployed agent |
ncp playground --agent <name> |
Interactive testing with your agent |
ncp playground --agent <name> --show-tools |
Show LLM tool calls during testing |
ncp list agents |
List all your deployed agents |
ncp remove --agent <name> |
Remove a deployed agent |
Each lab follows the standard NCP SDK project structure:
lab-name/
├── ncp.toml # Project configuration and metadata
├── requirements.txt # Python dependencies
├── apt-requirements.txt # System dependencies (optional)
├── agents/
│ ├── __init__.py
│ └── main_agent.py # Main agent definition
├── tools/
│ ├── __init__.py
│ └── *.py # Custom tool implementations
└── knowledge/ # Knowledge base files (optional)
└── *.md
Key files:
ncp.toml: Defines project metadata, Python version, entry pointagents/main_agent.py: Where you define your agent's behavior, instructions, and capabilitiestools/*.py: Custom Python functions decorated with@toolthat your agent can callknowledge/*.md: Markdown files for vector search (automatically indexed)
Symptom: ncp: command not found or wrong Python version
Solution:
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # WindowsSymptom: pip install ncp-sdk fails
Solutions:
- Ensure Python 3.9+ is installed:
python --version - Update pip:
pip install --upgrade pip - Check internet connectivity
Symptom: "Authentication failed" when running ncp authenticate
Solutions:
- Verify you're in a lab directory (e.g.,
cd lab-01-netbox-agent) - Check platform URL in
ncp.tomlor as provided by instructor - Verify username is correct
- Ensure password is exactly:
NAF@2025 - Check network connectivity to platform
Symptom: ncp validate . reports errors
Solutions:
- Ensure you're in the correct lab directory
- Check that
ncp.tomlexists - Verify
agents/main_agent.pyexists - Check that entry point in
ncp.tomlmatches actual file structure
Symptom: ncp deploy fails
Solutions:
- Run
ncp validate .first to check for configuration issues - Ensure you're authenticated: run
ncp authenticateagain - For updates, use
--updateflag:ncp deploy <file>.ncp --update - Check platform connectivity
Symptom: ncp playground doesn't start or agent not found
Solutions:
- Ensure agent is deployed:
ncp list agents - Check agent name matches deployment
- Verify platform authentication is valid
- Always validate before deploying: Run
ncp validate .to catch issues early - Use the playground for testing: Test your agent with
--show-toolsto debug - Read lab READMEs carefully: Each lab has specific instructions and learning objectives
- Experiment: Modify agents, try different instructions, add new tools
- Ask questions: Workshop instructors are here to help
- Make changes to your agent code
- Validate:
ncp validate . - Package:
ncp package - Deploy:
ncp deploy <agent-name>.ncp --update - Test:
ncp playground --agent <name> --show-tools - Iterate based on results
Ready to start? Head to Lab 1:
cd lab-01-netbox-agent
cat README.md # Read the lab instructionsFollow the lab README for detailed use case walkthrough, deployment instructions, and learning objectives.
Happy building! 🚀