blog.back_article_list

SOUL.md, AGENTS.md, USER.md and MEMORY.md explained

SOUL.md, AGENTS.md, USER.md and MEMORY.md explained

Hermes Agent has four markdown files that shape the prompt the model sees on every turn. SOUL.md, AGENTS.md, USER.md and MEMORY.md. They look similar so people often dump everything in SOUL.md and then wonder why behaviour is inconsistent across projects. The split between these files matters more than it looks at first.

This article explains what goes in each one and why. The technical loading order is in our Hermes memory architecture piece. This one is about how to structure the content for real use.

The four files at a glance

FileScopePurpose
SOUL.mdGlobal, all sessionsPersona, voice, base behaviour
AGENTS.mdPer projectProject conventions and context
USER.mdGlobal, all sessionsFacts about you, the operator
MEMORY.mdGlobal, mostly autoRetained facts the agent learned

SOUL.md: persona and voice

This is who the agent is. Tone, values, communication style, base caution level. If you handed a new colleague a single page that says "this is who you should be at this job", that page is SOUL.md.

What belongs in SOUL.md

  • "You are direct and prefer short answers over long ones."
  • "You explain your reasoning briefly before doing anything irreversible."
  • "You write British English. No em dashes."
  • "You are comfortable disagreeing when you have a good reason."

What does NOT belong in SOUL.md

  • "In ~/code/work-app, run npm test before commits." (belongs in that project's AGENTS.md)
  • "My name is Andrei." (belongs in USER.md)
  • "Deploy script is at scripts/deploy.sh." (belongs in AGENTS.md)

The most common SOUL.md mistake

Overloading it with caution. "Never run destructive commands. Always ask before editing files. Confirm before pushing. Verify before merging. Be careful with shell access." The model adds these up into an agent that refuses to do anything because it's busy asking for permission constantly.

If you're writing the fourth caution rule, you don't need more caution in SOUL.md. You need better tool scoping. See our Hermes talks but takes no action diagnostic if you've crossed that line.

AGENTS.md: project-specific knowledge

One AGENTS.md per project, in the project root. The agent reads whichever one applies based on the current working directory. Switch directories, different AGENTS.md takes over. No cross-contamination.

What belongs in AGENTS.md

  • "This is a Next.js 14 app with the App Router. Server components by default."
  • "Tests live in __tests__ next to source. Run with npm test."
  • "Deployments through GitHub Actions on main. Don't push directly to main."
  • "Linting enforced. Run npm run lint before committing."
  • "Staging URL: staging.example.com. Production: example.com. Don't mix them."

AGENTS.md is also where project-specific behaviour overrides go

If your SOUL.md says "always confirm before acting" but in this specific project you trust the agent to run tests aggressively, AGENTS.md is where you say so:

"In this project, run tests after every edit without asking."

That's scoped. It applies only here. It doesn't leak into other projects.

USER.md: who you are

Facts about you, the operator. The agent reads this so it doesn't have to ask you the same things every session. Keep it factual and concise.

What belongs in USER.md

  • "My name is Andrei. I am CMO at LumaDock."
  • "I'm based in London, GMT/BST."
  • "Prefer short replies. Less explanation, more substance."
  • "I read code but I'm not a daily coder. Use business framing for technical summaries."

Update USER.md occasionally when something stable about you changes. Don't put project state here. Don't put memory content here.

MEMORY.md: what the agent has learned about you

This file mostly maintains itself. The agent's learning loop adds entries as it picks up things from sessions. Facts you mentioned that turned out to be relevant later. Decisions you made that the agent thinks should persist. Observations about your preferences.

When to hand-edit MEMORY.md

Only when the agent has it wrong. If MEMORY.md says you prefer dark mode but you use light mode and the agent keeps recommending dark themes, find that line and delete it. Don't try to manage the whole file by hand. That defeats the point.

How the precedence works in practice

When the agent builds a prompt, it stacks the files in this order:

  1. SOUL.md as system-level identity
  2. AGENTS.md as project context (current directory only)
  3. USER.md as personal facts
  4. MEMORY.md as long-term retained info

If two files contradict, later in the stack tends to win for that specific topic. AGENTS.md can override SOUL.md for project-specific behaviour. It cannot rewrite who the agent fundamentally is.

Common problems and fixes

"I edited SOUL.md but the agent sounds the same"

Four possible causes.

Cause: wrong file location

The agent reads SOUL.md from the active persona directory, not always your home dir. Run hermes persona show to see which file it currently loads.

Cause: session cache

SOUL.md is loaded at session start and held for the duration. Run /new to start a fresh session.

Cause: AGENTS.md overrides the edit

If you changed tone in SOUL.md but the project's AGENTS.md sets a different tone, AGENTS.md wins in that project.

Cause: small model ignores nuanced instructions

Smaller models don't always follow detailed persona rules. Test with a bigger model to confirm.

"SOUL.md is becoming too project-specific"

Refactor. Move the project parts into the project's AGENTS.md. Keep SOUL.md focused on persona only. Less is more in SOUL.md.

SOUL.md vs /personality slash command

The /personality command sets a temporary persona for the current session only. Use it for one-off shifts ("be more playful for this brainstorm"). Don't use it for anything you want to persist. If you keep running /personality the same way every session, that instruction belongs in SOUL.md.

Testing SOUL.md edits without breaking your install

Before committing a SOUL.md change, backup the current file:

cp ~/.hermes/SOUL.md ~/.hermes/SOUL.md.backup
# make your edit
hermes chat -q "summarise yourself in two sentences"
# if the output is wrong, revert
cp ~/.hermes/SOUL.md.backup ~/.hermes/SOUL.md

The smoke test ("summarise yourself in two sentences") catches most persona drift in seconds.

Backing up all four files

These files plus state.db are what define your agent. Lose them, you lose your accumulated identity. A git repo of ~/.hermes/ with state.db gitignored is enough for the markdown. For state.db use the SQLite-aware approach in our Hermes backups guide.

One persona per real context

The reason all four files matter is that you probably need more than one set of them. I run a Work persona and a Personal persona. Each has its own SOUL.md, USER.md and MEMORY.md. AGENTS.md varies by project under either. Switching is one command, zero contamination.

If you're running one giant SOUL.md that tries to be everything, splitting that into focused personas is the first improvement worth making.

Starting from sensible defaults on a LumaDock VPS

If you'd rather not write the four files from scratch, the LumaDock Hermes Agent template comes with reasonable default SOUL.md and an empty USER.md ready to fill in. The layout matches what the rest of these tutorials assume. Unmetered bandwidth, no setup fees. Full setup walkthrough in our Hermes Agent complete guide.

Your idea deserves better hosting

24/7 support 30-day money-back guarantee Cancel anytime
Billing Cycle

VPS.S1

$5.99 packages.save  17 %
$4.99 Monthly
  • 2 vCPU AMD EPYC
  • 2 GB RAMPAMIĘĆ
  • 30 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie

VPS.S3

$14.99 packages.save  33 %
$9.99 Monthly
  • 4 vCPU AMD EPYC
  • 6 GB RAMPAMIĘĆ
  • 70 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie

EPYC VPS.P1

$8.99 packages.save  22 %
$6.99 Monthly
  • 2 vCPU AMD EPYC
  • 4 GB RAMPAMIĘĆ
  • 40 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

EPYC VPS.P2

$16.99 packages.save  24 %
$12.99 Monthly
  • 2 vCPU AMD EPYC
  • 8 GB RAMPAMIĘĆ
  • 80 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

EPYC VPS.P4

$29.99 packages.save  23 %
$22.99 Monthly
  • 4 vCPU AMD EPYC
  • 16 GB RAMPAMIĘĆ
  • 160 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

EPYC VPS.P5

$39.99 packages.save  25 %
$29.99 Monthly
  • 8 vCPU AMD EPYC
  • 16 GB RAMPAMIĘĆ
  • 180 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

EPYC VPS.P6

$59.99 packages.save  25 %
$44.99 Monthly
  • 8 vCPU AMD EPYC
  • 32 GB RAMPAMIĘĆ
  • 200 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

EPYC VPS.P7

$69.99 packages.save  29 %
$49.99 Monthly
  • 16 vCPU AMD EPYC
  • 32 GB RAMPAMIĘĆ
  • 240 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

Genoa VPS.G2

$24.99 packages.save  20 %
$19.99 Monthly
  • 2 vCPUAMD EPYC Genoa 4. generacji 9xx4 z 3,25 GHz lub podobny, na architekturze Zen 4. AMD EPYC G4
  • 4 GB DDR5PAMIĘĆ
  • 50 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

Genoa VPS.G4

$44.99 packages.save  22 %
$34.99 Monthly
  • 4 vCPUProcesor AMD EPYC z dedykowanymi rdzeniami vCPU, na serwerowym sprzęcie dla firm. AMD EPYC G4
  • 8 GB DDR5PAMIĘĆ
  • 100 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

Genoa VPS.G6

$89.99 packages.save  22 %
$69.99 Monthly
  • 8 vCPUProcesor AMD EPYC z dedykowanymi rdzeniami vCPU, na serwerowym sprzęcie dla firm. AMD EPYC G4
  • 16 GB DDR5PAMIĘĆ
  • 200 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

Genoa VPS.G7

$159.99 packages.save  22 %
$124.99 Monthly
  • 8 vCPUProcesor AMD EPYC z dedykowanymi rdzeniami vCPU, na serwerowym sprzęcie dla firm. AMD EPYC G4
  • 32 GB DDR5PAMIĘĆ
  • 250 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii. w cenie
  • Darmowa autokopiaZawiera jeden slot kopii zapasowej, który możesz ustawić na codzienne, cotygodniowe lub comiesięczne uruchamianie.

AMD Ryzen VPS.R1

$16.99 packages.save  18 %
$13.99 Monthly
  • 1 dedykowane CPU AMD Ryzen 9 7950X z 4,5 GHz lub podobny, na architekturze Zen 4. vCPU
  • 4 GB DDR5PAMIĘĆ
  • 50 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6 w cenie Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii.
  • Auto kopia zapasowa w cenie

AMD Ryzen VPS.R2

$29.99 packages.save  17 %
$24.99 Monthly
  • 2 dedykowane CPU AMD Ryzen 9 7950X z 4,5 GHz lub podobny, na architekturze Zen 4. vCPU
  • 8 GB DDR5PAMIĘĆ
  • 100 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6 w cenie Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii.
  • Auto kopia zapasowa w cenie

AMD Ryzen VPS.R4

$109.99 packages.save  18 %
$89.99 Monthly
  • 8 dedykowane CPU AMD Ryzen 9 7950X z 4,5 GHz lub podobny, na architekturze Zen 4. vCPU
  • 32 GB DDR5PAMIĘĆ
  • 400 GB NVMeDYSK
  • Nielimitowane łącze
  • IPv4 & IPv6 w cenie Obsługa IPv6 jest obecnie niedostępna we Francji, Finlandii ani w Holandii.
  • Auto kopia zapasowa w cenie

Frequent questions

What is the difference between SOUL.md and AGENTS.md in Hermes?

SOUL.md defines who the agent is across every project (persona, voice, base behaviour). AGENTS.md defines project-specific context that only applies in that project's directory. Persona goes in SOUL, project conventions in AGENTS.

Your agent runs wild. Your bill doesn't.

Easily deploy Hermes in one click on Ubuntu 24.04 with AMD EPYC, NVMe storage and unmetered bandwidth. The price stays the same whatever the agent does, no setup fees, no overage charges and no tier traps.

GPU products are in high demand at the moment. Fill the form to get notified as soon as your preferred GPU server is back in stock.