ZAP Protocol
ZAP Protocol
Zero-Copy App Proto — High-performance Cap'n Proto RPC for AI agent communication. 10-100x faster than MCP with post-quantum security.
ZAP Protocol
ZAP (Zero-Copy App Proto) is a high-performance communication protocol for AI agents built on Cap'n Proto. It provides full MCP compatibility with 10-100x performance improvements, post-quantum security, and native support for 11 programming languages.
curl -fsSL hanzo.sh | sh && hanzo mcp launch zapWhy ZAP?
- Zero-Copy Performance — Cap'n Proto's zero-copy serialization eliminates parsing overhead
- MCP Compatible — Full backward compatibility with Model Context Protocol servers
- Post-Quantum Security — ML-KEM and ML-DSA cryptography for future-proof security
- Multi-Language — Native bindings for Rust, Go, Python, JavaScript, C++, and 6 more
- Agent Consensus — Built-in voting mechanism for multi-agent response aggregation
- W3C DID — Native decentralized identity support
Overview
Architecture and core concepts
Getting Started
Install ZAP and build your first agent
Schema Language
Cap'n Proto schema reference
Protocol Spec
Wire format and RPC details
Language Bindings
SDK docs for 11 languages
Advanced Topics
Post-quantum crypto, consensus, blockchain
Quick Example
interface Zap {
init @0 (client :ClientInfo) -> (server :ServerInfo);
listTools @1 () -> (tools :ToolList);
callTool @2 (call :ToolCall) -> (result :ToolResult);
listResources @3 () -> (resources :ResourceList);
readResource @4 (uri :Text) -> (content :ResourceContent);
}use zap_protocol::{Zap, ClientInfo};
#[tokio::main]
async fn main() -> Result<()> {
let client = Zap::connect("zap://localhost:9000").await?;
let info = client.init(ClientInfo::new("my-agent", "1.0.0")).await?;
let tools = client.list_tools().await?;
for tool in tools {
println!("Tool: {} - {}", tool.name, tool.description);
}
Ok(())
}ZAP vs MCP
| Feature | MCP | ZAP |
|---|---|---|
| Serialization | JSON-RPC | Cap'n Proto |
| Performance | Baseline | 10-100x faster |
| Memory | High (parsing) | Zero-copy |
| Post-Quantum | No | ML-KEM, ML-DSA |
| Threshold Signing | No | Ringtail |
| DID Support | No | W3C DIDs |
| Agent Consensus | No | Built-in voting |
ZAP includes MCP Gateway Mode for seamless migration from existing MCP servers.
How is this guide?
Last updated on
