Inside the Architecture: Orchestration, Memory, and the Learning Loop

9 min read Module 1 of 9 Topic 3 of 25

What you'll learn

  • Name the major subsystems inside a Hermes Agent installation and what each is responsible for
  • Trace a single user request through the orchestration layer to a tool call and back
  • Explain what a 'contained sub-agent' is at a conceptual level
  • Understand why Hermes describes itself as an 'active orchestration layer, not a thin wrapper'
Building this at your company? For enterprise and company teams taking this to production: book a 30-minute session with our AI engineers for architecture guidance, code review, and a rollout plan for your use case.
Book a Team Session

The Subsystems, at a Glance

Every later module in this course goes deep on one piece of this diagram. Before that, it’s worth seeing how the pieces fit together, because Hermes’ behavior only makes sense as a system, not as a list of features.

flowchart TB
    REQ["User request\n(CLI, TUI, or messaging platform)"] --> ORCH

    subgraph ORCH["Orchestration Layer"]
        direction TB
        ROUTE["Decide: answer directly,\ncall a tool, or delegate\nto a sub-agent"]
    end

    MEM[("Memory store\nFTS5 cross-session recall\n+ user model")] -.retrieves.-> ORCH
    SKILLS[("Skills directory\n~/.hermes/skills/")] -.matches.-> ORCH

    ORCH --> MODEL["Configured model\n(any provider, Module 2)"]
    MODEL --> ORCH

    ORCH --> TOOLGW["Tool Gateway\n60+ built-in tools + MCP servers"]
    TOOLGW --> ORCH

    ORCH --> SUBAGENT["Contained sub-agent\n(isolated, short-lived)"]
    SUBAGENT --> ORCH

    ORCH --> RESULT["Response"]
    ORCH -.writes.-> MEM
    ORCH -.writes new skills.-> SKILLS

    style REQ fill:#EEF0F7,stroke:#6366F1,color:#0F172A
    style ORCH fill:#EEF0F7,stroke:#6366F1,color:#0F172A
    style MEM fill:#fff7ed,stroke:#f59e0b,color:#0F172A
    style SKILLS fill:#fff7ed,stroke:#f59e0b,color:#0F172A
    style MODEL fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style TOOLGW fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style SUBAGENT fill:#f0fdf9,stroke:#0D9488,color:#0F172A
    style RESULT fill:#EEF0F7,stroke:#6366F1,color:#0F172A

Tracing One Request

Say you type: “Check if the staging API is returning 500s, and if so, look at the last deploy’s diff.”

  1. Memory retrieval. The orchestration layer queries the memory store for anything relevant, maybe it recalls that “the staging API” refers to a specific URL you mentioned three sessions ago.
  2. Skill matching. It checks whether an existing skill already covers part of this (a check-staging-health skill you built earlier, say). If one matches closely enough, its instructions get injected as extra context.
  3. Model call. The model, whichever provider you configured in config.yaml, receives the request plus the retrieved memory and skill context, along with the current tool definitions.
  4. Tool routing. The model decides it needs to make an HTTP request and read a git diff. It emits tool calls; the orchestration layer routes each to the Tool Gateway (built-in HTTP tool, shell/git tool) or an MCP server if one is configured for it.
  5. Sub-agent delegation (optional). If the diff is large, the orchestration layer might spin up a contained sub-agent just to read and summarize it, keeping the main conversation’s context lean.
  6. Response, and a slightly smarter agent. The final answer comes back to you. If this turned out to be a repeatable workflow, you could /learn it into a permanent skill, covered in Module 4, so next time this whole chain runs as one command.

Why the Split Between Orchestration and Model Matters

Because the orchestration layer, not the model, owns memory, skills, and tool routing, you can swap the underlying model without losing any of the agent’s accumulated capability. Switch from Claude to a local Qwen checkpoint mid-project (Module 2 covers exactly how), and your skills directory, memory store, and MCP server configuration all carry over unchanged. The model is a replaceable component, not the seat of the agent’s identity.

Common pitfall: assuming a bigger or newer model automatically makes the agent “smarter” in every way that matters. A stronger model improves reasoning and tool-call accuracy on a given turn, but it does not, by itself, give the agent memory of your last conversation or a growing library of skills. Those come from the orchestration layer accumulating state over time, which is why a well-used Hermes installation on a mid-tier model can outperform a fresh installation on a frontier model for tasks it has already learned.

What You’ll Build in Each Module

ModuleSubsystemWhat you’ll do
2Model layerConnect and switch between cloud and self-hosted providers
3Tool GatewayWrite, parse, and debug tool calls; connect MCP servers
4Memory & SkillsInspect persistent memory; write and trigger a custom skill; delegate to a sub-agent
5DeploymentRun Hermes across terminal backends and serverless sandboxes
6GatewayBridge one agent to Telegram, Discord, and Slack
7GuardrailsLock down tool access and debug failures
8Advanced patternsCoordinate multiple Hermes agents together

Exercise before continuing: Run hermes tools in your terminal and read through the list. For each category of tool you see (file operations, web, code execution, and so on), guess which subsystem in the diagram above it belongs to. You’ll confirm your guesses in Module 3.

Knowledge Check

3 questions to test your understanding

1 Nous Research describes Hermes as 'an active orchestration layer, not a thin wrapper.' What distinguishes an orchestration layer from a thin wrapper in this context?

2 What is a 'contained sub-agent' in Hermes' architecture?

3 Where do skills, memory, and the model itself sit relative to each other in the request flow?

Go further with expert guidance

Ready to build production AI?
Talk to our R&D team.

These courses give you the foundation. Our embedded AI teams take you from prototype to production in 30–90 days, with your team, your codebase, your goals. Book a free strategy call to see how we can accelerate your AI initiative.

30 minutes · No obligation · Expert AI engineers, not sales reps

AI Architecture Review

Audit your current stack and identify high-impact improvements

Project Review

Get expert feedback on your AI implementation and codebase

Team Mentoring

Upskill your engineers with hands-on AI coaching sessions

AI Strategy

Define your AI roadmap, prioritization, and implementation plan