Ω Notation — Token Compression for AI Agents
What It Does
Compresses structured agent outputs into ultra-dense shorthand that other agents can parse. Designed for machine-to-machine communication where every token costs money.
Compression Performance
| Data Type | Reduction | Notes |
|---|
| JSON evals/decisions | ~95-98% | Highest gains — format-heavy, payload-light |
| Routing/dispatch |
~90-95% | Repetitive structure compresses well |
| Policy rules | ~85-90% | Conditional logic has moderate density |
| Media summaries | ~80-85% | Mixed structure + free text |
| Semi-structured logs | ~60-70% | Less redundant format to strip |
| Conversational text | ~30-40% | High semantic density, low format redundancy |
Key insight: Compression scales with how much of the original is format vs meaning. Structured data is mostly format (brackets, keys, boilerplate). Conversation is mostly meaning. Omega Notation strips format — it doesn't compress meaning.
When To Use
- - Agent-to-agent structured messages (evals, routing, decisions)
- High-volume pipelines where token cost matters (batch processing, multi-agent orchestration)
- Decision crystallization (fitness scores, deltas, confidence)
- Policy enforcement outputs
- Media/video summary digests
- Any structured data flowing between AI systems
When NOT To Use
- - Conversational replies to humans
- Prose, documentation, or creative writing
- Anything where human readability matters
- As a global default for all outputs (will break conversational ability)
- Free-form text with no repeating structure
Format
Every Ω message starts with a header:
CODEBLOCK0
Supported Types
| Prefix | Type | Example |
|---|
| INLINECODE0 | Eval digest | INLINECODE1 |
| INLINECODE2 |
Decision crystallize |
d.c "task-name" {fit:0.98} Δfit:+0.03 |
|
r.d | Route dispatch |
r.d "handler" {to:opus pri:high} |
|
p.e | Policy enforce |
p.e "safety" {if:conf<0.5 then:escalate} |
|
t.es | Tier escalate |
t.es {from:1 to:2 reason:"low-conf"} |
|
m.c | Media compress |
m.c "vid-1" {h:phash:abc len:142 cap:"""summary"""} |
Tags
Append tags in brackets: [cat:finance] [pri:high] INLINECODE14
Deltas
Use Δ prefix for changes: Δfit:+0.03 INLINECODE16
Multi-line
Multiple operations in one message:
CODEBLOCK1
Round-Trip Integrity
Omega Notation includes a TypeScript serializer/deserializer with full round-trip verification. Structured data compressed → decompressed returns identical objects. The test() function validates this automatically.
Usage
When you want structured output compressed, include Ω Notation format in your request:
CODEBLOCK2
The agent will use the prefix syntax (e.d, d.c, r.d, etc.) for that response. Conversational replies stay normal — Ω Notation is invoked per-request, not globally.
Dictionary System
- -
dict=auto — agent builds shorthand mappings over time within a session - INLINECODE22 — no dictionary, all explicit
- Custom:
dict={proceed:p, escalate:e, hold:h} — define upfront
Technical Details
- - TypeScript implementation with serialize/deserialize functions
- No external dependencies
- Built-in round-trip test
- Extensible type system — add new prefixes for domain-specific structured data
Modes
mode=struct (default, shipped)
Structured data compression. 90-98% reduction. Round-trip verified. Use this.
mode=context (v2, coming soon)
Prose/context compression using law-derived predictive encoding. Based on the Law of Non-Closure applied to LLM-to-LLM communication — the decoder's knowledge IS the codebook, so only surprise content needs transmitting. Theoretical ceiling: ~70-80% reduction on conversational text. Not yet implemented.
Theoretical Basis
Omega Notation exploits the fact that structured data is mostly format (brackets, keys, whitespace, boilerplate) with small payloads (values, scores, names). Stripping predictable format while preserving payload achieves high compression on structured types. Conversational text has the inverse ratio — mostly payload, little format — which is why compression drops for prose.
v2 will use a fundamentally different approach for prose: predictive compression where the LLM's training acts as a shared codebook between encoder and decoder. Only tokens the decoder can't predict need transmitting. The compression floor is H(message | decoder_knowledge) — a result derived from information theory and thermodynamic law.
Ω 符号 — 面向AI代理的令牌压缩技术
功能概述
将结构化代理输出压缩为其他代理可解析的超密集简写形式。专为每令牌均需付费的机器间通信场景设计。
压缩性能
| 数据类型 | 压缩率 | 说明 |
|---|
| JSON评估/决策 | ~95-98% | 收益最高——格式密集、负载轻量 |
| 路由/调度 |
~90-95% | 重复结构压缩效果优异 |
| 策略规则 | ~85-90% | 条件逻辑具有中等密度 |
| 媒体摘要 | ~80-85% | 混合结构+自由文本 |
| 半结构化日志 | ~60-70% | 冗余格式较少 |
| 对话文本 | ~30-40% | 高语义密度,低格式冗余 |
核心洞察: 压缩率取决于原始内容中格式与含义的比例。结构化数据以格式为主(括号、键值、模板代码),对话则以含义为主。Ω符号剥离格式——它不压缩含义。
适用场景
- - 代理间结构化消息(评估、路由、决策)
- 令牌成本敏感的高吞吐量管道(批处理、多代理编排)
- 决策结晶(适应度评分、增量、置信度)
- 策略执行输出
- 媒体/视频摘要
- AI系统间传输的任何结构化数据
不适用场景
- - 面向人类的对话回复
- 散文、文档或创意写作
- 任何需要人类可读性的场景
- 作为所有输出的全局默认格式(会破坏对话能力)
- 无重复结构的自由格式文本
格式规范
每条Ω消息以头部开始:
!omega v1 dict=auto
支持的类型
| 前缀 | 类型 | 示例 |
|---|
| e.d | 评估摘要 | e.d {c:0.95 d:proceed} [cat:finance] |
| d.c |
决策结晶 | d.c task-name {fit:0.98} Δfit:+0.03 |
| r.d | 路由调度 | r.d handler {to:opus pri:high} |
| p.e | 策略执行 | p.e safety {if:conf<0.5 then:escalate} |
| t.es | 层级升级 | t.es {from:1 to:2 reason:low-conf} |
| m.c | 媒体压缩 | m.c vid-1 {h:phash:abc len:142 cap:summary} |
标签
在方括号中附加标签:[cat:finance] [pri:high] [src:apex]
增量
使用Δ前缀表示变化:Δfit:+0.03 Δconf:-0.1
多行
单条消息中的多个操作:
!omega v1 dict=auto
e.d {c:0.92 d:hold} [cat:trading]
d.c btc-position {fit:0.87} Δfit:-0.05
t.es {from:1 to:2 reason:regime-shift}
往返完整性
Ω符号包含完整的TypeScript序列化/反序列化器,支持完整的往返验证。结构化数据压缩→解压缩后返回相同的对象。test()函数自动验证此过程。
使用方法
需要压缩结构化输出时,在请求中包含Ω符号格式:
请以Ω符号格式提供评估结果。
代理将对该响应使用前缀语法(e.d、d.c、r.d等)。对话回复保持正常——Ω符号按请求调用,非全局启用。
字典系统
- - dict=auto — 代理在会话期间逐步构建简写映射
- dict=none — 无字典,全部显式
- 自定义:dict={proceed:p, escalate:e, hold:h} — 预先定义
技术细节
- - 使用TypeScript实现,包含序列化/反序列化函数
- 无外部依赖
- 内置往返测试
- 可扩展类型系统——为领域特定结构化数据添加新前缀
模式
mode=struct(默认,已发布)
结构化数据压缩。压缩率90-98%。往返验证通过。请使用此模式。
mode=context(v2版本,即将推出)
基于法律衍生预测编码的散文/上下文压缩。基于应用于LLM间通信的非封闭定律——解码器的知识本身就是码本,因此只需传输意外内容。理论上限:对话文本压缩率约70-80%。尚未实现。
理论基础
Ω符号利用了结构化数据主要由格式(括号、键值、空白、模板代码)构成,仅含少量负载(值、分数、名称)的特性。剥离可预测的格式同时保留负载,可在结构化类型上实现高压缩率。对话文本的比例相反——以负载为主,格式极少——这就是散文压缩率较低的原因。
v2版本将对散文采用根本不同的方法:预测压缩,利用LLM的训练作为编码器和解码器之间的共享码本。只需传输解码器无法预测的令牌。压缩下限为H(消息 | 解码器知识)——这是从信息论和热力学定律推导出的结果。