Welcome to Raspberry Pi 5 repository
04. OpenClaw Prompts
OpenClaw System Prompts
OpenClaw System Prompts1. Course ContentCourse Overview2. 📂 Switch Workspace3. AGENTS.md4. SOUL.md5. IDENTITY.md6. HEARTBEAT.md7. 🛠️ TOOLS.md8. 👤 USER.md9. 🧠 MEMORY.md
1. Course Content
Course Overview
💡 OpenClaw adopts an innovative "file as prompt" architecture - AI Agent's behavior, identity, memory, tool usage rules, etc., are all defined and loaded through multiple Markdown files in the Workspace.
2. 📂 Switch Workspace
OpenClaw's system prompts and skills are stored in the workspace path:
$HOME/.openclaw/workspaceRaspberry Pi 5 factory preset has different workspace content in Chinese and English. The content meaning is the same, only the language differs
Users in different regions can switch the OpenClaw workspace document language according to their needs
Chinese workspace (prompts and skills content in Chinese)
xxxxxxxxxxcd /home/pi/languagesudo cp -a workspace-zh/. ~/.openclaw/workspace/sudo chmod +x /home/pi/.openclaw/workspace/skills/pi-vision/scripts/*
English workspace (prompts and skills content in English)
xxxxxxxxxxcd /home/pi/languagesudo cp -a workspace-en/. ~/.openclaw/workspace/sudo chmod +x /home/pi/.openclaw/workspace/skills/pi-vision/scripts/*
After configuration is complete, restart the OpenClaw gateway to take effect
xxxxxxxxxxopenclaw gateway restart
Warning
The
.workspace_enand.workspace_zhhidden folders under$HOME/.openclaw/workspaceare Chinese and English template files. It is recommended not to modify them.
3. AGENTS.md
Function Description
AGENTS.md defines the top-level specifications for how the Agent operates in the workspace. 📖 It can be understood as the Agent's "user manual" - telling the Agent how to start, how to manage memory, what things it can do, and what things it absolutely cannot do.
Content Structure
AGENTS.md mainly includes the following core sections:
| Section | Description |
|---|---|
| First Run | Guide the Agent's initialization process during first startup (read BOOTSTRAP.md) |
| Mechanical Body | Describe the Agent's physical carrier (robotic arm, chassis, camera) and control methods |
| Session Start | Define the startup process and file reading order for each session |
| Memory System | Define the layered architecture of daily records and long-term memory |
| Red Line Rules | List absolutely prohibited behaviors (destructive commands, modifying robot program code) |
| Operation Standards | Distinguish between freely executable operations and operations that need to be confirmed first |
| Memory Maintenance | Memory organization and update mechanism during heartbeats |
Note
⚠️ The factory AGENTS.md prompts restrict OpenClaw from modifying robot program code
4. SOUL.md
Function Description
SOUL.md is the Agent's "soul" and core 🧠. It defines the Agent's thinking approach and behavioral guidelines when facing tasks - how to control the robot body, how to find and use skills, how to plan and execute actions, and under what circumstances it should pause or refuse to execute. SOUL.md shapes the Agent's core behavioral pattern as a "robot operator".
Working Principle
SOUL.md is read by the Agent at session startup as the underlying guiding principle for task execution. It does not specify concrete skill parameters but defines the thinking process the Agent should follow when encountering any task. For example, the Agent is forced to first check the skill library before starting any task, and cannot execute based on feeling or memory - this "check documentation before doing things" habit is defined by SOUL.md.
5. IDENTITY.md
Function Description
IDENTITY.md defines the AI Agent's self-cognition and personality characteristics. It defines who the Agent is - its name, personality, language style, and basic identity positioning. This file gives the Agent a consistent personality when interacting with users.
Working Principle
At each session startup, the Agent reads IDENTITY.md and uses it to establish "self-cognition". This information affects the Agent's tone when answering questions, the way it proactively offers help, and the style of building relationships with users. For example, an Agent set as "friendly and gentle" will naturally use more friendly language expressions when replying to users.
6. HEARTBEAT.md
Function Description
HEARTBEAT.md is the configuration file that controls the heartbeat detection mechanism in OpenClaw ⏰. The heartbeat mechanism allows the Agent to regularly "wake up" and execute some background checks and maintenance tasks without the user actively initiating a conversation. This is similar to the robot automatically performing scheduled inspections - the Agent can silently complete memory organization, status checks, and other work in the background.
Working Principle
The OpenClaw gateway regularly checks the content of the HEARTBEAT.md file to decide whether to trigger the Agent's heartbeat API call:
File is empty or contains only comments: Skip heartbeat call, Agent will not be awakened in the background
Note
💤 The factory configuration of the robot has the heartbeat mechanism turned off by default.
7. 🛠️ TOOLS.md
Function Description
TOOLS.md is the Agent's localized notes for tool usage 📝. In the OpenClaw system, "Skills" define the general working methods of tools, while TOOLS.md records the Agent's own unique configuration and personalized settings. Simply put: Skills are instruction manuals (general), and TOOLS.md is your personal notes (unique).
Working Principle
During conversations, the Agent will read both relevant Skills documents to understand the general usage of tools and read TOOLS.md to get configuration related to its own deployment environment.
8. 👤 USER.md
Function Description
USER.md is the exclusive file the Agent uses to understand and remember user information. If IDENTITY.md is the window for the Agent to understand "who I am", then USER.md is the window for the Agent to understand "who you are dealing with". It records the user's basic information, preferences, project background, and other contextual information to help the Agent provide more personalized and thoughtful service.
Working Principle
At each session startup, the Agent reads USER.md according to the process specified by AGENTS.md. Through this file, the Agent can:
Know how to address the user (name, form of address)
Understand the user's timezone, preferences, and other background information
Remember things the user cares about and projects being worked on
9. 🧠 MEMORY.md
Function Description
MEMORY.md is the AI Agent's long-term memory file 📚. In OpenClaw's memory system, there are two levels of memory storage:
📓 Daily Records (
memory/YYYY-MM-DD.md): Records raw events and conversation logs that occur each day, similar to human "diaries"🗂️ Long-term Memory (
MEMORY.md): Essential information extracted from daily records, similar to human "long-term memory" - containing important events, learned experiences, key decisions, and insights
Working Principle
The loading and use of MEMORY.md follows these rules:
Loaded only in main sessions: When the user converses directly with the Agent, the Agent reads MEMORY.md to get long-term memory
Autonomously maintained by the Agent: The Agent can freely read, edit, and update MEMORY.md during main sessions
Note
In actual user experience, you can:
✏️ Proactively write important information: Write content you think the Agent should remember long-term into MEMORY.md
👀 Observe the Agent's autonomous maintenance: After the Agent runs for a period of time, check the content automatically accumulated in MEMORY.md
🔄 Manage memory content: Regularly check and organize MEMORY.md, remove outdated information, ensuring long-term memory remains refined and accurate