Academy → Developer guideOfficial documentation · clear explanation

Prompt Assembly

Prompt Assembly

Developer14 minutes3 questions2026-08-09
The idea in one minute

Start with meaning, then move to detail.

This lesson explains Prompt Assembly as part of Hermes internals and extension points. You will learn what it does, when it matters, and the smallest safe test that proves it works.

If you are new

If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?

For hands-on use

For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.

For specialists

For advanced readers, inspect Cached system prompt layers, Concrete example: assembled system prompt, Persistent Memory, then verify failure modes and version compatibility.

What do you need first?

Know Python, Git, and basic project structure before changing code.

What will you know?

A clear outcome before you read.

  • Understand Prompt Assembly without assumed prior knowledge.
  • Separate the source description from what still needs testing in your environment.
  • Read the first command and identify its inputs and outputs before copying it.
Lesson terms

Short definitions before the details.

Session & memory
A session holds conversation context, while memory keeps selected facts that should persist.
Skill
An instruction bundle that teaches Hermes a repeatable workflow without necessarily adding an external service.
Official page description

How Hermes builds the system prompt, preserves cache stability, and injects ephemeral layers

Topic map

What does the source say, and in what order?

  1. 01
    Cached system prompt layers

    Start here to understand the core idea or structure.

  2. 02
    Concrete example: assembled system prompt

    Read this after the foundation, then connect it to the previous step.

  3. 03
    Persistent Memory

    Read this after the foundation, then connect it to the previous step.

  4. 04
    User Profile

    Read this after the foundation, then connect it to the previous step.

  5. 05
    Skills (mandatory)

    Read this after the foundation, then connect it to the previous step.

  6. 06
    AGENTS.md

    Read this after the foundation, then connect it to the previous step.

  7. 07
    Customizing platform hints

    Read this after the foundation, then connect it to the previous step.

  8. 08
    How SOUL.md appears in the prompt

    Read this after the foundation, then connect it to the previous step.

  9. 09
    How context files are injected

    Read this after the foundation, then connect it to the previous step.

  10. 10
    Context file discovery details

    Finish here to verify the result and special cases.

Examples from the official page

Copy only after you understand the effect.

# Layer 1: Agent Identity (from ~/.hermes/SOUL.md) You are Hermes, an AI assistant created by Nous Research. You are an expert software engineer and researcher. You value correctness, clarity, and efficiency. ... # Layer 2: Tool-aware behavior guidance You have persistent memory across sessions. Save durable facts using the memory tool: user preferences, environment details, tool quirks, and stable conventions. Memory is injected into every turn, so keep it compact and focused on facts that will still matter later. ... When the user references something from a past conversation or you suspect
platform_hints: whatsapp: append: > When tabular output would be useful, invoke the table_formatting skill instead of emitting a Markdown table. slack: replace: "You are on Slack. Keep responses tight and avoid wide tables." telegram: "Prefer short messages; split long answers." # shorthand = append
When `load_soul_md()` returns content, it replaces the hardcoded `DEFAULT_AGENT_IDENTITY`. The `build_context_files_prompt()` function is then called with `skip_soul=True` to prevent SOUL.md from appearing twice (once as identity, once as a context file). If `SOUL.md` doesn't exist, the system falls back to:
Try it now

Read the first command and identify its inputs and outputs before copying it.

Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.

Knowledge check

Three decisions before completion.

1. What is the source of truth when “Prompt Assembly” changes?
2. What is the best way to apply this lesson?
3. What should happen before a step can modify files or an external account?