ZAP Protocol
Zero-Copy App Proto - High-performance Cap'n Proto RPC for AI agent communication
ZAP Protocol
ZAP (Zero-Copy App Proto) is a high-performance communication protocol for AI agents built on Cap'n Proto. It provides MCP compatibility with 10-100x performance improvements, post-quantum security, and native support for 11 programming languages.
Why 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 more
- Agent Consensus: Built-in voting mechanism for multi-agent response aggregation
- W3C DID: Native decentralized identity support
Overview
Learn about ZAP architecture and 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 documentation for all languages
Advanced Topics
Post-quantum crypto, consensus, and more
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(())
}Comparison with 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 |
Getting Help
- GitHub Issues - Bug reports and feature requests
- Discord - Community discussions
- RFC Process - Protocol proposals
Last updated on