OpenClaw Workspace Template
Production-tested workspace template for OpenClaw AI agents, extracted from a real agent running 3+ months in production.
What You Get
A fresh OpenClaw agent is stateless β it wakes up, helps you, and forgets everything. This template turns it into something that persists, learns, and improves over time.
After installing:
- π§ Your agent remembers β Daily logs (
memory/YYYY-MM-DD.md) + curated long-term memory (MEMORY.md) with priority levels and auto-expiry. It reads yesterday's and today's logs every session. - π§ Your agent learns from mistakes β A three-tier self-improvement system (
repair/optimize/innovate) tracks errors, corrections, and knowledge gaps. Problems that recur 3+ times auto-promote to long-term memory so they never happen again. - π€ Your agent delegates β Battle-tested sub-agent patterns with inject-rules, result verification, and delivery confirmation. Your main agent stays focused while sub-agents handle heavy lifting.
- π Your agent maintains itself β Routine checks framework (Type A: fixed logic / Type B: needs LLM) so your agent doesn't waste tokens on things a shell script can do.
- π‘οΈ Your agent verifies everything β Four defense lines: create β execute β deliver β alert. "I did it" is never enough β it checks that the user actually received the result.
- π€ Your agent has personality β
SOUL.mddefines who it is,IDENTITY.mdgives it a name and emoji,USER.mdhelps it understand you.
Features
- Memory System: Daily logs + long-term curation with P0/P1/P2 priority and auto-archival
- Self-Improvement: Error tracking, correction learning, recurring pattern detection
- Routine Checks: Type A/B monitoring framework, crontab templates
- Sub-agent Patterns: inject-rules, REVIEW_THEN_DELIVER, STATUS_PENDING fallback
- Starter Skills: Memory management, Obsidian markdown, Telegram HTML replies, temp file handling
- Multi-instance Support: Run multiple specialized agents with isolated workspaces
Quick Start
- Install OpenClaw if you haven't:
curl -fsSL https://openclaw.ai/install.sh | bash - Clone this template:
git clone https://github.com/kindomLee/openclaw-workspace-template.git cd openclaw-workspace-template - Run the bootstrap script:
chmod +x bootstrap.sh ./bootstrap.sh - Point OpenClaw to your new workspace:
openclaw config set agents.defaults.workspace /path/to/your/workspace openclaw gateway restart - Fill in
USER.mdandIDENTITY.mdwith your specific information - Start chatting β your agent will use the workspace files automatically
Directory Structure
clawd/ # Your workspace root
βββ AGENTS.md # Core agent instructions and workflows
βββ SOUL.md # Personality and interaction guidelines
βββ IDENTITY.md # Agent identity configuration
βββ USER.md # Information about the human user
βββ TOOLS.md # Tool references and quick commands
βββ MEMORY.md # Long-term curated memory
βββ HEARTBEAT.md # Heartbeat check instructions
βββ memory/ # Daily memory logs
β βββ YYYY-MM-DD.md # Date-specific memory files
βββ .learnings/ # Self-improvement tracking
β βββ ERRORS.md # Error tracking and fixes
β βββ LEARNINGS.md # Knowledge gaps and improvements
β βββ FEATURE_REQUESTS.md # New capability requests
βββ guides/ # Implementation guides
β βββ self-improvement.md # How to implement learning systems
β βββ routine-checks.md # Automated monitoring setup
β βββ sub-agent-patterns.md # Task delegation patterns
β βββ multi-instance.md # Multiple agent instance setup
βββ skills/ # Starter agent skills
β βββ memory/ # Memory management skill
β βββ write-tmp/ # Temp file writing workaround
β βββ telegram-html-reply/ # Rich HTML replies for Telegram
β βββ obsidian-markdown/ # Obsidian-flavored markdown
βββ scripts/ # Utility scripts
βββ reference/ # Documentation and references
βββ tmp/ # Temporary files
Guides Overview
Self-Improvement Guide (guides/self-improvement.md)
Learn how to implement systematic self-improvement in your AI agent, including error tracking, learning from corrections, and building long-term capabilities.
Routine Checks Guide (guides/routine-checks.md)
Set up automated monitoring and maintenance workflows, from simple health checks to complex analytical tasks.
Sub-agent Patterns Guide (guides/sub-agent-patterns.md)
Master the patterns for delegating complex tasks to specialized sub-agents, including communication protocols and error handling.
Multi-instance Guide (guides/multi-instance.md)
Run multiple specialized agent instances for different purposes, with proper isolation and resource management.
Getting Started
After running bootstrap.sh, you'll have a complete workspace template. The key files to customize are:
- USER.md - Information about yourself and your preferences
- IDENTITY.md - Your agent's personality and identity
- TOOLS.md - Add your specific tools and services
- AGENTS.md - Customize workflows for your use case
Requirements
- OpenClaw v1.x or higher
- Unix-like operating system (Linux, macOS, WSL)
- Basic shell environment
License
MIT
This template represents real-world patterns from a production OpenClaw deployment. Adapt and modify as needed for your specific use case.
No comments yet.