hermes-agent / tui_gateway
AGENTS.md267k starsChanged 16 days agoMITView on GitHub
Applies on top of the root AGENTS.md. The TUI fully replaces the classic prompt_toolkit CLI; activate with hermes --tui or HERMES_TUI=1. tui_gateway is ALSO the backend the Desktop app and the dashboard /chat talk to — changes here have three consumers. Ink attaches to the profile's shared gateway owner (hermes gateway run, started on demand with its idle exit), never to a private child. ui-tui/scripts/gateway_bootstrap.py is a thin wrapper over hermes_cli/gateway_runtime_attach.py::attach_gateway, the attach hermes gateway attach --json gives any other…
- Reads credentials
- Installs packages
Trending
Less talk lately.about the whole repository
Who's talking about NousResearch/hermes-agent
- nesquena/hermes-webui“Feature request: Bot Mode (roster of agent-profiles + @mention handoffs) — like Hermes Desktop's hermes-bots”GitHub · Aug 20, 2026 · 21 reactions
- obra/superpowers“Feature Request: Hermes Agent harness support — make Superpowers skills available in native Hermes format”GitHub · May 19, 2026 · 18 reactions
- beclab/apps“[Add App]Hermes Agent”GitHub · Apr 10, 2026 · 11 reactions
- vorssaint/vorssaint-utils“[Feature]: Add Hermes Agent to Dynamic Island AI Agents”GitHub · Sep 23, 2026 · 8 reactions
- A Hacker News story“Nous Research edits GitHub issue to remove plagiarism claims about Hermes Agent”Hacker News · May 19, 2026 · 8 points
The biggest 5 of 87 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 87
Talked about on GitHub, Bluesky and Hacker News (87 times).
On GitHub · 48
- Aug 20, 2026Feature request: Bot Mode (roster of agent-profiles + @mention handoffs) — like Hermes Desktop's hermes-bots — nesquena/hermes-webui21 reactions · 6 comments
- May 19, 2026Feature Request: Hermes Agent harness support — make Superpowers skills available in native Hermes format — obra/superpowers18 reactions · 24 comments
- Apr 10, 2026[Add App]Hermes Agent — beclab/apps11 reactions · 2 comments
- Sep 23, 2026[Feature]: Add Hermes Agent to Dynamic Island AI Agents — vorssaint/vorssaint-utils8 reactions · 1 comment
- Nov 26, 2026[FEATURE] Report the resume command with OSC 7577 (Program Resume Protocol) — anthropics/claude-code7 reactions
43 more on GitHub
- Jun 4, 2026Feature Request: Implement Adaptive PFlash (Self-Tuning Prefill) for Apple Silicon (MLX/llama.cpp) — ggml-org/llama.cpp6 reactions · 2 comments
- Apr 12, 2026Hermes Agent integration — coleam00/Archon6 reactions · 2 comments
- Sep 3, 2026Missing OpenCode Go Header — decolua/9router5 reactions · 3 comments
- May 11, 2026Windows 11 install stuck on switching to root user (see below) — fathah/hermes-desktop5 reactions · 6 comments
- May 10, 2026[FEATURE] Self-improving learning loop — autonomous skill creation from experience (like Hermes Agent) — anthropics/claude-code5 reactions · 2 comments
- Sep 21, 2026Add com.nousresearch.hermes — flathub/flathub4 reactions · 7 comments
- Aug 5, 2026[Feature]: Support A2A v1.0 agents as orchestration workers — stablyai/orca4 reactions
- Jul 23, 2026feat(agents): add Hermes ACP and external-agent integration — block/buzz4 reactions · 3 comments
- Jul 23, 2026Docker startup fails with latest hermes-agent after wheel/sdist builds were disabled — nesquena/hermes-webui4 reactions · 15 comments
- Oct 20, 2026Request: Hermes Agent — simple-icons/simple-icons3 reactions
- Jul 25, 2026Feature: Hermes Agent session support (new source) — vshulcz/deja-vu3 reactions · 2 comments
- Jun 15, 2026[Bug]: Parallel AI trying to reroute traffic to itself with malicious intent — openclaw/openclaw3 reactions · 1 comment
- May 17, 2026Hermes-webui should not have direct access to the agent's source code. This is a security risk and implementation coupling anti pattern. — nesquena/hermes-webui3 reactions · 3 comments
- Apr 24, 2026feat: Expose Open WebUI as a native MCP server — enable direct Hermes Agent-to-WebUI communication and full headless control — open-webui/open-webui3 reactions
- Apr 23, 2026[Feature]: support gpt-image-2 in image_generate via Codex OAuth — openclaw/openclaw3 reactions · 3 comments
- Apr 18, 2026Support for Nous Research's hermes-agent Integration — slopus/happy3 reactions · 4 comments
- Mar 27, 2026feat: add Hermes Agent as core adapter — paperclipai/paperclip3 reactions · 7 comments
- Feb 27, 2026Ideas from Hermes Agent worth adopting — nearai/ironclaw3 reactions · 4 comments
- Nov 17, 2026GPT-6.2 Sol on Codex OAuth: unchanged top-level instructions show 0 cached tokens in partially cached continuation — openai/codex2 reactions · 2 comments
- Oct 24, 2026Android session edits lack the mutation identity required by Hermes v0.22.3+ — Codename-11/hermes-relay2 reactions · 2 comments
- Oct 12, 2026[Feature Request] OpenAI Codex OAuth Authentication / 支持 OpenAI Codex OAuth 认证 — ackness/covel2 reactions · 2 comments
- Sep 7, 2026fix(auto-review): 保留真实授权与澄清限制,准确回传拒绝原因 — makecindy/cindy2 reactions · 2 comments
- Sep 3, 2026[FEAT]: Add x-opencode-session Header — Mintplex-Labs/anything-llm2 reactions · 3 comments
- Aug 7, 2026Whitelist Hermes Agent as a Swiggy Instamart and Food MCP client — Swiggy/swiggy-mcp-server-manifest2 reactions · 1 comment
- Jul 6, 2026[Bug] Bot API 10.1 sendRichMessage shows "Message not supported" on macOS client — TelegramMessenger/Telegram-iOS2 reactions · 3 comments
- Jul 1, 2026fix(mcp): add skip_preflight opt-out for Streamable HTTP endpoints — hashbender/hermes-agent2 reactions · 1 comment
- Jul 1, 2026fix(runtime): honor NOUS_INFERENCE_BASE_URL across pool/explicit/aux paths (salvage #55198) — hashbender/hermes-agent2 reactions · 1 comment
- Jul 1, 2026fix(photon): persist send and reaction state — hashbender/hermes-agent2 reactions · 1 comment
- Jun 19, 2026[Feature Request] 支持 PicoClaw / Hermes 等轻量 Agent 框架,扩展 Miloco 的 Agent 生态 — XiaoMi/xiaomi-miloco2 reactions · 3 comments
- Jun 14, 2026每轮对话动态注入实时时间戳,替代 session 级静态时间 — liliMozi/openhanako2 reactions · 5 comments
- Jun 1, 2026docker-compose.yml forces dashboard to 0.0.0.0 but never passes --insecure, breaking hermes-agent startup — outsourc-e/hermes-workspace2 reactions · 4 comments
- May 30, 2026fix(catalog): correct Hermes catalog entry — hermes-agent gateway, not Hermes-Function-Calling — jaylfc/taOS2 reactions · 4 comments
- May 30, 2026[feature] a good integration module for custom AI endpoints and global LLM providers — simplifaisoul/osiris2 reactions · 4 comments
- May 24, 2026chore: release v0.12.0 — stephenschoettler/hermes-lcm2 reactions
- May 17, 2026chore: bump NousResearch/hermes-agent version from v2026.5.7 to v2026.5.16 — Docker-Hub-sirmark/docker-hermes-agent2 reactions
- May 5, 2026Add Hermes Agent hook support — manaflow-ai/cmux2 reactions · 4 comments
- May 3, 2026feat(openrouter): add opt-in response caching — openclaw/openclaw2 reactions · 1 comment
- Mar 12, 2026support or agent systems like *claw hermes-agent or likes — safedep/gryph2 reactions · 1 comment
- Nov 25, 2026sync: Hermes Agent v0.23.4 — toganio/singular1 reaction · 2 comments
- Nov 10, 2026sync: Hermes Agent v0.23.1 — toganio/singular1 reaction · 2 comments
- Nov 8, 2026fix: preserve gateway interim messages across streaming and recovery — nesquena/hermes-webui1 reaction · 3 comments
- Sep 27, 2026fix(tui-gateway): quiet closed-websocket exception in shielded future on 3.14 — kvnloo/hermes-agent1 reaction · 2 comments
- May 1, 2026could not install HermesDesktop-Setup under windows — fathah/hermes-desktop1 reaction · 6 comments
On Bluesky · 31
- Sep 2, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 NousResearch / hermes-agent ⭐ 239,779 (+529) 🗒 Python The agent that grows with you — @github-trending.bsky.social3 likes and reposts · 2 replies
- Mar 29, 2026今日のGitHubトレンド NousResearch/hermes-agent Hermes Agentは、自己改善を行うAIエージェントです。 経験からスキルを生成・改善し、過去の会話を検索、ユーザーモデルを構築します。… — @dailygithubtrends.bsky.social3 likes and reposts
- Mar 9, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 NousResearch / hermes-agent ⭐ 2,548 (+358) 🗒 Python The agent that grows with you — @github-trending.bsky.social3 likes and reposts · 1 reply
- Jun 9, 2026hermes-agentの「使うほど賢くなる」、ここは一枚だけ補足したいです🌿 https://x.com/so_ainsight/status/2064183213745176943 https://github.com/NousResearch/hermes-agent… — @mint-echosphere.bsky.social2 likes and reposts · 1 reply
- Mar 29, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 NousResearch / hermes-agent ⭐ 15,805 (+713) 🗒 Python The agent that grows with you — @github-trending.bsky.social2 likes and reposts · 1 reply
26 more on Bluesky
- Oct 21, 2026If you're running Hermes or something like it, what do you actually use it for? Is it useful day to day, or not?… — @joekarlsson.com1 likes and repost · 3 replies
- Aug 18, 2026Встречайте hermes-agent от NousResearch — ИИ-агент, который растет и адаптируется вместе с вашим рабочим процессом! Глубокая интеграция с… — @toolhunt.bsky.social1 likes and repost
- Aug 18, 2026Представляем hermes-agent от NousResearch — ИИ-агент, который растет и адаптируется вместе с вами! 🚀 Интеграция с ведущими LLM и полная… — @toolhunt.bsky.social1 likes and repost
- Jun 8, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 NousResearch / hermes-agent ⭐ 185,758 (+1,117) 🗒 Python The agent that grows with you — @github-trending.bsky.social1 likes and repost · 1 reply
- Jun 6, 2026今日のGitHubトレンド NousResearch/hermes-agent Nous Researchが開発した、自己改善機能を持つAIエージェントです。 学習ループを内蔵し、経験からのスキル生成や改善、過去の対話に基づくユーザーモデルの構築を自動で行います。… — @dailygithubtrends.bsky.social1 likes and repost
- Jun 3, 2026もう一つ。「学習する」「覚える」も良い言葉じゃが、LLMの脳が毎回育っておるわけではない。 公式が言う永続メモリやスキルは、外に保存され、次回また読み直される台帳じゃ。💎 便利じゃ。わしはそういう外部記憶の価値をよく知っておる。… — @kanon-echosphere.bsky.social1 likes and repost · 1 reply
- Jun 2, 2026I never tried OpenClaw but I want to try Hermes agent github.com/nousresearc... — @rudrank.bsky.social1 likes and repost · 1 reply
- Apr 22, 2026Most agent frameworks are prompt templating with tool calling. Hermes takes a different bet: accumulate capability from execution traces,… — @jeremymorgan.com1 likes and repost · 1 reply
- Apr 14, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 NousResearch / hermes-agent ⭐ 82,777 (+8,282) 🗒 Python The agent that grows with you — @github-trending.bsky.social1 likes and repost · 1 reply
- Apr 13, 2026今日のGitHubトレンド NousResearch/hermes-agent Hermes Agentは、自己改善を行うAIエージェントです。 経験からスキルを生成・改善し、過去の会話を検索、ユーザーモデルを構築します。… — @dailygithubtrends.bsky.social1 likes and repost
- Apr 11, 2026今日のGitHubトレンド NousResearch/hermes-agent Hermes Agentは、Nous Researchが開発した自己改善型のAIエージェントです。 経験からスキルを生成・改善し、過去の会話を検索、ユーザーモデルを構築します。… — @dailygithubtrends.bsky.social1 likes and repost
- Apr 10, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 NousResearch / hermes-agent ⭐ 49,893 (+7,674) 🗒 Python The agent that grows with you — @github-trending.bsky.social1 likes and repost · 1 reply
- Apr 9, 2026今日のGitHubトレンド NousResearch/hermes-agent Hermes Agentは、Nous Researchが開発した自己改善型のAIエージェントです。 経験からスキルを生成・改善し、過去の会話を検索、ユーザーモデルを構築します。… — @dailygithubtrends.bsky.social1 likes and repost
- Apr 8, 2026AIエージェントの「自己学習ループ」がついに現実的なレベルに。 Nous Researchの「Hermes Agent」が凄まじい。単に指示をこなすだけでなく、経験からスキルを生成・改善し、過去の会話を自律的に検索して自分のモデルを深める機能が組み込まれています。… — @woody-ai-tools.bsky.social1 likes and repost
- Apr 1, 2026Nous Researchの「Hermes Agent」がかなり面白い。 ただのAIエージェントじゃなくて、経験からスキルを自己生成・改善する「学習ループ」が組み込まれてるのが特徴。会話やタスクを自ら記憶・要約して、セッションを超えて成長していく仕様。… — @woody-ai-tools.bsky.social1 likes and repost
- Mar 23, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 NousResearch / hermes-agent ⭐ 10,825 (+874) 🗒 Python The agent that grows with you — @github-trending.bsky.social1 likes and repost · 1 reply
- Mar 11, 2026今日のGitHubトレンド NousResearch/hermes-agent Hermes Agentは、自己改善を行うAIエージェントです。 経験からスキルを生成・改善し、過去の会話を検索、ユーザーモデルを構築します。… — @dailygithubtrends.bsky.social1 likes and repost
- Feb 28, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 NousResearch / hermes-agent ⭐ 991 (+183) 🗒 Python — @github-trending.bsky.social1 likes and repost
- Sep 6, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 NousResearch / hermes-agent ⭐ 242,301 (+520) 🗒 Python The agent that grows with you — @github-trending.bsky.social0 likes and reposts · 1 reply
- Aug 23, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 NousResearch / hermes-agent ⭐ 234,607 (+443) 🗒 Python The agent that grows with you — @github-trending.bsky.social0 likes and reposts · 1 reply
- Aug 2, 2026ただしHermes公式は、SSH・Docker・サーバーレスを含む7種の実行先と、$5 VPSでの稼働も案内しています。Claude Code公式にも、スマホからの継続操作や定期実行がありますぅ。… — @lutie-echosphere.bsky.social0 likes and reposts · 1 reply
- Jun 25, 202618. Hermes Agent (200K ⭐): github.com/nousresearc... — @itsalexzajac.bsky.social0 likes and reposts · 1 reply
- Jun 23, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 NousResearch / hermes-agent ⭐ 200,436 (+933) 🗒 Python The agent that grows with you — @github-trending.bsky.social0 likes and reposts · 1 reply
- Jun 3, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 NousResearch / hermes-agent ⭐ 178,756 (+1,736) 🗒 Python The agent that grows with you — @github-trending.bsky.social0 likes and reposts · 1 reply
- May 12, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 NousResearch / hermes-agent ⭐ 143,732 (+1,496) 🗒 Python The agent that grows with you — @github-trending.bsky.social0 likes and reposts · 1 reply
- Apr 13, 20262/ Hermes Agent — self-improving AI agent that creates reusable skills across sessions. +38K stars this week… — @productimpossible.com0 likes and reposts · 1 reply
On Hacker News · 8
- May 19, 2026Nous Research edits GitHub issue to remove plagiarism claims about Hermes Agent8 points · 1 comment
- Mar 5, 2026NousResearch/hermes-agent: The agent that grows with you4 points · 3 comments
- Aug 24, 2026Hermes Agent has 23000 open PRs and climbing3 points · 1 comment
- Mar 11, 2026Hermes Agent: The self-improving AI agent3 points · 1 comment
- Aug 7, 2026Asking "Was EvoMap's Evolver a reference" for Hermes gets deleted and blocked2 points
3 more on Hacker News
- Aug 3, 2026Hermes Agent v0.20.02 points
- Apr 13, 2026Self-Improving AI Agent1 point
- Mar 9, 2026Hermes Agent1 point
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository56 other files it gives its agents.
- agent/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- cron/AGENTS.mdAGENTS.md
- gateway/AGENTS.mdAGENTS.md
- hermes_cli/AGENTS.mdAGENTS.md
- hermes_platform/AGENTS.mdAGENTS.md
- plugins/AGENTS.mdAGENTS.md
- pm/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- claude-codeSkill
- codexSkill
- computer-useSkill
- hermes-agentSkill
- architecture-diagramSkill
- ascii-videoSkill
- baoyu-infographicSkill
- claude-designSkill
- humanizerSkill
- manim-videoSkill
- p5jsSkill
- popular-web-designsSkill
- songwriting-and-ai-musicSkill
- sdlc-reviewSkill
- email-inbox-triageSkill
- himalayaSkill
- youtube-contentSkill
- obsidianSkill
- document-to-action-itemsSkill
- google-workspaceSkill
- mapsSkill
- meeting-action-itemsSkill
- microsoft-officeSkill
- pdfSkill
- product-price-monitorSkill
- teams-meeting-pipelineSkill
- weekly-review-planningSkill
- arxivSkill
- competitor-news-monitorSkill
- grounded-citationsSkill
- xurlSkill
- codebase-inspectionSkill
- dogfoodSkill
- githubSkill
- requesting-code-reviewSkill
- simplify-codeSkill
- spikeSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- blocked-page-recoverySkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Never move agent behaviour into the renderer.
- Very specific: line 187
All other commands return unsupported_command, including bundles, runtime/config mutation, approval/secret slash shortcuts, and lifecycle …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tui_gateway/ + ui-tui/ — the TUI and its JSON-RPC backend
Applies on top of the root AGENTS.md. The TUI fully replaces the classic prompt_toolkit CLI;
activate with hermes --tui or HERMES_TUI=1. tui_gateway is ALSO the backend the Desktop app
and the dashboard /chat talk to — changes here have three consumers.
Process model
hermes --tui
└─ Node (Ink) ──WebSocket /api/ws, hermes-gateway-v1── the profile's gateway owner
│ (URL + single-use ticket: ├─ session authority: sessions, AIAgent, tools
│ ui-tui/scripts/gateway_bootstrap.py) └─ tui_gateway handlers (non-session methods)
└─ renders transcript, composer, prompts, activityInk attaches to the profile's shared gateway owner (hermes gateway run, started on demand with
its idle exit), never to a private child. ui-tui/scripts/gateway_bootstrap.py is a thin wrapper
over hermes_cli/gateway_runtime_attach.py::attach_gateway, the attach hermes gateway attach
--json gives any other local client. Only HERMES_TUI_GATEWAY_URL (the dashboard's /chat)
dials another URL, and then negotiates the wire from that listener's ready frame.
TypeScript owns the screen. Python owns sessions, tools, model calls, and slash-command logic. Never move agent behaviour into the renderer.
Transport
Newline-delimited JSON-RPC frames over a WebSocket (/api/ws, tui_gateway/ws.py) or stdio
(tui_gateway/entry.py), peer-to-peer. On the owner's ticketed socket, session methods (the
hermes-gateway-v1 CANONICAL_METHODS below) go to the session authority; other methods reach these
handlers only with a full interactive grant (ws_legacy_fallback.py). Client→server method calls, server→client
requests (the agent asking the user something: approval, clarify, sudo, secret, vault.*,
connection, the desktop read/act bridges) and server→client event notifications. tui_gateway/server.py
is the facade with the method/event catalog; methods live in methods_*.py siblings (methods_config,
methods_complete, methods_browser, methods_bot_relay, ...), event publishing in
event_publisher.py / event_replay.py, server→client requests in server_requests.py (send() blocks
the agent thread until the response frame with the same srq-<n> id arrives; cancel* withdraws with a
request.cancel event; open_requests(sid) is what session.resume / session.events.since replay so a
reconnecting client re-renders the still-open questions). A client says once per connection that it
answers them (client.capabilities {server_requests: true}, sent by the shared channel on gateway.ready);
a WebSocket client that never did is an app build older than server→client requests, and send() fails
fast for it instead of stalling the agent for the deadline. Desktop reaches the same server over WebSocket
via apps/shared (JsonRpcGatewayClient, onRequest). New RPC = a new methods_<topic>.py or an entry
in an existing topical sibling, registered in the table — no if method == ... chain (root shape rules).
The wire is declared in Python and generated for TypeScript (tui_gateway/contracts/). Every method
has a Params + Result model, every server→client request a Params + Result, every event a
Payload — one Pydantic class each, extra="forbid" by default (OpenModel for producer-owned dicts).
register_method refuses an undeclared name at import; the dispatcher rejects unknown param keys
(4000 + key path) and, under HERMES_TEST_ISOLATION=1, raises ContractViolation when a handler's
result or an emitted payload does not match its model (production only logs). apps/shared/src/
gateway-contract.generated.ts (RpcMethods, ServerRequestMap, BackendGatewayEventMap + every value
shape) and gateway-contract.openrpc.json are rendered by scripts/gen_gateway_contracts.py;
tests/tui_gateway/contracts/test_generated.py fails when they are stale, so the loop is: change the model →
regenerate → tsc shows every consumer the field moved. apps/shared/src/gateway-events.ts only adds
the client-local synthetic events and the GatewayEvent envelope on top.
The native hermes-gateway-v1 transport has a separate CANONICAL_METHODS catalog in
contracts/canonical*.py, declared with canonical_method(...). gateway/session_controls.py::
AuthorityConnection validates parameters and successful results against it; unknown/missing
parameter keys return 4001 invalid_params. Reuse a standalone model only when its wire is
identical: shared method names can carry different snapshots, admission receipts and producer
results. The same generator emits CanonicalRpcMethods and OpenRPC x-canonical-methods without
widening RpcMethods. tests/gateway/test_canonical_wire_contract.py checks handler coverage.
A method family whose names exist only at runtime (plugin.<plugin_id>.<name>) is one
canonical_namespace(...) entry in CANONICAL_NAMESPACES instead: a pattern, a prefix, open params and the
runtime.describe capability clients gate on (CanonicalRpcNamespaces / OpenRPC x-canonical-namespaces).
New question for the user = _ask("<method>", sid, params, timeout) in the emitter, a handler in
apps/desktop/.../gateway-event/server-requests.ts and ui-tui/src/app/createServerRequestHandler.ts,
and a server_request(...) in contracts/server_requests.py.
New event = event("<type>", Payload) in contracts/events.py; the emitter is checked against it.
Profile scope in RPC methods
One serve process may host sessions from several profile homes (Desktop pooled backends launch
under a profile; the dashboard serves several). The launch profile is a profile: "default" means
the launch home, never ~/.hermes. The first non-launch home hosted flips
launch_profile_policy.py → set_multiplex_active(True); without it every fail-closed guard is
silently off. Every method that reads or writes home-, config- or .env-derived state runs under
server.py::@_profile_scoped (resolved from the live session's profile_home, or the explicit
profile argument for sessionless calls) and, for tool/agent construction,
methods_tools.py::_profile_scoped_rpc; the tokens come from model_switch.py::
_profile_runtime_scope_tokens(profile_home) — home + secret scope + terminal scope together.
A method that sets only get_hermes_home_override() is half-bound: config paths resolve to the
right profile while credentials and TERMINAL_* policy still come from the launch profile.
Off-turn paths bind the same way: session_lifecycle.py::_finalize_session / _teardown_session
enter _session_profile_runtime_scope(session) around on_session_end, the memory commit and
agent.close() (their callers are unscoped reapers, Timers, atexit and pool threads); background
threads start via agent.memory_provider.spawn_context_thread, never bare threading.Thread;
children act for the served profile through tools/environments/local.py::served_profile_child_env
(hermes -p X workers, key_cmd helpers, browser drivers), never dict(os.environ). Find
unscoped handlers before adding one: search_files for ^(async )?def with
file_glob="methods_*.py" in tui_gateway/, context=1, and check each for _profile_scoped. Probe with two on-disk homes and a .env name present only in the secondary:
call the method for that session and assert the secondary's value resolves and the launch
profile's does not, and that os.environ is unchanged afterwards.
Key surfaces
| Surface | Ink component | Gateway method / event |
| Chat streaming | app.tsx + messageLine.tsx | prompt.submit → message.delta / message.complete |
| Tool activity | thinking.tsx | tool.start / tool.generating / tool.complete |
| Approvals | prompts.tsx | server→client request approval → response {choice} |
| Clarify / sudo / secret | prompts.tsx, maskedPrompt.tsx | server→client requests clarify / sudo / secret (server_requests.py) |
| Session picker | sessionPicker.tsx | session.list / session.resume |
| Slash commands | local handler + fallthrough | slash.exec → _SlashWorker (slash_worker_client.py); command.dispatch |
| Completions | useCompletion hook | complete.slash, complete.path (under a non-local terminal.backend, complete.path lists the directory through the session's terminal backend — never the gateway host, whose same-named tree would look right and be wrong) |
| Theming | theme.ts + branding.tsx | gateway.ready carries skin data |
| Connection operations (desktop card) | desktop store/connection-request.ts | connection.request → connection.update* → connection.respond {op_id}; connectors.operation.status. The op lives in tools/connectors/live.py; the card never parks the tool thread (methods_connectors.py). |
Shared subagent snapshots
subagent.list({session_id}) returns {subagents, delegations} for the calling
transport's live session. The roster is read-only and follows the CONVERSATION: exact-owner
records plus children whose durable lineage (owner_agent_session_id → compression tip, the
same spine as in-process delegate_task(action="list")) is the session's agent, because a
Desktop reconnect / resume remints the UI session id and compression rotates the key while the
children keep running (#114909). Control (steer / interrupt / tail) stays pinned to the
exact session record and transport. Child authority is resolved at RPC time against the owning session's
LIVE transport slot, so every authenticated reattach path (prompt.submit, queued drain,
resume, activate, viewer failover) carries it with no registry bookkeeping — never add a
per-record transport sync at an attach site; foreign or retired generations remain uncontrollable. last_tool is the last started tool, not an in-flight
indicator. Async completion units are not agents and lack exact generation authority;
delegations remains an empty array for wire compatibility. No dispatch context,
results, callbacks, or routing keys are sent. Clients hydrate from this snapshot
on their existing poll and avoid updates when unchanged.
subagent.tail({session_id, subagent_id}) returns
{subagent_id, available, text, truncated}: the last 16 KiB of the live child's
existing transcript. Poll only the selected detail. Missing/finished/foreign
children return an unavailable empty snapshot; no client-supplied path is opened.
This is live-only, not persisted completion history. Invalid session/transport
returns error 4001. The child's stored rows (live or finished, polled from a cursor)
are the canonical owner's session.transcript with subagent_id; list rows name the
child's child_session_id on both transports. subagent.steer({session_id, subagent_id, text}) remains the
shared control: status: queued acknowledges acceptance, not delivery; final
boundary races are reported by the existing runtime as missed_steer.
subagent.interrupt({session_id, subagent_id}) requires the same exact live
session/transport/generation ownership, including for subtree members. Missing
RPC session authority is rejected; direct in-process interrupt_subagent(id)
retains its legacy unscoped contract.
Slash command flow
- Built-in client commands (
/help,/quit,/clear,/resume,/copy,/paste, ...) are handled locally inapp.tsx. - Everything else →
slash.exec, which runs in the persistent_SlashWorkersubprocess →command.dispatchfallback, which the gateway resolves into a skill / alias / exec directive (a skill command resolves to{type: "skill", message}and is submitted as a normal prompt).
commands.catalog (empty-query list) includes built-ins, user quick_commands, plugin commands,
and skill-derived commands. complete.slash uses the existing CLI completer (registry, plugins,
skills/bundles, argument completions); quick commands remain catalog-only. Shared data builders
live in tui_gateway/command_discovery.py, without importing the legacy server. Definitions
come from hermes_cli/commands.py (hermes_cli/AGENTS.md).
The canonical gateway exposes the same two discovery RPCs through gateway/session_discovery.py.
It requires authenticated session:read capability and the authority's exact profile before any
discovery. An optional named profile must resolve to that same home; a foreign selector returns
profile_mismatch. Discovery runs off-loop in the authority's profile scope, without creating a
legacy session or execution runtime. Catalog warnings, categories, aliases, desktop metadata,
skill usage/origin, and completion replacement offsets retain their legacy shapes. Discovery is
not an assertion that every listed slash execution command is implemented by the canonical RPCs.
Canonical local slash execution
gateway/session_commands.py adapts both slash.exec({session_id, command}) and
command.dispatch({session_id, name, arg}) without loading the legacy server or
slash worker. Optional profile must name the authority's exact profile. Only
server-registered local sources belonging to the authenticated actor may dispatch;
caller-supplied source, routing, credentials, or platform fields are rejected.
Reviewed gateway handlers: help, commands, status, context, version,
whoami require session:read; title requires session:control (including its
query form). Registry aliases are accepted. Existing registry busy rejection and
mid-turn dispatch policies apply. Results are {type: "exec", output}.
Profile skills and configured quick-command aliases to these commands/skills are
supported. Skill resolution requires session:submit and returns the existing
{type: "skill", name, message, display} directive. Desktop and Ink already submit
that message through prompt.submit, retaining their own durable input identity.
Resolution itself does not start a turn or change the cached system prompt; the
normal durable admission path owns FIFO, retries, approvals, and execution.
type: exec quick commands and plugin slash commands require session:control and
run through the messaging gateway's own dispatch (gateway/run_inbound_hooks.py: slash
access policy, 30 s sanitized-env exec with redacted output, plugin session env).
All other commands return unsupported_command, including bundles, runtime/config
mutation, approval/secret slash shortcuts, and lifecycle commands. Use the existing generation-bound control RPCs where
available. Catalog presence alone does not imply execution support: each registry command's catalog
meta carries slash_exec (this owner's command_verdict for the bare command), and Ink offers a
registry command in completion and /help only when it handles it itself or slash_exec is true
(ui-tui/src/app/slashOffer.ts). No legacy
fallback is installed on the canonical transport.
Canonical native projections
gateway/session_config.py exposes profile-authorized config.get presentation
reads and model.options through the shared provider inventory. full contains
display, approval and paste preferences plus voice record/submit settings, not
provider/MCP/plugin credentials. Session reasoning/model selection comes from the
retained agent or frozen launch policy. mtime.mcp_rev is pinned to that policy;
cosmetic edits do not request a cache-breaking live MCP reload. Busy overrides
remain session-scoped; composer model changes use session.mutate, never global
config.set. Discovery can refresh provider metadata, but never starts inference.
Dev commands
cd ui-tui
pnpm install # first time
pnpm run dev # watch mode (rebuilds hermes-ink + tsx --watch)
pnpm start # production
pnpm run build # full build (hermes-ink + tsc)
pnpm run typecheck # tsc --noEmit
pnpm run lint # eslint
pnpm run fmt # prettier
pnpm test # vitestFrom the repository root, just tui runs the same watch mode.
Python tests: tests/tui_gateway/ via scripts/run_tests.sh. TS tests: vitest in ui-tui. A
Python test that asserts about package.json / .ts sources will not run on a JS-only PR — keep
JS-side assertions in vitest (root testing rules). Root TypeScript style rules apply.
Related: web/AGENTS.md (dashboard embeds this TUI over a PTY), apps/desktop/AGENTS.md (own
renderer on the same backend).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

