A starter template for building a CHP capability adapter — a governed, evidence-wrapped capability that any CHP host auto-discovers and any agent can call. Click “Use this template” to create your own adapter repo.
Full guide: Build a CHP adapter in 15 minutes
chp_adapter_example/
__init__.py # exports the adapter class
adapter.py # ExampleAdapter — one `greet` capability
tests/
test_adapter.py # conformance + behavior tests
pyproject.toml # packaging + the chp.adapters entry point
Makefile # make test | conformance | build | publish
.github/workflows/ # test on PR, publish to PyPI on tag
pip install -e ".[dev]"
make test # conformance checks + behavior test- Rename the package and class. Pick
chp-adapter-<name>:- directory
chp_adapter_example/→chp_adapter_<name>/ - class
ExampleAdapter→<Name>Adapter - in
pyproject.toml:name,[tool.hatch.build.targets.wheel] packages, and the entry point<name> = "chp_adapter_<name>:<Name>Adapter" - the
adapter_id/adapter_name/adapter_tagsclass attributes
- directory
- Implement your capability in
adapter.py. Each capability is anasync def method(self, ctx, payload) -> dictdecorated with@capability(give it aninput_schema; emit domain events withctx.emit(...)). - Test:
make test. A conformant adapter scores 100. - Publish:
make build && make publish(or push av*tag to let the release workflow publish via PyPI Trusted Publishing). Any environment thatpip installs your package discovers the adapter automatically through thechp.adaptersentry point — no host config needed.
Once your adapter is on PyPI, open a PR against
capabilityhostprotocol/chp-core
adding one entry to the community array in registry/adapters.json:
{
"id": "chp-adapter-<name>",
"pypi": "chp-adapter-<name>",
"github": "https://github.com/<you>/chp-adapter-<name>",
"category": "data",
"description": "One line on what it does.",
"status": "experimental",
"tier": 2,
"maintainer": "community"
}Maintainers review for spam/intent only — not your code. Accepted entries appear on the adapters directory.
Apache-2.0. Replace with your own license if you prefer.