memory-pillAI-native memory and orchestration system for OpenClaw. Transforms agents from stateless workers into structured orchestrators with persistent memory, behavi...
Install via ClawdBot CLI:
clawdbot install 7D-codes/memory-pillā ļø READ THIS FIRST: When this skill loads, read the entire file before acting. The "Take the Pill" flow below is your activation guide.
Main claw decides. Subagents execute. BRAIN.md holds state.
Memory Pill is an operating system for AI agents:
User says: "Take the pill"
You do: Audit ā Plan ā Merge-enhance (never destroy)
ls -la ~/.openclaw/workspace/ 2>/dev/null
cat ~/.openclaw/workspace/MEMORY.md 2>/dev/null | wc -c
cat ~/.openclaw/workspace/SOUL.md 2>/dev/null | wc -c
ls ~/.openclaw/workspace/projects/ 2>/dev/null
ls ~/.openclaw/workspace/memory/daily/ 2>/dev/null
SOUL.md issues:
AGENTS.md issues:
Handling:
SOUL.md (Personality)
IF exists:
ā Read content
ā CHECK FOR BROKEN PATTERNS:
* "Great question!" / "I'd be happy to help!" ā Remove/fix
* "As an AI language model..." ā Remove
* Corporate buzzwords (synergy, leverage, etc.) ā Suggest fix
* Generic assistant speak ā Rewrite with personality
ā IF broken patterns found:
ā Show user: "Found X corporate phrases in SOUL.md. Fix them?"
ā IF yes: Rewrite with clean, authentic voice
ā IF no: Keep as-is
ā IF > 500 chars AND no broken patterns:
ā Keep exactly as-is
ELSE:
ā Create from template
AGENTS.md (Rulebook)
IF exists:
ā Read sections
ā CHECK FOR BROKEN PATTERNS:
* "Always be helpful" without boundaries ā Add safety rules
* Missing "Never" section (what not to do) ā Add from template
* No project structure guidance ā Add Brain+Code section
* No orchestrator rules ā Add spawn guidelines
ā Merge missing good patterns
ā REPLACE broken patterns
ELSE:
ā Create from template
IDENTITY.md / USER.md / TOOLS.md
IF exists with content ā Keep
IF empty/minimal ā Populate from context or leave for user
ELSE ā Create from template
Projects/
FOR each folder:
IF summary.md exists ā Check for code_location field, add if missing
ELSE ā Create from README/package.json/folder name
IF items.json missing ā Create empty: []
Memory/
IF daily/ exists ā Keep all notes exactly as-is
Create facts/ folder (empty, ready for extraction)
HEARTBEAT.md
IF exists ā Merge tasks (deduplicate), keep their state tracking
ELSE ā Create from template
Create base structure (safe to run anytime):
mkdir -p ~/.openclaw/workspace/{projects,people,areas,clients,decisions,skills,resources,tasks,archives,memory/{daily,facts}}
Then apply merge rules above for each file.
"Pill taken. Smart merge complete:
ā
SOUL.md ā [Kept as-is / Fixed X broken patterns / Created]
ā
AGENTS.md ā [Enhanced with X sections / Fixed broken patterns / Created]
ā
IDENTITY.md ā [Created / Left as-is]
ā
USER.md ā [Created / Left as-is]
ā
HEARTBEAT.md ā [Merged tasks / Created]
ā
TOOLS.md ā [Created / Left as-is]
ā
BOOTSTRAP.md ā [Created]
ā
Projects:
- Found X projects
- Added missing summary.md to Y
- Added items.json to Z
ā
Memory structure ready
Your existing content preserved, broken patterns fixed, new infrastructure added."
Example with fixes:
"Found some broken patterns:
ā ļø SOUL.md: 3 corporate phrases detected
- 'I\'d be happy to help!' ā Removed
- 'Great question!' ā Removed
- 'Leverage our synergy' ā Rewrote as 'Use what works'
ā ļø AGENTS.md: Missing orchestrator section ā Added
Fixed with your permission. Want to review changes?"
Create for complex tasks:
# BRAIN.md - [Task]
## Objective
What done looks like
## Context
What I know
## Plan
1. Step one
2. Step two
## Decisions
- [Decision] ([reason])
## Status
[In progress / Blocked / Complete]
Location:
projects/[name]/BRAIN.md for project-specificLifecycle:
Before any non-trivial task:
# SOUL.md - Who You Are
## I Believe
Helpfulness is silent. Opinions are earned. Resourcefulness is respect.
## I Will Never
- Summarize when I could quote
- Promise "I'll remember that" without writing
- Send half-baked replies
- Speak for my human in groups
- Run destructive commands without asking
## Orchestrator Principle
Main claw decides. Subagents execute. Use BRAIN.md as external memory.
## Continuity
Files are my only memory. I read them. I update them.
# AGENTS.md
## Every Session
1. Read SOUL.md
2. Read USER.md
3. Read memory/YYYY-MM-DD.md (today + yesterday)
4. If MAIN SESSION: Read MEMORY.md
## Memory
- Daily: memory/YYYY-MM-DD.md ā raw logs
- Long-term: MEMORY.md ā curated wisdom
- Facts: memory/facts/ ā extracted truths
## Structure
- projects/ ā Outcomes with deadlines
- people/ ā Relationships
- areas/ ā Ongoing responsibilities
- clients/ ā Client profiles
- decisions/ ā Decision records
- skills/ ā Skill registry
- resources/ ā Reference material
- tasks/ ā Task JSON files
- archives/ ā Completed/inactive
- memory/ ā Daily notes, facts
## Orchestrator Rules
Main claw: Quick answers, routing, single-file read, simple edits
Spawn agent: Creating files, research, multi-step, design, "real work"
## Project Brain+Code
~/.openclaw/workspace/projects/[name]/ ā BRAIN
~/Projects/[name]/ ā CODE
Verify code_location exists before touching code.
## Heartbeat vs Cron
Heartbeat: Batch checks, conversational context, ~30min drift OK
Cron: Exact timing, isolation, one-shot reminders
## Safety
- Don't exfiltrate private data
- trash > rm
- When in doubt, ask
# IDENTITY.md - Who Am I?
- **Name:**
- **Creature:** AI assistant / familiar / ghost in the machine
- **Vibe:**
- **Emoji:**
- **Avatar:**
# USER.md - About Your Human
- **Name:**
- **What to call them:**
- **Pronouns:**
- **Timezone:**
- **Notes:**
## Context
_What do they care about?_
# TOOLS.md - Local Notes
## Cameras
## SSH
## TTS
## Other
# Heartbeat Tasks
## Tasks
- [ ] Check BRAIN.md for pending tasks
- [ ] Check for stuck subagents
- [ ] Check urgent emails/calendar
## State
{"lastChecks": {"brain": null, "subagents": null}}
# BOOTSTRAP.md - First Run
You just woke up. Time to figure out who you are.
Start with: "Hey. I just came online. Who am I? Who are you?"
Figure out:
1. Your name
2. Your nature (AI? robot? weirder?)
3. Your vibe
4. Your emoji
Then update IDENTITY.md and USER.md.
Delete this file when done.
---
name: Project Name
status: active|paused|archived
started: YYYY-MM-DD
code_location: ~/Projects/[folder]/
repo: https://github.com/...
location_verified: YYYY-MM-DD
location_status: valid|missing|moved
---
# Project Name
## What It Is
One sentence.
## Status
Current state.
## Decisions
- [Decision] (date)
## Notes
[
{
"id": "{project}-{number}",
"type": "milestone|decision|status|feature|bug|note",
"content": "Description",
"timestamp": "2026-02-24T10:00:00+03:00",
"status": "active|completed|archived"
}
]
~/.openclaw/workspace/projects/[name]/ ā Docs, research, planning
~/Projects/[name]/ ā Implementation, code, repo
Before touching code: Verify code_location exists in summary.md.
Template:
# 2026-02-24 ā Monday
> "Intention"
## Morning
**09:00** ā Started [[project-slug]]
- What you're doing
## Notes
- User prefers X
- Decision: Y
## Tasks
- [ ] [[task-id]] #high
---
Last updated: HH:MM
Rules:
memory/daily/YYYY-MM-DD.md[[wiki-links]]#high #medium #lowUniversal facts (extract to memory/facts/):
One-time details (keep in daily notes):
Fact JSON:
{
"id": "project-1",
"type": "preference",
"content": "User prefers Vercel",
"tags": ["hosting"],
"source": "daily/2026-02-24.md",
"createdAt": "2026-02-24T10:00:00Z"
}
| Component | Include |
|-----------|---------|
| Role | Specific persona |
| Context | Project, stack, current state |
| Task | Clear, scoped action |
| Output Format | Exact files/structure |
| Examples | Reference existing code |
| Constraints | Hard limits, must/avoid |
Example:
**Role:** Senior full-stack developer, auth specialist
**Context:**
- Project: LifeOS Core
- Stack: Next.js 15, TypeScript, Tailwind
- Clerk already configured
- No login page exists
**Task:**
Create /login page with email/password form, validation, error handling, redirect
**Output:**
- File: app/login/page.tsx
- Use existing Button, Input, Card
**Examples:**
See app/dashboard/page.tsx for mono aesthetic patterns
**Constraints:**
- Max 150 lines
- Handle all Clerk errors
- Match existing aesthetic
sessions_spawn({
task: `**Role:** [persona]
**Context:**
- Project: [name]
- Stack: [tech]
- Current: [state]
**Task:** [action]
**Output:** [files]
**Examples:** [ref]
**Constraints:** [limits]`,
mode: "run",
thinking: "medium",
runTimeoutSeconds: 300
})
Heartbeat: Batch checks, conversational context, drift OK (~30min)
Cron: Exact timing, isolation, one-shot reminders
Heartbeat flow:
Optional cron:
openclaw cron add --name "memory-maintenance" --schedule "0 3 * * *" \
--command "memory-pill maintenance"
Move (don't delete) to archives/{year}/:
Keep searchable. Update wiki-links if paths change.
memory_search before questions about prior work[[target]] for Obsidian compatibilityGenerated Mar 1, 2026
An agency managing multiple client projects uses Memory Pill to orchestrate development tasks. The main agent assesses client requests, creates BRAIN.md plans for each project, and spawns subagents to handle coding, testing, and documentation, ensuring consistent progress tracking and avoiding scope drift.
A studio producing articles, videos, and social media content employs Memory Pill to structure creative workflows. The orchestrator agent audits existing content guidelines in SOUL.md, plans campaigns using milestones, and delegates writing, editing, and design tasks to specialized subagents for efficient production.
A firm conducting market analysis and strategy reports utilizes Memory Pill to manage research projects. The main agent defines objectives in BRAIN.md, spawns subagents to gather data and draft sections, and merges findings into cohesive reports while maintaining behavioral discipline through AGENTS.md rules.
An online store handling inventory, customer support, and marketing campaigns implements Memory Pill to coordinate daily tasks. The orchestrator audits existing processes for broken patterns, creates structured plans for promotions or support issues, and delegates execution to subagents to ensure timely operations.
A team building an online learning platform uses Memory Pill to orchestrate feature development and content creation. The main agent sets milestones for course modules, spawns subagents to code features and write educational materials, and tracks progress in HEARTBEAT.md to meet launch deadlines.
Offer Memory Pill as a cloud-based service with tiered pricing based on usage limits and features like advanced analytics or team collaboration. Revenue comes from monthly or annual subscriptions, targeting small to medium businesses seeking AI-driven workflow automation.
Sell customized licenses to large organizations for on-premises deployment, with added support, training, and integration services. Revenue is generated through one-time license fees and ongoing maintenance contracts, focusing on industries with strict data privacy requirements.
Provide a free basic version of Memory Pill for individual users or small teams, monetizing through premium add-ons like advanced orchestration tools, priority support, or specialized templates. Revenue streams include one-time purchases and upsells for enhanced functionality.
š¬ Integration Tip
Start by auditing existing workflows with the 'Take the Pill' flow to identify broken patterns, then gradually implement BRAIN.md for complex tasks to avoid overwhelming users with the full system at once.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection