ab nuovo / system anatomy

Nowbot, opened up.

A field map of the chat surface, its Telegram companion, and the hot paths where time accumulates. The credentials stay behind the boundary; this page describes the machinery around them.

← Return to the chamber
01 / surfaceBrowser or TelegramMessage enters as a bounded turn.
→
02 / sessionSessionStoreLoads context, mode, and history.
→
03 / voicesOrchestratorCartographer · Builder · Critic.
→
04 / handoffHermes oneshotProvider/model inference and tools.

One turn, anatomized

Web path

POST /api/chat enters FastAPI, validates the bounded request, hashes the session ID, loads JSON-backed history, then invokes the polyphonic orchestrator.

Telegram path

Long polling receives a message, maps it to the same session/orchestration layer, then sends the synthesized answer back through the Telegram adapter.

Handoff boundary

Hermes runs as a subprocess in /srv/nowbot. Provider credentials and model selection remain server-side; browser errors are sanitized.

Hot code paths

Session load/save
JSON persistence is simple and inspectable, but serializes every turn and can become a contention point.
Polyphonic fan-out
Three voice prompts run concurrently; total time is governed by the slowest voice plus orchestration overhead.
Hermes subprocess
Process startup, provider resolution, tool setup, remote queueing, and model generation all sit inside one bounded handoff.
Response unfold
The browser now records wall time, shows the real wait, sanitizes non-JSON failures, and unfolds voices before synthesis.

Delay ledger

Known

  • Browser request wall time
  • 210-second client ceiling
  • Server-side Hermes timeout setting
  • Provider/model queue behavior

Worth instrumenting next

  • Session load/save milliseconds
  • Per-voice start/end timestamps
  • Hermes process startup
  • Provider response and token counts

Optimization levers

  • Persistent Hermes worker
  • Compact context windows
  • Model fallback on timeout
  • Streaming partial voice output
Reading the page: the dodecahedron is the visual state machine. It unsettles when a turn begins, the sigils trace while the internal voices work, and it settles when synthesis arrives—or remains visibly waiting when the upstream provider is slow.