Contributing to Traigent SDK¶
Thank you for your interest in contributing to Traigent SDK! We welcome contributions from the community and are excited to work with you to make AI agent discovery more accessible and powerful.
Getting Started¶
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Traigent.git cd Traigent - Install development dependencies:
# Create virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies (preferred) make install-dev # Or use pip directly pip install -r requirements/requirements-dev.txt pip install -e ".[dev,integrations,analytics,security]"
Development Workflow¶
-
Create a feature branch:
git checkout -b feature/your-feature-name -
Make your changes and ensure:
- Code follows our style guidelines (Black + isort for formatting, Ruff for linting)
- All tests pass
- New features include tests
- Documentation is updated
-
Run
make format && make lintbefore committing -
Run tests locally:
export TRAIGENT_MOCK_LLM=true # Run unit tests python -m pytest tests/unit/ -v # Run integration tests python -m pytest tests/integration/ -v # Run with coverage python -m pytest tests/ --cov=traigent --cov-report=term-missing -
Commit your changes:
git add . git commit -m "feat: add new feature"
We follow Conventional Commits:
- feat: New features
- fix: Bug fixes
- docs: Documentation changes
- style: Code style changes (formatting, etc.)
- refactor: Code refactoring
- test: Test changes
- chore: Build process or auxiliary tool changes
-
Push to your fork:
git push origin feature/your-feature-name -
Create a Pull Request on GitHub
Code Style¶
- Formatting: Black (line length 88) + isort (profile "black")
- Linting: Ruff (lint only)
- Use type hints for all public APIs
- Add docstrings to all public functions and classes
Run formatting and linting:
make format
make lint
Or manually:
isort traigent/ tests/ examples/
black traigent/ tests/ examples/
ruff check traigent/ --fix
black --check traigent/
isort --check-only traigent/
Testing¶
- Write tests for all new features
- Maintain or improve code coverage
- Use pytest for testing
- Tests should be in the
tests/directory mirroring the source structure - Use
pytest -m "unit"orpytest -m "integration"for targeted runs
Example test structure:
def test_feature_behavior():
"""Test that feature behaves correctly."""
# Arrange
input_data = create_test_data()
# Act
result = feature_function(input_data)
# Assert
assert result.is_valid()
Documentation¶
- Update README.md if adding new features
- Add docstrings following Google style
- Update relevant documentation in
docs/ - Include examples for new features
Areas for Contribution¶
High Priority¶
- Test Coverage: Help us reach 90%+ coverage
- Documentation: Improve guides and API documentation
- Examples: Add more real-world examples
- Bug Fixes: Check our issue tracker
Feature Ideas¶
- New optimization algorithms
- Additional framework integrations
- Performance improvements
- UI/UX enhancements (see TraigentDemo repository)
Pull Request Guidelines¶
- PR Title: Use conventional commit format
- Description: Clearly describe what changes you made and why
- Tests: Ensure all tests pass
- Documentation: Update docs if needed
- Size: Keep PRs focused and reasonably sized
PR Template¶
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tests pass locally
- [ ] Added new tests for features
- [ ] Updated existing tests
## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No new warnings
Reporting Issues¶
When reporting issues, please include: - Python version - Traigent SDK version - Minimal reproducible example - Error messages and stack traces - Expected vs actual behavior
Communication¶
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For questions and ideas
- Pull Requests: For code contributions
Project Structure¶
Traigent/
├── traigent/ # Main package
│ ├── api/ # Public API
│ ├── core/ # Core functionality
│ ├── optimizers/ # Optimization algorithms
│ └── ...
├── tests/ # Test suite
├── examples/ # Core SDK examples
├── plugins/ # Optional plugins (analytics, UI, etc.)
└── docs/ # Documentation
License¶
Traigent accepts external contributions only after a signed Contributor License
Agreement (CLA). Contributions are merged into a project whose open-source
releases are licensed under AGPLv3, and Traigent may also offer the project
under separate commercial terms. See CONTRIBUTOR-LICENSING.md in the
repository root.
Thank You¶
Your contributions help make Traigent SDK better for everyone. We appreciate your time and effort!
If you have any questions, feel free to open an issue or start a discussion.