This document provides comprehensive information about Python A2A's documentation system and recent updates.
Documentation for Python A2A is available at ReadTheDocs. The documentation covers:
- Getting Started: Installation, quick start examples, and basic concepts
- API Reference: Complete API documentation with type hints
- User Guides: In-depth tutorials and best practices
- Examples: Real-world examples and use cases
- Migration Guides: Upgrading between versions
The documentation has been comprehensively updated to reflect the new MCP provider architecture:
- GitHub MCP Provider: Complete GitHub integration via official GitHub MCP server
- Browserbase MCP Provider: Browser automation and web scraping capabilities
- Filesystem MCP Provider: Secure file operations with sandboxing
- MCP Integration Guide: Completely rewritten to showcase the provider architecture
- README.md: Updated with new provider examples and architecture overview
- Examples README: Added comprehensive MCP provider examples
- Provider vs Server Separation: Clear documentation of external MCP servers (providers) vs internal tools
- Type Safety: Documentation of comprehensive type hints and error handling
- Production Deployment: Enterprise-ready configuration and best practices
# New provider-based architecture
from python_a2a.mcp.providers import GitHubMCPServer, BrowserbaseMCPServer, FilesystemMCPServer
# GitHub integration
async with GitHubMCPServer(token="your-token") as github:
user = await github.get_authenticated_user()
repo = await github.create_repository("my-project", "Description")
# Browser automation
async with BrowserbaseMCPServer(api_key="key", project_id="id") as browser:
await browser.navigate("https://example.com")
screenshot = await browser.take_screenshot()
# File operations
async with FilesystemMCPServer(allowed_directories=["/tmp"]) as fs:
content = await fs.read_file("/tmp/data.txt")
await fs.write_file("/tmp/output.txt", "Hello World")Clear migration paths from the previous servers_*.py pattern to the new provider architecture:
# Old way (deprecated)
from python_a2a.mcp.servers_github import GitHubMCPServer
# New way (provider architecture)
from python_a2a.mcp.providers import GitHubMCPServer- Install the required dependencies:
# Install the package with all dependencies
pip install -e ".[all]"
# Install documentation-specific requirements
pip install -r docs/requirements.txt- Navigate to the
docsdirectory:
cd docs- Build the HTML documentation:
make html- Open the generated documentation in your browser:
# On macOS
open _build/html/index.html
# On Linux
xdg-open _build/html/index.html
# On Windows
start _build/html/index.htmldocs/
├── conf.py # Sphinx configuration
├── index.rst # Main documentation index
├── installation.rst # Installation instructions
├── quickstart.rst # Quick start guide
├── guides/ # User guides
│ ├── index.rst
│ ├── basics.rst
│ ├── advanced.rst
│ ├── mcp.rst # MCP provider guide (updated)
│ ├── langchain.rst
│ └── agent_flow.rst
├── examples/ # Example documentation
│ ├── index.rst
│ ├── simple.rst
│ ├── advanced.rst
│ └── langchain.rst
└── requirements.txt # Documentation dependencies
When contributing to documentation, please follow these standards:
- Accuracy: All examples must be tested and work with the current version
- Completeness: Cover all major features and use cases
- Clarity: Write for developers of all skill levels
- Production Focus: Include enterprise deployment considerations
- Use reStructuredText (.rst) format
- Follow the existing structure and style
- Include code examples with proper syntax highlighting
- Add cross-references between related sections
# Good: Complete, tested example
from python_a2a.mcp.providers import GitHubMCPServer
async def github_example():
"""Complete example with error handling and context management."""
async with GitHubMCPServer(token="your-token") as github:
try:
user = await github.get_authenticated_user()
print(f"Authenticated as: {user['login']}")
except Exception as e:
print(f"Error: {e}")
# Bad: Incomplete example without context
github = GitHubMCPServer()
user = github.get_user() # Missing token, no error handling- Identify Changes: Determine what needs to be documented
- Update Relevant Files: Modify the appropriate .rst files
- Test Examples: Ensure all code examples work correctly
- Build Locally: Test the documentation builds without errors
- Review: Check for accuracy and completeness
- Submit: Create a pull request with your changes
- Automatically generated from docstrings
- Must include complete type hints
- Should have usage examples for complex methods
- Step-by-step tutorials for major features
- Real-world examples and use cases
- Best practices and common pitfalls
- Clear paths between versions
- Breaking changes and their solutions
- Updated examples for new features
When updating documentation, ensure:
- All code examples are tested and working
- New features are documented with examples
- Migration paths are clearly explained
- Cross-references are updated
- API documentation matches the actual implementation
- Examples follow production-ready patterns
- Error handling is demonstrated
- Security considerations are included
The documentation is automatically built and deployed to ReadTheDocs when changes are pushed to the main branch. The deployment process:
- Automatic Trigger: Push to main branch triggers rebuild
- Sphinx Build: ReadTheDocs runs
sphinx-buildwith our configuration - Deployment: Successfully built documentation is deployed
- Notification: Contributors are notified of build status
For urgent documentation fixes:
- Update the relevant files
- Test locally to ensure builds work
- Create a pull request with clear description
- After merge, documentation will auto-deploy
- Monthly Reviews: Check for outdated examples and links
- Version Updates: Update documentation with each release
- User Feedback: Incorporate feedback from GitHub issues and discussions
- Accuracy: All examples must work with current version
- Completeness: Cover all public APIs and major features
- Usability: Clear navigation and searchable content
- Performance: Fast loading and responsive design
If you need help with documentation:
- GitHub Issues: Report documentation bugs or request improvements
- GitHub Discussions: Ask questions about documentation
- Contributing Guide: Learn how to contribute to the project
All documentation is released under the MIT License, same as the project code.