ZAP Protocol
Protocols

Overview

Native ZAP RPC, and higher-level protocols carried on the ZAP wire.

Protocols

ZAP is a wire format and capability-based RPC system. You can use it two ways:

  1. Natively — define your own .zap interfaces and let ZAP be the application protocol. This is the fastest path and the only one that gives you ZAP's full capability model (transferable, revocable references instead of bearer tokens).
  2. As a carrier — run a higher-level protocol (HTTP, MCP, FIX, …) on top of ZAP framing. Existing semantics, zero-copy buffers underneath, mutual KEM auth at the transport.

Choices

ProtocolPageWhen to use
Native ZAP RPCnativeGreenfield service ↔ service, you want capabilities + min latency
HTTPhttpDrop-in net/http replacement, existing HTTP clients keep working
MCPmcpAgent tool-call channel, replaces stdio MCP
A2Aa2aCross-vendor agent collaboration (Google A2A spec)
ACPacpFIPA-style structured speech acts between agents
RNSrnsService discovery bound to identity, not DNS
FIXfixFIX 4.4 / 5.0 trading, sub-µs p99
WSwsMulti-stream pubsub, per-stream FEC, no head-of-line blocking

Why carry HTTP / MCP / FIX over ZAP at all?

If you already speak HTTP, why pipe it through ZAP? Because the carrier buys you things the higher-level protocol can't:

  • Zero-copy at every hop — the payload sits in shared-memory buffers from network read to handler dispatch. No serializer step between layers.
  • One auth model — mutual KEM-bound identity at the transport. The higher-level protocol inherits authentication; no per-layer JWT, no API keys, no cookies.
  • One observability model — every frame is signed and content-addressed. Wireshark sees the same flow your application sees.
  • One framing layer — multi-stream, FEC, no head-of-line blocking. The higher-level protocol doesn't re-invent it.

Picking the right one

You needUse
New internal service, full control of both endsNative ZAP RPC
Drop-in replacement for net/http.HandlerHTTP
Agent tool-call channelMCP
Cross-vendor agent messagingA2A or ACP
Service discovery bound to identityRNS
Sub-µs tradingFIX
Pubsub with FECWS

All Go reference implementations live under github.com/zap-proto; polyglot clients speak them via the per-language SDKs.

On this page