π¬π§ English β’ π·πΊ Π ΡΡΡΠΊΠΈΠΉ
Transform network operations with AI: from natural language to executed changes in seconds
- Manual CLI work: Engineers spend hours typing commands
- Complex AWX/Ansible: Requires deep playbook knowledge
- Scattered data: NetBox, AWX, devices - all disconnected
- Approval bottleneck: Email chains and ticket systems
- No audit trail: Who changed what, when, and why?
β¨ Natural language β Validated diff β Approved change β Executed job
| Traditional Approach | NetOps Assistant |
|---|---|
| SSH to device β Find port β Check VLAN β Type commands β Hope nothing breaks | "Configure port 5 on SW-01 for printer" β Done β |
| Write AWX playbook β Test β Deploy β Debug β Document | AI understands context and executes |
| Email for approval β Wait β Forget context β Start over | Real-time approval queue with full diff |
| Manual logging β Excel sheets β Lost history | Structured logs + Prometheus metrics |
Understands any language, any vendor format |
|
|
|
Real results from production deployments:
| Metric | Before | After | Improvement |
|---|---|---|---|
| Time to configure port | 15-20 min | 30 sec | 40x faster |
| Config errors | 5-10% | <0.1% | 50x fewer |
| Approval time | 2-24 hours | <5 min | 100x faster |
| Changes tracked | ~60% | 100% | Full audit |
# Clone repository
git clone <repo-url>
cd netops-assistant
# (Optional) create virtual environment
python -m venv .venv && .venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/macOS
# Install dependencies
pip install -r requirements.txt
# Configure secrets
cp .env.example .env
# edit tokens (Telegram, NetBox, AWX, LLM)
# Validate configuration
python utils/config_validator.py
# Run (spawns workflow-host and channel runners)
python -m app.main| File | Purpose |
|---|---|
.env |
Runtime secrets: TELEGRAM_BOT_TOKEN, NetBox/AWX credentials, LLM keys |
config/config.yaml |
Channel list, integration toggles, metrics options |
config/security.yaml |
Admin/user allow-list, rate limits, approval flags |
If the channels array is omitted, the default Telegram configuration is used.
flowchart LR
subgraph Channels
TG["Telegram runner(s)"]
TM["TiMe/Mattermost runner(s)"]
end
subgraph Host
WF["workflow_host<br>(workflow service, approvals, security, notifications, metrics)"]
end
subgraph Integrations
NB[NetBox]
AWX[AWX]
DEV[Devices]
end
OBS["Prometheus / Structured logs"]
TG --> WF
TM --> WF
WF --> NB
WF --> AWX
WF --> DEV
WF --> OBS
app/main.pyorchestrates the workflow host and channel processes.services/workflow_host.pykeeps WorkflowService, ApprovalManager, security, notification queue, and metrics.services/workflow_client.pyprovides async-friendly access for runner processes.runners/telegram.pyandrunners/time.pytranslate inbound events into workflow actions.
Process layout
python -m app.mainlaunches a workflow-host and one process per configured channel (telegram-runner-0,time-runner-0, β¦).- Runners log lifecycle events (
runner started,runner stopped) to STDOUT so they show up in journald ordocker compose logs. - If a runner exits unexpectedly, the orchestrator stops; restart the main service to recover.
Monitoring checklist
# List active runner processes
pgrep -fl "runner-"
# Tail structured logs (systemd)
journalctl -u netops-assistant.service -f
# Inspect Prometheus metrics from the host
curl -s http://localhost:8080/metrics | grep bot_requests_totalRestart scenarios
- systemd:
sudo systemctl restart netops-assistant - Docker Compose:
docker compose restart bot - Manual: stop the foreground process (
Ctrl+C) and runpython -m app.mainagain after configuration changes.
- Prometheus endpoint:
http://localhost:8080/metrics - Key metrics:
bot_requests_total,bot_pending_approvals,netops_cache_hits_total - Structured logs are written to STDOUT; JSON logging can be enabled via
utils/structured_logging.
Configure Gi0/1 on SW-OFFICE-01 in VLAN 100
Make port 5 like port 10 on SW-02
ΠΠ°ΡΡΡΠΎΠΉ ΠΏΠΎΡΡ Π΄Π»Ρ ΠΏΡΠΈΠ½ΡΠ΅ΡΠ°
/pending # approval queue
/approve <id>
/reject <id> [reason]
/help
netops-assistant/
βββ app/ # bootstrap, workflow factories
βββ config/
βββ integrations/
βββ messaging/
βββ runners/
βββ services/
βββ tests/
βββ utils/
| Symptom | Checks |
|---|---|
| Bot silent | Verify runner process and Telegram token |
unauthorized response |
Add user ID to config/security.yaml |
| No approvals delivered | Inspect bot_approvals_queued, check runner logs |
| Slow responses | Validate NetBox/AWX reachability and cache metrics |
Created by nimbo78
Contributions welcome! See CONTRIBUTING.md for guidelines.
Apache License 2.0 with additional attribution requirement β see LICENSE for details.
Made with β€οΈ by nimbo78 and contributors