CLI / TUI / Web
Responsibility
The interface layer is the other group of entry points (besides the gateway's messaging platforms) through which users reach the agent: CLI (hermes_cli/, a command-line subcommand system), TUI (ui-tui/, a TypeScript terminal UI + the tui_gateway/ Python bridge), Web (web/, a browser interface). All three ultimately feed user input into the agent's run_conversation and render the output back. They sit alongside the gateway layer — the gateway connects to external platforms; the interface layer connects to local users.
Key Files
CLI
hermes_cli/__init__.py— package entry_parser.py— command-line argument parsingauth.py/auth_commands.py— authentication (Nous Portal, etc.)active_sessions.py— active-session managementbackup.py/checkpoints.py— backups and checkpointsblueprint_cmd.py— blueprint commandbrowser_connect.py/bundles.py/callbacks.pybanner.py/build_info.py— banner and build info
TUI
ui-tui/README— terminal UI (TypeScript, includes packages/src)ui-tui/package.json— dependencies and scriptstui_gateway/entry.py— TUI gateway entryserver.py— TUI servertransport.py/ws.py— transport and WebSocketevent_publisher.py— event publishinghost_supervisor.py/compute_host.py— host supervisionslash_worker.py/synthetic_turn.py/render.py/project_tree.py_stdin_recovery.py— stdin recovery
Web
web/README— browser interfaceweb/index.html/vite.config.ts— Vite entryweb/src/— frontend source
Data Flow
- CLI:
hermes <subcommand>→ parsed byhermes_cli/_parser.py→ executed by the subcommand module (auth/backup/blueprint/...); conversation-type commands ultimately callAIAgent.run_conversation:6350. - TUI:
ui-tui/(TS frontend) connects totui_gateway/ws.pyvia WebSocket;tui_gatewaybridges terminal events to the agent (tui_gateway/server.pyholds the agent); output is pushed back to the frontend viatui_gateway/event_publisher.py. - Web:
web/(Vite frontend) similarly connects to the agent through a backend, rendering the conversation and tool results. - All three assemble their agent instance via
init_agent:276and share the same capability layer.
Summary
The interface layer = three shells (CLI/TUI/Web) + one tui_gateway bridge. They hold no business logic, only the input/output form. They sit alongside the gateway layer: the gateway connects to external messaging platforms; the interface layer connects to local terminals/browsers. ACP (see here) connects to the IDE, completing the full "reach surface".