Skip to content

Mahdi-A98/OpsAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpsAgent 🚀

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.


Placeholder Logo


🏷️ Badges

Python License: MIT Last Commit Issues Pull Requests


📘 Table of Contents


✨ Features

  • 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

⚡ Quick Start

# 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.py

Your 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

Overview:

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.


🧠 Modules & Agents

  • 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.

🧰 Development Setup

  • 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.

💬 Usage Guide

  • 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.

🤝 Contributing

  • 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

✅ Contributor Checklist

  • Code follows project style (PEP8, docstrings)

  • Tests are added or updated

  • Documentation updated

  • No secrets or credentials included

🧪 Code Style & Testing

  • Follow PEP8 conventions.

  • Use Black or Flake8 for linting and formatting.

  • Place tests under a tests/ directory.

  • Mock external dependencies to keep tests isolated.

🗺️ Roadmap

  • 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

👥 Contributors Name GitHub Mahdi A. Mahdi-A98 📄 License

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.md in your repo’s root directory.
  • Add the LICENSE file (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?

About

System Operations Agents

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages