gsavla6-hue/ai-devops-agent

GitHub: gsavla6-hue/ai-devops-agent

基于GPT-4o的自主运维Agent,提供基础设施监控、故障检测、自动化响应和任务编排能力。

Stars: 0 | Forks: 0

# 🤖 Ai Devops Agent ![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python) ![OpenAI](https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=for-the-badge&logo=openai) ![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge) ![python](https://img.shields.io/badge/-python-0891b2?style=flat) ![openai](https://img.shields.io/badge/-openai-0891b2?style=flat) ![kubernetes](https://img.shields.io/badge/-kubernetes-0891b2?style=flat) ![docker](https://img.shields.io/badge/-docker-0891b2?style=flat) ![agentic](https://img.shields.io/badge/-agentic-0891b2?style=flat) ![devops](https://img.shields.io/badge/-devops-0891b2?style=flat) ## 🚀 快速开始 ``` # 1. Clone git clone https://github.com/gsavla6-hue/ai-devops-agent.git cd ai-devops-agent # 2. Install pip install -r requirements.txt # 3. Configure cp .env.example .env # 编辑 .env — 添加你的 OPENAI_API_KEY # 4. Run python main.py # Interactive CLI python main.py --task "your task" # Single task python main.py --api # REST API ``` ## ✨ 功能特性 - **自主执行** — 将复杂任务分解为步骤并执行 - **工具调用** — 网页搜索、代码执行、文件操作 - **多轮记忆** — 在对话中记住上下文 - **REST API** — 提供 `/run`、`/chat`、`/stats` 端点的 FastAPI 服务器 - **流式输出** — 支持实时输出流 - **生产就绪** — 包含错误处理、重试机制、日志记录 ## 🔌 API 使用 ``` # 启动 API server python main.py --api # 运行任务 curl -X POST http://localhost:8000/run \ -H "Content-Type: application/json" \ -d '{"task": "Research the latest developments in quantum computing"}' # Chat curl -X POST http://localhost:8000/chat \ -H "Content-Type: application/json" \ -d '{"task": "Explain RAG systems"}' ``` ## 🐍 Python SDK ``` from main import AiDevopsAgent agent = AiDevopsAgent() # 单任务 result = agent.run("Write a Python function to parse JSON files recursively") print(result["output"]) # 交互式 Chat while True: user_input = input("You: ") print(f"Agent: {agent.chat(user_input)}") ``` ## 🏗️ 架构 ``` ai-devops-agent/ ├── main.py # Main agent (entry point) ├── utils/ │ └── helpers.py # Utility functions ├── tests/ │ └── test_agent.py # Test suite ├── agent_outputs/ # Files created by the agent ├── .env.example # Environment template └── requirements.txt ``` ## 🧪 运行测试 ``` pytest tests/ -v ``` ## 📄 许可证 MIT — 查看 [LICENSE](LICENSE) *由 [Gaurav Savla](https://github.com/gsavla6-hue) 构建*
标签:AutoML, AV绕过, DevOps代理, DLL 劫持, Docker, FastAPI, GPT-4o, OpenAI, PE 加载器, Playbook执行, Python, Python SDK, REST API, 人工智能体, 任务自动化, 内存规避, 基础设施监控, 大语言模型, 子域名突变, 安全防御评估, 故障自愈, 无后门, 无线安全, 智能运维(AIOps), 网络测绘, 自主DevOps, 自动化运维, 自动扩缩容, 请求拦截, 逆向工具