kogunlowo123/incident-response-agent
GitHub: kogunlowo123/incident-response-agent
企业级事件响应 AI Agent,实现从事件检测、严重程度分类、团队升级到事后复盘报告的全流程自动化。
Stars: 0 | Forks: 0
# 事件响应 Agent
[](https://github.com/kogunlowo123/incident-response-agent/actions/workflows/ci.yml)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
自动化事件管理 Agent,可检测生产事件、分类严重程度、触发升级工作流、协调响应团队、生成事件后时间线,并生成免责事后复盘报告。
## 领域专用工具
| 工具 | 描述 |
|------|-------------|
| `detect_incident` | 分析警报和指标以确认事件 |
| `classify_severity` | 根据影响对事件严重程度进行分类 (SEV1-SEV4) |
| `escalate` | 触发向待命团队和相关人员的升级 |
| `create_timeline` | 从日志和警报生成事件时间线 |
| `generate_postmortem` | 生成免责事后复盘报告 |
| `run_diagnostic` | 对受影响的服务运行自动化诊断检查 |
## API Endpoint
| 方法 | 路径 | 描述 |
|--------|------|-------------|
| `POST` | `/api/v1/incidents` | 创建事件 |
| `GET` | `/api/v1/incidents/{incident_id}` | 获取事件详情 |
| `POST` | `/api/v1/incidents/{incident_id}/classify` | 分类严重程度 |
| `POST` | `/api/v1/incidents/{incident_id}/escalate` | 升级事件 |
| `GET` | `/api/v1/incidents/{incident_id}/timeline` | 获取事件时间线 |
| `POST` | `/api/v1/incidents/{incident_id}/postmortem` | 生成事后复盘 |
## 功能
- 事件检测
- 严重程度分类
- 升级
- 响应协调
- 事后复盘生成
## 集成
- Pagerduty
- Opsgenie
- Slack Connector
- Prometheus
- Datadog
## 架构
```
incident-response-agent/
├── src/
│ ├── agent/ # Domain-specific agent logic
│ │ ├── incident_response_agent_agent.py # Main agent with domain tools
│ │ ├── tools.py # 6 domain-specific tools
│ │ └── prompts.py # Expert system prompts
│ ├── api/ # FastAPI routes
│ │ └── routes/
│ │ ├── domain.py # 6 domain-specific endpoints
│ │ └── health.py # Health check
│ ├── connectors/ # 5 integration connectors
│ ├── config/ # Settings and configuration
│ ├── models/ # Domain-specific Pydantic schemas
│ ├── rag/ # RAG pipeline
│ ├── mcp/ # MCP server
│ └── a2a/ # Agent-to-agent protocol
├── tests/
├── infrastructure/ # Terraform, K8s, Helm, Docker
├── dashboard/ # Next.js frontend
└── docs/ # Architecture and deployment docs
```
## 快速开始
```
# 安装
pip install -e ".[dev]"
# 运行
make dev
# 测试
make test
# Docker
docker compose up -d
```
## 主要服务
**PagerDuty + OpsGenie + Slack + Prometheus**
作为企业级 AI Agent 平台的一部分构建。
标签:IT运维, Python, Socks5代理, 人工智能, 子域名突变, 无后门, 用户模式Hook绕过, 网络测绘, 网络调试, 自动化, 请求拦截