PyHall is the Python reference implementation of WCP (Worker Class Protocol). WCP is an open concept — fork it, implement it, improve it.
- Bug fixes with regression tests
- New worker examples in
workers/examples/ - Improvements to the routing engine that remain WCP-compliant
- Ports of WCP to other languages (link back to this repo)
- Extensions to the WCP spec (open an issue first to discuss)
git clone https://github.com/pyhall/pyhall-python
cd pyhall/sdk/python
pip install -e ".[dev]"
pytest tests/All tests must pass before submitting a PR.
- Python 3.10+ compatible (no 3.12-specific syntax)
- Pydantic v2 for all models
- Type annotations on all public functions
- Docstrings on all public modules, classes, and functions
- No hardcoded paths or IP addresses
- No secrets or credentials in code
Run the full test suite:
pytest tests/ -vNew features require new tests. Bug fixes require a regression test that fails before the fix and passes after.
Changes to router.py must maintain WCP compliance:
- Fail-closed behavior must never be weakened
- Mandatory telemetry must always be emitted on successful dispatch
- Deterministic routing must be preserved
- All deny paths must return a
RouteDecision(never raise)
- Create
workers/examples/<your_worker>/ - Include
worker.py,registry_record.json,README.md - Worker must implement the WorkerContext / WorkerResult pattern
- Worker must produce telemetry and evidence receipt
- Worker must never raise (return error status instead)
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature - Make your changes with tests
- Run
pytest tests/— all tests must pass - Open a pull request with a description of what changed and why
The WCP spec is versioned separately from PyHall — see github.com/workerclassprotocol/wcp.
To propose a spec change:
- Open an issue describing the problem and proposed solution
- Reference existing agent protocol specs where relevant
- Include a working implementation in PyHall
- Mark proposed additions as
x.*(experimental namespace) until stabilized
By contributing, you agree your contributions will be licensed under the Apache License 2.0. See LICENSE.
Note: The WCP specification itself is licensed under MIT. The PyHall
implementation (pyhall-wcp on PyPI) is Apache 2.0.