🦞OpenClaw Guide
← Back to BlogGuide

OpenClaw Workspace Templates: The Minimal SOUL.md and USER.md That Keep Your Tokens Low

2026-03-176 min read

OpenClaw Workspace Templates: The Minimal SOUL.md and USER.md That Keep Your Tokens Low

Target keywords: openclaw soul md template | openclaw workspace optimization


Every Line You Write Gets Sent to the API on Every Request

SOUL.md isn't a config file that sits on disk. It's context that loads into Claude's input on every API call. Every line. Every comment you added "just in case."

Most people overload these files. They add instructions for edge cases they've never hit. They paste reference docs for convenience. They add notes that only make sense in context. The result: a 10KB+ SOUL.md that costs significantly more per request — and usually performs worse because Claude has to parse noise to find the signal.

The math is straightforward. At Sonnet pricing, a 4KB SOUL.md costs ~$0.012 per request. At 100 requests/day: $1.20/day, $36/month — from a single file. Cut it to 1KB: $9/month. A $27/month difference from trimming one file.


The SOUL.md Template

# SOUL.md

## Core Principles
[YOUR AGENT PRINCIPLES HERE]

## How to Operate
See OPTIMIZATION.md for model routing and rate limits.

## Model Selection
Default: Haiku
Switch to Sonnet only for: architecture, security, complex reasoning

## Rate Limits
5s between API calls, 10s between searches, max 5/batch then 2min break

Why each section earns its place:

## Core Principles — Your agent's operating values: what it should do, what it shouldn't, what tone to take. 3–5 clear rules maximum. State the rule, not the reasoning. Agents with 3 clear principles outperform agents given 20 vague ones.

## How to Operate — A single reference line pointing to OPTIMIZATION.md. This is the reference-instead-of-inline pattern. Model routing rules, budget controls, and detailed operational guides live in that external file — and load on demand when relevant, not on every request.

## Model Selection — Two lines. Default model, when to upgrade. This belongs in SOUL.md because it applies to every interaction from message one. The agent can't look it up — it needs to already know.

## Rate Limits — The core numbers in one line. Applies to every interaction, so it's here. One line is enough: 5 seconds, 10 seconds, 5 searches maximum.


The USER.md Template

# USER.md
- **Name:** [YOUR NAME]
- **Timezone:** [YOUR TIMEZONE]
- **Mission:** [WHAT YOU'RE BUILDING]

## Success Metrics
- [METRIC 1]
- [METRIC 2]
- [METRIC 3]

What each field earns:

  • Name — Correct addressing. One line.
  • Timezone — Matters for scheduling and timing decisions. One line.
  • Mission — The most important contextual anchor in your workspace. One specific sentence that shapes how the agent interprets every question. Make it specific.
  • Success Metrics — Three outcomes that define what "good" looks like. The agent uses these to evaluate options against your actual goals, not generic best practices.

What to exclude:

  • Company history and backstory → reference file, load when relevant
  • Full tech stack → project files, not USER.md
  • Daily schedule → dynamic, belongs in daily notes
  • Contact information → contacts file, load when needed

The test: Does the agent need this on every single interaction? If no — if it's only relevant sometimes — it doesn't belong here.


Reference External Files Instead of Inlining

The template uses this pattern:

## How to Operate
See OPTIMIZATION.md for model routing and rate limits.

Instead of pasting 300 words of routing rules into SOUL.md, you reference an external file. The agent reads it when making a model routing decision — not on every request.

Not every request triggers a model routing decision. But every request processes whatever's inlined in SOUL.md. The reference pattern breaks that tax.

Use it for anything more than two lines:

See OPTIMIZATION.md for full rate limit and budget rules.
See projects/crm/REFERENCE.md for CRM configuration.
See life/areas/projects/index.md for active projects.

The agent knows where to look. Trust the on-demand pattern.


Common Mistakes

API keys in SOUL.md — Every request pays to process that key. Worse: it's plaintext in context sent to an external API. Store keys in environment variables. Load them only when the integration is called.

Adding instructions "just in case" — Every "just in case" line is a guaranteed token cost on every request, versus a hypothetical future benefit. If it's only needed sometimes, reference it, don't inline it.

Explaining rules instead of stating them:

  • ❌ "Always use Haiku by default because it's 12x cheaper than Sonnet and handles most routine tasks with acceptable quality, reserving Sonnet for complex reasoning tasks."
  • ✅ "Default: Haiku. Sonnet for: complex reasoning, architecture, security."

The agent needs the rule. Not your reasoning.

Pasting reference material — Product specs, competitive analysis, pricing tables. Put them in REFERENCE.md and load them when the agent is doing work that requires that context, not on every message.


The Lean Context Principle

The anxiety behind workspace bloat: what if the agent needs this and doesn't have it?

The answer: it will ask, search, or load the file when relevant. Modern agent workflows support on-demand context retrieval — memory_search, file reads, project lookups. The agent doesn't need everything preloaded. It needs just enough to orient itself and the ability to retrieve more.

Load the minimum for orientation. Retrieve the rest on demand.


Combining Lean Workspace With Session Init and Caching

These three optimizations stack directly:

Session initialization ensures only the lean workspace files load at startup — not 50KB of history. With lean SOUL.md and USER.md, startup context drops from 50KB to 2–5KB.

Prompt caching then caches those 2–5KB after the first request. Subsequent requests in the same session pay 90% less on that static content.

Combined effect per session:

SetupContext SizeCost per Request
Default (no optimization)50KBFull price
Session init only8KBFull price
Lean workspace only2KBFull price
All three combined2KB90% off after request 1

The minimum footprint is lean files + session init + caching. Each layer amplifies the others.


Key Takeaways

  • Every line in SOUL.md is processed on every API call. Each line is an ongoing cost.
  • Minimal SOUL.md: Core Principles (3–5 rules), How to Operate (reference external file), Model Selection (2 lines), Rate Limits (1 line).
  • Minimal USER.md: Name, Timezone, Mission, Success Metrics. Nothing else earns its place here.
  • Reference external files instead of inlining. See OPTIMIZATION.md beats pasting OPTIMIZATION.md directly.
  • Never put API keys in SOUL.md. Cost and security risk on every request.
  • Cut "just in case" content. If it's only needed sometimes, reference it.
  • Stack with session init and caching for the minimum possible footprint: lean context + no history bloat + 90% cache discount.

Learn alongside 1,000+ operators

Ask questions, share workflows, and get help from people running OpenClaw every day.