@@ -7,7 +7,14 @@ An AI-powered CLI tool to assist with DevOps troubleshooting, Applications with
77- 📊 ** Log Analysis** : Analyze log files and get actionable insights
88- 💬 ** Query Interface** : Ask questions about DevOps best practices, Terraform, Kubernetes, etc.
99- 🛠️ ** Template Generation** : Generate infrastructure code templates
10- - 🤖 ** AI-Powered** : Leverages Claude AI for intelligent responses
10+ - 🤖 ** AI-Powered** : Leverages multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama, vLLM)
11+ - 🎯 ** Flexible Provider Selection** : Choose your preferred LLM provider and model dynamically
12+ - 🔒 ** Self-Hosted Options** : Run privately with Ollama or vLLM
13+ - 🧠 ** Reasoning Mode** : Enable advanced reasoning capabilities for complex queries
14+ - 🐛 ** Debug Mode** : Troubleshoot agent behavior with detailed logging
15+ - 💾 ** Memory Management** : Persistent context using Qdrant vector database
16+ - 🎨 ** Interactive Mode** : Engage in continuous conversations with the agent
17+ - 📝 ** Multiple Output Formats** : Export results as text, JSON, or Markdown
1118
1219## Installation
1320
@@ -25,63 +32,130 @@ pip install devops-agent
2532
2633## Configuration
2734#### LLM API KEYS
28- ``` env
29- export GEMINI_API_KEY=YOUR API KEY
30- or
31- export ANTHROPIC_API_KEY=YOUR API KEY
32- or
33- export OPENAI_API_KEY=YOUR API KEY
35+ ``` bash
36+ # For OpenAI
37+ export OPENAI_API_KEY=YOUR_API_KEY
38+
39+ # For Anthropic Claude
40+ export ANTHROPIC_API_KEY=YOUR_API_KEY
41+
42+ # For Google Gemini
43+ export GEMINI_API_KEY=YOUR_API_KEY
44+
45+ # For Ollama (self-hosted, typically no API key needed)
46+ export OLLAMA_API_KEY=YOUR_API_KEY # Optional
47+
48+ # For vLLM (self-hosted)
49+ export VLLM_API_KEY=YOUR_API_KEY
3450```
3551#### Qdrant Config for Agent Memory
52+ (If not configured fall backs to in-memory vector store)
3653``` env
3754export QDRANT_URL=YOUR QDRANT URL
3855export QDRANT_API_KEY=YOUR QDRANT API KEY
3956```
4057## Usage
4158
42- ### Analyze Log Files
59+ #### Ask Questions
4360
4461``` bash
45- devops-agent run --log-file /path/to/app.log
62+ devops-agent run --query " I need terraform script to spin up Azure blob storage"
63+ devops-agent run --query " How to increase my pod memory and CPU in k8s"
4664```
4765
48- ### Ask Questions
66+ #### Interactive Mode
4967
5068``` bash
51- devops-agent run --query " I need terraform script to spin up Azure blob storage"
52- devops-agent run --query " How to increase my pod memory and CPU in k8s"
69+ devops-agent run --interactive
70+ # or
71+ devops-agent run -i
5372```
5473
55- ### Generate Templates
74+ ### Advanced Options
75+
76+ #### Choose Your LLM Provider and Model
5677
5778``` bash
58- devops-agent template terraform
59- devops-agent template kubernetes
60- devops-agent template docker
79+ # Use OpenAI with a specific model
80+ devops-agent run --provider openai --model gpt-4o --query " your question"
81+
82+ # Use Anthropic Claude
83+ devops-agent run --provider anthropic --model claude-sonnet-4-20250514 --query " your question"
84+
85+ # Use Google Gemini
86+ devops-agent run --provider google --model gemini-2.0-flash-exp --query " your question"
87+
88+ # Use Ollama (self-hosted)
89+ devops-agent run --provider ollama --model llama3 --query " your question"
90+
91+ # Use vLLM (self-hosted)
92+ devops-agent run --provider vllm --model your-model-name --query " your question"
6193```
6294
63- ### Configuration
95+ #### Enable Debug Mode
6496
6597``` bash
66- devops-agent config
98+ devops-agent run --query " your question " --debug_mode true
6799```
68100
69- ## Examples
101+ #### Enable Reasoning Mode
70102
71103``` bash
72- # Analyze application logs
73- devops-agent run --log-file ./logs/app.log --format json
104+ devops-agent run --query " your question " --reasoning_enabled true
105+ ```
74106
75- # Get Terraform help
76- devops-agent run --query " terraform script for AWS S3 bucket with versioning"
107+ #### Combine Multiple Options
77108
78- # Kubernetes troubleshooting
79- devops-agent run --query " pod is in CrashLoopBackOff status, how to debug?"
109+ ``` bash
110+ # Interactive mode with specific provider, model, and reasoning
111+ devops-agent run -i --provider anthropic --model claude-sonnet-4-20250514 --reasoning_enabled true
80112
81- # Save output to file
82- devops-agent run --query " docker-compose for nginx and postgres " --output docker-compose.yml
113+ # Query with debug mode and custom output
114+ devops-agent run --query " docker setup for microservices " --provider openai --model gpt-4o --debug_mode true --output result.md --format markdown
83115```
84116
117+ ## CLI Options Reference
118+
119+ ### ` devops-agent run ` Options
120+
121+ | Option | Type | Description |
122+ | --------| ------| -------------|
123+ | ` --log-file ` | Path | Path to log file to analyze |
124+ | ` --provider ` | String | LLM provider (openai, anthropic, google, ollama, vllm) |
125+ | ` --model ` | String | Model name (e.g., gpt-4o, claude-sonnet-4-20250514, gemini-2.0-flash-exp) |
126+ | ` --query ` | String | Query to ask the DevOps agent |
127+ | ` --output ` | Path | Output file path for saving results |
128+ | ` --format ` | Choice | Output format: text, json, or markdown (default: text) |
129+ | ` --interactive, -i ` | Flag | Run in interactive mode for continuous conversation |
130+ | ` --debug_mode ` | Boolean | Enable debug mode with detailed logging |
131+ | ` --reasoning_enabled ` | Boolean | Enable reasoning mode for complex problem-solving |
132+
133+ ### Provider-Specific Model Examples
134+
135+ ** OpenAI:**
136+ - ` gpt-4o `
137+ - ` gpt-5-mini `
138+ - ` gpt-5.1 `
139+
140+ ** Anthropic:**
141+ - ` claude-sonnet-4-20250514 `
142+ - ` claude-sonnet-4-5-20250929 `
143+ - ` claude-3-5-sonnet-20241022 `
144+
145+ ** Google:**
146+ - ` gemini-3-pro `
147+ - ` gemini-2.5-pro `
148+ - ` gemini-2.5-flash `
149+
150+ ** Ollama (Self-hosted):**
151+ - ` granite4:3b `
152+ - ` qwen3:8b `
153+ - ` cogito:latest `
154+ - Any model you have pulled locally
155+
156+ ** vLLM (Self-hosted):**
157+ - Any model served by your vLLM instance
158+
85159## Development
86160
87161``` bash
@@ -112,25 +186,6 @@ devops-agent/
112186└── docs/ # Documentation
113187```
114188
115- ## Common issues and fixes
116- - if you see any error like `INFO Error checking if content_hash ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73 exists: Unexpected Response: 400 (Bad Request)
117- Raw response content:
118- b'{"status":{"error":"Bad request: Index required but not found for \\ "content_hash\\ " of one of the following types: [ keyword] . Help: Create an index for this key or use a
119- different filter."},"time":2 ...' `
120- ``` text
121- curl --request PUT \
122- --url https://9df18135-290c-45b3-8158-f73b103dc352.eu-west-2-0.aws.cloud.qdrant.io:6333/collections/devops-memory/index \
123- --header 'Authorization: Bearer YOUR_API_KEY' \
124- --header 'Content-Type: application/json' \
125- --data '{
126- "field_name": "content_hash",
127- "field_schema": {
128- "type": "keyword",
129- "on_disk": true
130- }
131- }'
132- ```
133-
134189## Contributing
135190
136191Contributions are welcome! Please feel free to submit a Pull Request.
@@ -142,12 +197,10 @@ Apache2.0 License - see LICENSE file for details
142197## RoadMap
143198
144199- [ ] Implement log analysis with pattern detection
145- - [ ] Add support for multiple LLM providers with model params ` --model gpt-5-mini `
146- - [ ] Add Support for self-hosted models ` Ollama ` & ` vLLM `
147- - [ ] Add Support for Reasoning controls
148200- [ ] Add Support for MCP to use local file system for quick access
149201- [ ] Add support for Human-in-the-Loop for more focused and collaborated work
150- - [ ] Create direct pip package for easy install of the agent.
202+ - [ ] Support for custom prompt templates
203+ - [ ] Agent as a Service with privacy first concept
151204
152205## Support
153206
0 commit comments