AI-powered DevOps assistant for automating operational tasks.
⚙️ A modular, extensible system operations agent built with Python and Chainlit, designed to handle infrastructure, database, and DevOps workflows through an interactive conversational interface.
- Features
- Quick Start
- Architecture
- Modules & Agents
- Development Setup
- Usage Guide
- Contributing
- Code Style & Testing
- Roadmap
- Contributors
- License
- Modular agent-based architecture
- Database, DevOps, and infrastructure task automation
- Chainlit-powered conversational interface
- Easy to extend with new agents or capabilities
- Clean Pythonic codebase with clear abstractions
# 1. Clone the repo
git clone https://github.com/Mahdi-A98/OpsAgent.git
cd OpsAgent
# 2. Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. (Optional) Install system dependencies
sudo apt update
sudo apt install graphviz graphviz-dev pkg-config
pip install pygraphviz
# 5. Run the app
chainlit run app.pyYour OpsAgent will now be running in a Chainlit interface.
🧩 Architecture
OpsAgent/
│
├── app.py # Main entry point
├── core/ # Core agent logic & abstractions
├── database_agents/ # Database-related automation
├── devops_agents/ # CI/CD, infra & cloud tasks
├── public/ # Exposed APIs or public modules
└── requirements.txt
core/: Contains fundamental abstractions, base agent classes, and shared utilities.
database_agents/: Handles database operations (queries, migrations, monitoring).
devops_agents/: Focused on CI/CD, container management, and infrastructure operations.
public/: Houses any external API endpoints, web interfaces, or shared utilities.
- Each “agent” in OpsAgent is designed to handle a specific operational domain.
🔹 Core Agent
-
Defines shared logic and communication patterns.
-
Provides interfaces for agent discovery and task orchestration.
🔹 Database Agents
-
Handle SQL queries, schema migrations, or backups.
-
Example: a PostgreSQL management agent or a MongoDB query runner.
🔹 DevOps Agents
-
Automate deployments, container tasks, CI/CD workflows, or server operations.
-
Example: an agent that runs Docker or Kubernetes commands.
🔹 Adding New Agents
To create a new agent:
-
Create a new Python file in the appropriate module (e.g., devops_agents/).
-
Implement your class that inherits from a base agent class.
-
Register your agent in the main app or discovery system.
-
Document your new agent in the README or a dedicated module docstring.
-
Branching Strategy: Use feature branches (e.g. feature/new-agent) and open pull requests targeting main.
-
Dependencies: Update requirements.txt if you add new libraries.
-
Config: Use .env for environment variables and secrets (don’t commit this).
-
Logging: Leverage the core logging system for visibility and debugging.
- Once running, interact with OpsAgent via Chainlit.
Example prompts:
-
“Deploy my latest backend service.”
-
“Run a query on the user database.”
-
“Check container health on Kubernetes.”
-
OpsAgent will interpret and execute operational tasks through conversational commands.
-
We’d love your help!
-
Fork the repo
-
Create your feature branch (git checkout -b feature/new-agent)
-
Commit your changes (git commit -m 'Add new feature')
-
Push to your branch (git push origin feature/new-agent)
-
Open a Pull Request
-
Code follows project style (PEP8, docstrings)
-
Tests are added or updated
-
Documentation updated
-
No secrets or credentials included
-
Follow PEP8 conventions.
-
Use Black or Flake8 for linting and formatting.
-
Place tests under a tests/ directory.
-
Mock external dependencies to keep tests isolated.
-
Add network & security agents
-
Implement plugin-based agent architecture
-
Create a web dashboard / visualization layer
-
Add container deployment and orchestration support
-
Introduce conversational memory and context persistence
This project is licensed under the MIT License — see the LICENSE file for full details.
💡 OpsAgent is an open-source project — contributions, ideas, and feedback are always welcome!
✅ You can now:
- Save this content as
README.mdin your repo’s root directory. - Add the
LICENSEfile (from our previous message).
Would you like me to generate both as downloadable files (README.md + LICENSE) so you can just drop them into your project?