Thank you for your interest in contributing to AMB (Agent Message Bus)! This document provides guidelines and instructions for contributing.
- Python 3.8 or higher
- Git
-
Clone the repository:
git clone https://github.com/microsoft/agent-governance-toolkit.git cd amb -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install in development mode with all dependencies:
pip install -e ".[dev,all]" -
Verify installation:
pytest tests/ -v
We use the following tools to maintain code quality:
- Ruff for linting and formatting
- MyPy for type checking
- pytest for testing
# Run linter
ruff check amb_core/ tests/
# Run formatter
ruff format amb_core/ tests/
# Run type checker
mypy amb_core/
# Run tests with coverage
pytest tests/ -v --cov=amb_core --cov-report=term-missinggit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix- Follow the existing code style
- Add type hints to all functions
- Write Google-style docstrings
- Keep the API minimal and consistent
- Add tests for new functionality in
tests/ - Ensure all tests pass before submitting
- Update docstrings for any API changes
- Update README.md if adding new features
- Add examples for new functionality
- Push your branch to GitHub
- Open a Pull Request against
main - Fill in the PR template
- Wait for CI checks to pass
- Request a review
- Keep PRs focused and atomic
- Write clear commit messages
- Update the changelog if applicable
- Ensure CI passes before requesting review
amb_core/
├── __init__.py # Public API exports
├── models.py # Message and MessagePriority
├── broker.py # BrokerAdapter ABC
├── bus.py # MessageBus facade
├── memory_broker.py # In-memory implementation
├── hf_utils.py # Hugging Face utilities
└── adapters/
├── __init__.py
├── redis_broker.py
├── rabbitmq_broker.py
└── kafka_broker.py
- Create a new file in
amb_core/adapters/ - Implement the
BrokerAdapterinterface - Add lazy import in
amb_core/adapters/__init__.py - Add optional dependency in
pyproject.toml - Add tests in
tests/ - Update documentation
# Run benchmark suite
python experiments/reproduce_results.py --seed 42 --iterations 1000- Open an issue for bugs or feature requests
- Start a discussion for questions
Thank you for contributing! 🎉