Open Protocol · Apache-2.0

See what your agents and tools actually did.

CHP is an open protocol for making agent, tool, and system execution visible, replayable, and ready for governance. Not another framework — an execution evidence layer at the capability boundary.

pip install chp-core
Read the quickstart →

Your agent stack tells you what tools exist.

MCP, tool calling, function APIs — they all answer: what tools are available, how do I call them, how do I return output to the model.

They don't standardize what happens after the call boundary is crossed: whether execution started, whether it completed, what was denied, and why. Logs are inconsistent, optional, and not a protocol contract.

CHP answers what actually happened.

Which capability ran, and under what correlation?
Did it start, complete, fail, or get denied?
What evidence supports that answer?
What would a replay of this session show?

How it works

01

Register

Wrap any function as a capability with a stable ID, version, and description. The host manages the registry.

@capability(id="payments.transfer", version="1.0.0")
02

Invoke

Call the capability through the host with a correlation ID. The host wraps execution, checks invariants, and emits evidence automatically.

host.invoke("payments.transfer", payload, correlation_id=...)
03

Replay

Ask the host for the ordered evidence stream for any correlation ID. Every invocation is queryable — locally, without a backend.

events = host.replay("session-abc")

Structured evidence, not logs.

Every invocation emits typed evidence events with stable fields: capability ID, version, correlation, sequence, outcome, and timing. Evidence is stored locally in an append-only SQLite store.

Payloads for sensitive keys are redacted by default. The store is queryable by correlation ID without any backend.

execution_started
execution_completed
execution_failed
execution_denied
evidence event
{
  "event_id": "evt_8f3a1c",
  "evidence_type": "execution_completed",
  "capability_id": "payments.transfer",
  "capability_version": "1.0.0",
  "correlation_id": "session-abc",
  "host_id": "my-host",
  "sequence": 2,
  "timestamp": "2026-06-03T00:14:22.104Z",
  "outcome": "success",
  "duration_ms": 43,
  "payload": {
    "status": "ok",
    "amount": 100.0
  }
}

Minimal example

Register a capability, invoke it, replay the evidence.

from chp_core import LocalCapabilityHost, capability

host = LocalCapabilityHost("my-host")

@capability(id="payments.transfer", version="1.0.0", description="Transfer funds.")
def transfer(amount: float, to: str):
    execute_transfer(amount, to)
    return {"status": "ok", "amount": amount}

host.register(transfer)

result = host.invoke(
    "payments.transfer",
    {"amount": 100.0, "to": "acct_456"},
    correlation_id="session-abc",
)

events = host.replay("session-abc")
# → execution_started, execution_completed

Visible

Every capability invocation emits structured execution evidence. See exactly what ran, when, and with what inputs — automatically.

Replayable

Replay any execution by correlation ID. The ordered event stream is always available for debugging and audit — local-first, no backend.

Governed

Denial semantics, outcome tracking, and a conformance model — built in. Governance without adopting a new framework.

What CHP defines

Capability descriptors
Host descriptors
Invocation envelopes
Correlation context
Structured execution evidence
Outcome, error, and denial semantics
Replay queries and results
Minimal conformance requirements

CHP is not a replacement for logs or tracing.

QuestionLogsOpenTelemetryCHP
Did this tool run?MaybeYes (span)Yes (evidence)
Was it denied before running?MaybeCustom span statusFirst-class outcome
What correlated to this session?NoTrace contextCorrelation ID + replay
Can I replay by causal ID?NoDepends on backendYes, required
What invariants were declared?NoNoCapability descriptor

CHP composes with OpenTelemetry — evidence exports to OTLP spans are planned for v0.6. See CHP and OpenTelemetry for details.

Install

Python reference host

pip install chp-core
pypi.org/project/chp-core ↗

TypeScript types

npm install @capabilityhostprotocol/types
npmjs.com/@capabilityhostprotocol/types ↗

Local visibility should be free.
Production trust should be paid.

The spec, schemas, local host, SDK primitives, conformance runner, and local replay are open source. Commercial value lives around production trust: hosted capability graph, multi-host trace stitching, compliance exports, and enterprise identity.

Open source on GitHub

Spec, schemas, Python host, conformance suite, and examples.