{"id":28863147,"url":"https://github.com/tierraskyllc/network-automation-system","last_synced_at":"2026-04-09T11:01:13.891Z","repository":{"id":299898407,"uuid":"1004572977","full_name":"tierraskyllc/network-automation-system","owner":"tierraskyllc","description":"Hybrid LangGraph/LangChain/MCP Network Automation System with pyATS/Genie - Intelligent network device management with natural language interface","archived":false,"fork":false,"pushed_at":"2025-06-18T21:01:53.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-18T22:18:47.049Z","etag":null,"topics":["ai","automation","cisco","fastapi","genie","langchain","langgraph","mcp","network-automation","network-management","postgresql","pyats","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tierraskyllc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-18T20:58:36.000Z","updated_at":"2025-06-18T20:59:04.000Z","dependencies_parsed_at":"2025-06-18T22:18:57.149Z","dependency_job_id":"b1401c8c-6730-4fb9-8719-e9833e55a1fb","html_url":"https://github.com/tierraskyllc/network-automation-system","commit_stats":null,"previous_names":["tierraskyllc/network-automation-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tierraskyllc/network-automation-system","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tierraskyllc%2Fnetwork-automation-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tierraskyllc%2Fnetwork-automation-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tierraskyllc%2Fnetwork-automation-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tierraskyllc%2Fnetwork-automation-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tierraskyllc","download_url":"https://codeload.github.com/tierraskyllc/network-automation-system/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tierraskyllc%2Fnetwork-automation-system/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001115,"owners_count":26083021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","automation","cisco","fastapi","genie","langchain","langgraph","mcp","network-automation","network-management","postgresql","pyats","python"],"created_at":"2025-06-20T07:02:02.120Z","updated_at":"2025-10-09T09:13:57.061Z","avatar_url":"https://github.com/tierraskyllc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hybrid Network Automation System\n## LangGraph/LangChain/MCP with pyATS/Genie Integration\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.104+-green.svg)](https://fastapi.tiangolo.com/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15+-blue.svg)](https://www.postgresql.org/)\n\nA comprehensive network automation system that combines the power of LangGraph workflow orchestration, LangChain natural language processing, and Model Context Protocol (MCP) for intelligent network device management.\n\n## 🚀 Features\n\n### Core Capabilities\n- **Natural Language Interface**: Interact with network devices using conversational commands\n- **Intelligent Workflow Orchestration**: Complex multi-device operations with LangGraph\n- **Rich Context Management**: MCP-powered device and topology awareness\n- **Multi-Vendor Support**: pyATS/Genie integration for Cisco, Juniper, Arista, and more\n- **Comprehensive Topology Discovery**: Automated network mapping and relationship tracking\n- **Enterprise Security**: Role-based access control, audit logging, and credential management\n\n### Supported Platforms\n- **Cisco**: IOS, IOS-XE, IOS-XR, NX-OS, WLC (Wireless Controllers)\n- **Juniper**: JunOS\n- **Arista**: EOS\n- **Future**: Palo Alto, Fortinet, F5, and more\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    User Interface Layer                     │\n│                  (CLI + Web Dashboard)                      │\n└─────────────────────────────────────────────────────────────┘\n                              │\n┌─────────────────────────────────────────────────────────────┐\n│                   FastAPI Gateway                           │\n│              (Authentication \u0026 Routing)                     │\n└─────────────────────────────────────────────────────────────┘\n                              │\n        ┌─────────────────────┼─────────────────────┐\n        ▼                     ▼                     ▼\n┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐\n│   LangChain     │  │   LangGraph     │  │   MCP Server    │\n│   (NL Processing)│  │  (Workflows)    │  │  (Context)      │\n└─────────────────┘  └─────────────────┘  └─────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│              Network Execution Layer                        │\n│                 (pyATS/Genie)                              │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                PostgreSQL Database                          │\n│        (Devices, Topology, Commands, Audit)                │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## 🛠️ Technology Stack\n\n- **Backend**: FastAPI, Python 3.11+\n- **Database**: PostgreSQL 15+ with JSONB support\n- **Caching**: Redis\n- **Network Automation**: pyATS/Genie, Unicon\n- **AI/ML**: LangChain, LangGraph, OpenAI/Ollama\n- **Context Protocol**: Model Context Protocol (MCP)\n- **Containerization**: Docker, Docker Compose\n- **Monitoring**: Prometheus, Grafana\n- **Testing**: pytest, pytest-asyncio\n\n## 📋 Prerequisites\n\n- Python 3.11 or higher\n- PostgreSQL 15 or higher\n- Redis 7 or higher\n- Docker and Docker Compose (for containerized deployment)\n- Git\n\n## 🚀 Quick Start\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/your-org/network-automation-system.git\ncd network-automation-system\n```\n\n### 2. Environment Setup\n```bash\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### 3. Database Setup\n```bash\n# Start PostgreSQL and Redis with Docker\ndocker-compose -f deployment/docker-compose/docker-compose.dev.yml up -d postgres redis\n\n# Run database migrations\nalembic upgrade head\n```\n\n### 4. Configuration\n```bash\n# Copy environment template\ncp configs/env.template .env\n\n# Edit .env with your settings\n# - Database connection\n# - OpenAI API key (or Ollama endpoint)\n# - Device credentials\n```\n\n### 5. Start the System\n```bash\n# Development mode\npython -m uvicorn src.api.main:app --reload --host 0.0.0.0 --port 8000\n\n# Or use Docker Compose\ndocker-compose -f deployment/docker-compose/docker-compose.dev.yml up\n```\n\n### 6. Access the System\n- **API Documentation**: http://localhost:8000/docs\n- **Web Interface**: http://localhost:3000\n- **Monitoring**: http://localhost:3001 (Grafana)\n\n## 📖 Documentation\n\n### Quick Links\n- [Installation Guide](docs/installation.md)\n- [Configuration Guide](docs/configuration.md)\n- [API Reference](docs/api-reference.md)\n- [User Guide](docs/user-guide.md)\n- [Developer Guide](docs/developer-guide.md)\n\n### Architecture Documentation\n- [System Architecture](docs/architecture/system-architecture.md)\n- [Database Schema](docs/architecture/database-schema.md)\n- [MCP Implementation](docs/architecture/mcp-implementation.md)\n- [Security Model](docs/architecture/security-model.md)\n\n### Operational Guides\n- [Deployment Guide](docs/operations/deployment.md)\n- [Monitoring Setup](docs/operations/monitoring.md)\n- [Backup \u0026 Recovery](docs/operations/backup-recovery.md)\n- [Troubleshooting](docs/operations/troubleshooting.md)\n\n## 🎯 Usage Examples\n\n### Natural Language Commands\n```bash\n# CLI Interface\nnetwork-automation interactive\n\n\u003e Add a new Cisco wireless controller at 192.168.1.10\n\u003e Show me the status of all access points on WLC-CORP-01\n\u003e Find all devices connected to VLAN 100\n\u003e Backup configurations of all core routers\n```\n\n### API Usage\n```python\nimport httpx\n\n# Execute command via API\nasync with httpx.AsyncClient() as client:\n    response = await client.post(\"http://localhost:8000/api/v1/natural-language/process\", \n        json={\"input\": \"Show interface status on router-01\"})\n    print(response.json())\n```\n\n### Workflow Creation\n```python\nfrom src.langgraph_layer.workflows import WorkflowBuilder\n\n# Create multi-device workflow\nworkflow = WorkflowBuilder() \\\n    .add_command_step(\"Backup Config\", \"show_running_config\", \"router-01\") \\\n    .add_command_step(\"Update SNMP\", \"configure_snmp\", \"router-01\", {\"community\": \"new-string\"}) \\\n    .add_validation_step(\"Verify Config\", \"show_running_config\", \"router-01\") \\\n    .build(\"SNMP Update Workflow\")\n```\n\n## 🧪 Testing\n\n```bash\n# Run all tests\npytest\n\n# Run specific test categories\npytest tests/unit/          # Unit tests\npytest tests/integration/   # Integration tests\npytest tests/e2e/          # End-to-end tests\n\n# Run with coverage\npytest --cov=src --cov-report=html\n```\n\n## 🚀 Deployment\n\n### Docker Compose (Recommended)\n```bash\n# Production deployment\ndocker-compose -f deployment/docker-compose/docker-compose.prod.yml up -d\n\n# Development deployment\ndocker-compose -f deployment/docker-compose/docker-compose.dev.yml up -d\n```\n\n### Kubernetes\n```bash\n# Deploy to Kubernetes\nkubectl apply -f deployment/kubernetes/\n```\n\n## 🔧 Development\n\n### Project Structure\n```\nsrc/\n├── api/                 # FastAPI application\n├── core/               # Database models and core utilities\n├── langchain_layer/    # Natural language processing\n├── langgraph_layer/    # Workflow orchestration\n├── mcp_server/         # Model Context Protocol implementation\n├── network_layer/      # Network device connectivity\n└── topology/           # Network topology management\n\ndocs/                   # Documentation\ntests/                  # Test suites\ndocker/                 # Docker configurations\ndeployment/             # Deployment configurations\nmonitoring/             # Monitoring configurations\n```\n\n### Contributing\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📊 Monitoring\n\nThe system includes comprehensive monitoring with:\n- **Prometheus**: Metrics collection\n- **Grafana**: Visualization and alerting\n- **Application metrics**: Command execution, workflow performance\n- **Infrastructure metrics**: Database, API, network connectivity\n\n## 🔒 Security\n\n- **Authentication**: JWT with multi-factor authentication\n- **Authorization**: Role-based access control (RBAC)\n- **Credential Management**: HashiCorp Vault integration\n- **Audit Logging**: Comprehensive audit trail\n- **Network Security**: Encrypted connections, credential rotation\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🤝 Support\n\n- **Documentation**: [docs/](docs/)\n- **Issues**: [GitHub Issues](https://github.com/your-org/network-automation-system/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/your-org/network-automation-system/discussions)\n\n## 🙏 Acknowledgments\n\n- [pyATS/Genie](https://developer.cisco.com/pyats/) - Network automation framework\n- [LangChain](https://langchain.com/) - LLM application framework\n- [LangGraph](https://langchain-ai.github.io/langgraph/) - Workflow orchestration\n- [FastAPI](https://fastapi.tiangolo.com/) - Modern web framework\n- [Model Context Protocol](https://modelcontextprotocol.io/) - Context management standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftierraskyllc%2Fnetwork-automation-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftierraskyllc%2Fnetwork-automation-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftierraskyllc%2Fnetwork-automation-system/lists"}