opspilot-ai 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/ARCHITECTURE.md +2 -2
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/DEPLOYMENT.md +3 -3
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/PKG-INFO +180 -53
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/README.md +173 -46
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/pyproject.toml +6 -6
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/setup.py +4 -4
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/.env.example +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/LICENSE +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/MANIFEST.in +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/__init__.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/agents/fixer.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/agents/planner.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/agents/remediation.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/agents/verifier.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/cli.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/config.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/__init__.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/deployment_history.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/deps.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/docker.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/env.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/logs.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/production_logs.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/context/project.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/diffs/redis.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/graph/engine.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/graph/nodes.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/memory.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/memory_redis.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/state.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/tools/__init__.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/tools/dep_tools.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/tools/env_tools.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/tools/log_tools.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/tools/pattern_analysis.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/utils/__init__.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/utils/llm.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot/utils/llm_providers.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/opspilot_ai.egg-info/SOURCES.txt +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/setup.cfg +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/tests/__init__.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/tests/test_llm_providers.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/tests/test_pattern_analysis.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/tests/test_production_logs.py +0 -0
- {opspilot_ai-0.1.0 → opspilot_ai-0.1.2}/tests/test_remediation.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# OpsPilot Architecture 🏗️
|
|
1
|
+
# OpsPilot-AI Architecture 🏗️
|
|
2
2
|
|
|
3
3
|
> Production-grade multi-agent AI system for autonomous incident analysis and resolution
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## 🎯 System Overview
|
|
16
16
|
|
|
17
|
-
OpsPilot is a **production-grade incident analysis system** that uses specialized AI agents, multi-provider LLM routing, and Redis-based memory to automatically diagnose and resolve runtime issues with enterprise-level reliability.
|
|
17
|
+
OpsPilot-AI is a **production-grade incident analysis system** that uses specialized AI agents, multi-provider LLM routing, and Redis-based memory to automatically diagnose and resolve runtime issues with enterprise-level reliability.
|
|
18
18
|
|
|
19
19
|
### 🎨 Core Design Principles
|
|
20
20
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# OpsPilot Deployment Guide
|
|
1
|
+
# OpsPilot-AI Deployment Guide
|
|
2
2
|
|
|
3
3
|
## 🎯 Deployment Options
|
|
4
4
|
|
|
5
|
-
OpsPilot can be deployed in 3 ways depending on your use case.
|
|
5
|
+
OpsPilot-AI can be deployed in 3 ways depending on your use case.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ OpsPilot can be deployed in 3 ways depending on your use case.
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
# Install from PyPI
|
|
15
|
-
pip install opspilot
|
|
15
|
+
pip install opspilot-ai
|
|
16
16
|
|
|
17
17
|
# Install Ollama (required for LLM)
|
|
18
18
|
# macOS/Linux
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opspilot-ai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: AI-powered production incident analysis tool using multi-agent systems
|
|
5
|
-
Home-page: https://github.com/choudharikiranv15/
|
|
5
|
+
Home-page: https://github.com/choudharikiranv15/OpsPilot-AI
|
|
6
6
|
Author: Kiran Vijaykumar Choudhari
|
|
7
7
|
Author-email: Kiran Vijaykumar Choudhari <choudharikiranv2003@gmail.com>
|
|
8
8
|
License: MIT
|
|
9
|
-
Project-URL: Homepage, https://github.com/choudharikiranv15/
|
|
10
|
-
Project-URL: Documentation, https://github.com/choudharikiranv15/
|
|
11
|
-
Project-URL: Repository, https://github.com/choudharikiranv15/
|
|
12
|
-
Project-URL: Bug Tracker, https://github.com/choudharikiranv15/
|
|
13
|
-
Project-URL: Changelog, https://github.com/choudharikiranv15/
|
|
9
|
+
Project-URL: Homepage, https://github.com/choudharikiranv15/OpsPilot-AI
|
|
10
|
+
Project-URL: Documentation, https://github.com/choudharikiranv15/OpsPilot-AI#readme
|
|
11
|
+
Project-URL: Repository, https://github.com/choudharikiranv15/OpsPilot-AI
|
|
12
|
+
Project-URL: Bug Tracker, https://github.com/choudharikiranv15/OpsPilot-AI/issues
|
|
13
|
+
Project-URL: Changelog, https://github.com/choudharikiranv15/OpsPilot-AI/releases
|
|
14
14
|
Keywords: ai,mlops,devops,incident-analysis,sre,production-monitoring,agentic-ai,multi-agent,llm,observability,incident-response,automation
|
|
15
15
|
Classifier: Development Status :: 3 - Alpha
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
@@ -57,17 +57,21 @@ Dynamic: home-page
|
|
|
57
57
|
Dynamic: license-file
|
|
58
58
|
Dynamic: requires-python
|
|
59
59
|
|
|
60
|
-
# OpsPilot 🤖
|
|
60
|
+
# OpsPilot-AI 🤖
|
|
61
|
+
|
|
62
|
+
[](https://pypi.org/project/opspilot-ai/)
|
|
63
|
+
[](https://www.python.org/downloads/)
|
|
64
|
+
[](https://opensource.org/licenses/MIT)
|
|
61
65
|
|
|
62
66
|
> An intelligent agentic AI CLI tool for automated incident analysis and error resolution
|
|
63
67
|
|
|
64
|
-
OpsPilot is your AI-powered Site Reliability Engineer that analyzes your projects, identifies runtime issues, and suggests safe fixes—all through a simple command-line interface.
|
|
68
|
+
OpsPilot-AI is your AI-powered Site Reliability Engineer that analyzes your projects, identifies runtime issues, and suggests safe fixes—all through a simple command-line interface.
|
|
65
69
|
|
|
66
70
|
---
|
|
67
71
|
|
|
68
|
-
## 🎯 What is OpsPilot?
|
|
72
|
+
## 🎯 What is OpsPilot-AI?
|
|
69
73
|
|
|
70
|
-
OpsPilot uses a **multi-agent AI architecture** to understand your project's context, form hypotheses about runtime issues, and provide evidence-based fix recommendations. Think of it as having an experienced SRE on your team, available 24/7.
|
|
74
|
+
OpsPilot-AI uses a **multi-agent AI architecture** to understand your project's context, form hypotheses about runtime issues, and provide evidence-based fix recommendations. Think of it as having an experienced SRE on your team, available 24/7.
|
|
71
75
|
|
|
72
76
|
### Key Capabilities
|
|
73
77
|
|
|
@@ -83,86 +87,203 @@ OpsPilot uses a **multi-agent AI architecture** to understand your project's con
|
|
|
83
87
|
|
|
84
88
|
---
|
|
85
89
|
|
|
86
|
-
## 🚀 Quick Start
|
|
87
|
-
|
|
88
|
-
### Prerequisites
|
|
89
|
-
|
|
90
|
-
- Python 3.8 or higher
|
|
91
|
-
- At least ONE of the following LLM providers:
|
|
92
|
-
- [Ollama](https://ollama.ai/) (local, free, recommended)
|
|
93
|
-
- Google Gemini API key (free tier)
|
|
94
|
-
- OpenRouter API key (free models available)
|
|
95
|
-
- HuggingFace API token (free tier)
|
|
90
|
+
## 🚀 Quick Start (2 Minutes Setup)
|
|
96
91
|
|
|
97
|
-
###
|
|
92
|
+
### Step 1: Install OpsPilot-AI
|
|
98
93
|
|
|
99
94
|
```bash
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
cd opspilot
|
|
95
|
+
pip install opspilot-ai
|
|
96
|
+
```
|
|
103
97
|
|
|
104
|
-
|
|
105
|
-
pip install -e .
|
|
98
|
+
### Step 2: Setup LLM (Choose ONE Option)
|
|
106
99
|
|
|
107
|
-
|
|
108
|
-
pip install -e ".[redis]"
|
|
100
|
+
OpsPilot-AI needs an LLM to analyze your code. Choose **one** of these options:
|
|
109
101
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
#### Option A: Ollama (Recommended - Free & Private)
|
|
113
105
|
|
|
114
|
-
|
|
106
|
+
Ollama runs locally on your machine. Your code never leaves your computer.
|
|
115
107
|
|
|
116
|
-
**
|
|
108
|
+
**For macOS/Linux:**
|
|
117
109
|
```bash
|
|
118
110
|
# Install Ollama
|
|
119
111
|
curl -fsSL https://ollama.ai/install.sh | sh
|
|
120
112
|
|
|
121
|
-
# Pull
|
|
113
|
+
# Pull the AI model (one-time download, ~4GB)
|
|
122
114
|
ollama pull llama3
|
|
115
|
+
|
|
116
|
+
# Verify it's running
|
|
117
|
+
ollama list
|
|
123
118
|
```
|
|
124
119
|
|
|
125
|
-
**
|
|
120
|
+
**For Windows:**
|
|
121
|
+
1. Download Ollama from [ollama.ai/download](https://ollama.ai/download)
|
|
122
|
+
2. Install and run the application
|
|
123
|
+
3. Open terminal and run:
|
|
126
124
|
```bash
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
ollama pull llama3
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
#### Option B: Cloud API (No Local Install Required)
|
|
131
|
+
|
|
132
|
+
Use cloud-based LLMs with free tiers. Set **one** of these environment variables:
|
|
129
133
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
#
|
|
133
|
-
|
|
134
|
+
**Google Gemini (Recommended Cloud Option):**
|
|
135
|
+
```bash
|
|
136
|
+
# Get free API key: https://makersuite.google.com/app/apikey
|
|
137
|
+
export GOOGLE_API_KEY="your-api-key-here"
|
|
134
138
|
```
|
|
135
139
|
|
|
136
|
-
|
|
140
|
+
**OpenRouter (100+ Models Available):**
|
|
141
|
+
```bash
|
|
142
|
+
# Get free API key: https://openrouter.ai/keys
|
|
143
|
+
export OPENROUTER_API_KEY="your-api-key-here"
|
|
144
|
+
```
|
|
137
145
|
|
|
138
|
-
|
|
146
|
+
**HuggingFace:**
|
|
147
|
+
```bash
|
|
148
|
+
# Get free token: https://huggingface.co/settings/tokens
|
|
149
|
+
export HUGGINGFACE_API_KEY="your-api-key-here"
|
|
150
|
+
```
|
|
139
151
|
|
|
140
|
-
|
|
152
|
+
**Windows Users (set environment variable):**
|
|
153
|
+
```cmd
|
|
154
|
+
set GOOGLE_API_KEY=your-api-key-here
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### Step 3: Analyze Your Project
|
|
141
160
|
|
|
142
161
|
```bash
|
|
143
|
-
#
|
|
162
|
+
# Navigate to your project
|
|
163
|
+
cd /path/to/your/project
|
|
164
|
+
|
|
165
|
+
# Run analysis
|
|
144
166
|
opspilot analyze
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
That's it! OpsPilot-AI will analyze your project and provide diagnosis.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 📖 Usage Examples
|
|
145
174
|
|
|
175
|
+
### Basic Commands
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Quick analysis (fastest)
|
|
179
|
+
opspilot analyze --mode quick
|
|
180
|
+
|
|
181
|
+
# Deep analysis (thorough, recommended)
|
|
182
|
+
opspilot analyze --mode deep
|
|
183
|
+
|
|
184
|
+
# Verbose output (see what's happening)
|
|
185
|
+
opspilot analyze --verbose
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Advanced Commands
|
|
189
|
+
|
|
190
|
+
```bash
|
|
146
191
|
# Analyze with production logs from S3
|
|
147
192
|
opspilot analyze --log-source s3://my-bucket/logs/app.log
|
|
148
193
|
|
|
149
|
-
# Analyze with deployment correlation
|
|
194
|
+
# Analyze with deployment correlation (links errors to git commits)
|
|
150
195
|
opspilot analyze --deployment-analysis --since-hours 48
|
|
151
196
|
|
|
152
|
-
# JSON output for automation
|
|
197
|
+
# JSON output for CI/CD automation
|
|
153
198
|
opspilot analyze --json --mode quick
|
|
154
199
|
|
|
155
|
-
#
|
|
200
|
+
# Analyze specific log file
|
|
201
|
+
opspilot analyze --log-source /var/log/myapp/error.log
|
|
202
|
+
|
|
203
|
+
# Full debugging output
|
|
156
204
|
opspilot analyze --verbose --debug
|
|
157
205
|
```
|
|
158
206
|
|
|
207
|
+
### Analysis Modes
|
|
208
|
+
|
|
209
|
+
| Mode | Speed | LLM Calls | Use Case |
|
|
210
|
+
|------|-------|-----------|----------|
|
|
211
|
+
| `quick` | Fast | 1 | Quick check, CI/CD pipelines |
|
|
212
|
+
| `deep` | Thorough | Up to 4 | Detailed incident analysis |
|
|
213
|
+
| `explain` | Instant | 0 | Context gathering only (no LLM) |
|
|
214
|
+
|
|
215
|
+
### Installation Options
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Basic (just the CLI)
|
|
219
|
+
pip install opspilot-ai
|
|
220
|
+
|
|
221
|
+
# With Redis support (remembers past incidents)
|
|
222
|
+
pip install "opspilot-ai[redis]"
|
|
223
|
+
|
|
224
|
+
# With AWS support (S3, CloudWatch logs)
|
|
225
|
+
pip install "opspilot-ai[aws]"
|
|
226
|
+
|
|
227
|
+
# With Kubernetes support (K8s pod logs)
|
|
228
|
+
pip install "opspilot-ai[k8s]"
|
|
229
|
+
|
|
230
|
+
# Everything included
|
|
231
|
+
pip install "opspilot-ai[all]"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 🔧 Troubleshooting
|
|
237
|
+
|
|
238
|
+
### "No LLM providers available"
|
|
239
|
+
|
|
240
|
+
You need to set up an LLM. Choose one:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Option 1: Install Ollama (recommended)
|
|
244
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
245
|
+
ollama pull llama3
|
|
246
|
+
|
|
247
|
+
# Option 2: Set a cloud API key
|
|
248
|
+
export GOOGLE_API_KEY="your-key"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### "Ollama connection refused"
|
|
252
|
+
|
|
253
|
+
Make sure Ollama is running:
|
|
254
|
+
```bash
|
|
255
|
+
# Start Ollama service
|
|
256
|
+
ollama serve
|
|
257
|
+
|
|
258
|
+
# In another terminal, verify it works
|
|
259
|
+
ollama list
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### "No logs found"
|
|
263
|
+
|
|
264
|
+
OpsPilot-AI looks for logs in these locations:
|
|
265
|
+
- `./logs/` directory
|
|
266
|
+
- `*.log` files in project root
|
|
267
|
+
- Files specified with `--log-source`
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Specify log file directly
|
|
271
|
+
opspilot analyze --log-source ./my-app/error.log
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### "Context collected: 0 env vars"
|
|
275
|
+
|
|
276
|
+
Make sure you have a `.env` file in your project directory, or environment variables set.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
159
280
|
**Example Output:**
|
|
160
281
|
|
|
161
282
|
```
|
|
162
283
|
Similar issues detected from past runs:
|
|
163
284
|
- Redis connection issue caused by network or Redis server downtime (confidence 0.8)
|
|
164
285
|
|
|
165
|
-
OpsPilot initialized
|
|
286
|
+
OpsPilot-AI initialized
|
|
166
287
|
Project detected: /your/project
|
|
167
288
|
|
|
168
289
|
Planner Agent reasoning...
|
|
@@ -200,7 +321,7 @@ Enable connection pooling and reasonable timeouts to improve reliability.
|
|
|
200
321
|
|
|
201
322
|
## 🏗️ Architecture
|
|
202
323
|
|
|
203
|
-
OpsPilot implements a **multi-agent agentic architecture** with four specialized agents:
|
|
324
|
+
OpsPilot-AI implements a **multi-agent agentic architecture** with four specialized agents:
|
|
204
325
|
|
|
205
326
|
1. **Planner Agent** - Analyzes project context and forms hypotheses about root causes
|
|
206
327
|
2. **Verifier Agent** - Collects evidence and validates hypotheses with confidence scoring
|
|
@@ -225,7 +346,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed design documentation.
|
|
|
225
346
|
## 🧩 How It Works
|
|
226
347
|
|
|
227
348
|
### 1. Context Collection
|
|
228
|
-
OpsPilot gathers information from multiple sources:
|
|
349
|
+
OpsPilot-AI gathers information from multiple sources:
|
|
229
350
|
- **Logs**: Recent error logs and exceptions
|
|
230
351
|
- **Environment**: Environment variables and configurations
|
|
231
352
|
- **Dependencies**: Project dependencies (requirements.txt, package.json)
|
|
@@ -254,7 +375,7 @@ If confidence ≥ 0.6, the Fixer agent:
|
|
|
254
375
|
- **Never auto-applies changes** (dry-run only for safety)
|
|
255
376
|
|
|
256
377
|
### 5. Learning from History
|
|
257
|
-
OpsPilot maintains Redis-based memory of past issues:
|
|
378
|
+
OpsPilot-AI maintains Redis-based memory of past issues:
|
|
258
379
|
- Stores hypotheses, confidence scores, and evidence with automatic TTL
|
|
259
380
|
- User-isolated storage using project path hashing
|
|
260
381
|
- Detects similar issues in future runs with sub-second lookups
|
|
@@ -406,3 +527,9 @@ For questions or feedback, please open an issue on GitHub.
|
|
|
406
527
|
---
|
|
407
528
|
|
|
408
529
|
**Built with ❤️ using agentic AI principles**
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## 📦 PyPI
|
|
534
|
+
|
|
535
|
+
This package is available on PyPI: [opspilot-ai](https://pypi.org/project/opspilot-ai/)
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
# OpsPilot 🤖
|
|
1
|
+
# OpsPilot-AI 🤖
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/opspilot-ai/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
6
|
|
|
3
7
|
> An intelligent agentic AI CLI tool for automated incident analysis and error resolution
|
|
4
8
|
|
|
5
|
-
OpsPilot is your AI-powered Site Reliability Engineer that analyzes your projects, identifies runtime issues, and suggests safe fixes—all through a simple command-line interface.
|
|
9
|
+
OpsPilot-AI is your AI-powered Site Reliability Engineer that analyzes your projects, identifies runtime issues, and suggests safe fixes—all through a simple command-line interface.
|
|
6
10
|
|
|
7
11
|
---
|
|
8
12
|
|
|
9
|
-
## 🎯 What is OpsPilot?
|
|
13
|
+
## 🎯 What is OpsPilot-AI?
|
|
10
14
|
|
|
11
|
-
OpsPilot uses a **multi-agent AI architecture** to understand your project's context, form hypotheses about runtime issues, and provide evidence-based fix recommendations. Think of it as having an experienced SRE on your team, available 24/7.
|
|
15
|
+
OpsPilot-AI uses a **multi-agent AI architecture** to understand your project's context, form hypotheses about runtime issues, and provide evidence-based fix recommendations. Think of it as having an experienced SRE on your team, available 24/7.
|
|
12
16
|
|
|
13
17
|
### Key Capabilities
|
|
14
18
|
|
|
@@ -24,86 +28,203 @@ OpsPilot uses a **multi-agent AI architecture** to understand your project's con
|
|
|
24
28
|
|
|
25
29
|
---
|
|
26
30
|
|
|
27
|
-
## 🚀 Quick Start
|
|
28
|
-
|
|
29
|
-
### Prerequisites
|
|
30
|
-
|
|
31
|
-
- Python 3.8 or higher
|
|
32
|
-
- At least ONE of the following LLM providers:
|
|
33
|
-
- [Ollama](https://ollama.ai/) (local, free, recommended)
|
|
34
|
-
- Google Gemini API key (free tier)
|
|
35
|
-
- OpenRouter API key (free models available)
|
|
36
|
-
- HuggingFace API token (free tier)
|
|
31
|
+
## 🚀 Quick Start (2 Minutes Setup)
|
|
37
32
|
|
|
38
|
-
###
|
|
33
|
+
### Step 1: Install OpsPilot-AI
|
|
39
34
|
|
|
40
35
|
```bash
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
cd opspilot
|
|
36
|
+
pip install opspilot-ai
|
|
37
|
+
```
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
pip install -e .
|
|
39
|
+
### Step 2: Setup LLM (Choose ONE Option)
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
pip install -e ".[redis]"
|
|
41
|
+
OpsPilot-AI needs an LLM to analyze your code. Choose **one** of these options:
|
|
50
42
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
#### Option A: Ollama (Recommended - Free & Private)
|
|
54
46
|
|
|
55
|
-
|
|
47
|
+
Ollama runs locally on your machine. Your code never leaves your computer.
|
|
56
48
|
|
|
57
|
-
**
|
|
49
|
+
**For macOS/Linux:**
|
|
58
50
|
```bash
|
|
59
51
|
# Install Ollama
|
|
60
52
|
curl -fsSL https://ollama.ai/install.sh | sh
|
|
61
53
|
|
|
62
|
-
# Pull
|
|
54
|
+
# Pull the AI model (one-time download, ~4GB)
|
|
63
55
|
ollama pull llama3
|
|
56
|
+
|
|
57
|
+
# Verify it's running
|
|
58
|
+
ollama list
|
|
64
59
|
```
|
|
65
60
|
|
|
66
|
-
**
|
|
61
|
+
**For Windows:**
|
|
62
|
+
1. Download Ollama from [ollama.ai/download](https://ollama.ai/download)
|
|
63
|
+
2. Install and run the application
|
|
64
|
+
3. Open terminal and run:
|
|
67
65
|
```bash
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
ollama pull llama3
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
#### Option B: Cloud API (No Local Install Required)
|
|
72
|
+
|
|
73
|
+
Use cloud-based LLMs with free tiers. Set **one** of these environment variables:
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
+
**Google Gemini (Recommended Cloud Option):**
|
|
76
|
+
```bash
|
|
77
|
+
# Get free API key: https://makersuite.google.com/app/apikey
|
|
78
|
+
export GOOGLE_API_KEY="your-api-key-here"
|
|
75
79
|
```
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
**OpenRouter (100+ Models Available):**
|
|
82
|
+
```bash
|
|
83
|
+
# Get free API key: https://openrouter.ai/keys
|
|
84
|
+
export OPENROUTER_API_KEY="your-api-key-here"
|
|
85
|
+
```
|
|
78
86
|
|
|
79
|
-
|
|
87
|
+
**HuggingFace:**
|
|
88
|
+
```bash
|
|
89
|
+
# Get free token: https://huggingface.co/settings/tokens
|
|
90
|
+
export HUGGINGFACE_API_KEY="your-api-key-here"
|
|
91
|
+
```
|
|
80
92
|
|
|
81
|
-
|
|
93
|
+
**Windows Users (set environment variable):**
|
|
94
|
+
```cmd
|
|
95
|
+
set GOOGLE_API_KEY=your-api-key-here
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Step 3: Analyze Your Project
|
|
82
101
|
|
|
83
102
|
```bash
|
|
84
|
-
#
|
|
103
|
+
# Navigate to your project
|
|
104
|
+
cd /path/to/your/project
|
|
105
|
+
|
|
106
|
+
# Run analysis
|
|
85
107
|
opspilot analyze
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
That's it! OpsPilot-AI will analyze your project and provide diagnosis.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 📖 Usage Examples
|
|
86
115
|
|
|
116
|
+
### Basic Commands
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Quick analysis (fastest)
|
|
120
|
+
opspilot analyze --mode quick
|
|
121
|
+
|
|
122
|
+
# Deep analysis (thorough, recommended)
|
|
123
|
+
opspilot analyze --mode deep
|
|
124
|
+
|
|
125
|
+
# Verbose output (see what's happening)
|
|
126
|
+
opspilot analyze --verbose
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Advanced Commands
|
|
130
|
+
|
|
131
|
+
```bash
|
|
87
132
|
# Analyze with production logs from S3
|
|
88
133
|
opspilot analyze --log-source s3://my-bucket/logs/app.log
|
|
89
134
|
|
|
90
|
-
# Analyze with deployment correlation
|
|
135
|
+
# Analyze with deployment correlation (links errors to git commits)
|
|
91
136
|
opspilot analyze --deployment-analysis --since-hours 48
|
|
92
137
|
|
|
93
|
-
# JSON output for automation
|
|
138
|
+
# JSON output for CI/CD automation
|
|
94
139
|
opspilot analyze --json --mode quick
|
|
95
140
|
|
|
96
|
-
#
|
|
141
|
+
# Analyze specific log file
|
|
142
|
+
opspilot analyze --log-source /var/log/myapp/error.log
|
|
143
|
+
|
|
144
|
+
# Full debugging output
|
|
97
145
|
opspilot analyze --verbose --debug
|
|
98
146
|
```
|
|
99
147
|
|
|
148
|
+
### Analysis Modes
|
|
149
|
+
|
|
150
|
+
| Mode | Speed | LLM Calls | Use Case |
|
|
151
|
+
|------|-------|-----------|----------|
|
|
152
|
+
| `quick` | Fast | 1 | Quick check, CI/CD pipelines |
|
|
153
|
+
| `deep` | Thorough | Up to 4 | Detailed incident analysis |
|
|
154
|
+
| `explain` | Instant | 0 | Context gathering only (no LLM) |
|
|
155
|
+
|
|
156
|
+
### Installation Options
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Basic (just the CLI)
|
|
160
|
+
pip install opspilot-ai
|
|
161
|
+
|
|
162
|
+
# With Redis support (remembers past incidents)
|
|
163
|
+
pip install "opspilot-ai[redis]"
|
|
164
|
+
|
|
165
|
+
# With AWS support (S3, CloudWatch logs)
|
|
166
|
+
pip install "opspilot-ai[aws]"
|
|
167
|
+
|
|
168
|
+
# With Kubernetes support (K8s pod logs)
|
|
169
|
+
pip install "opspilot-ai[k8s]"
|
|
170
|
+
|
|
171
|
+
# Everything included
|
|
172
|
+
pip install "opspilot-ai[all]"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 🔧 Troubleshooting
|
|
178
|
+
|
|
179
|
+
### "No LLM providers available"
|
|
180
|
+
|
|
181
|
+
You need to set up an LLM. Choose one:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Option 1: Install Ollama (recommended)
|
|
185
|
+
curl -fsSL https://ollama.ai/install.sh | sh
|
|
186
|
+
ollama pull llama3
|
|
187
|
+
|
|
188
|
+
# Option 2: Set a cloud API key
|
|
189
|
+
export GOOGLE_API_KEY="your-key"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### "Ollama connection refused"
|
|
193
|
+
|
|
194
|
+
Make sure Ollama is running:
|
|
195
|
+
```bash
|
|
196
|
+
# Start Ollama service
|
|
197
|
+
ollama serve
|
|
198
|
+
|
|
199
|
+
# In another terminal, verify it works
|
|
200
|
+
ollama list
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### "No logs found"
|
|
204
|
+
|
|
205
|
+
OpsPilot-AI looks for logs in these locations:
|
|
206
|
+
- `./logs/` directory
|
|
207
|
+
- `*.log` files in project root
|
|
208
|
+
- Files specified with `--log-source`
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# Specify log file directly
|
|
212
|
+
opspilot analyze --log-source ./my-app/error.log
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### "Context collected: 0 env vars"
|
|
216
|
+
|
|
217
|
+
Make sure you have a `.env` file in your project directory, or environment variables set.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
100
221
|
**Example Output:**
|
|
101
222
|
|
|
102
223
|
```
|
|
103
224
|
Similar issues detected from past runs:
|
|
104
225
|
- Redis connection issue caused by network or Redis server downtime (confidence 0.8)
|
|
105
226
|
|
|
106
|
-
OpsPilot initialized
|
|
227
|
+
OpsPilot-AI initialized
|
|
107
228
|
Project detected: /your/project
|
|
108
229
|
|
|
109
230
|
Planner Agent reasoning...
|
|
@@ -141,7 +262,7 @@ Enable connection pooling and reasonable timeouts to improve reliability.
|
|
|
141
262
|
|
|
142
263
|
## 🏗️ Architecture
|
|
143
264
|
|
|
144
|
-
OpsPilot implements a **multi-agent agentic architecture** with four specialized agents:
|
|
265
|
+
OpsPilot-AI implements a **multi-agent agentic architecture** with four specialized agents:
|
|
145
266
|
|
|
146
267
|
1. **Planner Agent** - Analyzes project context and forms hypotheses about root causes
|
|
147
268
|
2. **Verifier Agent** - Collects evidence and validates hypotheses with confidence scoring
|
|
@@ -166,7 +287,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed design documentation.
|
|
|
166
287
|
## 🧩 How It Works
|
|
167
288
|
|
|
168
289
|
### 1. Context Collection
|
|
169
|
-
OpsPilot gathers information from multiple sources:
|
|
290
|
+
OpsPilot-AI gathers information from multiple sources:
|
|
170
291
|
- **Logs**: Recent error logs and exceptions
|
|
171
292
|
- **Environment**: Environment variables and configurations
|
|
172
293
|
- **Dependencies**: Project dependencies (requirements.txt, package.json)
|
|
@@ -195,7 +316,7 @@ If confidence ≥ 0.6, the Fixer agent:
|
|
|
195
316
|
- **Never auto-applies changes** (dry-run only for safety)
|
|
196
317
|
|
|
197
318
|
### 5. Learning from History
|
|
198
|
-
OpsPilot maintains Redis-based memory of past issues:
|
|
319
|
+
OpsPilot-AI maintains Redis-based memory of past issues:
|
|
199
320
|
- Stores hypotheses, confidence scores, and evidence with automatic TTL
|
|
200
321
|
- User-isolated storage using project path hashing
|
|
201
322
|
- Detects similar issues in future runs with sub-second lookups
|
|
@@ -347,3 +468,9 @@ For questions or feedback, please open an issue on GitHub.
|
|
|
347
468
|
---
|
|
348
469
|
|
|
349
470
|
**Built with ❤️ using agentic AI principles**
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## 📦 PyPI
|
|
475
|
+
|
|
476
|
+
This package is available on PyPI: [opspilot-ai](https://pypi.org/project/opspilot-ai/)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "opspilot-ai"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "AI-powered production incident analysis tool using multi-agent systems"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -77,11 +77,11 @@ all = [
|
|
|
77
77
|
]
|
|
78
78
|
|
|
79
79
|
[project.urls]
|
|
80
|
-
Homepage = "https://github.com/choudharikiranv15/
|
|
81
|
-
Documentation = "https://github.com/choudharikiranv15/
|
|
82
|
-
Repository = "https://github.com/choudharikiranv15/
|
|
83
|
-
"Bug Tracker" = "https://github.com/choudharikiranv15/
|
|
84
|
-
Changelog = "https://github.com/choudharikiranv15/
|
|
80
|
+
Homepage = "https://github.com/choudharikiranv15/OpsPilot-AI"
|
|
81
|
+
Documentation = "https://github.com/choudharikiranv15/OpsPilot-AI#readme"
|
|
82
|
+
Repository = "https://github.com/choudharikiranv15/OpsPilot-AI"
|
|
83
|
+
"Bug Tracker" = "https://github.com/choudharikiranv15/OpsPilot-AI/issues"
|
|
84
|
+
Changelog = "https://github.com/choudharikiranv15/OpsPilot-AI/releases"
|
|
85
85
|
|
|
86
86
|
[project.scripts]
|
|
87
87
|
opspilot = "opspilot.cli:app"
|
|
@@ -13,7 +13,7 @@ setup(
|
|
|
13
13
|
description="AI-powered production incident analysis tool using multi-agent systems",
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
16
|
-
url="https://github.com/choudharikiranv15/
|
|
16
|
+
url="https://github.com/choudharikiranv15/OpsPilot-AI",
|
|
17
17
|
packages=find_packages(),
|
|
18
18
|
classifiers=[
|
|
19
19
|
"Development Status :: 3 - Alpha",
|
|
@@ -64,8 +64,8 @@ setup(
|
|
|
64
64
|
},
|
|
65
65
|
keywords="ai mlops devops incident-analysis sre production-monitoring agentic-ai",
|
|
66
66
|
project_urls={
|
|
67
|
-
"Bug Reports": "https://github.com/choudharikiranv15/
|
|
68
|
-
"Source": "https://github.com/choudharikiranv15/
|
|
69
|
-
"Documentation": "https://github.com/choudharikiranv15/
|
|
67
|
+
"Bug Reports": "https://github.com/choudharikiranv15/OpsPilot-AI/issues",
|
|
68
|
+
"Source": "https://github.com/choudharikiranv15/OpsPilot-AI",
|
|
69
|
+
"Documentation": "https://github.com/choudharikiranv15/OpsPilot-AI#readme",
|
|
70
70
|
},
|
|
71
71
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|