<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tools on Jamie&#39;s Blog</title>
    <link>http://akjamie.github.io/tags/tools/</link>
    <description>Recent content in Tools on Jamie&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 21 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://akjamie.github.io/tags/tools/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hermes Agent — Deep Dive Learning Notes</title>
      <link>http://akjamie.github.io/post/2026-05-21-hermes-agent-deep-dive/</link>
      <pubDate>Thu, 21 May 2026 00:00:00 +0000</pubDate>
      <guid>http://akjamie.github.io/post/2026-05-21-hermes-agent-deep-dive/</guid>
      <description>&lt;h1 id=&#34;hermes-agent--deep-dive-learning-notes&#34;&gt;Hermes Agent — Deep Dive Learning Notes&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Staff-engineer-level notes for senior AI engineers designing and implementing production agents.&#xA;Written after reading &lt;code&gt;run_agent.py&lt;/code&gt;, &lt;code&gt;model_tools.py&lt;/code&gt;, &lt;code&gt;toolsets.py&lt;/code&gt;, &lt;code&gt;agent/&lt;/code&gt;, and &lt;code&gt;tools/&lt;/code&gt; in full.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-high-level-architecture&#34;&gt;1. High-Level Architecture&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│                         Entry Points                                │&#xD;&#xA;│  cli.py (HermesCLI)  │  gateway/run.py  │  batch_runner.py         │&#xD;&#xA;│  tui_gateway/server  │  acp_adapter/    │  run_agent.py __main__    │&#xD;&#xA;└──────────────────────┬──────────────────────────────────────────────┘&#xD;&#xA;                       │&#xD;&#xA;                       ▼&#xD;&#xA;┌─────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│                      AIAgent  (run_agent.py)                        │&#xD;&#xA;│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────┐  │&#xD;&#xA;│  │ Conversation │  │  Tool Loop   │  │  Provider / Transport    │  │&#xD;&#xA;│  │   History    │  │  Orchestrator│  │  (Anthropic / OpenAI /   │  │&#xD;&#xA;│  │  (messages)  │  │              │  │   Bedrock / Codex / ACP) │  │&#xD;&#xA;│  └──────────────┘  └──────────────┘  └──────────────────────────┘  │&#xD;&#xA;│  ┌──────────────┐  ┌──────────────┐  ┌──────────────────────────┐  │&#xD;&#xA;│  │  ContextComp │  │  MemoryMgr   │  │  CredentialPool          │  │&#xD;&#xA;│  │  -ressor     │  │  (builtin +  │  │  (multi-key failover)    │  │&#xD;&#xA;│  │              │  │   plugins)   │  │                          │  │&#xD;&#xA;│  └──────────────┘  └──────────────┘  └──────────────────────────┘  │&#xD;&#xA;└──────────────────────┬──────────────────────────────────────────────┘&#xD;&#xA;                       │&#xD;&#xA;                       ▼&#xD;&#xA;┌─────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│                    model_tools.py                                   │&#xD;&#xA;│  get_tool_definitions()  │  handle_function_call()                  │&#xD;&#xA;│  _run_async()            │  _should_parallelize_tool_batch()        │&#xD;&#xA;└──────────────────────┬──────────────────────────────────────────────┘&#xD;&#xA;                       │&#xD;&#xA;                       ▼&#xD;&#xA;┌─────────────────────────────────────────────────────────────────────┐&#xD;&#xA;│                    tools/registry.py  (singleton)                   │&#xD;&#xA;│  ToolRegistry.register()  │  .dispatch()  │  .get_definitions()     │&#xD;&#xA;└──────────────────────┬──────────────────────────────────────────────┘&#xD;&#xA;                       │&#xD;&#xA;          ┌────────────┴────────────┐&#xD;&#xA;          ▼                         ▼&#xD;&#xA;┌──────────────────┐     ┌──────────────────────────────────────────┐&#xD;&#xA;│  tools/*.py      │     │  plugins/&amp;lt;name&amp;gt;/__init__.py              │&#xD;&#xA;│  (built-in tools)│     │  (user / pip-installed plugins)          │&#xD;&#xA;└──────────────────┘     └──────────────────────────────────────────┘&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Key insight:&lt;/strong&gt; The architecture is a strict layered DAG. &lt;code&gt;tools/registry.py&lt;/code&gt; has zero imports from any other Hermes module — it is the root. Every tool file imports from it. &lt;code&gt;model_tools.py&lt;/code&gt; imports from the registry and triggers discovery. &lt;code&gt;run_agent.py&lt;/code&gt; imports from &lt;code&gt;model_tools.py&lt;/code&gt;. This prevents circular imports and makes the tool system independently testable.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
