Thank you for your interest in contributing to AgentBridge! This document provides guidelines and instructions for contributing to the project.
- Getting Started
- Development Setup
- Project Structure
- Adding New Adapters
- Submitting Changes
- Code Standards
- Testing
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/AgentBridge.git - Create a new branch for your feature:
git checkout -b feature/my-feature
- Ensure you have Python 3.8+ installed
- Install dependencies:
pip install -e ".[dev]" - Install pre-commit hooks (optional but recommended):
pip install pre-commit pre-commit install
AgentBridge/
├── agentbridge/ # Main package
│ ├── __init__.py # Package init
│ ├── bridge.py # Core bridge logic
│ ├── protocol.py # Message protocol
│ ├── adapter.py # Framework adapters
│ ├── server.py # FastAPI server
│ ├── cli.py # Command line interface
│ └── utils.py # Utility functions
├── examples/ # Usage examples
├── tests/ # Test suite
├── pyproject.toml # Project configuration
├── README.md # Main documentation
└── CONTRIBUTING.md # This file
To add support for a new agent framework:
- Create a new adapter class in
agentbridge/adapter.pythat inherits fromBaseAdapter - Implement all required abstract methods
- Register your adapter in the
AdapterRegistryconstructor - Add tests for your adapter
- Update documentation
Example adapter:
class MyFrameworkAdapter(BaseAdapter):
async def send_message(self, message: Any) -> Any:
# Implementation for your framework
pass
async def get_capabilities(self) -> Dict[str, Any]:
# Implementation
pass
async def list_available_tools(self) -> List[Dict[str, Any]]:
# Implementation
pass- Ensure all tests pass:
pytest - Update documentation if needed
- Add tests for new functionality
- Submit a pull request to the
mainbranch
- Follow PEP 8 style guide
- Use type hints for all public functions
- Write docstrings for all public classes and functions
- Keep functions focused and modular
- Use meaningful variable names
- Write unit tests for new functionality
- Use pytest for testing
- Aim for high test coverage
- Test edge cases and error conditions
Run tests with:
pytest
pytest --cov=agentbridge # with coverage reportIf you have any questions, feel free to open an issue or contact the maintainers.
Thank you for contributing to AgentBridge!