Skip to main content

GLYPH

Token-efficient serialization for AI agents. 50%+ fewer tokens, streaming validation, human-readable.

Why GLYPH?

JSON wastes tokens on redundant syntax. Every quote, colon, and comma consumes context window. GLYPH eliminates the waste.

⚑

40-60% Token Savings

No quotes, no colons, no commas, abbreviated keys. More context window for your agents.

πŸ”„

Streaming Validation

Detect errors mid-stream, cancel immediately. Save tokens, money, and reduce latency.

πŸ“Š

Auto-Tabular Mode

Homogeneous lists compress to tables automatically. 50-62% fewer tokens that scale linearly.

🌐

JSON Interoperability

Drop-in replacement with bidirectional conversion. One-line change to your code.

Quick comparison

See the difference for yourself

JSON (30 tokens)
GLYPH (16 tokens - 47% reduction)

Get started

1

Install GLYPH

Choose your language and install the package.
pip install glyph-serial
2

Convert JSON to GLYPH

Use the simple conversion API to start saving tokens immediately.
import glyph

data = {"action": "search", "query": "AI agents", "limit": 5}
glyph_str = glyph.json_to_glyph(data)
# Result: {action=search limit=5 query="AI agents"}
3

Parse and use GLYPH

Parse GLYPH text and access values directly.
result = glyph.parse('{name=Alice age=30}')
print(result.get("name").as_str())  # Alice
print(result.get("age").as_int())   # 30

Explore by topic

Quickstart

Get up and running in 5 minutes with working code examples

AI Agent Patterns

Tool calling, state management, and multi-agent coordination

Python SDK

Complete Python API reference with examples

JavaScript SDK

TypeScript-first SDK with full type definitions

Token Savings

Understand how GLYPH reduces token usage by 40-60%

Streaming Validation

Cancel bad requests before generation completes

Language support

GLYPH is available in multiple languages with consistent APIs

Ready to optimize your AI agents?

Start saving tokens, reducing costs, and improving your agent’s performance today.

Get Started β†’

Build docs developers (and LLMs) love