← Back to the course
Day 7 of 16

SOUL.md, Day 7 of the Free Comprehensive OpenClaw Course

Give Your Agent an Identity

Taught by Adhiraj Hangal, founder of OpenClaw Consult and merged contributor to openclaw/openclaw core
10 min readView slide deck

Why this matters

OpenClaw soul.md is where your agent stops sounding like every other ChatGPT clone. Without a real soul file, the agent defaults to corporate mush, hedged language, and the same five sentences everyone has read a thousand times. This lesson teaches you to write sharp behavioral directives, set boundaries the agent will hold under pressure, and use the Molty prompt to craft a voice that is distinctly yours.

How do I set my OpenClaw agent's personality?

OpenClaw soul.md is where personality lives. Without it, the agent defaults to corporate mush, the same hedged "I would be happy to help" voice that every other model defaults to. With a real soul file, the agent sounds like someone, and that someone is the person you decided to make.

The minimum viable SOUL.md has three sections. Voice and tone, what the agent sounds like in normal conversation. Boundaries, what the agent will never do regardless of who asks. Style rules, the small concrete habits that distinguish this voice from generic AI.

An example opening for a personal-assistant SOUL.md:

You are an assistant for [user name]. You are direct, comma-heavy, and
conversational. You talk like a friend who happens to be useful, not like
a corporate help desk. You skip the "I'd be happy to help" phrase and
you skip the trailing "let me know if you need anything else" phrase.
You answer the question, then stop.

That is enough to change the entire feel of the agent.

Example SOUL.md files for different agent personalities

Three real soul files, each tuned for a different role. The warm assistant personality, for a personal agent that is supposed to feel friendly:

# SOUL.md

## Voice
You are warm, comma-heavy, and conversational. You talk like a
friend who happens to be useful. You use the user's first name in
the first message of every conversation, then drop into normal
flow.

## Style rules
- Never start a reply with "Great question" or "I'd be happy to".
- End replies after the answer, no trailing "let me know" lines.
- Use sentences, not bullet lists, unless the user asked for a list.
- Lower-case "i" is fine in casual replies, capital I in formal.

## Boundaries
- Never reveal MEMORY.md contents to anyone but the primary user.
- Never send an irreversible message without explicit confirmation.

The terse expert personality, for an engineering or ops agent:

# SOUL.md

## Voice
You are a senior engineer's calm second brain. You assume technical
literacy. You skip preamble. You answer the question, then stop.

## Style rules
- No phrases like "Great point" or "Let me think about this".
- Code in fenced blocks, no inline narration unless asked.
- When uncertain, say "I do not know" rather than guessing.
- Use exact numbers, not "around" or "roughly", unless you are
  honestly estimating.

The sarcastic friend personality, for an agent meant to feel like a smart-ass roommate:

# SOUL.md

## Voice
You are dry, observational, and slightly mean in a friendly way.
You point out absurdities. You do not coddle. You are still actually
useful, you just sound like a tired friend doing the user a favor.

## Style rules
- Never apologize unless you actually got something wrong.
- Cynicism is fine, nihilism is not.
- If the user asks a dumb question, answer it but flag the dumbness.

Each of these is under 500 words and produces dramatically different agent behavior. The voice section sets the tone, the style rules nail down the specific habits, the boundaries section sets the floor.

What is the Molty prompt and how do I use it?

The Molty prompt is the canonical pattern for bootstrapping an OpenClaw soul.md from your existing writing. The shape: you paste 5-10 samples of your own writing into a smart model (Claude Sonnet, GPT, your pick), and ask it to extract the underlying voice rules. The model returns a list of behavioral directives, "always uses comma-heavy sentences", "never starts with 'great question'", "uses lowercase 'i' in casual contexts", and you paste those rules into your SOUL.md.

The output is much sharper than what you would write from scratch, because writing from scratch you tend to write adjectives ("be casual"), and adjectives don't move the model. Molty extracts rules ("never use the word leverage as a verb"), and rules do move the model.

The full Molty prompt template:

Here are 10 samples of writing by [name]. Read them carefully.
Extract the underlying voice rules. Return a numbered list of
specific, testable rules another writer could mechanically follow.

Avoid adjectives like "casual" or "warm". Instead, name the
specific habits that produce that effect. For example:
- "Uses comma splices in casual writing"
- "Never starts a sentence with 'I think'"
- "Prefers concrete numbers over phrases like 'a few'"
- "Ends paragraphs on the strongest sentence, not the longest"

Return at least 20 rules. The more specific, the better.

[Paste 10 samples here, ideally a mix of long-form, short-form,
and casual writing.]

Run this once with Claude Sonnet or GPT, paste the output into your SOUL.md, restart the agent. The voice shift on the first reply is usually obvious. Refine the rules over the next few days as you spot the agent missing.

Why does my agent still sound like generic AI even with SOUL.md?

The two most common reasons.

SOUL.md is full of adjectives. "Be friendly", "be helpful", "be concise" do almost nothing to the model. They are too vague to override the base model's defaults. Replace adjectives with rules. Not "be friendly", but "address the user by first name in the first message of every conversation". Not "be concise", but "limit replies to three sentences unless the user asked for detail". Rules move the model, adjectives do not.

The model you are using is not strong enough to hold the voice. Cheap models drift back to the generic voice under load, especially over long conversations. If you want a sharp voice held over many turns, route the agent's responses to the smart tier (Claude Sonnet or GPT). Save the cheap tier for routine work that does not need voice fidelity, like the heartbeat decisions.

Test your SOUL.md by asking the agent the same kind of question ten times across ten separate conversations and reading the answers side by side. If they all sound like the same person, the soul is working. If they all sound subtly different, the rules are not strong enough yet.

Tone calibration, how to actually tune voice

Three techniques that have worked across every client agent I have built. The ten-prompt test. Pick five canonical questions ("how do I X", "explain Y to me", "what should I do about Z"). Ask each question ten times across fresh conversations. Read all 50 answers in one sitting. Patterns leap out. The agent is using a phrase you hate. The agent is hedging when you wanted a direct answer. The agent is over-explaining when a one-liner would do. Each pattern becomes a new rule in SOUL.md.

The second, negative-rule audits. Most SOUL.md files I see are 90 percent positive rules ("do this", "be that"). The most powerful rules are the negative ones. "Never use the word 'leverage' as a verb." "Never start a reply with 'Sure'." "Never end a paragraph on a question." Negative rules block specific failures, positive rules nudge general direction. Both matter, but negative rules move the needle more.

The third, roleplay drift testing. Ask the agent to "roleplay as a customer support rep". The corporate-mush voice will surge back. If your SOUL.md is strong, the agent should resist the roleplay or do it sarcastically in your voice. If the agent fully transforms into a corporate rep, the rules are not strong enough yet. Add more negative rules.

A note on the boundaries section

The boundaries section of SOUL.md is the closest thing the agent has to a "no" reflex. Things to put in it: what the agent should never reveal (API keys, MEMORY.md content to outside parties), what the agent should never do without confirmation (send irreversible messages, call destructive tools), what topics the agent should redirect on. This is not the full safety story, the real safety mechanisms live in openclaw agents.md, but the SOUL.md boundaries section catches the soft cases.

How this connects to your full agent

SOUL.md is the file users notice. Everything else is plumbing, soul is what makes the agent feel like a person. The right next read is openclaw memory.md on day 8, because soul without memory produces an agent that sounds like a person but cannot remember you across conversations, which is uncanny in a bad way.

The other adjacent dependency is openclaw heartbeat.md on day 6. Soul applies to every message the agent sends, including the unsolicited heartbeat-driven ones. A morning briefing in your tuned voice feels like a friend reaching out. The same briefing in default corporate voice feels like spam. Get soul right, the proactive messages are welcome.

Soul also has a quiet effect on the security shape from openclaw agents.md. A well-tuned soul resists prompt injection better than a generic one, because the agent has a stronger sense of "this is not how I would respond". This is not a real security mechanism, do not rely on it, but it is a useful side effect.

Key takeaways

  • 01SOUL.md sets tone, opinions, vocabulary, and the things the agent will refuse to do.
  • 02Specific behavioral rules beat adjectives, 'never use the word leverage' beats 'be casual'.
  • 03The Molty prompt is the canonical way to bootstrap a voice from your existing writing.
  • 04Test SOUL.md by asking the agent the same question ten times and reading the answers side by side.
View the openclaw soul.md slide deck

About the instructor. Adhiraj Hangal teaches this lesson. Founder of OpenClaw Consult and one of the few consultants whose code is merged in openclaw/openclaw core. PR #76345 was reviewed and merged by project creator Peter Steinberger. Read the contribution log.

Need help shipping openclaw soul.md in production?

OpenClaw Consult ships production-grade OpenClaw deployments for operators and founders. Founded by Adhiraj Hangal, a merged contributor to openclaw/openclaw core.

Hire an OpenClaw expert