Thank you for your interest in contributing to the AI Imaging Agent! This guide will help you get started.
# Fork the repository on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/ai-agent.git
cd ai-agent# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-description- Make your changes in the appropriate module
- Test your changes (see Testing)
- Update documentation if needed
- Update CHANGELOG.md following Keep a Changelog format
MyPy for type checking:
mypy src/# Run all tests
pytest tests/
# Run specific test file
pytest tests/test_retrieval_pipeline.py
# Run with coverage
pytest --cov=ai_agent tests/- Follow PEP 8: Use Black for formatting
- Type hints: Add type annotations to new functions
- Docstrings: Document all public functions and classes
- Tests: Add tests for new functionality
- No warnings: Fix any linter warnings before submitting
Use clear, descriptive commit messages:
feat: Add alternative search tool for agent
- Implement search_alternative tool
- Add retry logic for insufficient results
- Update agent prompt with tool description
Format:
feat:New featuresfix:Bug fixesdocs:Documentation changestest:Test additions/changesrefactor:Code refactoringchore:Maintenance tasks
- Update CHANGELOG.md under
[Unreleased]section - Write clear PR description explaining changes
- Link related issues if applicable
- Request review from maintainers
PR description template:
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
How to test these changes
## Checklist
- [ ] Code follows project style
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] CHANGELOG.md updated- Catalog expansion: Add more imaging tools
- Demo integration: Improve Gradio Space execution and add new spaces for tools
- Format support: Add new image format handlers
Before implementing new features:
- Check existing issues for similar requests
- Open an issue to discuss the feature
- Get feedback from maintainers
- Implement after discussion
Documentation lives in docs/ and uses MkDocs Material.
# Install MkDocs
pip install mkdocs-material
# Serve locally
mkdocs serve
# Open http://127.0.0.1:8000- Use clear headings and structure
- Include code examples where relevant
- Add warnings and tips for important information
- Keep language simple and accessible
- Create tool entry in
dataset/catalog.jsonl:
{
"@type": "SoftwareSourceCode",
"name": "ToolName",
"description": "Tool description",
"url": "https://github.com/user/tool",
"license": "Apache-2.0",
"keywords": ["segmentation", "CT"],
"supportingData": {
"modalities": ["CT"],
"dimensions": ["3D"],
"formats": ["DICOM"],
"demo_url": "https://huggingface.co/spaces/user/tool"
}
}- Validate entry:
# Check JSON syntax
python -c "import json; print(json.loads('YOUR_JSON_HERE'))"- Update checksum:
shasum dataset/catalog.jsonl > dataset/catalog.jsonl.sha1- Sync catalog:
ai_agent sync- Test retrieval:
ai_agent chat
# Try queries that should return your new toolTools should:
- ✅ Be relevant to imaging analysis
- ✅ Be actively maintained
- ✅ Have clear documentation
- ✅ Preferably have a runnable demo
- ✅ Be open-source or have free tier
Include:
- Description of the bug
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment (OS, Python version, etc.)
- Logs if available
Include:
- Use case for the feature
- Proposed solution (if you have one)
- Alternatives considered
- Examples of similar features
- Automated checks run on PR (tests, linting)
- Maintainer review provides feedback
- Address feedback and update PR
- Approval from maintainer(s)
- Merge into main branch
Releases follow semantic versioning:
- Update version in
pyproject.toml - Update
CHANGELOG.mdwith release date - Create git tag:
git tag v0.2.0 - Push tag:
git push origin v0.2.0 - GitHub Actions deploys documentation
- GitHub Discussions: Ask questions
- GitHub Issues: Report bugs
Be respectful and professional:
- Use welcoming and inclusive language
- Respect differing viewpoints
- Accept constructive criticism
- Focus on what's best for the community
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.
- Review Project Structure
- Learn about Testing
- Read Architecture Overview