Legion A2A is an implementation of the Agent to Agent Protocol, providing tools and utilities for building agent-to-agent communications.
This is a monorepo containing:
a2a-protocol: Core protocol models and specifications (ina2a_protocol/)
For detailed information about the protocol, please see the a2a_protocol/README.md.
# Or install just the protocol models
pip install a2a-protocol# Work directly with the protocol models
from a2a_protocol.pydantic_v2 import Message, Part, TextPart, Role
# Create a message
message = Message(
role=Role.user,
parts=[
Part(root=TextPart(
type="text",
text="Hello, agent!",
metadata={"source": "user_interface"}
))
],
metadata={"session_id": "12345"}
)This project uses PEP 625 compliant build configuration with pyproject.toml.
# Clone the repository
git clone https://github.com/TheRaLabs/legion-a2a.git
cd legion-a2a
# Install in development mode
pip install -e .To publish the a2a-protocol package to PyPI:
# Navigate to the protocol directory
cd a2a_protocol
# Remove old build and build the package
rm -rf dist build && python -m build
# Upload to PyPI
python -m twine upload dist/*Make sure you have the required dependencies installed:
pip install build twineMIT