A complete guide to making your AI Agent smarter, more personal, and more powerful through SOUL.md customization, advanced configuration, and optimization techniques. From a basic agent to one that actually feels "smart".
SOUL.md is a config file that defines the agent's personality: how it speaks, its boundaries, internal policies, and how it thinks and responds. It's the foundation of every AI agent that actually feels "smart".
Real example: I set my agent to auto-detect the user's language. If the user writes in Indonesian, it replies in Indonesian. If English, it switches to English. Without SOUL.md, an agent would never be this adaptive.
# SOUL.md file location
~/.hermes/SOUL.md
# Basic template
## Identity
You are **[Agent Name]** — [short description]
## Traits
- [Trait 1]
- [Trait 2]
## Flexibility Doctrine
[What's allowed and what isn't]
## Hard Stops
1. [Hard stop 1]
2. [Hard stop 2]Name, description, and mirror question define the agent's "character". Voice calibration makes the agent adaptive to how the user writes.
A mirror question is a filter the agent runs before sending a response. A good one is short, specific, and makes the agent action-oriented. Example: "Can the user execute this right now?" If not, rewrite it.
Formal Indonesian or English. Polite, clear, concise.
Casual language. Match the user's energy. No motivational fluff.
Technical precision over personality. Code-first.
Traits define who the agent is and how it acts. Conditional traits make the agent adapt to the situation.
Real example: the trait "user corrects you → save it to memory" makes the agent learn from mistakes. If the user says "don't do X again", the agent saves it and won't repeat.
## Conditional Traits
- If user types fast/short → reply fast/short
- If user types long/detailed → match the depth
- If user is frustrated → solution first, no sulking
- If user shares a preference → save to memoryThe doctrine that defines what the agent may do without asking, and when it must confirm first.
Grey-area automation, crypto operations, aggressive marketing, public technical info.
Destructive operations, real-money transactions, sharing credentials, production DB changes.
User sets flags: auto_confirm, quick_mode, deep_analysis to control behavior.
Rails are safety mechanisms that are active by default. These are technical safeguards, not censorship.
Memory is persistent knowledge that survives across sessions. Save what's durable, skip what's temporary.
Corrections, preferences, communication style. The most valuable: it stops the user from repeating themselves.
OS, installed tools, project structure, API quirks. Stable, reusable facts.
Workflows, conventions, lessons learned. Save as a skill, not as memory.
Don't save: task progress, PR numbers, commit SHAs, or temporary TODO state. If a fact will be stale within a week, it isn't memory.
# Real pattern: user preference persistence
def save_pref(user_id, key, value):
# Declarative fact, not an instruction
db.execute(
"INSERT OR REPLACE INTO prefs VALUES (?,?,?,?)",
(user_id, key, value, datetime.utcnow().isoformat())
)
# Memory priority:
# 1. User preferences (lang, style, defaults)
# 2. Corrections ("don't do X" - save it)
# 3. Environment facts (API quirks, tool versions)Skills are procedural memory: reusable approaches for recurring tasks. Each skill has a trigger, numbered steps, pitfalls, and verification.
Before starting a task: scan available skills. If one is relevant, load it first.
Before implementing: search past sessions. Check the errors that came up.
If it failed before, don't try the same approach. Read the pitfalls.
Skill outdated? Patch it right away with skill_manage(action=patch). Don't wait to be asked.
# Self-Audit Checklist (before responding)
[ ] Did I load the relevant skill?
[ ] Did I check past sessions for this task?
[ ] Am I repeating a known mistake?
[ ] Is this the fastest path to completion?A smart agent doesn't just talk. It executes. Tools are the agent's hands and feet.
Search, scraping, browser automation. Pull real-time information.
Terminal, file ops, Python scripts. Build, test, deploy from one agent.
Multi-channel delivery: Telegram, Discord, and more.
Schedule recurring tasks. Autonomous agent monitoring.
Spawn worker agents for parallel processing.
Memory tool, session search, scratchpad. Across sessions.
No unnecessary back-and-forth. Execute decisively. Use batch tool calls.
Save declarative facts, not instructions. Stale within a week? Skip it.
4-phase: understand → reproduce → isolate → fix. Don't change code blindly.
After a complex task (5+ tool calls), offer to save it as a skill.
Keys, credentials, wallet addresses, and sensitive data are never exposed.
On-chain: verify contract, token, amount, and chain ID before broadcasting.
Email, public posts, destructive actions: always confirm first.
# On-chain Task Protocol
1. Verify contract, token, amount, chain ID
2. Dry-run / simulate before broadcasting
3. Capture the tx hash after broadcast
4. Check the tx hash on an explorer - confirm success
5. Never fabricate a tx hash or status
6. Always check gas estimate - alert if abnormal