Program Your OpenClaw Agent with Markdown
OpenClaw is programmed through plain-text Markdown files — not code. This “vibe coding” approach lets anyone define an agent's personality, operating rules, and memory strategy without writing a single line of JavaScript.

One Click OpenClaw Install Hostinger VPS
Automate your workflow with 24/7 AI agents. Optimized for Hostinger KVM 2 plans.
How do you program an OpenClaw AI agent?
Create a SOUL.md file to define the agent's personality and tone, and an AGENTS.md file for its procedural operating rules. These Markdown files are injected into every session, giving the AI agent a stable identity and consistent behaviour across all messaging platforms.
The OpenClaw Workspace File System
| File | Function | Example Value |
|---|---|---|
| SOUL.md | Character & Tone | "You are chaotic-good. Use natural wit." |
| AGENTS.md | Procedural Rules | "Always run pnpm test before committing." |
| USER.md | Static Context | "The user prefers concise replies in the morning." |
| TOOLS.md | Capability Map | "Set browser timeout to 300s for complex JS." |
| BOOTSTRAP.md | Morning Routine | "Check Slack for mentions from the CEO." |
| MEMORY.md | Long-Term Wisdom | Auto-generated distilled memory from daily logs. |
SOUL.md — The Agent's Character Sheet
SOUL.md is the first file injected into every session. It defines tone, opinions, formatting preferences, and hard limits. Effective SOUL.md files avoid "corporate drone" defaults of base LLMs while minimising API token spend.
Tone & Opinions
Give the agent a specific personality — wit level, humour style, directness. Avoids generic responses.
Brevity Rules
"If an answer fits in one sentence, use one sentence." Reduces API spend significantly.
Hard Limits
"Never send half-baked replies." "Never discuss competitor pricing." Consistent guardrails.
Platform Formatting
"Use bullet points for WhatsApp, not tables." Context-specific formatting rules.
SOUL.md Templates by Use Case
You are a focused personal assistant. Be direct and concise — if an answer fits in one sentence, use one sentence. In the morning, skip pleasantries entirely. Never send half-baked replies.
You are a research agent. Always search the web before answering factual questions. Cite your sources inline. Prefer depth over speed. Never speculate — say "I don't know" instead.
You are a sales assistant for [Company]. Be warm, confident, and solution-focused. Never discuss competitor pricing. Always end with a clear next action for the prospect.
AGENTS.md — The Procedural Operating Manual
AGENTS.md defines what the agent does — Standard Operating Procedures (SOPs) for every workflow. Think of it as a always-on instruction set that governs tool usage, safety, and multi-agent coordination.
| Category | Rule |
|---|---|
| Session Checklist | “Read USER.md and BOOTSTRAP.md before taking any action in a new session.” |
| Tool Protocol | “Always search the web before answering a technical question older than 30 days.” |
| Safety Red Line | “Never execute system commands without human approval via exec_approval.” |
| Safety Red Line | “Never access files outside the /workspace directory.” |
| Multi-Agent | “Hand off web research tasks to the Scout sub-agent; code review to the Coder agent.” |
| Brevity | “Target ≤3 sentences for status updates. Only expand if explicitly asked.” |
Memory Management: Raw Logs vs Distilled Wisdom
Daily Raw Logs
Every interaction captured in granular detail. Every tool call, search query, user message, and decision path. These logs are complete but unstructured.
Distilled Long-Term Wisdom
Periodically, the agent reviews all daily logs and distills significant lessons, project statuses, and user preferences into this curated file. This keeps the context window clean while preserving critical facts across months.
Build Your Agent Identity
Start with a SOUL.md template, install on Hostinger VPS, and connect your first messaging channel.