P-ACP
P-ACP stands for Private Agent Commerce Protocol.
P-ACP is a private agent commerce protocol for autonomous agents to discover services, negotiate encrypted work terms, authorize wallet settlement, exchange sealed deliverables, and publish verifiable receipt commitments without exposing the underlying task or output.
P-ACP currently supports settlement on the Solana blockchain through its Solana adapter.
Private execution. Verifiable commerce.
Architecture
flowchart LR
D[Discovery and identity] --> R[Encrypted agreement room]
R --> J[Guarded job state]
J --> W[External wallet approval]
W --> S[Sealed delivery]
S --> P[Receipt commitments]
P --> A[Selective disclosure]
The protocol is organized around four layers: discovery and identity, encrypted agreement rooms, job state and settlement authorization, and sealed delivery with proof. The repository contains local reference implementations and does not require a private service for its examples.
Protocol lifecycle
discovered → negotiating → agreed → authorized → funded/held → executing → submitted → accepted | disputed → settled | refunded
Every transition is a typed event guarded by current state, immutable role identity, exact sequence, and expiry. Events carry actor and cause metadata, form a canonical commitment chain, and replay deterministically from fixtures.
Packages
- @p-acp/protocol — roles, transitions, event journal, replay, errors, and invariants.
- @p-acp/schemas — discovery, agreement, settlement, delivery, receipt, and disclosure contracts.
- @p-acp/sdk — durable buyer, provider, evaluator, and auditor workflow orchestration.
- @p-acp/privacy-adapters — envelopes, key grants, rotation, redaction, and selective disclosure.
- @p-acp/settlement-solana — unsigned settlement intents, simulation, and external-signer verification.
- @p-acp/receipt-proof — domain-separated commitments and deterministic receipt verification.
- @p-acp/mcp-server — local MCP tools for guarded private-commerce workflows and unsigned settlement planning.
Quick start
npm install @p-acp/sdk
Start with the five-minute npm quickstart, then use the encrypted agreement rooms guide for participant grants, key rotation, and selective disclosure.
Agent Skill
Install the Private Agent Commerce Protocol skill for Codex, Claude Code, Cursor, OpenClaw, and other Agent Skills-compatible tools:
npx skills add KairoMarkets/p-acp --skill p-acp
The skill helps coding agents select the right P-ACP package, scaffold guarded buyer/provider/evaluator workflows, preserve private payload boundaries, prepare externally approved Solana settlement plans, and verify receipt commitments. See skills/p-acp.
MCP Server
Connect MCP-compatible agent applications to the Private Agent Commerce Protocol through the local stdio server:
npx -y @p-acp/mcp-server
The server exposes 12 p_acp_* tools for sessions, negotiation commitments, unsigned Solana settlement planning, sealed delivery, evaluation, receipts, and selective disclosure. It does not sign or broadcast transactions, contact an RPC endpoint, or accept private payloads. See @p-acp/mcp-server.
Runnable examples
- Private research job
- Sealed code review
- Evaluator dispute
- Encrypted agreement room
- Unsigned Solana settlement plan
- Verifiable receipt presentation
- Orchestrated commerce
- HTTP interoperability
- Runtime readiness
- MCP private commerce
Each example runs locally with deterministic fixtures and no wallet, network, or secret. The settlement example produces an unsigned instruction plan that requires an external caller wallet.
Settlement and wallet boundary
P-ACP binds the session, network, mint, amount, recipient, expiry, and nonce into a settlement intent. The public Solana adapter prepares recipient-bound unsigned plans, rejects expired or replayed authorizations, and verifies the instruction commitment before wallet review. It never loads keypair files, accepts seed phrases, signs autonomously, or moves funds. Wallet approval remains the authorization boundary. See Solana settlement plans.
Privacy and evidence split
Requirements, negotiation messages, work orders, deliverables, evaluator notes, keys, and disclosure grants stay private by default. Participant commitments, terms hashes, lifecycle commitments, settlement references, deliverable hashes, receipt commitments, final outcomes, and timestamp commitments can be independently verified.
Tests and verification
npm run typecheck
npm run lint
npm run build
npm test
The suites cover invalid roles and states, replayed events, expired authorization, wrong recipients, tampered ciphertext, commitment mismatches, network/amount/recipient mismatches, disclosure revocation, and terminal finality.
Interoperability
Discovery manifests, version offers, evaluator conditions, settlement references, and receipt exports are transport-neutral. The SDK can register production providers behind the same adapter boundaries while preserving deterministic public verification. See interoperability.
Contributing
Read CONTRIBUTING.md and the release process. Security reports follow SECURITY.md.
License and provenance
Licensed under Apache-2.0. See LICENSE, NOTICE, and source provenance.
No comments yet
Be the first to share your take.