Token efficient IDs for AI agents
Where UUIDs cost ~23 tokens and get hallucinated by LLMs, id-agent produces memorable word-based IDs at ~14 tokens with equivalent collision resistance. The first ID library built for the context window, not the database.
Human-readable -- word-based IDs that humans and LLMs can actually remember
-- word-based IDs that humans and LLMs can actually remember Token-efficient -- every word in the wordlist is exactly 1 BPE token on o200k_base
-- every word in the wordlist is exactly 1 BPE token on o200k_base Collision-safe -- configurable entropy from ~12 to ~192 bits
-- configurable entropy from ~12 to ~192 bits Validated inputs -- zod-powered schema validation on all public APIs
Token Cost Comparison
Format Example Tokens (o200k_base) Collision Resistance UUID v4 89b842d9-6df9-4cf4-8db0-9dc3aed3cfd7 ~23 122 bits id-agent (default, 8 words) urd-antes-sorry-pac-dire-total-expire-going ~14 ~96 bits id-agent (5 words) frame-beer-bell-tog-hoot ~8 ~60 bits
id-agent — 8 words, 43 chars, 12 tokens
... continue reading