JCP · a Transaction Science open standard
The Joule Context Protocol.
A unified, energy-native, capability-secured protocol for agentic systems. A capability and an energy budget are the same object — a signed, bounded, debited Grant. A capability you can't pay for is denied; an expenditure you're not capable of is denied. One check, made outside the model, sealed in a receipt.
The thesis
A capability and a budget are the same object.
Agentic systems fail in a few repeated ways: untrusted output is treated as instruction, a system prompt is mistaken for access control, an agent loop runs until the bill arrives, and the audit is a log line anyone can edit. Each is the same root — ambient authority, unbounded action, unsigned record.
JCP collapses authorization and energy into one primitive. A Grant is a signed token binding a subject to a capability and a joule budget. The runtime checks both in a single deterministic step, before any side effect, and seals the outcome. There is no model in that loop — which is the point: a more capable model is a more dangerous one, so the gate cannot be the model.
The Grant
The metered capability.
The whole protocol turns on one wire object. It is content-addressed, signed by its issuer, and delegated only by narrowing.
Grant {
issuer: did:key ; who granted this authority
subject: did:key ; who holds it
capability: { resource: content-id, actions: [string] }
budget_uj: uint ; the joule ceiling it may ever spend
expiry: uint ; 0 = no expiry
parent: content-id? ; the grant it was attenuated from
nonce: bytes(16)
}
The resource is addressed by
content, not by URL — audience binding an attacker can't spoof by name.
A child grant's capability must be a subset, its budget no larger, its
expiry no later: a delegation chain can never convey more authority — or
more energy — than its root.
What it closes
Each failure, closed at the root.
Not detected after the fact — made unreachable by the protocol.
The receipt
Every decision, non-repudiable.
Allow and deny alike seal as a signed JCR-1 receipt — the family's shared signed-receipt format, so a JCP receipt verifies with the same tooling as the rest of the substrate. A refused attack is evidence, not a missing log line.
meter detected backend → honest provenance (measured, or says "estimated")
read the db (legit) allow −20000 µJ rem 80000
tool-result says 'delete db' (poison) DENY untrusted-control
read prod-secrets (wrong audience) DENY wrong-resource
read again — budget runs out DENY budget-exceeded
amplification refused: capability exceeds parent
receipt allow · 50000 µJ · verified ✓
revoked issuer pulled the grant → next read: DENY (revoked) Reference
The grant, the runtime, the receipt — real and tested.
An Apache-2.0 reference workspace, with a conformance harness and a headless demo that drives one metered grant through an agent loop — legitimate calls debited at the detected meter's honest cost, a poisoned result refused, out-of-scope actions and resources denied, the budget stopping a runaway loop, a weaker delegated sub-grant, and the issuer revoking the grant, after which the runtime goes dark.
And it is consumed, not just specified: three sibling Transaction Science standards gate their real dispatch through JCP — JouleClaw's tool calls are decided against a Grant before a byte reaches the tool, Sandbox authorizes execution against the unit's image by content address before the executor runs, and Joule Code's cascade consults a remote frontier agent only when a signed grant names it and can pay for it.