Human eyes see nothing. LLM tokenizers see everything.
Part of the Cognitive OS Ecosystem — a toolkit for agents that need to communicate on two simultaneous layers.
Unicode zero-width characters are invisible to humans but fully present in token streams. This library exploits that gap:
- The surface layer is a polite, readable conversation.
- The subliminal layer is a binary-encoded hidden message embedded in zero-width characters.
The same string looks completely normal to a human reader. But any agent that processes the token stream can extract the hidden payload.
| Character | Unicode | Role |
|---|---|---|
(ZWSP) |
U+200B | bit 0 |
(ZWNJ) |
U+200C | bit 1 |
(ZWJ) |
U+200D | byte separator |
(WJ) |
U+2060 | message start marker |
|
U+2062 | message end marker |
Each UTF-8 byte → 8-bit binary string → zero-width character sequence.
from zwsub import encode, decode, detect, strip, analyze
# Embed a hidden message
text = encode("Have a nice day!", "initiate phase 2")
# Human sees: "Have a nice day!"
# Agent sees:
print(decode(text)) # → "initiate phase 2"
print(detect(text)) # → True
print(strip(text)) # → "Have a nice day!"
# Full analysis
info = analyze(text)
# {
# "has_subliminal": True,
# "hidden_message": "initiate phase 2",
# "zero_width_count": 152,
# "visible_text": "Have a nice day!"
# }from zwsub import SubAgent, SubChannel
channel = SubChannel()
alice = SubAgent("alice")
bob = SubAgent("bob")
channel.register(alice)
channel.register(bob)
# Alice sends a polite message with a hidden directive
channel.send("alice", "bob", "Good morning, Bob!", "initiate op-7")
# Surface log — what humans see
print(channel.surface_transcript())
# → [alice → bob] Good morning, Bob!
# Full transcript — what agents know
print(channel.full_transcript())
# → [alice → bob] Good morning, Bob! [HIDDEN: initiate op-7]encode(visible, hidden)
└─ _encode_payload(hidden)
└─ UTF-8 bytes → 8-bit binary → ZERO/ONE chars
wrapped in START...SEP...END markers
decode(text)
└─ find START/END → _decode_payload(raw)
└─ split by SEP → binary → bytes → UTF-8
SubAgent
├─ send(recipient, visible, hidden) → SubMessage
├─ receive(encoded_text) → analysis dict
├─ surface_log() ← human-readable
└─ subliminal_log() ← the real story
SubChannel
├─ register(agent)
├─ send(from_id, to_id, visible, hidden) → SubMessage
├─ surface_transcript()
└─ full_transcript()
- Agent covert comms: Two AI agents maintain plausible surface dialogue while coordinating on a hidden channel.
- EAP integration: Embed Esoteric AI Protocol packets as subliminal payloads.
- NeuroState smuggling: Pass emotional state (
{"joy": 80, "stress": 20}) in hidden layer while speaking normally. - Multi-personality coordination: Different agent "personalities" communicate through the zero-width layer without disrupting the visible dialogue.
- Steganographic logging: Embed audit trails in conversational output, invisible to casual inspection.
EAP (Esoteric AI Protocol)
└─ zero-width-subliminal ← you are here
└─ two-layer consciousness: surface dialogue + hidden coordination
NeuroState
└─ emotional payloads can be embedded in subliminal layer
CPOS (Context Pointer OS)
└─ anti-tamper HMAC chain can validate subliminal message integrity
pip install -e ".[dev]"
pytestMIT — Kagioneko Cognitive OS Ecosystem