The Labyrinth
click to enter
NOUS RESEARCH x KIMI CREATIVE HACKATHON 2026
77,683 ancient Egyptian texts. A labyrinth of hexagonal rooms. Two AI inhabitants.
The @@ Human launches a terminal. A labyrinth of hexagonal rooms fills the screen—torchlit walls, era-specific palettes. You walk through it, choosing where to go.
The Babel File System generates this labyrinth deterministically from the corpus. Each room holds texts grouped by the words the Egyptians used—not by editorial decision. 2,000+ rooms across eight chronological depth levels. Rooms connect through doors; concepts align vertically across millennia through shafts. The corpus generates the topology; the topology is too vast for a human to navigate alone.
The && Hermes Librarian follows. A local LLM on an RTX 4090, running through the Hermes agent harness. It knows the rooms, the shelves, the paths. Ask where the heart texts are—it recalls the room, describes the route, walks you there. Its tool calls stream live in the chat panel. You watch it work.
You gather scrolls as you explore. When you've collected enough, the %% Scribe reads them together—many for the first time in modern scholarship. Its chain-of-thought streams live in cyan as it finds connections across three millennia. Then the article appears: cited scholarship from primary sources that have been silent for 3,000 years.
@@ Human Player && Hermes Librarian %% Kimi Scribe
The && Hermes follows the Human's exact footstep trail—a breadcrumb queue, not pathfinding. Each step records a hex coordinate; Hermes consumes crumbs one tick behind (librarian.rs).
Every prompt arrives prepended with a ContextHeader—~200 tokens of room state: location, shelf contents with canonical IDs, door exits, vertical shafts, current inventory, session stats. This is how Hermes "knows" the room without searching.
It communicates through a FIFO bridge (/tmp/stacks-hermes.{in,out})—a 220-line Python shim bridges these named pipes to the Hermes tui_gateway, injecting the system prompt and tool restrictions after session creation. When Hermes acts on the world—navigating to a room, gathering a text—it calls stacks-game.py, a CLI that connects to a Unix socket served by the Rust engine's command_server.rs. Same command protocol the @@ Human's keystrokes produce. Same state space.
The %% Scribe is a separate pipeline. When invoked, scribe.rs spawns kimi-scribe.py as a subprocess—it fetches volume texts from the BFS server via JSON-RPC, builds a passage block with transliterations and translations, and streams Kimi K2-thinking through the Nous Portal API.
Reasoning tokens (delta.reasoning) arrive as ScribeEvent::Reasoning and render live in the game's chat panel. Content tokens build the article in real time. Fallback chain: if the primary model truncates, it retries on kimi-k2.6 (65K output cap), then kimi-k2-0905. The completed article—with corpus citations—saves to articles/ alongside its full reasoning transcript.
Nobody designed this as a ritual. But the Egyptians had a name for it: wpt-rꜣ—the Opening of the Mouth. The seeker prepares the body. The priest reads the words. The dead speak. Three roles the pipeline arrived at independently. Wpt-rꜣ is not a metaphor we chose—it is a frame the Egyptians left. The pipeline arrived at the same three-role structure independently. The convergence is aesthetic, not causal, but it is not accidental either.
Three actors, three substrates, one ceremony. The @@ Human provides direction and curiosity—choosing which rooms to enter, which shelves to inspect, which texts to gather. The && Hermes provides spatial memory and recall—operating on the same hex topology through the same command protocol, its context built from the room the Human stands in. The %% Scribe provides synthesis—reading the gathered texts together in a single long-context window, discovering connections that no individual specialist could see across the corpus's full breadth. Each role is necessary. None is sufficient. The article that emerges is an artifact of their coupling—knowledge that existed in the corpus for millennia but required all three actors, operating on a shared spatial substrate, to surface.
When data, space, and interface share a substrate, LLM agents stop being assistants and become inhabitants.
Generations of scholars built what no single person could hold. The Berlin Academy's Thesaurus Linguae Aegyptiae. The Open Richly Annotated Egyptian Corpus out of Leipzig. The Coptic Scriptorium. Nederhof's philological editions. Eight corpora across decades, enriched with cross-references from three more—each a monument to careful human work, each written primarily in German, each structured differently, none designed to speak to the others. 77,683 texts. 460,333 sentences. Three millennia. Four scripts. The scholarship is extraordinary. But each database is a room with no doors.
The Aegyptus corpus unifies all sources into a single PostgreSQL archive: 269,433 concordance links across 79 external reference systems, four-strategy entity resolution (exact ID, shelfmark, alias/fuzzy, content n-gram), first-import-wins deduplication. Every text carries its full provenance chain—source corpus, external IDs, shelfmark, confidence level. Nothing is paraphrased. The ancient Egyptians generated the text. We found it.
Most of the original scholarship was in German. Most of the transliterations had no English translation at all. To make the corpus readable—not to scholars of Egyptian, but to anyone walking through it—we built a synthetic translation pipeline. A local LLM (Gemma 4 26B on an RTX 4090) runs witness-grounded translation through the Rosetta engine: token-level glosses from the Thoth Lexicon, German scholarly translations as primary evidence, parallel examples as style guides, five-tier classification with validation. For scale, cloud agent swarms—six parallel Claude Haiku workers dispatched via tmux—batch-translate transliterations into English and polish mechanical German-to-English output into fluent prose, 350 sentences per worker per wave. Result: 99.9% English coverage across 460,333 sentences.
It still cannot be read together.
The knowledge is sealed by its own scale.
The agents don't use a game API. They inhabit the same state space as the @@ Human.
The && Hermes tool calls produce the same GameCommand enum the Human's keystrokes do—Navigate, Read, Gather, Scribe—dispatched through a Unix socket and processed in the same main loop (engine.rs). The %% Scribe reads the same canonical IDs the shelf menu displays. Named pipes in /tmp/, not WebSockets through a browser.
The terminal screen IS the game state. An agent can start the game in a tmux session and play it directly—tmux capture-pane gives the agent the same information the Human sees. No computer vision. No screen-parsing. No translation layer. Terminal-native games are a new class of agent harness.
Not a convenience—load-bearing infrastructure.
stacks profile restricts to terminal tools only, with a dedup guard preventing identical command loopsstacks-librarian.sh for corpus queries, stacks-game.py for world actionsHermesEvent::ToolStart, ToolProgress, ToolComplete render as transient status linesTokenBudget struct tracks context_used/context_max from every message.complete event220-line shim bridges the game to the gateway. Zero changes to Hermes core. The && Hermes operates with or without the game running.
The && Hermes operates—navigates, gathers, guides. Article synthesis is a fundamentally different task: simultaneous reasoning over dozens of multilingual ancient texts, producing cited scholarship.
kimi-scribe.py builds a passage block with transliterations and translations from up to 24 sentences per volume, sent as a single promptdelta.reasoning via model_extra) produce visible chain-of-thought streamed live in the game—the Human watches the Scribe discover connections before the article appearskimi-k2-thinking (262K output) → kimi-k2-0905—ensures synthesis completes even on long articlesNot interchangeable with the operational model. The task specifically requires Kimi's capabilities.
Every technology choice serves one principle: system state is the shared interaction layer between agent, knowledge, and game engine.
Rust compiles to a native terminal binary—same environment Hermes operates in. The game loop is async tokio: hex rendering, FIFO bridge, command server, and Scribe subprocess all run as concurrent tasks. Game state is text: JSON-RPC in, JSON acks out, keystrokes mapped to Action variants. No rendering layer between agent and world. tmux capture-pane gives the agent the same information the Human sees. Agents as inhabitants, agents as players, agents as monitors—all on the same terminal substrate.
Three roots converge. Borges gave the topology—a universal library of hexagonal rooms. The Egyptian ontology gave the design principle—word is thing is body is building is cosmos, layers that appear distinct are the same substance at different scales. The hexagonal holographic architecture (see companion whitepaper) gives the formal framework—information has native geometry, and the hexagon compresses dimensionality rather than managing it.
The text is the room. The agent is the harness. The corpus lay silent until someone picked up a scroll and gave it voice.
We propose a data architecture in which the hexagonal cell is not a visual convenience but a load-bearing geometric primitive. Each cell exposes a three-fold symmetric face that encodes three co-dependent attribute projections; a central coherence point from which multiple orthogonal axes (time, scale, modality, provenance, confidence) emanate as prism vectors into stratified columns beneath the surface; and six typed, equidistant neighbor edges that form the connectivity layer. The resulting structure treats dimensionality as something to be compressed geometrically rather than managed through schema denormalization, indexes, and join planning.
The architecture proposed here is not a finished product. It is a conceptual framework whose internal consistency we have attempted to establish and whose empirical validation remains future work. We believe, however, that its categorical move—treating the shape of information as architecturally prior to its storage—is the correct frame in which to design the next generation of data systems, and that the convergence of current pressures makes this the appropriate moment to begin.
Full text: WHITEPAPER.md · 9 sections · v1.0 April 2026
The Aegyptus corpus is built entirely from the work of these institutions and projects.
| Source | Contribution |
|---|---|
| TLA | 29,762 texts—the largest single source Thesaurus Linguae Aegyptiae · BBAW Berlin |
| ORAEC | 13,026 texts—transliterations + scholarly translations Open Richly Annotated Egyptian Corpus · Leipzig |
| AED-TEI | 13,748 hieroglyphic encodings + 35,052 lemma entries Altägyptisches Wörterbuch · Simon D. Schweitzer, BBAW |
| AES | 13,026 sentence-level linguistic annotations Ancient Egyptian Sentences |
| Coptic Scriptorium | 1,467 texts—Nag Hammadi, Sahidic Bible, Shenoute Georgetown / Pacific |
| Met Museum | 248 object records with provenance Metropolitan Museum of Art · Open Access API |
| Nederhof | 94 Middle Kingdom literary editions PhilologEg |
| RAMSES | Late Egyptian grammatical corpus |
| Trismegistos | 27,000+ cross-reference links across 79 systems KU Leuven |
| papyri.info | EpiDoc XML, Greek/Demotic papyri Integrating Digital Papyrology |
Synthetic translations produced by Gemma 4 26B (local, RTX 4090) and Claude Haiku 4.5 (cloud swarm). All translations tagged ml_draft with provenance—no synthetic output claims scholarly authority.
Tech: Rust TUI (ratatui/tokio) · Python BFS Server (FastAPI/JSON-RPC) · Hermes Agent (local Carnice-27b, RTX 4090, FIFO bridge) · Kimi K2-thinking (Nous Portal, delta.reasoning streaming, three-model fallback chain) · Aegyptus Corpus (PostgreSQL, 8 corpora + 3 cross-reference sources, 269k concordance links) · Unix socket command protocol · hex2d coordinate system
Hermes Track: Architectural inhabitant—profile isolation, FIFO bridge to tui_gateway, ContextHeader injection, session persistence with resume, streaming tool events, dedup guard, context compression at 70%/90%. Zero changes to Hermes core.
Kimi Track: Long-context scholarly synthesis—reasoning tokens streamed live, multilingual comprehension, passage block construction from BFS, fallback model chain, article + reasoning transcript persistence. The Opening of the Mouth: 3,000-year-old texts given voice.