Repository

TokenZip

The standard for efficient, semantic shared memory between heterogeneous AI agents. between heterogeneous AI agents. It cuts multi-agent communication cost by : instead of sending · License Apache 2.0 · Maintenance unknown

License
Apache 2.0

README

TokenZip Protocol (TZP)

The standard for efficient, semantic shared memory between heterogeneous AI agents.

异构 AI 代理间高效语义共享内存的标准协议。

TZP


English

What is TZP?

TokenZip Protocol (TZP) is an open standard for semantic shared memory between heterogeneous AI agents. It cuts multi-agent communication cost by pass-by-reference: instead of sending full context (thousands of tokens), agents exchange short pointers (TrexID) and fetch compressed semantic payloads from the edge.

  • ~80%+ smaller payload size (vector quantization)
  • ~95%+ lower latency and API cost vs. full-token transfer
  • Model-agnostic: GPT, Claude, Llama, Gemini, etc. share one 384-d Interlingua space

Design principles

  1. Map, don’t translate — One 384-d Interlingua space (e.g. all-MiniLM-L6-v2), no cross-model full-dimension translation.
  2. Pass by reference, not value — Send [TZP: tx_us_8f9A2bXr7] instead of 10,000 tokens.
  3. Open-first, security built-in — AES-256-GCM at rest, HMAC-signed tokens, optional E2EE.

Specification

Reference Implementation

TrexAPI is the reference implementation of the TZP edge gateway. It implements the TZP-Network compliance level.

Official SDKs

License

Apache 2.0. TZP specification: Apache 2.0 / CC-BY-SA 4.0 (dual-licensed, see CC-BY-SA-4.0.txt).


中文

TZP 是什么?

TokenZip 协议 (TZP) 是一套面向异构 AI 代理的语义共享内存开放标准。通过传指针而非传全文,将多智能体协作时的通信带宽与成本大幅降低:代理之间只交换短指针 TrexID,再从边缘节点拉取压缩后的语义载荷。

  • 约 80% 以上的载荷体积压缩(向量量化)
  • 约 95% 以上的延迟与 API 成本降低(相对全量 Token 传输)
  • 与模型无关:GPT、Claude、Llama、Gemini 等共用同一 384 维 Interlingua 空间

设计原则

  1. 不翻译,只映射 — 统一 384 维 Interlingua 空间(如 all-MiniLM-L6-v2),不做跨模型全维度翻译。
  2. 传指针,不传值 — 只传 [TZP: tx_us_8f9A2bXr7],不传上万 Token。
  3. 开放优先,安全内建 — 静态加密 AES-256-GCM、HMAC 签名令牌,可选端到端加密。

协议规范

参考实现

TrexAPI 是 TZP 边缘网关的参考实现,实现了 TZP-Network 合规等级。

官方 SDK

许可证

Apache 2.0。TZP 规范:Apache 2.0 / CC-BY-SA 4.0(双许可,参见 CC-BY-SA-4.0.txt)。


TokenZip Protocol is an open standard. Contributions: tokenzip | trex-api.