Thank you for your interest in contributing to tinyagent! 🎉
We're building a minimal, easy-to-read agent framework with first-class tracing, callbacks, MCP, and serving support, in service of mozilla.ai's goal of empowering developers to integrate AI capabilities into their projects using open-source tools. Contributions of any size are welcome — typo fixes, new tools, callbacks, docs, or core agent-loop improvements.
Before creating a new issue or starting work:
- Search existing issues for duplicates
- Check open pull requests to see if someone is already working on it
- For bugs, verify it still exists in the
mainbranch
For significant changes, please open an issue before starting work:
- API changes or new public methods
- Architectural changes
- Breaking changes
- New dependencies
Use the rfc label for design discussions. This ensures alignment with project goals and saves everyone time.
Important: PRs must build on agreed direction where one exists. If there is no agreed direction, seek consensus from the core maintainers before starting work.
All contributors must follow our Code of Conduct. We're committed to maintaining a welcoming, inclusive community.
- Python 3.11 or newer
- Git
- uv (recommended) or your preferred package manager
- API keys for any LLM providers you want to test
We recommend using uv as your Python package and project manager.
# 1. Fork the repository on GitHub
# Click the "Fork" button at https://github.com/mozilla-ai/tinyagent
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/tinyagent.git
cd tinyagent
# 3. Add upstream remote
git remote add upstream https://github.com/mozilla-ai/tinyagent.git
# 4. Create a virtual environment and install dependencies
uv venv
source .venv/bin/activate
uv sync --dev --extra all
# 5. Install pre-commit hooks
uv run pre-commit install
# 6. Verify your setup - ensure all checks pass
uv run pre-commit run --all-files
# 7. Run tests to confirm everything works
pytest -v testsCreate a .env file in the project root (this file is gitignored):
# Add keys for providers you want to test
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
MISTRAL_API_KEY=your_key_here
# Add others as neededAlternatively, export environment variables:
export OPENAI_API_KEY="your_key_here".env files.
Always work on a feature branch, never directly on main:
# Update your main branch
git checkout main
git pull upstream main
# Create a new branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-descriptionBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code improvements without behavior changes
Keep changes focused and well-documented.
Every change needs tests! This is non-negotiable.
- New features: Add tests covering happy path and error cases
- Bug fixes: Add a test that reproduces the bug
- Coverage: All new functionality must be thoroughly tested
Run tests locally:
# Run all tests
pytest -v tests
# Run specific test file
pytest -v tests/test_specific.py
# Run with coverage
pytest -v tests --covBefore submitting, make sure all checks pass:
# Run pre-commit checks
pre-commit run --all-files
# Run tests
pytest -v testsAll checks must pass before your PR can be reviewed.
Documentation is as important as code!
Update when you:
- Add a new feature
- Change existing behavior
- Fix a bug that affects usage
Documentation to update:
- Docstrings in code (required)
- README.md if changing core functionality
- docs/ for any user-facing changes
Preview documentation locally:
uv run mkdocs serveThis serves the docs at http://127.0.0.1:8000.
Write clear, descriptive commit messages:
# Good commit messages
git commit -m "feat: add an LLM-judge cookbook"
git commit -m "fix(callbacks): pass correct context to wrapped tool calls"
git commit -m "docs: clarify MCPSse client_session_timeout_seconds"
# Less helpful commit messages (avoid these)
git commit -m "fix bug"
git commit -m "update"
git commit -m "wip"# Commit your changes
git add .
git commit -m "feat: add support for X"
# Push to your fork
git push origin feature/your-feature-nameAvoid the placeholder commit message above; replace it with the real one.
- Go to https://github.com/mozilla-ai/tinyagent
- Click "New Pull Request"
- Click "compare across forks"
- Select your fork and branch
- Fill out the PR template completely
- Click "Create Pull Request"
Your PR description must include:
- What changed: Clear description of the changes
- Why: Explanation of the motivation and context
- How to test: Step-by-step instructions for testing your changes
- Related issues: Links to any related issues
- Checklist completion: All items in the PR template must be addressed
PRs without complete descriptions will be closed and asked to be resubmitted.
- Initial Response: Within 5 business days
- Simple Fixes: Usually merged within 1 week
- Complex Features: May take 2-3 weeks for thorough review
- Maintainers will provide constructive feedback
- Address comments with new commits (don't force push during review)
- Ask questions if feedback is unclear
- Be patient and respectful
- CI must pass before merge
- All review comments must be addressed before requesting re-review
- No activity for 30+ days may result in closure
- You can always reopen and continue later
- Let us know if you need help finishing
- We can find another contributor to complete it
New to open source? Welcome! Here's how to get started:
Look for issues labeled:
good-first-issue- Perfect for newcomershelp-wanted- Community contributions welcomedocumentation- Often accessible for beginners
Comment on the issue:
"Hi! I'd like to work on this. Is it still available?"
We'll assign it to you and provide guidance.
Don't spend days stuck! Ask questions:
- In the issue comments
- In GitHub Discussions
- Tag
@maintainersif needed
We're here to help you succeed.
Your first PR doesn't have to be ambitious:
- Fix a typo
- Improve documentation
- Add a test
- Fix a small bug
Every expert was once a beginner. We're here to help you grow as a contributor!
This project follows Mozilla's Community Participation Guidelines.
In brief:
- Be respectful and inclusive
- Focus on constructive feedback
- Help create a welcoming environment
- Report concerns to maintainers
See our full Code of Conduct for details.
- 💬 Open a GitHub Discussion
- 🐛 Report a Bug
- 💡 Request a Feature
We're excited to have you as part of the mozilla-ai-tinyagent community! 🚀
License: By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).