Thank you for your interest in contributing to agentape! We welcome contributions from the community.
- Python 3.10 or higher
- uv - Fast Python package installer
- Git
-
Install uv (if you haven't already):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Fork and clone the repository:
git clone https://github.com/yourusername/agentape.git cd agentape -
Create a virtual environment and install dependencies:
uv venv source .venv/bin/activate uv pip install -e ".[dev]"
This installs agentape in editable mode with all development dependencies.
-
Install the pre-commit hook (optional but recommended):
cp scripts/pre-commit.sh .git/hooks/pre-commit chmod +x .git/hooks/pre-commit
This will automatically run linting checks before each commit.
Note: We use
uvfor fast dependency management. It's significantly faster than pip and handles virtual environments seamlessly.
We use pytest for testing. Run the full test suite:
pytest tests/Run with coverage:
pytest tests/ --cov=agentape --cov-report=htmlWe use several tools to maintain code quality:
Quick lint (recommended):
./scripts/lint.shLinting with Ruff:
ruff check agentape/ tests/Auto-fix linting issues:
ruff check --fix agentape/ tests/Type checking with mypy:
mypy agentape/Auto-formatting:
ruff format agentape/ tests/-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and add tests
-
Run tests and linting:
pytest tests/ ruff check agentape/ tests/ mypy agentape/
-
Commit your changes:
git add . git commit -m "Add feature: description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
- Follow PEP 8 style guidelines
- Use type hints for all function signatures
- Write docstrings for public functions and classes
- Keep line length to 88 characters (enforced by Ruff)
- Use clear, descriptive commit messages
- Start with a verb in present tense (e.g., "Add", "Fix", "Update")
- Reference issue numbers when applicable
- Write tests for all new features
- Ensure all tests pass before submitting a PR
- Aim for high test coverage (we target 80%+)
- Include both unit tests and integration tests where appropriate
- Update the README.md if you add new features
- Add docstrings to new functions and classes
- Update CHANGELOG.md following Keep a Changelog format
If you find a bug, please open an issue with:
- A clear title and description
- Steps to reproduce the bug
- Expected vs actual behavior
- Your environment (Python version, OS, etc.)
We welcome feature suggestions! Please open an issue with:
- A clear description of the feature
- Use cases and benefits
- Any implementation ideas you have
We especially welcome contributions in these areas:
- Bug fixes
- New features (discuss in an issue first for large features)
- Documentation improvements
- Test coverage improvements
- Performance optimizations
agentape/
├── agentape/ # Main package
│ ├── clients/ # Client wrappers (OpenAI, etc.)
│ ├── core/ # Core functionality (tape, recorder, replayer)
│ ├── storage/ # Tape storage implementations
│ └── pytest_plugin.py
├── tests/ # Test suite
├── .agent/ # Workflow documentation
└── pyproject.toml # Project configuration
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Reach out to the maintainers
Please be respectful and constructive in all interactions. We aim to foster an inclusive and welcoming community.
By contributing to agentape, you agree that your contributions will be licensed under the MIT License.