Agent Protocols
PEAC provides mappings for major agent communication protocols. Each mapping is a pure transform -- it takes protocol-specific input and produces a standardized PEAC extension object that you attach to a receipt.
Supported protocols
| Protocol | Package | Description | Status |
|---|---|---|---|
| MCP | @peac/mappings-mcp | Model Context Protocol (tool calls, resources) | Stable |
| ACP | @peac/mappings-acp | Agent Communication Protocol (agent-to-agent) | Stable |
| A2A | @peac/mappings-a2a | Agent-to-Agent metadata and agent card discovery | Planned |
| TAP | -- | Visa Trusted Agent Protocol | Planned |
| UCP | -- | Universal Commerce Protocol | Planned |
| RSL | -- | Request Signing Layer | Planned |
MCP (Model Context Protocol)
Map MCP tool calls to PEAC receipts. The mapping captures tool identity, call arguments (hashed for privacy), result metadata, and timing information.
pnpm add @peac/mappings-mcp
import { fromMcpToolCall } from '@peac/mappings-mcp';
const evidence = fromMcpToolCall({
toolName: 'search',
toolServer: 'https://tools.example.com',
arguments: { query: 'AI safety' },
result: { hits: 42 },
});
The mapping extracts:
- Tool identity -- tool name and server origin
- Call arguments -- hashed by default for privacy
- Result metadata -- response shape and size
- Timing -- call duration and timestamps
MCP Server
The @peac/mcp-server package is a complete MCP server that exposes PEAC verification, inspection, and issuance as MCP tools. See the MCP Server guide for setup and usage.
ACP (Agent Communication Protocol)
Map ACP agent-to-agent interactions to PEAC receipts. The mapping captures sender and receiver identities, message types, and conversation context.
pnpm add @peac/mappings-acp
import { fromAcpInteraction } from '@peac/mappings-acp';
const evidence = fromAcpInteraction({
senderId: 'agent:sender-123',
receiverId: 'agent:receiver-456',
messageType: 'task_request',
conversationId: 'conv_abc',
});
How mappings work
Mappings are pure functions with no I/O, no side effects, and no dependencies on protocol SDKs. They take protocol-specific input and return a PEAC extension object. This makes them safe to run in any environment -- server, edge, or browser.
The data flows through three stages:
Protocol event
|
v
Mapping function (pure transform)
|
v
PEAC extension object
|
v
Receipt (via issueReceipt)
Extension objects use reverse-DNS namespaced keys under peac.extensions:
{
"peac": {
"extensions": {
"org.peacprotocol/interaction@0.1": {
"tool_name": "search",
"tool_server": "https://tools.example.com"
}
}
}
}
Extension registry
PEAC maintains advisory registries for tool call metadata. These registries define standard vocabularies so that different implementations describe the same operations consistently.
toolcall_op_types-- types of tool call operations (read,write,execute,query,subscribe)toolcall_resource_types-- types of resources accessed (api,database,file,network,compute)
See Registries for the full registry specification.