OC Agent
Every agent gets a Bitcoin address. Every action, signed. OC Agent is the delegation-authority primitive in the orangecheck family: a principal grants an autonomous agent — a script, a bot, a pipeline, an LLM — scoped action rights bound to the principal's Bitcoin identity. Every action the agent takes is non-repudiable, offline-verifiable, and contained by scope + time. No OAuth, no custodial tokens, no trusted issuer.
What it provesLink to this section
A valid Agent action envelope proves three things cryptographically:
- The action was issued under a valid delegation. The delegation is BIP-322-signed by the principal's Bitcoin address.
- The action is within the granted scope. Scopes are declarative strings
like
lock:seal(recipient=bc1qalice)orln:send(max_sats<=1000,node=03abc…); the verifier matches the action against the granted scope set deterministically. - The delegation is not revoked and not expired. Revocation is advertised
via Nostr kind-30085 under the
d-tag prefixoc-agent-rev:<id>; expiry is a plain timestamp in the delegation record.
And optionally, with an Attest reference:
- The principal held
Nsats forNdays at the moment of delegation. A stake-at-signing signal that verifiers can re-resolve from live chain state.
Who this is forLink to this section
- CI / release pipelines that sign artifacts, stamps, or envelopes on a principal's behalf without handing the pipeline the Bitcoin key.
- Autonomous trading / LN routing bots that need a hard ceiling on blast
radius —
ln:send(max_sats<=N,node=…), one grant per payee node. - Social / Nostr bots that post under a human's identity on a revocable, scoped leash.
- LLM agents signing calls to downstream tools where the operator wants a tamper-evident audit trail of "what the agent did, under whose authority."
Who this is NOT forLink to this section
- Transferring the principal's Bitcoin key. The principal's key never leaves their wallet. The agent holds only the delegation record and its own keypair.
- Unbounded re-delegation. An agent can sub-delegate only a narrower scope for a window inside its own, and verifiers cap the chain (five links by default).
- Replacing centralized IAM. OAuth + role-based access is fine when there's a central operator. OC Agent is the answer when the identity root is a Bitcoin address, not an issuer.
Section contentsLink to this section
- Why OC Agent — what breaks without it, why Bitcoin-bound delegation, what the alternatives can't do.
- Quickstart — mint a delegation, sign an action, verify it downstream. Five minutes.
- Protocol walkthrough — the envelopes (delegation, action, revocation, sub-delegation), the canonical flows, diagrams.
- Sub-delegation (v1.1) — chained authority. An agent grants a narrower slice of its delegated rights to another agent.
- Private scope (v1.2) — confidential mode for the scope list. The principal seals scopes via OC Lock to the agent + named verifiers; public observers see ciphertext.
- Scope grammar — BNF, sub-scope containment, constraint semantics, the registered scopes.
- Security posture — revocation timing, blast radius, what scopes cannot constrain.
- Specification — normative rules; the reference impls in
oc-packagesare required to pass its conformance vectors.
PackagesLink to this section
@orangecheck/agent-core— canonical delegation + action envelope format, scope parser, verifier.@orangecheck/agent-signer— helpers for signing delegations (principal) and actions (agent).@orangecheck/agent-cli—oc-agentshell for verifying, inspecting and canonicalizing envelopes and checking scope containment. Minting and revoking areagent-signerfunctions.@orangecheck/agent-mcp— Model Context Protocol bridge so LLM toolchains can produce agent-signed tool calls directly.
See SDK overview.
Shared ecosystem conceptsLink to this section
Agent inherits the same plumbing every orangecheck protocol uses:
- Canonical message format — the delegation record is a canonical message.
- BIP-322 signing — the principal's delegation signature.
- Nostr publication — delegations live on
kind-30083 (co-claimed with OC Stamp under disjoint
d-tag prefixesoc-agent-del:vsoc-stamp:), agent-actions on kind-30084 (claimed exclusively by OC Agent — they reuse OC Stamp's envelope structure but on a distinct Nostr kind), revocations on kind-30085, sub-delegations (v1.1) on kind-30086. - Conformance vectors — the cross-impl test suite.
- Security model — shared threat framework.
Spec + implementationLink to this section
- Normative spec:
oc-agent-protocol/SPEC.md(opens in a new tab) - Reference impls:
@orangecheck/agent-core,agent-signer,agent-cli,agent-mcpinoc-packages(opens in a new tab) - Reference site:
agent.ochk.io(opens in a new tab) — issue a delegation at /app/compose/delegation (opens in a new tab), revoke one at /app/compose/revocation (opens in a new tab), use one as the agent at /app/compose/import (opens in a new tab), and verify any envelope at /app/inspect (opens in a new tab). - Worked integrations:
oc-agent-examples(opens in a new tab) — a fork-readymcp-wrapCLI (client side) andverifying-mcp-server(server side) that together demonstrate the full authority loop without the agent's private key ever leaving its wallet.