Human–Agent Coordination Protocol Specification
HACP defines a protocol-neutral authorization and provenance layer that lets a receiver verify which human or institutional decision authorized an agent action, which constraints apply, and whether the proposed external effect remains within scope.
Version 0.1 ships a TypeScript SDK, Fetch-compatible HTTP middleware, CLI, JSON Schema, conformance vectors, tests, and runnable examples. View the source on GitHub →
Introduction
Agent authentication answers which software is making a request. Conventional authorization answers whether that software possesses a scope or credential. Neither establishes the human decision from which a specific action derives. HACP fills this gap by representing the chain from human communication to decision, mandate, action, verification, and receipt.
1.1Positioning
HACP is a generic, cross-platform provenance protocol for agent actions. It is not tied to one model provider, agent framework, transport, organization, or application domain. The same Decision, Mandate, ActionEnvelope, and Receipt model can protect commerce, software changes, infrastructure operations, communications, data access, and other consequential actions.
HACP composes with the existing agent and web security stack rather than replacing it:
AuthenticationWeb Bot Auth, OAuth, mTLS, or workload identity establishes which agent is calling.
TransportHTTP, MCP, A2A, queues, or internal RPC carries the request.
HACP provenanceEstablishes which human or institution authorized the action, what they decided, which constraints apply, and whether the concrete effect remains within that authority.
Receiver policyThe receiving service independently decides whether the authenticated, provenance-backed action should be accepted.
This separation makes HACP portable across platforms and verifiable across organizational boundaries without asking a receiver to trust an agent’s private reasoning or its claim of good intent.
1.2Why HACP is needed
A website often sees an agent as just another API client. Consider two nearly identical airline booking requests: one comes from a trusted travel agent that Alice asked to book a Friday flight to New York for no more than $600; the other comes from an attacker-controlled agent attempting an unwanted purchase. Authentication can identify the software making each request, but it cannot prove which human authorized the booking, what that person intended, or whether the selected flight and price remain inside their instructions.
HACP gives the legitimate request a verifiable chain: Alice’s reviewed Decision, the exact limits she approved, the identity of the agent she authorized, and the concrete booking action the agent proposes. The airline verifies that chain and applies its own policy before creating the reservation. It can allow a properly authorized booking, request human review when evidence is insufficient, or deny an anonymous, altered, expired, replayed, or out-of-scope request.
Authentication proves which agent is calling. HACP proves the human or institutional authority behind the specific action.
1.3Key goals
Portable provenanceCarry decision authority across agents, organizations, and transports without exposing an entire private conversation.
Bounded delegationDelegate narrow, time-limited authority to a named agent and require monotonic attenuation across subdelegation.
Receiver enforcementAllow websites and APIs to evaluate agent identity, human provenance, intent, constraints, and issuer trust before accepting an effect.
Independent auditProduce cryptographically verifiable records that an authorized auditor can validate after execution.
Protocol neutralityKeep the canonical semantics independent of HTTP, A2A, MCP, gRPC, or a specific identity system.
1.4Guiding principles
Human authority is explicit. Model inference is never equivalent to consent. Verification is local. Each receiver chooses its own trust anchors and risk policy. Disclosure is minimal. Proof of authority should not require disclosure of chain-of-thought or unrelated human communication. History is append-only. Correction and revocation create new records rather than rewriting the evidence available at action time.
1.5Specification structure
Decision, Mandate, ActionEnvelope, Receipt, Revocation
Propose, attest, issue, verify, revoke, resolve
HTTP+JSON is shipped; A2A and MCP profiles are planned for 0.2
Core semantics remain invariant across bindings. A custom binding MUST provide representations equivalent to the canonical objects and MUST preserve the verification order defined by this specification.
1.6Normative content
The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL are to be interpreted as requirement levels. Examples, diagrams, rationales, and implementation notes are informative unless explicitly marked normative.
Terminology
2.1Actors
PrincipalA human or institution whose decision is the root of authority.
ExtractorA component that converts human communication into a proposed structured Decision.
AttesterA human, organization, or accepted service that confirms a Decision under a declared assurance method.
Mandate issuerThe party that delegates permissions derived from a Decision to an Agent.
AgentThe authenticated software actor that proposes an external action.
VerifierThe policy enforcement point controlling whether the target system accepts the action.
AuditorA party authorized to reconstruct and validate the provenance chain without executing the action.
2.2Core concepts
DecisionAn attested representation of intent, constraints, evidence commitments, and principal context.
MandateA signed, audience-bound delegation of permissions from an issuer to a specific Agent.
ActionEnvelopeA proposed operation and target, bound to a mandate, nonce, creation time, and proof.
ReceiptThe Verifier’s signed record of ALLOW, DENY, or REVIEW and the policy version used.
Evidence commitmentA digest or selective disclosure supporting a Decision without requiring raw source publication.
Provenance graphThe directed graph connecting decisions, delegations, actions, revocations, and receipts.
HACP protocol operations
Operations are defined independently of transport. Bindings map these operation names, inputs, outputs, and error semantics to concrete endpoints or methods.
3.1.1extractDecision
Creates a non-authoritative structured proposal from human communication.
- Inputs
DecisionProposal- Outputs
Decision with state PROPOSED- Errors
- InvalidEvidenceError, UnsupportedVocabularyError
- Behavior
- The extractor MUST preserve source evidence commitments and mark every value as asserted or inferred. This operation MUST NOT produce an authoritative mandate.
3.1.2attestDecision
Confirms a proposed Decision using a permitted attestation method.
- Inputs
decisionId, attestation, proof- Outputs
Decision with state ATTESTED- Errors
- DecisionNotFoundError, AttestationRequiredError, InvalidProofError
- Behavior
- The service MUST bind the attestation to the canonical Decision digest. Material changes after attestation create a new Decision ID.
3.1.3issueMandate / delegateMandate
Delegates bounded permissions derived from an attested Decision.
- Inputs
Mandate- Outputs
Accepted Mandate- Errors
- DecisionNotAttestedError, ScopeEscalationError, InvalidAudienceError
- Behavior
- The issuer MUST establish authority to delegate and MUST NOT issue permissions broader than the controlling Decision or parent Mandate.
3.1.4verifyAction
Evaluates an ActionEnvelope against its provenance chain and local policy.
- Inputs
ActionEnvelope- Outputs
Receipt- Errors
- MalformedEnvelopeError, InvalidMandateError, ReplayDetectedError
- Behavior
- The Verifier MUST validate canonical form, signatures, chain continuity, audience, freshness, nonce, scope, constraints, revocation, and local policy before producing an effect.
3.1.5createRevocation
Prevents future actions from deriving authority from a Mandate.
- Inputs
mandateId, reason, effectiveAt, proof- Outputs
RevocationRecord- Errors
- MandateNotFoundError, RevocationUnauthorizedError
- Behavior
- Revocation MUST be idempotent. It does not invalidate receipts for actions accepted before effectiveAt.
3.1.6verifyReceipt
Verifies the signature on a receiver-issued Receipt.
- Inputs
Receipt, KeyResolver- Outputs
boolean- Errors
- Key resolution or invalid proof
- Behavior
- Reconstructs the canonical receipt payload and validates its Ed25519 proof.
3.2Operation semantics
Replay protection
Every ActionEnvelope carries a single-use nonce. The reference verifier scopes nonce consumption to the receiving audience and authenticated Agent, and production stores must consume it atomically.
Versioning
Clients MUST send the protocol major and minor version. Servers MUST process the declared semantics or return VERSION_NOT_SUPPORTED; they MUST NOT silently downgrade authorization behavior.
Three-valued disposition
ALLOW means all required checks passed. DENY means a non-recoverable verification or policy condition failed. REVIEW pauses the effect until fresh human judgment or missing evidence is supplied.
Protocol data model
All implementations MUST support the canonical HACP object semantics. HACP 0.1 serializes objects as UTF-8 JSON using camelCase field names. Every signed object includes hacpVersion, type, id, and proof.
4.1Decision
hacpVersionstringRequiredMajor.minor protocol version.idstringRequiredGlobally unique opaque Decision identifier.stateDecisionStateRequiredPROPOSED, ATTESTED, REVOKED, or SUPERSEDED.principalPrincipalRequiredHuman or institutional root of authority.intentIntentRequiredTyped authorized outcome and human-readable statement.constraintsConstraintSetRequiredMachine-evaluable authorization limits.evidenceEvidenceRef[]RequiredDigest-only, selective, or full evidence references.fieldSourcesFieldSource[]RequiredPaths marked ASSERTED or INFERRED.createdAttimestampRequiredDecision creation time.attestationAttestationRequired for authorityMethod, assurance, time, and Ed25519 proof.supersedesstring[]OptionalPrior Decisions replaced by this object.{
"hacpVersion": "0.1",
"type": "decision",
"id": "dec_01J8Z5XNT7",
"state": "ATTESTED",
"principal": {
"id": "did:web:acme.example:users:alice",
"type": "HUMAN",
"organization": "did:web:acme.example"
},
"intent": {
"type": "flight.book",
"statement": "Book a Friday afternoon flight to NYC."
},
"constraints": {
"maxAmount": { "currency": "USD", "value": "600.00" },
"departureWindow": "2026-09-18T12:00:00-07:00/2026-09-18T18:00:00-07:00"
},
"evidence": [{
"mediaType": "application/vnd.slack.message",
"digest": "sha256:7e9f...",
"disclosure": "DIGEST_ONLY"
}],
"fieldSources": [{
"path": "/constraints/maxAmount",
"basis": "ASSERTED",
"evidenceDigest": "sha256:7e9f..."
}],
"createdAt": "2026-09-12T18:42:00.000Z",
"attestation": {
"method": "DIRECT_CONFIRMATION",
"assuranceLevel": "HACP_L2",
"attestedAt": "2026-09-12T18:42:03.000Z",
"proof": {
"type": "Ed25519Signature2020",
"verificationMethod": "did:web:acme.example:users:alice#hacp-1",
"createdAt": "2026-09-12T18:42:03.000Z",
"proofValue": "z5Ns..."
}
}
}4.2Mandate
issuerURIRequiredIdentity delegating authority.subjectURIRequiredAgent allowed to exercise the mandate.decisionRefstringRequiredImmutable controlling Decision.permissionsstring[]RequiredOperations available to the subject.constraintsConstraintSetRequiredLimits inherited and added at this delegation step.audienceURI[]RequiredReceivers where the mandate may be presented.maxDelegationDepthuint32RequiredRemaining permitted subdelegation hops.validFromtimestampRequiredBeginning of the validity window.notAftertimestampRequiredExclusive end of the validity window.noncestringRequiredUnique value for issuance replay detection.{
"hacpVersion": "0.1",
"type": "mandate",
"id": "mandate_01J8Z6M2Q4",
"issuer": "did:web:acme.example:users:alice",
"subject": "did:web:agents.acme.example:travel",
"decisionRef": "dec_01J8Z5XNT7",
"permissions": ["flight.search", "flight.purchase"],
"constraints": {
"destination": ["NYC"],
"maxAmount": { "currency": "USD", "value": "600.00" }
},
"audience": ["https://api.example-air.com"],
"maxDelegationDepth": 1,
"validFrom": "2026-09-12T18:42:03.000Z",
"notAfter": "2026-09-14T07:00:00.000Z",
"nonce": "3f6bcda9-0db7-4f7c-a1b1-cf62eaf40b87",
"proof": {
"type": "Ed25519Signature2020",
"verificationMethod": "did:web:acme.example#hacp-1",
"createdAt": "2026-09-12T18:42:03.000Z",
"proofValue": "z3FXQ..."
}
}A child Mandate MUST NOT add a permission, widen an audience, extend validity, increase a quantitative limit, remove a critical caveat, or increase the remaining delegation depth of its parent.
4.3ActionEnvelope
The ActionEnvelope describes the external effect to be authorized. The Verifier evaluates the resolved target and final parameters, not only the Agent’s label for the action.
mandateRefstringRequiredControlling Mandate ID or digest.agentURIRequiredAuthenticated actor; MUST equal Mandate.subject.action.typestringRequiredOperation identifier matched to a permission.action.targetURIRequiredCanonical target resource.action.parametersobjectRequiredDomain-specific proposed effect.noncestringRequiredSingle-use action nonce.createdAttimestampRequiredAction creation time in UTC.proofProofRequiredSignature over the complete canonical envelope.4.4Receipt and RevocationRecord
A Receipt binds the verification verdict to the ActionEnvelope digest and policy version. A RevocationRecord identifies its issuer, affected object, effective time, reason, and proof. Both are append-only audit events.
4.5Data type conventions
Timestamps use RFC 3339 UTC with millisecond precision. Monetary values use uppercase ISO currency codes and decimal strings; floating-point values MUST NOT be used for authorization limits. URIs are absolute. IDs are opaque and MUST NOT carry authorization meaning. Signed JSON is canonicalized using JSON Canonicalization Scheme semantics before hashing.
Protocol binding requirements
A protocol binding maps abstract HACP operations to a transport while preserving the canonical data model and verification semantics.
Object equivalenceEvery required canonical field and enum value MUST be representable without loss.
Version transportThe binding MUST carry HACP major.minor version on every operation.
Authentication contextThe binding MUST let the Verifier bind transport authentication to ActionEnvelope.agent.
IntegrityThe binding MUST preserve the signed bytes or a deterministic mapping to the canonical object.
Error mappingEvery standard HACP error MUST map to an unambiguous transport-specific status.
Replay controlsThe binding MUST transmit the signed action nonce without intermediary rewriting.
5.1Shipped binding
The 0.1 repository currently implements a Fetch-compatible HTTP binding. MCP and A2A binding profiles are roadmap items, not shipped interfaces.
Trust, identity, and proofs
6.1Identity resolution
HACP treats principal, issuer, subject, verifier, and verification-method identifiers as URIs. Deployments may use DIDs, HTTPS identifiers, workload identities, or organization-local identifiers. A trust policy decides which schemes and issuers are acceptable; HACP does not create a universal identity registry.
6.2Proof requirements
A proof MUST cover the canonical object, object type, protocol version, creation time, and verification-method identifier. Action proofs cover the exact operation, target, parameters, Mandate reference, creation time, and action nonce; the Mandate binds the audience. Verifiers MUST reject unknown critical proof parameters and algorithm substitutions.
6.3Proof suites
The 0.1 TypeScript reference implementation ships one concrete proof profile: Ed25519Signature2020. Signed objects are canonicalized before hashing and signing. Additional proof suites are future interoperability work and are not claimed by the current SDK.
Human decision extraction and attestation
Natural-language interpretation is probabilistic; authorization is not. An Extractor creates a proposal. Authority begins only when an accepted attestation method binds a Principal to the canonical Decision digest.
7.1Extraction requirements
An Extractor MUST distinguish values explicitly asserted by a human from values inferred by a model. Inferred values carry source location, extraction method, and optional confidence. An inferred value MUST NOT broaden authority unless the applicable attestation explicitly confirms it.
7.2Attestation methods
DIRECT_CONFIRMATIONThe Principal reviews and confirms the canonical Decision.
ORGANIZATION_POLICYAn institution attests under a named policy and delegated role.
SIGNED_SOURCEThe source communication itself carries a qualifying signature.
WITNESSED_APPROVALA trusted service records the approval event and produces a verifiable attestation.
7.3Assurance levels
HACP_L0DeclaredUnsigned provenance; suitable only for low-risk assistance.HACP_L1Agent-attestedAuthenticated Agent plus evidence commitment.HACP_L2Principal-attestedHuman or organization signature over the Decision.HACP_L3WitnessedTrusted issuer and independently verifiable transparency event.HTTP+JSON protocol binding
8.1General requirements
HTTPS is REQUIRED. Request and response bodies use application/hacp+json. Clients send HACP-Version on every operation. Authentication remains deployment-specific but MUST be bound to the identity named by the ActionEnvelope.
8.2VerifyAction
The signed ActionEnvelope is sent directly to the protected application endpoint; HACP does not require a separate verification resource URL.
POST /flights/UA123 HTTP/1.1
Host: api.example-air.com
Content-Type: application/hacp+json
HACP-Version: 0.1
Authorization: Bearer <workload-credential>
{
"hacpVersion": "0.1",
"type": "action-envelope",
"id": "act_01J8Z6P1JG",
"mandateRef": "mandate_01J8Z6M2Q4",
"agent": "did:web:agents.acme.example:travel",
"action": {
"type": "flight.purchase",
"target": "https://api.example-air.com/flights/UA123",
"parameters": {
"destination": "NYC",
"amount": { "currency": "USD", "value": "542.00" }
}
},
"nonce": "80f30b3c-5c2b-4e8d-9f18-e51d9626e8f1",
"createdAt": "2026-09-12T18:43:08.000Z",
"proof": {
"type": "Ed25519Signature2020",
"verificationMethod": "did:web:agents.acme.example:travel#hacp-1",
"createdAt": "2026-09-12T18:43:08.000Z",
"proofValue": "z4Qm..."
}
}HTTP/1.1 200 OK
Content-Type: application/hacp+json
HACP-Version: 0.1
{
"receipt": {
"id": "rcpt_01J8Z6P4QS",
"verdict": "ALLOW",
"actionDigest": "sha256:4ca9...",
"mandateRef": "mandate_01J8Z6M2Q4",
"reasonCodes": ["DECISION_ATTESTATION_VALID", "AGENT_IDENTITY_BOUND", "MANDATE_CHAIN_VALID", "WITHIN_SCOPE"],
"policyVersion": "air-api/hacp-policy@3",
"evaluatedAt": "2026-09-12T18:43:09.000Z",
"proof": {
"type": "Ed25519Signature2020",
"verificationMethod": "did:web:api.example-air.com:hacp#receipt-1",
"createdAt": "2026-09-12T18:43:09.000Z",
"proofValue": "z5Rcpt..."
}
}
}The receiver MUST bind an independently authenticated caller to ActionEnvelope.agent and consume the action nonce atomically. Responses contain a signed Receipt: HTTP 200 for ALLOW, 202 for REVIEW, and 403 for DENY.
8.3Production storage
The included in-memory stores are development utilities. Production deployments require durable object resolution, atomic shared nonce storage, live revocation checks, and protected signing keys.
Verification algorithm
A conforming Verifier performs the following checks in order. Implementations may optimize resolution and cryptography, but an optimization MUST NOT change observable authorization semantics.
- 01
Parse the envelope, reject duplicate members, and canonicalize the signed representation.
- 02
Resolve the Mandate, controlling Decision, parent delegation chain, verification methods, and current revocation status.
- 03
Validate every signature and ensure each issuer was authorized to create the next edge in the chain.
- 04
Bind the authenticated requester to ActionEnvelope.agent and confirm it equals the final Mandate subject.
- 05
Validate audience, creation time, expiry, clock skew, nonce freshness, and idempotency semantics.
- 06
Match the action type and resolved target to the granted permission set.
- 07
Evaluate inherited constraints against the actual proposed external effect.
- 08
Apply local issuer trust, assurance, risk, and business policy.
- 09
Atomically record the verdict and issue a signed Receipt before or with the protected effect.
If a required constraint is unknown, ambiguous, or not machine-evaluable, the Verifier MUST return REVIEW or DENY. It MUST NOT silently treat the constraint as satisfied.
Reference implementation
The public repository is an executable TypeScript monorepo, not only a prose proposal. It contains three packages plus schemas, conformance assets, tests, and examples.
@ahi-lab-hacp/coreCanonicalization, Ed25519 proofs, Decisions, Mandates, delegation, constraints, replay protection, revocation, verification, and signed Receipts.
@ahi-lab-hacp/httpFetch-compatible request encoding, parsing, verification responses, and server middleware.
@ahi-lab-hacp/cliEd25519 key generation, canonicalization, SHA-256 digests, and Receipt verification.
Reference integration: Cofeat
Cofeat is the first end-to-end, cross-service HACP integration. An explicit Slack action creates an attested Decision for the verified member and a narrow, expiring Mandate for the Cofeat Slack agent. The agent signs the exact design-generation ActionEnvelope and sends it over the HTTP binding.
A verified member initiates a bounded request.
Human authority and the exact external effect are signed.
Identity, signature, scope, constraints, expiry, nonce, and policy must pass.
Only an ALLOW Receipt reaches the model provider. Altered actions and replays are denied before any model call. The bearer token still authenticates the workload; HACP binds that workload to the human decision.
Security considerations
12.1Threats and mitigations
Fabricated authorityRequire an attested Decision and cryptographically continuous Mandate chain.
Scope escalationEvaluate permissions and constraints against the receiver-resolved effect.
ReplayUse audience-bound proofs, short validity, atomic nonce consumption, and idempotency keys.
Delegation launderingPreserve every signed delegation edge and enforce monotonic attenuation.
Evidence substitutionCommit to immutable evidence digests before attestation.
Key compromiseSupport key versioning, revocation, short-lived mandates, and incident-time policy.
12.2Privacy
A verifier SHOULD receive only the claims required by its policy. Raw conversations, model reasoning, unrelated participants, and unneeded personal data remain outside the protocol exchange. Evidence references SHOULD support digest-only or selective-disclosure modes.
12.3Revocation and availability
High-risk operations SHOULD fail closed when fresh revocation status cannot be obtained. Lower-risk profiles may accept a stapled status proof within a declared freshness window. Revocation changes future authority; it does not rewrite historical receipts.
12.4Audit retention
Receivers SHOULD retain action digests, relevant Mandate chains, verdicts, reason codes, policy versions, and timestamps for the applicable audit period. Logs MUST exclude credentials and SHOULD avoid raw source communication.
Implementation roadmap
0.1 · Reference foundationShipped: canonical objects, Ed25519 proofs, attenuation, verification, HTTP binding, schema, vectors, TypeScript SDK, CLI, tests, examples, and CI.
0.2 · InteroperabilityPlanned: expanded vectors, durable adapters, OpenAPI, constraint vocabulary, A2A and MCP profiles, and a Python SDK.
0.3 · Operational assurancePlanned: selective disclosure, transparency logs, key rotation, Go verifier, gateway integration, and external security review.
1.0 · Stable protocolTarget: multiple interoperable implementations, stable proof suites, complete conformance, and production guidance.
Schema and conformance
The repository includes specification/schema/hacp.schema.json and language-neutral canonicalization fixtures in conformance/vectors. Compatibility means producing the same canonical bytes, verifying the same proof chain, and returning the same authorization result—not merely matching TypeScript types.
Reference languageTypeScript/JavaScript is the shipped 0.1 implementation. Python is planned next, followed by Go.
Continuous integrationLinting, type checking, tests, conformance vectors, and package builds run together through pnpm check.
Change controlChanges to object meaning, canonical representation, signing inputs, or verification order require schema, vector, test, and compatibility updates.
Runnable ticket-booking example
- Alice decides: book a Friday afternoon flight to NYC for no more than USD 600.
- The communication is extracted into
dec_01J8Z5XNT7. Alice directly attests the canonical digest at HACP_L2. - A mandate grants the travel Agent
flight.searchandflight.purchase, binds it to the airline API, and expires after the travel window. - The Agent proposes UA123 for USD 542 through
VerifyAction. - The airline validates identity, signatures, nonce, audience, expiry, permission, destination, and amount.
- The airline returns an ALLOW Receipt and performs the purchase. Any later auditor can reconstruct the exact authorization chain without receiving Alice’s full conversation.
Human decision → accountable agent action.
Review the implementation and run the examples on GitHub.