Thank you for your interest in contributing to Sysadmin Agents! This document provides guidelines and instructions for contributing.
Please be respectful and constructive in all interactions. We welcome contributors of all backgrounds and experience levels.
- Python 3.10 or later
- Git
- A Gemini API key (for testing agents)
- SSH access to a test Linux/RHEL system (optional, for integration testing)
-
Fork and clone the repository
git clone https://github.com/your-username/sysadmin-agents.git cd sysadmin-agents -
Create a virtual environment
python -m venv .venv source .venv/bin/activate -
Install dependencies
pip install -e ".[dev]" -
Set up environment variables
# Copy the example config cp deploy/config.env.example .env # Edit .env with your settings (at minimum, set GOOGLE_API_KEY and LINUX_MCP_USER)
Use descriptive branch names:
feature/agent-<name>- For new agentsfeature/<description>- For new featuresfix/<description>- For bug fixesdocs/<description>- For documentation updates
-
Create a feature branch
git checkout -b feature/agent-my-new-agent
-
Make your changes
- Follow the code style (enforced by ruff)
- Add tests for new functionality
- Update documentation as needed
-
Run tests and linting
# Run linting ruff check . ruff format . # Run tests pytest
-
Commit your changes
git add . git commit -m "feat: add my-new-agent for X functionality"
Follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Adding testsrefactor:- Code refactoring
-
Push and create a Pull Request
git push origin feature/agent-my-new-agent
Then create a PR on GitHub.
- Follow PEP 8 (enforced by ruff)
- Use type hints where practical
- Write docstrings for public functions and classes
- Maximum line length: 100 characters
- Use 2-space indentation
- Include comments explaining non-obvious settings
- Keep prompts readable with proper line breaks
# Run all tests
pytest
# Run specific test file
pytest tests/test_rca_agent.py
# Run with coverage
pytest --cov=agents- Place tests in
tests/directory - Name test files
test_<module>.py - Use descriptive test names:
test_agent_loads_config_correctly - Mock external dependencies (MCP server, SSH connections)
See ADDING_AGENTS.md for detailed instructions on creating new agents.
Quick overview:
- Create directory:
agents/<agent_name>/ - Add files:
__init__.py,agent.py,root_agent.yaml - Define agent in
root_agent.yamlwith YAML-driven configuration - Add tests in
tests/test_<agent_name>.py
- Tests pass locally
- Linting passes (
ruff check .) - Code is formatted (
ruff format .) - Documentation is updated
- Commit messages follow conventions
Include:
- What the change does
- Why the change is needed
- How to test the change
- Any breaking changes
- Automated checks run (linting, tests)
- Maintainer reviews code
- Address feedback if needed
- Maintainer merges when approved
Include:
- Steps to reproduce
- Expected vs actual behavior
- Python version, OS
- Relevant logs or error messages
Include:
- Use case description
- Proposed solution
- Alternatives considered
- Open an issue for questions
- Tag issues with appropriate labels
- Be patient - maintainers are volunteers
By contributing, you agree that your contributions will be licensed under the Apache-2.0 License.
Your contributions help make Linux system administration easier for everyone.