Thank you for your interest in contributing to Agent-Runner! This document provides guidelines and information for contributors.
- Python 3.10 or higher
- Git
- A GitHub account with a Personal Access Token (PAT) with
reposcope
-
Clone the repository
git clone https://github.com/your-org/Agent-Runner.git cd Agent-Runner -
Create a virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -e ".[dev]" -
Set up environment variables
cp .env.example .env # Edit .env with your credentials
We use Ruff for linting and formatting:
# Check for issues
ruff check .
# Auto-fix issues
ruff check --fix .
# Format code
ruff format .We use MyPy for static type checking:
mypy backend/Run tests with pytest:
# Run all tests
pytest
# Run with coverage
pytest --cov=backend --cov-report=html
# Run specific test file
pytest tests/test_agent_runner.pyBefore committing, ensure your code passes all checks:
ruff check .
ruff format --check .
mypy backend/
pytestUse descriptive branch names:
feature/add-retry-logicfix/fork-timeout-issuedocs/update-readme
Follow conventional commit format:
feat: add retry logic for failed forksfix: handle timeout in workflow dispatchdocs: update installation instructionschore: update dependencies
- Create a branch from
main - Make your changes
- Ensure all checks pass
- Submit a PR with a clear description
- Wait for review
Agent-Runner/
├── .github/
│ └── workflows/
│ └── run.yml # Main workflow
├── backend/
│ ├── agent_runner.py # Core library
│ └── requirements.txt # Dependencies
├── tests/ # Test files
├── pyproject.toml # Project config
├── README.md # Documentation
└── CONTRIBUTING.md # This file
-
GitHub Actions Workflow (
run.yml)- Clones the fork
- Runs the OpenHands agent
- Commits and pushes changes
- Creates a PR
- Sends callback notifications
-
Backend Service (
agent_runner.py)AgentRunnerclass: Core logic for fork management and workflow dispatchJobdataclass: Job tracking and state management- FastAPI app: REST API endpoints
User Request → Backend API → Fork Repo → Trigger Workflow → Agent Runs → PR Created → Callback
When reporting issues, please include:
- Description: Clear description of the issue
- Steps to Reproduce: How to reproduce the issue
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment: Python version, OS, relevant config
If you discover a security vulnerability, please do NOT open a public issue. Instead, email the maintainers directly.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
Feel free to open an issue for any questions or discussions!