opencortexSelf-improving memory architecture for OpenClaw agents. Structured memory files, nightly distillation, weekly synthesis, enforced principles (P0 for custom,...
Install via ClawdBot CLI:
clawdbot install JD2005L/opencortexTransform a default OpenClaw agent into one that compounds knowledge daily.
š¦ Full source on GitHub ā review the code, file issues, or contribute.
OPENCORTEX_VOICE_PROFILE=1)vault.sh rotate) and validates key names on vault.sh setPrerequisites (install these separately if you don't have them):
# 1. Download the skill from your OpenClaw workspace directory
cd ~/clawd # or wherever your workspace is
clawhub install opencortex
# 2. Run the installer FROM YOUR WORKSPACE DIRECTORY (not from inside the skill folder)
bash skills/opencortex/scripts/install.sh
# Optional: preview what would be created without changing anything
bash skills/opencortex/scripts/install.sh --dry-run
The installer will ask about optional features (encrypted vault, voice profiling, infrastructure collection, git backup). It's safe to re-run ā it skips anything that already exists. The installer itself makes no network calls ā it only creates local files and registers cron jobs.
# 3. Verify everything is working (read-only ā checks files and cron jobs, changes nothing)
bash skills/opencortex/scripts/verify.sh
You can also ask your OpenClaw agent "is OpenCortex working?" ā it knows how to run the verification and share results.
The script will:
After install, review and customize:
SOUL.md ā personality and identity (make it yours)USER.md ā info about your humanMEMORY.md ā principles (add/remove as needed).secrets-map ā add your actual secrets for git scrubbing# 1. Download the latest version (run from workspace root)
clawhub install opencortex --force
# 2. Re-run the installer ā it detects your existing install and offers to update
bash skills/opencortex/scripts/install.sh
The installer detects your existing version and offers three options: Update (recommended), Full reinstall, or Cancel. The update path is non-destructive ā it adds missing content, refreshes cron messages, and offers any new optional features without overwriting your customized files.
SOUL.md ā Identity, personality, boundaries
AGENTS.md ā Operating protocol, delegation rules
MEMORY.md ā Principles + memory index (< 3KB, loaded every session)
TOOLS.md ā Tool shed: APIs, scripts, and access methods with abilities descriptions
INFRA.md ā Infrastructure atlas: hosts, IPs, services, network
USER.md ā Human's preferences, projects, communication style
BOOTSTRAP.md ā First-run checklist for new sessions
memory/
projects/ ā One file per project (distilled, not raw)
contacts/ ā One file per person/org (role, context, preferences)
workflows/ ā One file per workflow/pipeline (services, steps, issues)
runbooks/ ā Step-by-step procedures (delegatable to sub-agents)
preferences.md ā Cross-cutting user preferences by category
archive/ ā Archived daily logs + weekly summaries
YYYY-MM-DD.md ā Today's working log (distilled nightly)
| # | Name | Purpose |
|---|------|---------|
| P1 | Delegate First | Assess tasks for sub-agent delegation; stay available |
| P2 | Write It Down | Commit to files, not mental notes |
| P3 | Ask Before External | Confirm before emails, public posts, destructive ops |
| P4 | Tool Shed & Workflows | Document tools and workflows; enforced by nightly audit |
| P5 | Capture Decisions & Preferences | Record decisions and preferences; enforced by nightly + weekly audit |
| P6 | Sub-agent Debrief | Delegated work feeds back to daily log; orphans recovered by distillation |
| P7 | Log Failures | Tag failures/corrections; root cause analysis enforced by nightly audit |
| P8 | Check the Shed First | Consult TOOLS.md/INFRA.md/memory before deferring work to user; enforced by nightly audit |
| Schedule | Name | What it does |
|----------|------|-------------|
| Daily 3 AM (local) | Distillation | Reads daily logs ā distills into project/tools/infra files ā audits tools/decisions/debriefs/failures ā optimizes ā archives |
| Weekly Sunday 5 AM | Synthesis | Reviews week for patterns, recurring problems, unfinished threads, decisions; auto-creates runbooks from repeated procedures |
Both jobs use a shared lockfile (/tmp/opencortex-distill.lock) to prevent conflicts when daily and weekly runs overlap.
Customize times by editing cron jobs: openclaw cron list then openclaw cron edit .
If enabled during install, creates:
scripts/git-backup.sh ā auto-commit every 6 hours, scrubs secrets in an isolated temp copy (workspace files never modified).secrets-map ā maps secrets to placeholders (gitignored, 600 perms)Add secrets to .secrets-map in format: actual_secret|{{PLACEHOLDER_NAME}}
Before each push, git-backup.sh verifies no raw secrets remain in the scrubbed copy. If any are found, the backup is aborted ā nothing reaches the remote.
Adding a project: Create memory/projects/my-project.md, add to MEMORY.md index.
Adding a contact: Create memory/contacts/name.md. Distillation auto-creates contacts from conversations.
Adding a workflow: Create memory/workflows/my-pipeline.md. Distillation auto-creates workflows when described.
Adding a preference: Append to memory/preferences.md under the right category. Distillation auto-captures from conversation.
Adding a principle: Append to MEMORY.md under š“ PRINCIPLES. Keep it short.
Adding a runbook: Create memory/runbooks/my-procedure.md. Sub-agents can follow these directly.
Adding a tool: Add to TOOLS.md with: what it is, how to access it, and a goal-oriented abilities description (so future intent-based lookup matches).
Daily work ā daily log
ā nightly distill ā routes to project/tools/infra/principles files
ā optimization pass (dedup, prune stale, condense)
ā weekly synthesis ā patterns, recurring problems, unfinished threads ā auto-creates runbooks from repeated procedures ā `memory/runbooks/`
Sub-agent work ā debrief (P6) ā daily log ā same pipeline
Decisions ā captured with reasoning (P5) ā never re-asked
New tools ā documented with abilities (P4) ā findable by intent
Each day the agent wakes up slightly more knowledgeable and better organized.
Generated Mar 1, 2026
A research team uses OpenCortex to capture daily experiment results, literature insights, and failure analyses into structured memory files. The nightly distillation ensures findings are synthesized into permanent knowledge, preventing loss of critical data across projects and enabling weekly pattern recognition for breakthrough identification.
A customer support agent integrates OpenCortex to organize common issues, solutions, and user interactions into structured memory. This allows the agent to recall past cases accurately, improve response consistency over time, and build a voice profile for authentic communication, reducing reliance on manual documentation.
An individual sets up OpenCortex with a new OpenClaw instance to manage daily tasks, notes, and goals. The self-improving memory architecture helps the agent learn user preferences and habits through nightly distillation, optimizing task recommendations and reducing repetitive instructions over time.
A development team bootstraps a fresh OpenClaw agent with OpenCortex to capture coding standards, project documentation, and decision logs. The enforced principles ensure tool usage is documented and failures are analyzed, accelerating new member onboarding and maintaining institutional knowledge.
A healthcare organization uses OpenCortex to structure memory for handling sensitive patient interaction logs and regulatory guidelines. With encrypted vaults and opt-in features disabled by default, it ensures data security while enabling knowledge compounding for improved compliance tracking and audit trails.
Offer OpenCortex as a managed service with premium features like enhanced metrics dashboards, priority support, and automated backup integrations. Revenue is generated through monthly or annual subscriptions per user or team, targeting organizations needing scalable memory architecture solutions.
Sell enterprise licenses that include custom integrations, on-premise deployment support, and tailored training sessions. Revenue comes from one-time licensing fees and ongoing maintenance contracts, focusing on large corporations with strict security and compliance requirements.
Provide OpenCortex as a free open-source tool with basic features, while monetizing through premium add-ons such as advanced analytics, voice profiling enhancements, and dedicated infrastructure collection tools. Revenue is generated from sales of these optional modules to individual users and small teams.
š¬ Integration Tip
Ensure all prerequisite binaries like grep and sed are installed before running the installer, and set environment variables like CLAWD_WORKSPACE for custom workspace paths to avoid setup errors.
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