How tejas-pd/net_assist works
The product is a natural-language network administration assistant with a parallel local CLI. Its main workflow is user request → local LLM tool selection → assistant validation and MCP invocation → server tool dispatch → policy-checked network operation → result returned for explanation. The excerpts show the core calls and execution boundary; some assistant and server code is omitted, so links beyond those calls are based only on explicit README statements.
Main entry points: mcp_server.py MCP Server Tools · runner.py Command Runner · assistant.py Natural-language Assistant · policy.py Network Policy
Components 14
User Interaction
- Natural-language Assistant
assistant.py - Local Ollama LLM
- Local CLI
cli.py
MCP Tooling
- MCP Server Tools
server/mcp_server.py
Policy and Network Operations
- Network Policy
core/policy.py - Policy Configuration
policies/network_policy.yaml - Firewall Controls
core/network_tools.py - Bandwidth Limiting
core/network_tools.py - Connectivity Check
core/network_tools.py - Bandwidth Test
core/network_tools.py
Command Execution
- Command Runner
core/runner.py - Audit Log
Other components
- Administrator
- Network Utilities
Connections 26
- Administrator → Natural-language Assistant: submits request
README.md - Natural-language Assistant → Local Ollama LLM: sends request
README.md - Local Ollama LLM → Natural-language Assistant: selects tool
README.md - Natural-language Assistant → MCP Server Tools: invokes tool
assistant.py - MCP Server Tools → Natural-language Assistant: returns result
README.md - Natural-language Assistant → Administrator: explains result
README.md - Administrator → Local CLI: runs command
cli.py - Local CLI → Firewall Controls: calls controls
cli.py - Local CLI → Bandwidth Limiting: calls limiter
cli.py - MCP Server Tools → Firewall Controls: dispatches tools
server/mcp_server.py - MCP Server Tools → Bandwidth Limiting: dispatches tool
server/mcp_server.py - MCP Server Tools → Connectivity Check: dispatches tool
server/mcp_server.py - MCP Server Tools → Bandwidth Test: dispatches tool
server/mcp_server.py - MCP Server Tools → Network Policy: loads policy
server/mcp_server.py - MCP Server Tools → Command Runner: configures runner
server/mcp_server.py - Network Policy → Policy Configuration: loads rules
core/policy.py - Firewall Controls → Network Policy: validates target
core/network_tools.py - Bandwidth Limiting → Network Policy: validates settings
core/network_tools.py - Connectivity Check → Network Policy: validates target
core/network_tools.py - Bandwidth Test → Network Policy: validates target
core/network_tools.py - Firewall Controls → Command Runner: runs commands
core/network_tools.py - Bandwidth Limiting → Command Runner: runs commands
core/network_tools.py - Connectivity Check → Command Runner: runs monitor
core/network_tools.py - Bandwidth Test → Command Runner: observes target
core/network_tools.py - Command Runner → Network Utilities: executes commands
core/runner.py - Command Runner → Audit Log: records results
core/runner.py