Contributing to Agent Infrastructure SDK
September 23, 2025 · View on GitHub
Thank you for your interest in contributing to the Agent Infrastructure SDK! This document provides guidelines and instructions for contributing to the project.
Table of Contents
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Pull Request Process
- Development Guidelines
- Testing
- Documentation
- Release Process
Code of Conduct
We are committed to providing a welcoming and inclusive environment for all contributors. Please be respectful and constructive in all interactions.
Expected Behavior
- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community
- Show empathy towards other community members
Getting Started
Prerequisites
- Node.js 18+ and npm/yarn for JavaScript SDK
- Python 3.8+ for Python SDK
- Git for version control
- Docker (optional, for containerized development)
Repository Structure
sdk/
├── javascript/ # JavaScript/TypeScript SDK
│ ├── src/ # Source code
│ ├── tests/ # Test files
│ └── examples/ # Usage examples
├── python/ # Python SDK
│ ├── src/ # Source code
│ ├── tests/ # Test files
│ └── examples/ # Usage examples
└── website/ # Documentation website
Development Setup
JavaScript SDK
cd javascript
npm install
npm run build
npm test
Python SDK
cd python
pip install -e .
pip install -r requirements-dev.txt
pytest
How to Contribute
Reporting Issues
Before creating an issue, please check if a similar issue already exists. When creating a new issue:
- Use a clear and descriptive title
- Provide a detailed description of the problem
- Include steps to reproduce the issue
- Specify your environment (OS, SDK version, runtime version)
- Include relevant code snippets or error messages
Suggesting Enhancements
Enhancement suggestions are tracked as GitHub issues. When suggesting an enhancement:
- Use a clear and descriptive title
- Provide a detailed description of the proposed enhancement
- Explain why this enhancement would be useful
- Include code examples if applicable
Contributing Code
- Fork the repository
- Create a feature branch from
main:git checkout -b feature/your-feature-name - Make your changes following our coding standards
- Write or update tests as needed
- Ensure all tests pass
- Commit your changes with a descriptive message
- Push to your fork and create a pull request
Pull Request Process
Before Submitting
- Test your changes: Run the full test suite
- Update documentation: Update relevant documentation and examples
- Follow code style: Run linters and formatters
- Write clear commits: Use conventional commit format
Pull Request Guidelines
-
Title: Use a clear, descriptive title following conventional commit format
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringtest:for test additions/changeschore:for maintenance tasks
-
Description: Include:
- Summary of changes
- Related issue numbers (fixes #123)
- Breaking changes (if any)
- Testing performed
-
Size: Keep PRs focused and reasonably sized
- Split large changes into multiple PRs if possible
- One feature/fix per PR
Review Process
- At least one maintainer review is required
- All CI checks must pass
- Resolve all review comments
- Maintainers will merge using squash and merge
Development Guidelines
Code Style
JavaScript/TypeScript
- Use ESLint and Prettier configurations
- Follow TypeScript strict mode
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
/**
* Creates a new sandbox instance
* @param config - Sandbox configuration options
* @returns Promise<Sandbox> - The initialized sandbox
*/
async function createSandbox(config: SandboxConfig): Promise<Sandbox> {
// Implementation
}
Python
- Follow PEP 8 style guide
- Use type hints for function signatures
- Use meaningful variable and function names
- Add docstrings for all public functions
def create_sandbox(config: SandboxConfig) -> Sandbox:
"""
Creates a new sandbox instance.
Args:
config: Sandbox configuration options
Returns:
The initialized sandbox instance
Raises:
ValueError: If configuration is invalid
"""
# Implementation
Commit Messages
Follow conventional commit format:
<type>(<scope>): <subject>
<body>
<footer>
Examples:
feat(python): add sandbox lifecycle management
fix(javascript): resolve connection timeout issue
docs: update API reference for v2.0
Testing
- Write unit tests for all new functionality
- Maintain or improve code coverage
- Include integration tests for API changes
- Test edge cases and error conditions
JavaScript Testing
npm test # Run all tests
npm run test:unit # Run unit tests only
npm run test:integration # Run integration tests
npm run test:coverage # Generate coverage report
Python Testing
pytest # Run all tests
pytest tests/unit # Run unit tests only
pytest tests/integration # Run integration tests
pytest --cov=src # Generate coverage report
Documentation
Code Documentation
- Document all public APIs
- Include examples in docstrings
- Explain complex algorithms or business logic
- Keep documentation up-to-date with code changes
User Documentation
- Update README files as needed
- Add examples for new features
- Update API reference documentation
- Consider adding tutorials for complex features
Documentation Website
The documentation website is built with Docusaurus:
cd website
npm install
npm start # Start development server
npm build # Build for production
Release Process
Version Numbering
We follow Semantic Versioning (SemVer):
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality additions
- PATCH version for backwards-compatible bug fixes
Release Checklist
- Update version numbers in package files
- Update CHANGELOG.md
- Run full test suite
- Build and verify packages
- Create git tag
- Publish to package repositories
- Update documentation website
- Create GitHub release with notes
Publishing
JavaScript SDK
npm version <major|minor|patch>
npm run build
npm publish
Python SDK
cd python
./publish.sh # Builds, publishes to PyPI, and creates git tag
Questions and Support
If you have questions or need help:
- Check the documentation
- Search existing issues
- Join our community discussions
- Create a new issue if needed
License
By contributing to this project, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).
Acknowledgments
Thank you to all contributors who help make this project better!