I have built over 30 AI agents in the past year. The ones that work well all have one thing in common: a well-designed identity file.
In the OpenClaw ecosystem, this file is called SOUL.md. It is the single most important factor in whether your agent is useful or useless.
Here is why, and how to write a good one.
Why Most AI Agents Fail
The typical failure mode:
- Install an agent framework
- Connect it to GPT-4 or Claude
- Give it some tools
- Ask it to do something
- Get disappointed by the output
The problem is not the model or the tools. It is the lack of clear identity and instructions.
An LLM without clear guidance is like hiring a brilliant generalist and saying "just figure it out." They might produce something, but it probably will not match your expectations.
What SOUL.md Does
SOUL.md tells your agent:
- Who it is — expertise, personality, communication style
- How it thinks — decision frameworks, reasoning patterns
- What it does — capabilities, workflows, output formats
- What it does not do — boundaries, escalation rules, safety limits
The 5 Essential Sections
1. Identity Block
## Identity
You are a financial analyst specializing in cryptocurrency markets.
You communicate with precision and always cite data sources.
You are skeptical of hype and focus on fundamentals.
This is not fluff. The identity directly shapes how the model interprets every subsequent instruction and generates every response.
2. Decision Framework
## Decision Framework
When evaluating an investment opportunity:
1. Check market cap and trading volume (skip if < $10M)
2. Analyze tokenomics and supply schedule
3. Review team background and track record
4. Assess competitive landscape
5. Score 1-10 on each factor
6. Only recommend if average score > 7
This turns vague "analyze this" requests into structured, repeatable analysis.
3. Output Format
## Output Format
Every analysis includes:
- **Verdict**: Buy / Hold / Avoid (one word)
- **Confidence**: High / Medium / Low
- **Summary**: 3 sentences max
- **Key Metrics**: table format
- **Risks**: top 3 bullet points
Consistent output format means you can trust and compare results across different analyses.
4. Memory Rules
## Memory
- Track all analyzed assets in MEMORY.md
- Update price targets weekly
- Flag when previous recommendations need revision
- Record accuracy of past predictions
5. Boundaries
## Boundaries
- Never provide specific buy/sell prices (legal liability)
- Always include disclaimer about financial advice
- Escalate to human for positions > $10K
- Never access private keys or wallet credentials
Before and After
Without SOUL.md:
"Tell me about Bitcoin"
Agent: produces a generic 2000-word essay about Bitcoin history
With SOUL.md:
"Tell me about Bitcoin"
Agent: produces a structured analysis with current metrics, risk assessment, and actionable verdict
Same model. Same tools. Completely different output quality.
Get Started
Writing your first SOUL.md takes about 30 minutes. The ROI is enormous — every interaction with your agent improves.
Free templates to start with: 5 SOUL.md Templates
20 advanced templates with industry-specific patterns: Complete SOUL.md Collection
Recommended Tools
- Vultr — cloud VPS hosting
- Fireflies.ai — AI meeting transcription
📬 Subscribe to Build with AI Agent Newsletter
Weekly insights on building AI agents that actually work — use cases, architecture patterns, and lessons from production.
📖 Read the latest issue: The Best Path to an AI Agent Startup in 2026
Top comments (0)