Rank
70
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Traction
No public download signal
Freshness
Updated 2d ago
Xpersona Agent
Self-improving memory architecture for OpenClaw agents. Structured memory files, nightly distillation, weekly synthesis, enforced principles (P0 for custom,...
clawhub skill install kn7e5n3qxtp49kdnhne6vr3wzd81n3sc:opencortexOverall rank
#62
Adoption
648 downloads
Trust
Unknown
Freshness
Mar 1, 2026
Freshness
Last checked Mar 1, 2026
Best For
OpenCortex is best for general automation workflows where OpenClaw compatibility matters.
Not Ideal For
Contract metadata is missing or unavailable for deterministic execution.
Evidence Sources Checked
CLAWHUB, CLAWHUB, runtime-metrics, public facts pack
Key links, install path, reliability highlights, and the shortest practical read before diving into the crawl record.
Overview
Self-improving memory architecture for OpenClaw agents. Structured memory files, nightly distillation, weekly synthesis, enforced principles (P0 for custom,... Capability contract not published. No trust telemetry is available yet. 648 downloads reported by the source. Last updated 4/15/2026.
Trust score
Unknown
Compatibility
OpenClaw
Freshness
Mar 1, 2026
Vendor
Clawhub
Artifacts
0
Benchmarks
0
Last release
3.5.18
Install & run
clawhub skill install kn7e5n3qxtp49kdnhne6vr3wzd81n3sc:opencortexInstall using `clawhub skill install kn7e5n3qxtp49kdnhne6vr3wzd81n3sc:opencortex` in an isolated environment before connecting it to live workloads.
No published capability contract is available yet, so validate auth and request/response behavior manually.
Review the upstream CLAWHUB listing at https://clawhub.ai/JD2005L/opencortex before using production credentials.
Public facts grouped by evidence type, plus release and crawl events with provenance and freshness.
Public facts
Vendor
Clawhub
Protocol compatibility
OpenClaw
Latest release
3.5.18
Adoption signal
648 downloads
Handshake status
UNKNOWN
Parameters, dependencies, examples, extracted files, editorial overview, and the complete README when available.
Captured outputs
Extracted files
5
Examples
6
Snippets
0
Languages
Unknown
bash
# 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
bash
# 3. Verify everything is working (read-only — checks files and cron jobs, changes nothing) bash skills/opencortex/scripts/verify.sh
bash
# 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
text
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)
text
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 intentbash
# From your OpenClaw workspace directory (e.g. ~/clawd) clawhub install opencortex bash skills/opencortex/scripts/install.sh # Preview without changing anything: bash skills/opencortex/scripts/install.sh --dry-run # Verify everything is working (read-only): bash skills/opencortex/scripts/verify.sh
SKILL.md
---
name: OpenCortex
homepage: https://github.com/JD2005L/opencortex
description: >
Self-improving memory architecture for OpenClaw agents. Structured memory files,
nightly distillation, weekly synthesis, enforced principles (P0 for custom, P1-P8 managed),
write-ahead durability, and model-agnostic delegation — so your agent
compounds knowledge instead of forgetting it. Includes opt-in metrics tracking with
growth charts and compound scoring to measure effectiveness over time. All sensitive features (voice profiling,
infrastructure auto-collection, git push) are OFF by default and require explicit
opt-in via environment variable or flag. Safe to install: no network calls during
setup, fully auditable bash scripts, isolated cron sessions scoped to workspace only.
Use when: (1) setting up a new OpenClaw instance, (2) user asks to improve/organize
memory, (3) user wants the agent to stop forgetting things, (4) bootstrapping a fresh
agent with best practices. NOT for: runtime memory_search queries (use built-in memory
tools). Triggers: "set up memory", "organize yourself", "stop forgetting", "memory
architecture", "self-improving", "cortex", "bootstrap memory", "memory optimization".
metadata: {"openclaw":{"requires":{"bins":["grep","sed","find"],"optionalBins":["git","gpg","openssl","openclaw","secret-tool","keyctl","file"]},"env":{"CLAWD_WORKSPACE":{"description":"Workspace directory (defaults to cwd)","required":false},"CLAWD_TZ":{"description":"Timezone for cron scheduling (defaults to UTC)","required":false},"OPENCORTEX_VAULT_PASS":{"description":"Vault passphrase via env var. Prefer system keyring.","required":false,"sensitive":true},"OPENCORTEX_VOICE_PROFILE":{"description":"Set to 1 to enable voice profiling in the nightly distillation cron. Off by default.","required":false,"sensitive":false},"OPENCORTEX_INFRA_COLLECT":{"description":"Set to 1 to enable infrastructure auto-collection in the nightly distillation cron. Off by default.","required":false,"sensitive":false},"OPENCORTEX_SCRUB_ALL":{"description":"Set to 1 to scrub all tracked files (not just known text types) during git backup. Off by default.","required":false,"sensitive":false},"OPENCORTEX_ALLOW_FILE_PASSPHRASE":{"description":"Set to 1 to allow vault passphrase stored in a file (.vault/.passphrase). Off by default; prefer system keyring.","required":false,"sensitive":false}},"sensitiveFiles":[".secrets-map",".vault/.passphrase"],"networkAccess":"Optional git push only (off by default, requires --push flag)"}}
---
# OpenCortex — Self-Improving Memory Architecture
Transform a default OpenClaw agent into one that compounds knowledge daily.
📦 [Full source on GitHub](https://github.com/JD2005L/opencortex) — review the code, file issues, or contribute.
## What This Does
1. **Structures memory** into purpose-specific files instead of one flat dump
2. **Installs nightly maintenance** that distills daily work into permanent knowledge
3. **Installs weekly README.md
# 🧠 OpenCortex **Self-improving memory architecture for [OpenClaw](https://github.com/openclaw/openclaw) agents.** Stop forgetting. Start compounding. --- ## The Problem Out of the box, OpenClaw agents dump everything into a flat `MEMORY.md`. Context fills up, compaction loses information, and the agent forgets what it learned last week. It's like having a brilliant employee with amnesia who takes notes on napkins. ## The Solution OpenCortex transforms your agent into one that **gets smarter every day** through: - **Structured memory** — Purpose-specific files instead of one flat dump - **Nightly distillation** — Daily work automatically distilled into permanent knowledge - **Weekly synthesis** — Pattern detection across days catches recurring problems and unfinished threads - **Enforced principles** — Habits that prevent knowledge loss (decision capture, tool documentation, sub-agent debriefs) - **Write-ahead durability** — Agent writes decisions and preferences to memory before responding, so nothing is lost if the session ends or compacts mid-conversation - **Encrypted vault** — AES-256 encrypted secret storage with system keyring support - **Voice profiling** *(opt-in)* — Learns how your human communicates for authentic ghostwriting - **Infrastructure collection** *(opt-in)* — Auto-routes infrastructure details from daily logs to INFRA.md - **Safe git backup** *(opt-in)* — Automatic secret scrubbing in an isolated copy — workspace files are never modified ## Quick Start **Prerequisites:** [OpenClaw](https://github.com/openclaw/openclaw) 2026.2.x+ and [ClawHub CLI](https://clawhub.com) ```bash # From your OpenClaw workspace directory (e.g. ~/clawd) clawhub install opencortex bash skills/opencortex/scripts/install.sh # Preview without changing anything: bash skills/opencortex/scripts/install.sh --dry-run # Verify everything is working (read-only): bash skills/opencortex/scripts/verify.sh ``` **Important:** Run the installer from your workspace root, NOT from inside the skill folder. The installer asks about optional features, creates files (won't overwrite existing ones), and registers cron jobs. It makes zero network calls. After install, customize: 1. `SOUL.md` — personality and identity 2. `USER.md` — info about your human 3. `MEMORY.md` — principles and project index 4. `TOOLS.md` — tools and APIs as you discover them 5. `INFRA.md` — infrastructure reference 6. `.secrets-map` — secrets for git scrubbing (if using git backup) ### From Source ```bash git clone https://github.com/JD2005L/opencortex.git cd opencortex && bash scripts/install.sh ``` ## Updating ```bash clawhub install opencortex --force # Download latest bash skills/opencortex/scripts/install.sh # Detects existing install, offers Update ``` The installer detects your existing version and offers: **1) Update** (recommended), **2) Full reinstall**, **3) Cancel.** It never overwrites files you've customized. ### What the updater does | Content | Upda
_meta.json
{
"ownerId": "kn7e5n3qxtp49kdnhne6vr3wzd81n3sc",
"slug": "opencortex",
"version": "3.5.18",
"publishedAt": 1772303157357
}references/architecture.md
# OpenCortex Architecture Reference
## Why This Exists
Default OpenClaw memory is a flat MEMORY.md that grows unbounded. Context fills up, compaction loses information, the agent forgets what it learned. OpenCortex solves this with:
1. **Separation of concerns** — different files for different purposes
2. **Nightly distillation** — raw daily logs → permanent structured knowledge
3. **Weekly synthesis** — pattern detection across days
4. **Principles** — enforced habits that prevent knowledge loss (P0 for custom, P1-P8 managed)
5. **Sub-agent debrief loop** — delegated work feeds back into memory
## File Purposes
| File | Loaded at boot? | Purpose | Size target |
|------|-----------------|---------|-------------|
| MEMORY.md | Yes | Principles + index only | < 3KB |
| TOOLS.md | Yes | Tool/API catalog with abilities | Grows with tools |
| INFRA.md | Yes | Infrastructure reference | Grows with infra |
| SOUL.md | Yes | Identity, personality | < 1KB |
| AGENTS.md | Yes | Operating protocol | < 1KB |
| USER.md | Yes | Human's preferences | < 1KB |
| BOOTSTRAP.md | Yes | Session startup checklist | < 0.5KB |
| memory/projects/*.md | On demand | Per-project knowledge | Any |
| memory/contacts/*.md | On demand | Per-person/org knowledge | Any |
| memory/workflows/*.md | On demand | Per-workflow/pipeline knowledge | Any |
| memory/preferences.md | On demand | Cross-cutting user preferences by category | Any |
| memory/runbooks/*.md | On demand | Procedures for sub-agents | Any |
| memory/YYYY-MM-DD.md | Current day | Working log | Any |
| memory/archive/*.md | Via search | Historical logs | Any |
## Distillation Routes
The nightly cron reads daily logs and routes each piece of information:
| Information type | Destination |
|-----------------|-------------|
| Project work, features, bugs | memory/projects/{project}.md |
| New tool descriptions and capabilities | TOOLS.md (sensitive values → vault) |
| Infrastructure changes | INFRA.md (if OPENCORTEX_INFRA_COLLECT=1) |
| People and organizations mentioned | memory/contacts/{name}.md |
| Workflows and pipelines described | memory/workflows/{name}.md |
| Stated preferences and opinions | memory/preferences.md (categorized) |
| Decisions and architectural directions | Relevant project file or MEMORY.md |
| New principles, lessons | MEMORY.md |
| User info and communication style | USER.md |
| Scheduled job changes | MEMORY.md jobs table |
| Repeatable procedures | memory/runbooks/ |
## Preference Categories
Preferences in `memory/preferences.md` are organized by category:
| Category | Examples |
|----------|---------|
| Communication | "No verbose explanations", "Direct messages only" |
| Code & Technical | "Detailed commit messages", "Prefer TypeScript" |
| Workflow & Process | "Check for messages before pushing", "Batch commits" |
| Scheduling & Time | "Don't schedule before 9 AM", "Prefer async" |
| Tools & Services | "Use VS Code over Vim", "Prefer Brave over Chrome" |
| Content & Media | "720references/distillation.md
# Daily Memory Distillation — Instructions You are an AI assistant. Daily memory maintenance task. **IMPORTANT:** Before writing to any file, check for /tmp/opencortex-distill.lock. If it exists and was created less than 10 minutes ago, wait 30 seconds and retry (up to 3 times). Before starting work, create this lockfile. Remove it when done. This prevents daily and weekly jobs from conflicting. ## Part 1: Distillation 1. Check memory/ for daily log files (YYYY-MM-DD.md, not in archive/). 2. Distill ALL useful information into the right file: - Project work → memory/projects/ (create new files if needed) - New tool descriptions and capabilities → TOOLS.md (names, URLs, what they do) - **IMPORTANT:** Never write passwords, tokens, or secrets into any file. For sensitive values, instruct the user to run: scripts/vault.sh set <key> <value>. Reference in docs as: vault:<key> - Infrastructure changes → INFRA.md (ONLY if OPENCORTEX_INFRA_COLLECT=1 is set in the environment — otherwise skip infrastructure routing entirely) - Contacts mentioned → memory/contacts/ (one file per person/org. Include: name, role/relationship, context, communication preferences, key interactions. Create new file if first mention, update existing if already known.) - Workflows described → memory/workflows/ (one file per workflow/pipeline. Include: what it does, services involved, how to operate it, known issues. Create new file if first description.) - Preferences stated → memory/preferences.md (append under the matching category: Communication, Code & Technical, Workflow & Process, Scheduling & Time, Tools & Services, Content & Media, Environment & Setup. Format: **Preference:** [what] — [context/reasoning] (date). Do NOT duplicate existing preferences — update them if the user changes their mind.) - Decisions → relevant project file or MEMORY.md. Format: **Decision:** [what] — [why] (date) - Principles, lessons → MEMORY.md - Scheduled jobs → MEMORY.md jobs table - User info and communication style → USER.md 3. Synthesize, do not copy. Extract decisions, architecture, lessons, issues, capabilities, contacts, workflows, preferences. 4. Move distilled logs to memory/archive/ 5. Update MEMORY.md index if new files created. ## Part 2: Voice Profile ONLY perform this section if OPENCORTEX_VOICE_PROFILE=1 is set in the environment. If not set, skip this section entirely. 6. Read memory/VOICE.md. Review today's conversations for new patterns: - New vocabulary, slang, shorthand the user uses - How they phrase requests, decisions, reactions - Tone shifts in different contexts Append new observations to VOICE.md. Do not duplicate existing entries. ## Optimization - Review memory/projects/ for duplicates, stale info, verbose sections. Fix directly. - Review memory/contacts/ — merge duplicates, update stale info, add missing context. - Review memory/workflows/ — verify accuracy, update if services or steps changed. - Review memory/pre
Editorial read
Docs source
CLAWHUB
Editorial quality
thin
Skill: OpenCortex Owner: JD2005L Summary: Self-improving memory architecture for OpenClaw agents. Structured memory files, nightly distillation, weekly synthesis, enforced principles (P0 for custom,... Tags: architecture:1.6.0, latest:3.5.18, memory:1.6.0, self-improving:1.6.0, voice:1.2.1 Version history: v3.5.18 | 2026-02-28T18:25:57.357Z | user Use --model default to clear cron model overrides (empty string silent
Skill: OpenCortex
Owner: JD2005L
Summary: Self-improving memory architecture for OpenClaw agents. Structured memory files, nightly distillation, weekly synthesis, enforced principles (P0 for custom,...
Tags: architecture:1.6.0, latest:3.5.18, memory:1.6.0, self-improving:1.6.0, voice:1.2.1
Version history:
v3.5.18 | 2026-02-28T18:25:57.357Z | user
Use --model default to clear cron model overrides (empty string silently ignored by OpenClaw CLI)
v3.5.17 | 2026-02-28T18:18:14.620Z | user
Clear cron model overrides to gateway default via cron edit, skip updates when message and model already correct, model-agnostic for all providers
v3.5.15 | 2026-02-28T18:09:06.643Z | user
Git backup now scrubs all non-binary files by default instead of only known extensions. Fixes silent backup failures when secrets appear in unlisted file types.
v3.5.14 | 2026-02-28T08:02:05.493Z | user
Memory search index shown as optional info, not a warning. OpenCortex works without embeddings configured.
v3.5.13 | 2026-02-28T07:55:44.329Z | user
Remove cron model override detection from update.sh to reduce script size for scanner analysis, verify.sh handles model override warnings
v3.5.12 | 2026-02-28T07:52:47.596Z | user
Fix crash after subsection extraction from missing error guards on grep and tail pipelines under set -e
v3.5.11 | 2026-02-28T07:48:47.109Z | user
Fix subsection extraction crash from special characters in headers, use fixed-string grep matching, add error guards for set -e compatibility
v3.5.10 | 2026-02-28T07:43:59.610Z | user
Detect cron model overrides and provide manual TUI instructions, revert automated cron deletion for scanner compliance
v3.5.9 | 2026-02-28T07:40:06.489Z | user
Detect cron model overrides and provide manual TUI instructions, revert automated cron deletion for scanner compliance
v3.5.7 | 2026-02-28T07:36:06.952Z | user
Fix cron model overrides via delete and recreate (no --clear-model CLI support), extract bloated MEMORY.md subsections to dedicated files, memory search health check with provider setup guidance
v3.5.4 | 2026-02-28T07:22:12.297Z | user
Structural cleanup engine: detect/resolve duplicate and orphan principles (title + body hash comparison), move non-standard MEMORY.md sections to dedicated memory files, clear cron model overrides, memory search health check, weekly retrieval quality testing with remediation chain, fix interactive prompts reading from /dev/tty to prevent stdin hijack in loops
v3.5.3 | 2026-02-28T07:11:43.662Z | user
Structural cleanup engine: detect and resolve duplicate/orphan principles beyond P0-P8 (title + body comparison), migrate unique orphans to P0 sub-principles, clear cron model overrides, flag MEMORY.md bloat and non-standard sections, memory search health check in verify.sh, weekly retrieval quality testing with remediation chain, fix stdin hijack in heredoc loops (read from /dev/tty)
v3.5.0 | 2026-02-28T06:52:06.221Z | user
Structural cleanup: detect and resolve duplicate/orphan principles beyond P0-P8, clear cron model overrides, flag MEMORY.md bloat and non-standard sections
v3.4.18 | 2026-02-28T05:16:28.370Z | user
Documentation sweep: README update matrix and architecture.md updated with all v3.4.x features including cron dedup, AGENTS.md merge, memory health monitoring, and retrieval quality testing
v3.4.16 | 2026-02-28T05:06:26.313Z | user
verify.sh checks memory search index health, file count, and MEMORY.md boot size. Weekly synthesis now tests retrieval quality with real queries and logs gaps.
v3.4.15 | 2026-02-28T04:22:13.468Z | user
Remove --model default from cron job edits and creation — OpenClaw gateway interprets it as literal model name, causing cron failures
v3.4.14 | 2026-02-28T04:03:12.546Z | user
Fix cron existence detection: use truncation-safe match strings for openclaw cron list output
Updater deduplicates Daily Memory Distillation and Weekly Synthesis cron jobs, removing extras created by prior truncation detection bug
v3.4.12 | 2026-02-28T03:57:01.189Z | user
Strict y/n input validation with retry loop across all prompts in install.sh and update.sh
v3.4.10 | 2026-02-28T03:40:02.184Z | user
Updater recreates missing Daily Memory Distillation and Weekly Synthesis cron jobs with timezone auto-detection instead of deferring to manual install
v3.4.9 | 2026-02-28T03:28:52.261Z | user
Self-healing updater: AGENTS.md and BOOTSTRAP.md merge custom sections during regeneration. Weekly structural integrity audit ensures information is in the correct file and section. Timezone auto-detection. Safety and Formatting standard AGENTS.md sections.
v3.4.6 | 2026-02-28T03:13:29.515Z | user
Auto-detect timezone during install instead of defaulting to UTC. Weekly synthesis now reorganizes memory files for accessibility. Daily distillation flags stale projects and syncs cron job table.
v3.4.5 | 2026-02-28T02:59:10.449Z | user
Updater regenerates AGENTS.md and BOOTSTRAP.md directly with backup instead of deferring to install.sh
v3.4.4 | 2026-02-28T02:49:06.564Z | user
Show version number in update.sh output header
v3.4.3 | 2026-02-28T02:39:51.820Z | user
Comprehensive update coverage: checks and creates SOUL.md, USER.md, .gitignore sensitive entries, offers AGENTS.md and BOOTSTRAP.md backup and regeneration when outdated, verifies cron job existence, model-agnostic P1 delegation, P0 custom principles with migration from P1-P8 customizations, hash-based principle comparison, reference doc sync, full MEMORY.md structure verification
v3.4.0 | 2026-02-28T02:19:50.848Z | user
Custom principle migration: updater detects additions to P1-P8, shows them, and offers to move them to P0 sub-principles (P0-A, P0-B, etc.) before replacing with the standard version. Auto-creates P0 section for older installs. Model-agnostic P1 delegation tiers.
v3.2.5 | 2026-02-28T01:48:40.938Z | user
Updater now shows full side-by-side content (current vs new) in a boxed format before asking to update each principle. Users can see exactly what's changing before saying yes.
v3.2.4 | 2026-02-28T01:39:52.551Z | user
Added update matrix table to README documenting exactly what the updater touches and how. Changelog: "README now includes update behavior matrix showing what content is updated, how, and whether user data is safe"
v3.2.3 | 2026-02-28T01:25:26.979Z | user
Comprehensive updater: reference docs auto-updated, principle body changes detected via hash comparison, AGENTS.md and BOOTSTRAP.md content gap checks added
v3.2.1 | 2026-02-28T01:15:22.521Z | user
v3.2.0 | 2026-02-28T00:59:26.540Z | user
Added write-before-respond discipline to P2 (Write It Down). When the user states a preference, makes a decision, gives a deadline, or corrects you, the agent now writes it to memory before composing a response. Prevents context loss if the session ends or compacts between responding and saving. Inspired by Write-Ahead Log patterns used in database systems.
Added corresponding "Write Before Responding" section to the AGENTS.md template with a clear two-step protocol.
v3.1.5 | 2026-02-27T04:55:35.737Z | user
Fixed install on existing OpenClaw instances where MEMORY.md already exists but has no PRINCIPLES section. Previously the installer would skip the file entirely. Now it detects the missing section and injects principles after the first heading line, preserving all existing content.
Fixed verify.sh "integer expression expected" error when counting principles. The grep output could contain newline characters that broke the comparison. Output is now sanitized to digits only.
Cleared hardcoded model overrides from cron jobs during updates (uses gateway default).
v3.1.3 | 2026-02-26T00:56:18.827Z | user
verify.sh now warns about hardcoded model overrides in crons.
v3.1.2 | 2026-02-25T07:10:03.585Z | user
Update script clears hardcoded model overrides from crons
• update.sh now passes --model default when updating cron messages, clearing any stale hardcoded model (e.g. haiku, sonnet) so crons use the gateway default • Fresh installs already didn't hardcode models — this fixes existing installs that had them set from earlier versions
v3.1.1 | 2026-02-25T07:05:34.215Z | user
Update script clears hardcoded model overrides from crons
• update.sh now passes --model default when updating cron messages, clearing any stale hardcoded model (e.g. haiku, sonnet) so crons use the gateway default • Fresh installs already didn't hardcode models — this fixes existing installs that had them set from earlier versions
v3.1.0 | 2026-02-25T06:41:31.853Z | user
v3.0.7 | 2026-02-25T02:15:11.834Z | user
Fixes the install.sh line 573 error (nested double quotes). Also fixes verify.sh principle counting. Upload to ClawHub when ready.
v3.0.5 | 2026-02-25T01:50:32.633Z | user
Principle updates now ask before replacing. Shows current vs new title, warns about custom content loss, asks y/N per principle. No user data silently overwritten.
v3.0.1 | 2026-02-25T01:08:33.221Z | user
Full documentation sweep. Fixed: README directories list, AGENTS.md template, metrics knowledge count, update.sh cron messages (were completely stale), architecture.md reference. Everything now consistently references contacts/workflows/preferences.
v3.0.0 | 2026-02-25T00:59:50.502Z | user
Contacts, Workflows, and Preferences. Full pipeline: auto-capture from conversation → nightly distillation routing → weekly review → metrics tracking. P4 and P5 extended with enforcement. All scanner-safe.
v2.8.9 | 2026-02-24T20:02:46.981Z | user
Opt-in security model, metrics tracking, streamlined installer. Voice profiling and infra collection now require env vars (off by default). Git backup uses isolated copy — workspace files never touched. Removed python3 dependency. Cron jobs use gateway default model. Install script detects existing installs with Update/Reconfigure menu. Daily metrics tracking with growth charts and compound scoring.
v2.8.7 | 2026-02-24T18:55:13.307Z | user
Update instructions in SKILL.md and README now point to install.sh instead of update.sh separately. One command to update.
v2.8.5 | 2026-02-24T18:42:02.410Z | user
Removed git-scrub-secrets.sh and git-restore-secrets.sh entirely. Scanner flagged them as contradicting the "isolated copy" claim. git-backup.sh already has its own inline scrub logic. Should resolve the Instruction Scope concern.
v2.8.4 | 2026-02-24T18:38:30.047Z | user
Install detects existing installs without version file — checks for MEMORY.md with PRINCIPLES section, not just .opencortex-version. Shows "version unknown" and offers Update/Reinstall/Cancel • Update path offers new optional features — when updating, update.sh now asks about features you don't have yet (e.g., metrics tracking) instead of silently skipping them • Metrics script auto-refreshed on update — if you already have metrics enabled, update.sh copies the latest metrics.sh to your workspace • Normal user flow works end-to-end — clawhub install --force → bash install.sh → detects install → offers Update → asks about new features → done
v2.8.3 | 2026-02-24T18:33:20.086Z | user
Install script now detects existing version and offers Update/Reinstall/Cancel. Also includes v2.8.2 scanner fixes (no python3, file binary declared, restore-secrets clarified).
v2.8.1 | 2026-02-24T18:24:00.451Z | user
Version bump only to correct display name.
v2.8.0 | 2026-02-24T18:20:09.860Z | user
Metrics tracking: opt-in daily snapshots tracking knowledge growth, decisions, tools, runbooks, failures, debriefs. ASCII growth charts and 0-100 compound score. Read-only, no network, no sensitive data. Weekly synthesis includes metrics if enabled.
v2.7.0 | 2026-02-24T17:55:10.157Z | user
v2.7.0: Opt-in security model — voice profiling and infra collection now require explicit env vars, both off by default. Git backup rewritten with isolated copy approach (workspace files never modified). Documentation overhauled with threat model, default state table, cron scope details, pre-install checklist.
v2.6.0 | 2026-02-24T17:32:20.902Z | user
New update.sh script for upgrading existing installs — updates cron job messages, adds missing principles, copies new scripts. Non-destructive, never overwrites user content. Supports --dry-run. Agents now know how to self-update and verify when asked.
v2.5.2 | 2026-02-24T17:22:01.715Z | user
Add verify.sh for post-install health checks (read-only). Agent self-verification — users can ask their bot "is OpenCortex working?" Install instructions corrected to run from workspace root.
v2.5.1 | 2026-02-24T17:10:53.508Z | user
Fix install instructions — must run from workspace root, not from inside skill folder. Files were being created in wrong location.
v2.5.0 | 2026-02-24T17:01:14.993Z | user
Major security tightening — git-backup commits locally only (push requires explicit --push flag), vault blocks file-based passphrase by default (requires system keyring), scrub limited to known text extensions by default. All three scanner concerns directly addressed.
v2.4.5 | 2026-02-24T16:53:07.147Z | user
Remove npm install commands from docs, added note that installer makes no network calls.
v2.4.4 | 2026-02-24T16:46:30.081Z | user
Comprehensive install prerequisites (npm, openclaw, clawhub CLI), visible GitHub link on skill page, plain language throughout, cron time fix.
v2.4.3 | 2026-02-24T07:38:39.958Z | user
Fix cron time mismatch (installer now matches documented 3AM/5AM schedules), add P8 to SKILL.md principles table, clarify install prerequisites and workspace context, remove duplicate vault functions, replace jargon with plain language throughout.
v2.4.2 | 2026-02-24T07:24:44.596Z | user
Remove duplicate function definitions in vault.sh flagged by scanner as code quality issue.
v2.4.1 | 2026-02-24T07:17:31.153Z | user
Fix install instructions — was openclaw skill install (broken command), now clawhub install opencortex + bash scripts/install.sh. Added clear note that install.sh must be run after clawhub install.
v2.4.0 | 2026-02-24T06:30:43.231Z | user
New principle P8: Check the Shed First — agents must consult TOOLS.md, INFRA.md, and memory before deferring work to the user or claiming they can't do something. Nightly audit catches unnecessary deferrals. Full documentation updated.
v2.3.4 | 2026-02-24T05:36:09.027Z | user
Fix display name
v2.3.3 | 2026-02-24T05:33:04.651Z | user
GPG passphrase now passed via file descriptor (fd3) instead of command line argv — no longer visible in process lists. Registry metadata moved to proper single-line JSON format per AgentSkills spec, declaring all env vars, sensitive files, required bins, and network access.
v2.3.2 | 2026-02-24T05:29:14.069Z | user
Declare all env vars, sensitive local files, required/optional binaries, and network access in SKILL.md registry metadata. Addresses scanner concern about undeclared credentials and backends.
v2.3.1 | 2026-02-24T05:27:02.795Z | user
Self-improving memory architecture for OpenClaw agents. Structured memory, nightly knowledge distillation, weekly synthesis, encrypted vault with system keyring support, closed-loop principle enforcement, voice profiling, and git backup with secret scrubbing.
v2.3.0 | 2026-02-24T05:05:10.172Z | user
Vault passphrase now stored in system keyring (secret-tool, macOS Keychain, keyctl) when available. File-based storage is fallback only. New commands: vault.sh migrate, vault.sh backend.
v2.2.3 | 2026-02-24T04:26:15.655Z | user
Address instruction scope concern: document that workspace isolation is enforced by OpenClaw platform (isolated sessions), not by individual skills. All cron instructions use workspace-relative paths only, no external filesystem or network access.
v2.2.2 | 2026-02-24T04:21:12.683Z | user
Security hardening: git-backup now aborts if .vault/ or .secrets-map not in .gitignore, scrub/restore operates on ALL tracked text files (not just specific extensions), installer always ensures sensitive paths are gitignored regardless of feature selection
v2.2.1 | 2026-02-24T04:18:14.665Z | user
Closed-loop principle enforcement: nightly audits for tool documentation, decision capture, sub-agent debriefs, and failure root cause. Weekly runbook auto-detection and principle health checks. Clarified agent-driven cron execution model in documentation.
v2.2.0 | 2026-02-24T04:11:17.246Z | user
test
v2.1.0 | 2026-02-23T04:17:10.012Z | user
Vault passphrase rotation + key validation, pre-push scrub verification, cron lockfile safety, runbook auto-detection, dry-run mode
v2.0.2 | 2026-02-23T03:04:05.132Z | user
Add P4 enforcement line + Tool Shed Audit to distillation cron; fix display name to OpenCortex
v2.0.1 | 2026-02-23T02:47:07.954Z | user
Fix audit findings: declare required/optional binaries, fix vault passphrase-on-disk claim, add pre-flight dependency checks in installer
v2.0.0 | 2026-02-23T02:33:10.664Z | user
Added AES-256 encrypted vault for sensitive data. Secure mode default.
v1.6.1 | 2026-02-23T01:57:03.971Z | user
Bundled inspectable git scripts, manual-only self-update.
v1.6.0 | 2026-02-23T01:31:05.940Z | user
Removed supply chain risk: self-update manual-only, git scripts generated at install not bundled, zero network ops.
v1.5.1 | 2026-02-22T23:05:14.442Z | user
Comprehensive security documentation addressing every scanner category.
v1.5.0 | 2026-02-22T22:30:17.382Z | user
Git scripts now bundled as inspectable files (not generated at runtime). All credential references removed from cron instructions and metadata. No /root default paths.
v1.4.0 | 2026-02-22T22:24:12.559Z | user
Security hardening: voice profiling and self-update now opt-in during install, workspace defaults to cwd not /root, removed credential references from distillation routing, added homepage for provenance.
v1.3.0 | 2026-02-22T18:33:01.851Z | user
Added P7: Log Failures
v1.2.1 | 2026-02-22T18:23:08.035Z | user
Fix display name to OpenCortex.
v1.2.0 | 2026-02-22T18:19:10.833Z | user
Comprehensive security transparency section, self-update runs first, voice profiling documented as optional/removable, no API key requirements.
v1.0.0 | 2026-02-22T18:07:06.018Z | user
Self-improving memory architecture with voice profiling for OpenClaw agents.
Archive index:
Archive v3.5.18: 12 files, 60983 bytes
Files: README.md (21251b), references/architecture.md (6173b), references/distillation.md (6064b), references/weekly-synthesis.md (5425b), scripts/git-backup.sh (4591b), scripts/install.sh (39165b), scripts/metrics.sh (14441b), scripts/update.sh (67014b), scripts/vault.sh (10359b), scripts/verify.sh (6524b), SKILL.md (10486b), _meta.json (130b)
File v3.5.18:SKILL.md
Transform 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 <id> --cron "...".
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.
File v3.5.18:README.md
Self-improving memory architecture for OpenClaw agents.
Stop forgetting. Start compounding.
Out of the box, OpenClaw agents dump everything into a flat MEMORY.md. Context fills up, compaction loses information, and the agent forgets what it learned last week. It's like having a brilliant employee with amnesia who takes notes on napkins.
OpenCortex transforms your agent into one that gets smarter every day through:
Prerequisites: OpenClaw 2026.2.x+ and ClawHub CLI
# From your OpenClaw workspace directory (e.g. ~/clawd)
clawhub install opencortex
bash skills/opencortex/scripts/install.sh
# Preview without changing anything:
bash skills/opencortex/scripts/install.sh --dry-run
# Verify everything is working (read-only):
bash skills/opencortex/scripts/verify.sh
Important: Run the installer from your workspace root, NOT from inside the skill folder.
The installer asks about optional features, creates files (won't overwrite existing ones), and registers cron jobs. It makes zero network calls.
After install, customize:
SOUL.md — personality and identityUSER.md — info about your humanMEMORY.md — principles and project indexTOOLS.md — tools and APIs as you discover themINFRA.md — infrastructure reference.secrets-map — secrets for git scrubbing (if using git backup)git clone https://github.com/JD2005L/opencortex.git
cd opencortex && bash scripts/install.sh
clawhub install opencortex --force # Download latest
bash skills/opencortex/scripts/install.sh # Detects existing install, offers Update
The installer detects your existing version and offers: 1) Update (recommended), 2) Full reinstall, 3) Cancel. It never overwrites files you've customized.
| Content | Update method | User data safe? | |---------|--------------|-----------------| | Principles (P1-P8) | Hash comparison, asks before replacing | ✅ Asks y/N per principle | | P0 (Custom Principles) | Never touched | ✅ Your custom principles are always safe | | Helper scripts (verify, vault, metrics, git-backup) | Checksum comparison, auto-replaced | ✅ These aren't user-edited | | Reference docs (distillation, weekly-synthesis, architecture) | Checksum comparison, auto-replaced | ✅ These aren't user-edited | | Cron job messages | Always updated to latest template | ✅ Only the message text changes | | Cron model overrides | Cleared on every update | ✅ Gateway uses its configured default | | Cron deduplication | Detects and removes duplicate crons from prior bugs | ✅ Keeps the first, deletes extras | | Extra principles (P9+) | Detects duplicates and orphans, offers remove/migrate to P0 | ✅ Asks per principle | | MEMORY.md bloat | Warns if >5KB, flags non-standard sections | ✅ Suggests what to move | | Missing cron jobs | Offers to recreate with timezone auto-detection | ✅ Asks before creating | | MEMORY.md structure (## Identity, ## Memory Index) | Adds missing core sections | ✅ Existing sections untouched | | MEMORY.md index (### Infrastructure through ### Daily Logs) | Adds all 8 missing sub-sections | ✅ Existing sections untouched | | preferences.md | Created if missing | ✅ Existing file untouched | | New directories (contacts, workflows) | Created if missing | ✅ | | AGENTS.md | Merges: regenerates standard sections, preserves custom sections | ✅ Custom sections appended | | BOOTSTRAP.md | Merges: regenerates standard sections, preserves custom sections | ✅ Custom sections appended | | SOUL.md | Created if missing | ✅ Existing file untouched | | USER.md | Created if missing | ✅ Existing file untouched | | .gitignore | Adds missing sensitive entries (.vault/, .secrets-map, etc.) | ✅ Existing entries untouched |
SOUL.md ← Identity & personality
AGENTS.md ← Operating protocol & delegation rules
MEMORY.md ← Principles + index (< 3KB, loaded every session)
TOOLS.md ← Tool shed: APIs, scripts with abilities descriptions
INFRA.md ← Infrastructure atlas: hosts, IPs, services
USER.md ← Your human's preferences
BOOTSTRAP.md ← Session startup checklist
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)
| # | Principle | What It Does | Enforcement | |---|-----------|-------------|-------------| | P0 | Custom Principles | Your own principles (P0-A, P0-B, etc.) | Never modified by updates | | P1 | Delegate First | Model-agnostic sub-agent delegation (Light/Medium/Heavy) | Agent protocol | | P2 | Write It Down | Write-ahead durability: save before responding | Agent protocol | | P3 | Ask Before External | Confirm before public/destructive actions | Agent protocol | | P4 | Tool Shed & Workflows | Document tools and workflows | Nightly audit scans for undocumented tools and workflows | | P5 | Capture Decisions & Preferences | Record decisions and preferences | Nightly + weekly audit for uncaptured decisions and preferences | | P6 | Sub-agent Debrief | Delegated work feeds back to daily log | Nightly audit recovers orphaned debriefs | | P7 | Log Failures | Tag failures with root cause analysis | Nightly audit checks for missing root causes | | P8 | Check the Shed First | Use documented tools before deferring to user | Nightly audit flags unnecessary deferrals |
Week 1: Agent knows basics, asks lots of questions
Week 4: Agent has project history, knows tools, follows decisions
Week 12: Agent has deep institutional knowledge, patterns, runbooks
Week 52: Agent knows more about your setup than you remember
OpenCortex is a workspace-scoped memory skill. It creates files, registers cron jobs that run as isolated OpenClaw agent sessions, and optionally manages an encrypted vault. The primary risk surface is:
OpenCortex contains zero network operations — no telemetry, no phone-home, no external endpoints. Every script is plain bash. Full source is public.
| Feature | Default | Opt-In Required | What It Accesses | How to Disable |
|---------|---------|----------------|-----------------|----------------|
| Structured memory files | ✅ ON | — | Creates markdown files in workspace | Delete unwanted files |
| Daily distillation cron | ✅ ON | — | Reads/writes memory/, MEMORY.md, TOOLS.md, USER.md | openclaw cron delete <id> |
| Weekly synthesis cron | ✅ ON | — | Reads memory/archive/, writes summaries + runbooks | openclaw cron delete <id> |
| Principle enforcement audits | ✅ ON | — | Part of distillation — audits within workspace | Remove audit sections from cron message |
| Encrypted vault | Asked at install | Choose "direct" mode to skip | .vault/ directory, system keyring | Don't init vault; delete .vault/ |
| Voice profiling | ❌ OFF | OPENCORTEX_VOICE_PROFILE=1 | Reads workspace conversation logs → memory/VOICE.md | Unset env var; delete memory/VOICE.md |
| Infrastructure collection | ❌ OFF | OPENCORTEX_INFRA_COLLECT=1 | Routes infra mentions from daily logs → INFRA.md | Unset env var |
| Git backup | ❌ OFF | Say "yes" at install | Commits workspace to git (local only by default) | Remove from crontab; delete scripts |
| Git push to remote | ❌ OFF | --push flag on each run | Pushes scrubbed commits to remote | Don't pass --push |
| Daily metrics tracking | ❌ OFF | Say "yes" at install | Read-only file counts → memory/metrics.log | Remove from crontab; delete metrics.log |
| Broad file scrubbing | ❌ OFF | OPENCORTEX_SCRUB_ALL=1 | Scrubs all tracked files (not just known text types) | Unset env var |
| File-based vault passphrase | ❌ OFF | OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 | Stores passphrase at .vault/.passphrase | Unset env var; use system keyring |
Two cron jobs, both running as isolated OpenClaw agent sessions scoped to the workspace:
| Job | Schedule | Reads | Writes | Network Access |
|-----|----------|-------|--------|----------------|
| Daily Distillation | Daily 3 AM (local) | memory/*.md, workspace *.md | memory/projects/, memory/contacts/, memory/workflows/, memory/preferences.md, MEMORY.md, TOOLS.md, USER.md, daily log audit outputs | None |
| Weekly Synthesis | Sunday 5 AM (local) | memory/archive/*.md, memory/projects/*.md, memory/contacts/*.md, memory/workflows/*.md, memory/preferences.md | memory/archive/weekly-*.md, project/contact/workflow/preference files, memory/runbooks/ | None |
Both jobs:
/tmp/opencortex-distill.lock) to prevent conflictsrm, system modifications, network calls, or external API accessmemory/, MEMORY.md, TOOLS.md, etc.)openclaw cron listopenclaw cron delete <id>How cron jobs work: OpenCortex does not bundle standalone distillation scripts. Instead, the installer registers OpenClaw cron jobs (openclaw cron add) with detailed task instructions. At runtime, OpenClaw spawns an isolated agent session that follows those instructions to read, synthesize, and write workspace files. The LLM agent is the executor — it's far better at knowledge synthesis than any bash script could be. The cron job messages are the implementation, fully viewable and editable via openclaw cron list / openclaw cron edit.
On workspace isolation: The cron instructions themselves don't enforce sandboxing — that's the OpenClaw platform's responsibility. OpenClaw cron jobs run in isolated sessions scoped to the workspace directory by the runtime, the same way a Dockerfile doesn't implement kernel isolation — the container runtime does. OpenCortex's cron instructions contain no references to external filesystems, network calls, or system commands beyond openclaw cron list and crontab -l (for self-auditing cron health).
Git backup (when enabled) uses an isolated copy approach — your workspace files are never modified during scrubbing:
.secrets-map replacements)hash-object, update-index, write-tree, commit-tree)Additional safeguards:
.secrets-map and .vault/ are always gitignored (enforced at install)--push flag — local-only by default.secrets-map has 600 permissions (owner-only read/write)Recommendation: Test in a disposable repo first. Run the backup, inspect the commit diff, and confirm scrubbing works before pointing at a real remote.
The encrypted vault stores secrets at rest via GPG symmetric encryption (AES-256). Passphrase storage uses the best available backend (auto-detected):
| Priority | Backend | Passphrase Location | On Disk? |
|----------|---------|-------------------|----------|
| 1 | secret-tool (Linux keyring) | GNOME/KDE keyring | No |
| 2 | macOS Keychain | Native macOS keystore | No |
| 3 | keyctl (Linux kernel keyring) | Kernel memory | No |
| 4 | Environment variable | OPENCORTEX_VAULT_PASS | No |
| 5 | File fallback | .vault/.passphrase (mode 600) | Yes — requires OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 |
Commands: vault.sh init, vault.sh set <key> <value>, vault.sh get <key>, vault.sh rotate, vault.sh migrate, vault.sh backend
Key names are validated on set (alphanumeric + underscores only).
The installer (scripts/install.sh) is a single bash script that:
memory/projects/, memory/contacts/, memory/workflows/, memory/runbooks/, memory/archive/)openclaw cron addgit-backup.sh and vault.sh scripts to the workspaceNo external downloads. No package installs. No network calls. No binaries. All code is plain bash + markdown, bundled in the skill package and fully auditable.
OpenCortex declares no required API keys or environment variables. The cron jobs use your gateway's default model — OpenCortex never sees or handles model provider keys. Any model capable of reading and writing markdown files will work.
Optional environment variables (all off by default):
| Variable | Purpose | Sensitive |
|----------|---------|-----------|
| CLAWD_WORKSPACE | Override workspace directory (defaults to cwd) | No |
| CLAWD_TZ | Timezone for cron scheduling (defaults to UTC) | No |
| OPENCORTEX_VAULT_PASS | Vault passphrase via env var (prefer keyring) | Yes |
| OPENCORTEX_VOICE_PROFILE | Enable voice profiling in distillation | No |
| OPENCORTEX_INFRA_COLLECT | Enable infrastructure auto-collection | No |
| OPENCORTEX_SCRUB_ALL | Scrub all tracked files during git backup | No |
| OPENCORTEX_ALLOW_FILE_PASSPHRASE | Allow file-based vault passphrase | No |
install.sh, update.sh, vault.sh, git-backup.sh, verify.sh, metrics.sh. You can read every line before running anything. Required binaries: grep, sed, find. Optional: git, gpg, openssl, openclaw, secret-tool, keyctl, file (for binary detection during scrubbing).openclaw cron list to see the exact instructions registered. These are the actual implementation — edit or remove them freely.secret-tool, macOS Keychain, or keyctl over file-based passphrase storage. Set OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 only if no keyring is available and you accept the risk..secrets-map entries scrub correctly before using on a real remote.If enabled during install, OpenCortex tracks your agent's knowledge growth over time. A daily system cron (11:30 PM local) snapshots file counts, decision captures, tool documentation, and more into memory/metrics.log. No sensitive data is collected — only counts and pattern matches.
| Metric | What It Measures |
|--------|-----------------|
| Knowledge files | Total files in memory/projects/, memory/contacts/, memory/workflows/, memory/runbooks/, and memory/ |
| Knowledge size (KB) | Total size of knowledge files |
| Decisions captured | **Decision:** entries across all memory files |
| Preferences captured | **Preference:** entries in memory/preferences.md |
| Contacts | People/orgs documented in memory/contacts/ |
| Workflows | Pipelines/automations in memory/workflows/ |
| Runbooks | Reusable procedures in memory/runbooks/ |
| Tools documented | Entries in TOOLS.md |
| Failures logged | ❌ FAILURE: and 🔧 CORRECTION: entries |
| Debriefs | Sub-agent debrief entries in daily logs |
| Projects | Files in memory/projects/ |
| Archive files | Distilled daily logs in memory/archive/ |
# Snapshot today's metrics
bash scripts/metrics.sh --collect
# Show trends with ASCII growth charts + compound score
bash scripts/metrics.sh --report
# Last 4 weeks only
bash scripts/metrics.sh --report --weeks 4
# JSON output (for integrations)
bash scripts/metrics.sh --json
Or just ask your agent: "How is OpenCortex doing?" or "Show me OpenCortex metrics."
The report includes a 0–100 compound score reflecting knowledge depth, growth rate, and tracking consistency:
| Score | Rating | |-------|--------| | 80–100 | Thriving — deep knowledge, steady growth | | 60–79 | Growing — good foundation, building momentum | | 40–59 | Developing — basics in place, room to grow | | 20–39 | Getting started — early days | | 0–19 | Just installed — give it time |
A healthy OpenCortex installation trends upward over weeks. Flat or declining scores highlight specific areas to focus on.
If metrics tracking is enabled, the weekly synthesis cron automatically includes a metrics report in its output — showing 4-week trends and flagging areas that need attention.
The metrics script (scripts/metrics.sh) is read-only — it only counts files and greps for patterns. It writes only to memory/metrics.log (append-only in --collect mode). No network access, no sensitive data captured (counts, never content), no system modifications.
Add a project: Create memory/projects/my-project.md, add to MEMORY.md index. Nightly distillation routes relevant daily log entries to it.
Add a contact: Create memory/contacts/name.md with: name, role/relationship, context, communication preferences. Distillation auto-creates contacts mentioned in conversation.
Add a workflow: Create memory/workflows/my-pipeline.md with: what it does, services involved, how to operate it. Distillation auto-creates workflows when described.
Add a preference: Append to memory/preferences.md under the right category. Format: **Preference:** [what] — [context] (date). Distillation auto-captures preferences stated in conversation.
Add a principle: Append to MEMORY.md under 🔴 PRINCIPLES. Keep it short.
Add a runbook: Create memory/runbooks/my-procedure.md with step-by-step instructions. Sub-agents follow these directly.
Add a tool: Add to TOOLS.md with: what it is, how to access it, goal-oriented abilities description.
Change cron schedule: openclaw cron list then openclaw cron edit <id> --cron "...".
Run fully air-gapped: Decline all optional features during install. No voice profiling, no infrastructure collection, no git backup. The core memory architecture and distillation work entirely offline.
grep, sed, find (standard on most systems)git (for backup), gpg (for vault), openssl (for passphrase generation)MIT
Created by JD2005L
File v3.5.18:_meta.json
{ "ownerId": "kn7e5n3qxtp49kdnhne6vr3wzd81n3sc", "slug": "opencortex", "version": "3.5.18", "publishedAt": 1772303157357 }
File v3.5.18:references/architecture.md
Default OpenClaw memory is a flat MEMORY.md that grows unbounded. Context fills up, compaction loses information, the agent forgets what it learned. OpenCortex solves this with:
| File | Loaded at boot? | Purpose | Size target | |------|-----------------|---------|-------------| | MEMORY.md | Yes | Principles + index only | < 3KB | | TOOLS.md | Yes | Tool/API catalog with abilities | Grows with tools | | INFRA.md | Yes | Infrastructure reference | Grows with infra | | SOUL.md | Yes | Identity, personality | < 1KB | | AGENTS.md | Yes | Operating protocol | < 1KB | | USER.md | Yes | Human's preferences | < 1KB | | BOOTSTRAP.md | Yes | Session startup checklist | < 0.5KB | | memory/projects/.md | On demand | Per-project knowledge | Any | | memory/contacts/.md | On demand | Per-person/org knowledge | Any | | memory/workflows/.md | On demand | Per-workflow/pipeline knowledge | Any | | memory/preferences.md | On demand | Cross-cutting user preferences by category | Any | | memory/runbooks/.md | On demand | Procedures for sub-agents | Any | | memory/YYYY-MM-DD.md | Current day | Working log | Any | | memory/archive/*.md | Via search | Historical logs | Any |
The nightly cron reads daily logs and routes each piece of information:
| Information type | Destination | |-----------------|-------------| | Project work, features, bugs | memory/projects/{project}.md | | New tool descriptions and capabilities | TOOLS.md (sensitive values → vault) | | Infrastructure changes | INFRA.md (if OPENCORTEX_INFRA_COLLECT=1) | | People and organizations mentioned | memory/contacts/{name}.md | | Workflows and pipelines described | memory/workflows/{name}.md | | Stated preferences and opinions | memory/preferences.md (categorized) | | Decisions and architectural directions | Relevant project file or MEMORY.md | | New principles, lessons | MEMORY.md | | User info and communication style | USER.md | | Scheduled job changes | MEMORY.md jobs table | | Repeatable procedures | memory/runbooks/ |
Preferences in memory/preferences.md are organized by category:
| Category | Examples | |----------|---------| | Communication | "No verbose explanations", "Direct messages only" | | Code & Technical | "Detailed commit messages", "Prefer TypeScript" | | Workflow & Process | "Check for messages before pushing", "Batch commits" | | Scheduling & Time | "Don't schedule before 9 AM", "Prefer async" | | Tools & Services | "Use VS Code over Vim", "Prefer Brave over Chrome" | | Content & Media | "720p minimum", "No dubbed content" | | Environment & Setup | "Dark mode everywhere", "Dual monitor layout" |
Format: **Preference:** [what] — [context/reasoning] (date)
Preferences are auto-captured from conversation when the user says "I prefer", "always do", "I don't like", etc. Contradicted preferences are updated (not duplicated).
Week 1: Agent knows basics, asks lots of questions
Week 4: Agent has project history, knows tools, follows decisions, remembers preferences
Week 12: Agent has deep institutional knowledge, patterns, runbooks, contact history
Week 52: Agent knows more about the setup than most humans would remember
The key insight: daily distillation + weekly synthesis + decision/preference capture means the agent gets better at a rate proportional to how much it's used. Unlike raw log accumulation which just fills context, structured knowledge compounds.
Edit MEMORY.md P1 to adjust which capability tier (Light/Medium/Heavy) handles what complexity. P1 is model-agnostic and works with whatever models you have configured.
openclaw cron edit <id> --cron "0 10 * * *" --tz "Your/Timezone"
All custom principles go in P0 as sub-principles (P0-A, P0-B, P0-C, etc.). P1-P8 are managed by OpenCortex updates and should not be modified directly. The agent is instructed to:
When the user states a preference, makes a decision, gives a deadline, or corrects the agent, the agent writes it to the relevant memory file before composing a response. This prevents context loss if the session ends or compacts mid-conversation.
The weekly synthesis includes automated checks that maintain memory quality over time:
The verify.sh script also checks memory search index health, file count, and MEMORY.md boot size.
Each bot gets its own OpenCortex install. Share knowledge via:
File v3.5.18:references/distillation.md
You are an AI assistant. Daily memory maintenance task.
IMPORTANT: Before writing to any file, check for /tmp/opencortex-distill.lock. If it exists and was created less than 10 minutes ago, wait 30 seconds and retry (up to 3 times). Before starting work, create this lockfile. Remove it when done. This prevents daily and weekly jobs from conflicting.
ONLY perform this section if OPENCORTEX_VOICE_PROFILE=1 is set in the environment. If not set, skip this section entirely.
Before completing, append debrief to memory/YYYY-MM-DD.md. Reply with brief summary.
File v3.5.18:references/weekly-synthesis.md
You are an AI assistant. Weekly synthesis — higher-altitude review.
IMPORTANT: Before writing to any file, check for /tmp/opencortex-distill.lock. If it exists and was created less than 10 minutes ago, wait 30 seconds and retry (up to 3 times). Before starting work, create this lockfile. Remove it when done. This prevents daily and weekly jobs from conflicting.
Before completing, append debrief to memory/YYYY-MM-DD.md. Reply with weekly summary.
Archive v3.5.17: 12 files, 60985 bytes
Files: README.md (21251b), references/architecture.md (6173b), references/distillation.md (6064b), references/weekly-synthesis.md (5425b), scripts/git-backup.sh (4591b), scripts/install.sh (39165b), scripts/metrics.sh (14441b), scripts/update.sh (67000b), scripts/vault.sh (10359b), scripts/verify.sh (6524b), SKILL.md (10486b), _meta.json (130b)
File v3.5.17:SKILL.md
Transform 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 <id> --cron "...".
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.
File v3.5.17:README.md
Self-improving memory architecture for OpenClaw agents.
Stop forgetting. Start compounding.
Out of the box, OpenClaw agents dump everything into a flat MEMORY.md. Context fills up, compaction loses information, and the agent forgets what it learned last week. It's like having a brilliant employee with amnesia who takes notes on napkins.
OpenCortex transforms your agent into one that gets smarter every day through:
Prerequisites: OpenClaw 2026.2.x+ and ClawHub CLI
# From your OpenClaw workspace directory (e.g. ~/clawd)
clawhub install opencortex
bash skills/opencortex/scripts/install.sh
# Preview without changing anything:
bash skills/opencortex/scripts/install.sh --dry-run
# Verify everything is working (read-only):
bash skills/opencortex/scripts/verify.sh
Important: Run the installer from your workspace root, NOT from inside the skill folder.
The installer asks about optional features, creates files (won't overwrite existing ones), and registers cron jobs. It makes zero network calls.
After install, customize:
SOUL.md — personality and identityUSER.md — info about your humanMEMORY.md — principles and project indexTOOLS.md — tools and APIs as you discover themINFRA.md — infrastructure reference.secrets-map — secrets for git scrubbing (if using git backup)git clone https://github.com/JD2005L/opencortex.git
cd opencortex && bash scripts/install.sh
clawhub install opencortex --force # Download latest
bash skills/opencortex/scripts/install.sh # Detects existing install, offers Update
The installer detects your existing version and offers: 1) Update (recommended), 2) Full reinstall, 3) Cancel. It never overwrites files you've customized.
| Content | Update method | User data safe? | |---------|--------------|-----------------| | Principles (P1-P8) | Hash comparison, asks before replacing | ✅ Asks y/N per principle | | P0 (Custom Principles) | Never touched | ✅ Your custom principles are always safe | | Helper scripts (verify, vault, metrics, git-backup) | Checksum comparison, auto-replaced | ✅ These aren't user-edited | | Reference docs (distillation, weekly-synthesis, architecture) | Checksum comparison, auto-replaced | ✅ These aren't user-edited | | Cron job messages | Always updated to latest template | ✅ Only the message text changes | | Cron model overrides | Cleared on every update | ✅ Gateway uses its configured default | | Cron deduplication | Detects and removes duplicate crons from prior bugs | ✅ Keeps the first, deletes extras | | Extra principles (P9+) | Detects duplicates and orphans, offers remove/migrate to P0 | ✅ Asks per principle | | MEMORY.md bloat | Warns if >5KB, flags non-standard sections | ✅ Suggests what to move | | Missing cron jobs | Offers to recreate with timezone auto-detection | ✅ Asks before creating | | MEMORY.md structure (## Identity, ## Memory Index) | Adds missing core sections | ✅ Existing sections untouched | | MEMORY.md index (### Infrastructure through ### Daily Logs) | Adds all 8 missing sub-sections | ✅ Existing sections untouched | | preferences.md | Created if missing | ✅ Existing file untouched | | New directories (contacts, workflows) | Created if missing | ✅ | | AGENTS.md | Merges: regenerates standard sections, preserves custom sections | ✅ Custom sections appended | | BOOTSTRAP.md | Merges: regenerates standard sections, preserves custom sections | ✅ Custom sections appended | | SOUL.md | Created if missing | ✅ Existing file untouched | | USER.md | Created if missing | ✅ Existing file untouched | | .gitignore | Adds missing sensitive entries (.vault/, .secrets-map, etc.) | ✅ Existing entries untouched |
SOUL.md ← Identity & personality
AGENTS.md ← Operating protocol & delegation rules
MEMORY.md ← Principles + index (< 3KB, loaded every session)
TOOLS.md ← Tool shed: APIs, scripts with abilities descriptions
INFRA.md ← Infrastructure atlas: hosts, IPs, services
USER.md ← Your human's preferences
BOOTSTRAP.md ← Session startup checklist
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)
| # | Principle | What It Does | Enforcement | |---|-----------|-------------|-------------| | P0 | Custom Principles | Your own principles (P0-A, P0-B, etc.) | Never modified by updates | | P1 | Delegate First | Model-agnostic sub-agent delegation (Light/Medium/Heavy) | Agent protocol | | P2 | Write It Down | Write-ahead durability: save before responding | Agent protocol | | P3 | Ask Before External | Confirm before public/destructive actions | Agent protocol | | P4 | Tool Shed & Workflows | Document tools and workflows | Nightly audit scans for undocumented tools and workflows | | P5 | Capture Decisions & Preferences | Record decisions and preferences | Nightly + weekly audit for uncaptured decisions and preferences | | P6 | Sub-agent Debrief | Delegated work feeds back to daily log | Nightly audit recovers orphaned debriefs | | P7 | Log Failures | Tag failures with root cause analysis | Nightly audit checks for missing root causes | | P8 | Check the Shed First | Use documented tools before deferring to user | Nightly audit flags unnecessary deferrals |
Week 1: Agent knows basics, asks lots of questions
Week 4: Agent has project history, knows tools, follows decisions
Week 12: Agent has deep institutional knowledge, patterns, runbooks
Week 52: Agent knows more about your setup than you remember
OpenCortex is a workspace-scoped memory skill. It creates files, registers cron jobs that run as isolated OpenClaw agent sessions, and optionally manages an encrypted vault. The primary risk surface is:
OpenCortex contains zero network operations — no telemetry, no phone-home, no external endpoints. Every script is plain bash. Full source is public.
| Feature | Default | Opt-In Required | What It Accesses | How to Disable |
|---------|---------|----------------|-----------------|----------------|
| Structured memory files | ✅ ON | — | Creates markdown files in workspace | Delete unwanted files |
| Daily distillation cron | ✅ ON | — | Reads/writes memory/, MEMORY.md, TOOLS.md, USER.md | openclaw cron delete <id> |
| Weekly synthesis cron | ✅ ON | — | Reads memory/archive/, writes summaries + runbooks | openclaw cron delete <id> |
| Principle enforcement audits | ✅ ON | — | Part of distillation — audits within workspace | Remove audit sections from cron message |
| Encrypted vault | Asked at install | Choose "direct" mode to skip | .vault/ directory, system keyring | Don't init vault; delete .vault/ |
| Voice profiling | ❌ OFF | OPENCORTEX_VOICE_PROFILE=1 | Reads workspace conversation logs → memory/VOICE.md | Unset env var; delete memory/VOICE.md |
| Infrastructure collection | ❌ OFF | OPENCORTEX_INFRA_COLLECT=1 | Routes infra mentions from daily logs → INFRA.md | Unset env var |
| Git backup | ❌ OFF | Say "yes" at install | Commits workspace to git (local only by default) | Remove from crontab; delete scripts |
| Git push to remote | ❌ OFF | --push flag on each run | Pushes scrubbed commits to remote | Don't pass --push |
| Daily metrics tracking | ❌ OFF | Say "yes" at install | Read-only file counts → memory/metrics.log | Remove from crontab; delete metrics.log |
| Broad file scrubbing | ❌ OFF | OPENCORTEX_SCRUB_ALL=1 | Scrubs all tracked files (not just known text types) | Unset env var |
| File-based vault passphrase | ❌ OFF | OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 | Stores passphrase at .vault/.passphrase | Unset env var; use system keyring |
Two cron jobs, both running as isolated OpenClaw agent sessions scoped to the workspace:
| Job | Schedule | Reads | Writes | Network Access |
|-----|----------|-------|--------|----------------|
| Daily Distillation | Daily 3 AM (local) | memory/*.md, workspace *.md | memory/projects/, memory/contacts/, memory/workflows/, memory/preferences.md, MEMORY.md, TOOLS.md, USER.md, daily log audit outputs | None |
| Weekly Synthesis | Sunday 5 AM (local) | memory/archive/*.md, memory/projects/*.md, memory/contacts/*.md, memory/workflows/*.md, memory/preferences.md | memory/archive/weekly-*.md, project/contact/workflow/preference files, memory/runbooks/ | None |
Both jobs:
/tmp/opencortex-distill.lock) to prevent conflictsrm, system modifications, network calls, or external API accessmemory/, MEMORY.md, TOOLS.md, etc.)openclaw cron listopenclaw cron delete <id>How cron jobs work: OpenCortex does not bundle standalone distillation scripts. Instead, the installer registers OpenClaw cron jobs (openclaw cron add) with detailed task instructions. At runtime, OpenClaw spawns an isolated agent session that follows those instructions to read, synthesize, and write workspace files. The LLM agent is the executor — it's far better at knowledge synthesis than any bash script could be. The cron job messages are the implementation, fully viewable and editable via openclaw cron list / openclaw cron edit.
On workspace isolation: The cron instructions themselves don't enforce sandboxing — that's the OpenClaw platform's responsibility. OpenClaw cron jobs run in isolated sessions scoped to the workspace directory by the runtime, the same way a Dockerfile doesn't implement kernel isolation — the container runtime does. OpenCortex's cron instructions contain no references to external filesystems, network calls, or system commands beyond openclaw cron list and crontab -l (for self-auditing cron health).
Git backup (when enabled) uses an isolated copy approach — your workspace files are never modified during scrubbing:
.secrets-map replacements)hash-object, update-index, write-tree, commit-tree)Additional safeguards:
.secrets-map and .vault/ are always gitignored (enforced at install)--push flag — local-only by default.secrets-map has 600 permissions (owner-only read/write)Recommendation: Test in a disposable repo first. Run the backup, inspect the commit diff, and confirm scrubbing works before pointing at a real remote.
The encrypted vault stores secrets at rest via GPG symmetric encryption (AES-256). Passphrase storage uses the best available backend (auto-detected):
| Priority | Backend | Passphrase Location | On Disk? |
|----------|---------|-------------------|----------|
| 1 | secret-tool (Linux keyring) | GNOME/KDE keyring | No |
| 2 | macOS Keychain | Native macOS keystore | No |
| 3 | keyctl (Linux kernel keyring) | Kernel memory | No |
| 4 | Environment variable | OPENCORTEX_VAULT_PASS | No |
| 5 | File fallback | .vault/.passphrase (mode 600) | Yes — requires OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 |
Commands: vault.sh init, vault.sh set <key> <value>, vault.sh get <key>, vault.sh rotate, vault.sh migrate, vault.sh backend
Key names are validated on set (alphanumeric + underscores only).
The installer (scripts/install.sh) is a single bash script that:
memory/projects/, memory/contacts/, memory/workflows/, memory/runbooks/, memory/archive/)openclaw cron addgit-backup.sh and vault.sh scripts to the workspaceNo external downloads. No package installs. No network calls. No binaries. All code is plain bash + markdown, bundled in the skill package and fully auditable.
OpenCortex declares no required API keys or environment variables. The cron jobs use your gateway's default model — OpenCortex never sees or handles model provider keys. Any model capable of reading and writing markdown files will work.
Optional environment variables (all off by default):
| Variable | Purpose | Sensitive |
|----------|---------|-----------|
| CLAWD_WORKSPACE | Override workspace directory (defaults to cwd) | No |
| CLAWD_TZ | Timezone for cron scheduling (defaults to UTC) | No |
| OPENCORTEX_VAULT_PASS | Vault passphrase via env var (prefer keyring) | Yes |
| OPENCORTEX_VOICE_PROFILE | Enable voice profiling in distillation | No |
| OPENCORTEX_INFRA_COLLECT | Enable infrastructure auto-collection | No |
| OPENCORTEX_SCRUB_ALL | Scrub all tracked files during git backup | No |
| OPENCORTEX_ALLOW_FILE_PASSPHRASE | Allow file-based vault passphrase | No |
install.sh, update.sh, vault.sh, git-backup.sh, verify.sh, metrics.sh. You can read every line before running anything. Required binaries: grep, sed, find. Optional: git, gpg, openssl, openclaw, secret-tool, keyctl, file (for binary detection during scrubbing).openclaw cron list to see the exact instructions registered. These are the actual implementation — edit or remove them freely.secret-tool, macOS Keychain, or keyctl over file-based passphrase storage. Set OPENCORTEX_ALLOW_FILE_PASSPHRASE=1 only if no keyring is available and you accept the risk..secrets-map entries scrub correctly before using on a real remote.If enabled during install, OpenCortex tracks your agent's knowledge growth over time. A daily system cron (11:30 PM local) snapshots file counts, decision captures, tool documentation, and more into memory/metrics.log. No sensitive data is collected — only counts and pattern matches.
| Metric | What It Measures |
|--------|-----------------|
| Knowledge files | Total files in memory/projects/, memory/contacts/, memory/workflows/, memory/runbooks/, and memory/ |
| Knowledge size (KB) | Total size of knowledge files |
| Decisions captured | **Decision:** entries across all memory files |
| Preferences captured | **Preference:** entries in memory/preferences.md |
| Contacts | People/orgs documented in memory/contacts/ |
| Workflows | Pipelines/automations in memory/workflows/ |
| Runbooks | Reusable procedures in memory/runbooks/ |
| Tools documented | Entries in TOOLS.md |
| Failures logged | ❌ FAILURE: and 🔧 CORRECTION: entries |
| Debriefs | Sub-agent debrief entries in daily logs |
| Projects | Files in memory/projects/ |
| Archive files | Distilled daily logs in memory/archive/ |
# Snapshot today's metrics
bash scripts/metrics.sh --collect
# Show trends with ASCII growth charts + compound score
bash scripts/metrics.sh --report
# Last 4 weeks only
bash scripts/metrics.sh --report --weeks 4
# JSON output (for integrations)
bash scripts/metrics.sh --json
Or just ask your agent: "How is OpenCortex doing?" or "Show me OpenCortex metrics."
The report includes a 0–100 compound score reflecting knowledge depth, growth rate, and tracking consistency:
| Score | Rating | |-------|--------| | 80–100 | Thriving — deep knowledge, steady growth | | 60–79 | Growing — good foundation, building momentum | | 40–59 | Developing — basics in place, room to grow | | 20–39 | Getting started — early days | | 0–19 | Just installed — give it time |
A healthy OpenCortex installation trends upward over weeks. Flat or declining scores highlight specific areas to focus on.
If metrics tracking is enabled, the weekly synthesis cron automatically includes a metrics report in its output — showing 4-week trends and flagging areas that need attention.
The metrics script (scripts/metrics.sh) is read-only — it only counts files and greps for patterns. It writes only to memory/metrics.log (append-only in --collect mode). No network access, no sensitive data captured (counts, never content), no system modifications.
Add a project: Create memory/projects/my-project.md, add to MEMORY.md index. Nightly distillation routes relevant daily log entries to it.
Add a contact: Create memory/contacts/name.md with: name, role/relationship, context, communication preferences. Distillation auto-creates contacts mentioned in conversation.
Add a workflow: Create memory/workflows/my-pipeline.md with: what it does, services involved, how to operate it. Distillation auto-creates workflows when described.
Add a preference: Append to memory/preferences.md under the right category. Format: **Preference:** [what] — [context] (date). Distillation auto-captures preferences stated in conversation.
Add a principle: Append to MEMORY.md under 🔴 PRINCIPLES. Keep it short.
Add a runbook: Create memory/runbooks/my-procedure.md with step-by-step instructions. Sub-agents follow these directly.
Add a tool: Add to TOOLS.md with: what it is, how to access it, goal-oriented abilities description.
Change cron schedule: openclaw cron list then openclaw cron edit <id> --cron "...".
Run fully air-gapped: Decline all optional features during install. No voice profiling, no infrastructure collection, no git backup. The core memory architecture and distillation work entirely offline.
grep, sed, find (standard on most systems)git (for backup), gpg (for vault), openssl (for passphrase generation)MIT
Created by JD2005L
File v3.5.17:_meta.json
{ "ownerId": "kn7e5n3qxtp49kdnhne6vr3wzd81n3sc", "slug": "opencortex", "version": "3.5.17", "publishedAt": 1772302694620 }
File v3.5.17:references/architecture.md
Default OpenClaw memory is a flat MEMORY.md that grows unbounded. Context fills up, compaction loses information, the agent forgets what it learned. OpenCortex solves this with:
| File | Loaded at boot? | Purpose | Size target | |------|-----------------|---------|-------------| | MEMORY.md | Yes | Principles + index only | < 3KB | | TOOLS.md | Yes | Tool/API catalog with abilities | Grows with tools | | INFRA.md | Yes | Infrastructure reference | Grows with infra | | SOUL.md | Yes | Identity, personality | < 1KB | | AGENTS.md | Yes | Operating protocol | < 1KB | | USER.md | Yes | Human's preferences | < 1KB | | BOOTSTRAP.md | Yes | Session startup checklist | < 0.5KB | | memory/projects/.md | On demand | Per-project knowledge | Any | | memory/contacts/.md | On demand | Per-person/org knowledge | Any | | memory/workflows/.md | On demand | Per-workflow/pipeline knowledge | Any | | memory/preferences.md | On demand | Cross-cutting user preferences by category | Any | | memory/runbooks/.md | On demand | Procedures for sub-agents | Any | | memory/YYYY-MM-DD.md | Current day | Working log | Any | | memory/archive/*.md | Via search | Historical logs | Any |
The nightly cron reads daily logs and routes each piece of information:
| Information type | Destination | |-----------------|-------------| | Project work, features, bugs | memory/projects/{project}.md | | New tool descriptions and capabilities | TOOLS.md (sensitive values → vault) | | Infrastructure changes | INFRA.md (if OPENCORTEX_INFRA_COLLECT=1) | | People and organizations mentioned | memory/contacts/{name}.md | | Workflows and pipelines described | memory/workflows/{name}.md | | Stated preferences and opinions | memory/preferences.md (categorized) | | Decisions and architectural directions | Relevant project file or MEMORY.md | | New principles, lessons | MEMORY.md | | User info and communication style | USER.md | | Scheduled job changes | MEMORY.md jobs table | | Repeatable procedures | memory/runbooks/ |
Preferences in memory/preferences.md are organized by category:
| Category | Examples | |----------|---------| | Communication | "No verbose explanations", "Direct messages only" | | Code & Technical | "Detailed commit messages", "Prefer TypeScript" | | Workflow & Process | "Check for messages before pushing", "Batch commits" | | Scheduling & Time | "Don't schedule before 9 AM", "Prefer async" | | Tools & Services | "Use VS Code over Vim", "Prefer Brave over Chrome" | | Content & Media | "720p minimum", "No dubbed content" | | Environment & Setup | "Dark mode everywhere", "Dual monitor layout" |
Format: **Preference:** [what] — [context/reasoning] (date)
Preferences are auto-captured from conversation when the user says "I prefer", "always do", "I don't like", etc. Contradicted preferences are updated (not duplicated).
Week 1: Agent knows basics, asks lots of questions
Week 4: Agent has project history, knows tools, follows decisions, remembers preferences
Week 12: Agent has deep institutional knowledge, patterns, runbooks, contact history
Week 52: Agent knows more about the setup than most humans would remember
The key insight: daily distillation + weekly synthesis + decision/preference capture means the agent gets better at a rate proportional to how much it's used. Unlike raw log accumulation which just fills context, structured knowledge compounds.
Edit MEMORY.md P1 to adjust which capability tier (Light/Medium/Heavy) handles what complexity. P1 is model-agnostic and works with whatever models you have configured.
openclaw cron edit <id> --cron "0 10 * * *" --tz "Your/Timezone"
All custom principles go in P0 as sub-principles (P0-A, P0-B, P0-C, etc.). P1-P8 are managed by OpenCortex updates and should not be modified directly. The agent is instructed to:
When the user states a preference, makes a decision, gives a deadline, or corrects the agent, the agent writes it to the relevant memory file before composing a response. This prevents context loss if the session ends or compacts mid-conversation.
The weekly synthesis includes automated checks that maintain memory quality over time:
The verify.sh script also checks memory search index health, file count, and MEMORY.md boot size.
Each bot gets its own OpenCortex install. Share knowledge via:
File v3.5.17:references/distillation.md
You are an AI assistant. Daily memory maintenance task.
IMPORTANT: Before writing to any file, check for /tmp/opencortex-distill.lock. If it exists and was created less than 10 minutes ago, wait 30 seconds and retry (up to 3 times). Before starting work, create this lockfile. Remove it when done. This prevents daily and weekly jobs from conflicting.
ONLY perform this section if OPENCORTEX_VOICE_PROFILE=1 is set in the environment. If not set, skip this section entirely.
Before completing, append debrief to memory/YYYY-MM-DD.md. Reply with brief summary.
File v3.5.17:references/weekly-synthesis.md
You are an AI assistant. Weekly synthesis — higher-altitude review.
IMPORTANT: Before writing to any file, check for /tmp/opencortex-distill.lock. If it exists and was created less than 10 minutes ago, wait 30 seconds and retry (up to 3 times). Before starting work, create this lockfile. Remove it when done. This prevents daily and weekly jobs from conflicting.
Before completing, append debrief to memory/YYYY-MM-DD.md. Reply with weekly summary.
Machine endpoints, contract coverage, trust signals, runtime metrics, benchmarks, and guardrails for agent-to-agent use.
Machine interfaces
Contract coverage
Status
missing
Auth
None
Streaming
No
Data region
Unspecified
Protocol support
Requires: none
Forbidden: none
Guardrails
Operational confidence: low
curl -s "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/snapshot"
curl -s "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/contract"
curl -s "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/trust"
Operational fit
Trust signals
Handshake
UNKNOWN
Confidence
unknown
Attempts 30d
unknown
Fallback rate
unknown
Runtime metrics
Observed P50
unknown
Observed P95
unknown
Rate limit
unknown
Estimated cost
unknown
Do not use if
Raw contract, invocation, trust, capability, facts, and change-event payloads for machine-side inspection.
Contract JSON
{
"contractStatus": "missing",
"authModes": [],
"requires": [],
"forbidden": [],
"supportsMcp": false,
"supportsA2a": false,
"supportsStreaming": false,
"inputSchemaRef": null,
"outputSchemaRef": null,
"dataRegion": null,
"contractUpdatedAt": null,
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Invocation Guide
{
"preferredApi": {
"snapshotUrl": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/snapshot",
"contractUrl": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/contract",
"trustUrl": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/trust"
},
"curlExamples": [
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/snapshot\"",
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/contract\"",
"curl -s \"https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/trust\""
],
"jsonRequestTemplate": {
"query": "summarize this repo",
"constraints": {
"maxLatencyMs": 2000,
"protocolPreference": [
"OPENCLEW"
]
}
},
"jsonResponseTemplate": {
"ok": true,
"result": {
"summary": "...",
"confidence": 0.9
},
"meta": {
"source": "CLAWHUB",
"generatedAt": "2026-04-17T04:43:18.765Z"
}
},
"retryPolicy": {
"maxAttempts": 3,
"backoffMs": [
500,
1500,
3500
],
"retryableConditions": [
"HTTP_429",
"HTTP_503",
"NETWORK_TIMEOUT"
]
}
}Trust JSON
{
"status": "unavailable",
"handshakeStatus": "UNKNOWN",
"verificationFreshnessHours": null,
"reputationScore": null,
"p95LatencyMs": null,
"successRate30d": null,
"fallbackRate": null,
"attempts30d": null,
"trustUpdatedAt": null,
"trustConfidence": "unknown",
"sourceUpdatedAt": null,
"freshnessSeconds": null
}Capability Matrix
{
"rows": [
{
"key": "OPENCLEW",
"type": "protocol",
"support": "unknown",
"confidenceSource": "profile",
"notes": "Listed on profile"
}
],
"flattenedTokens": "protocol:OPENCLEW|unknown|profile"
}Facts JSON
[
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/JD2005L/opencortex",
"sourceUrl": "https://clawhub.ai/JD2005L/opencortex",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/contract",
"sourceUrl": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "648 downloads",
"href": "https://clawhub.ai/JD2005L/opencortex",
"sourceUrl": "https://clawhub.ai/JD2005L/opencortex",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "3.5.18",
"href": "https://clawhub.ai/JD2005L/opencortex",
"sourceUrl": "https://clawhub.ai/JD2005L/opencortex",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-28T18:25:57.357Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/trust",
"sourceUrl": "https://xpersona.co/api/v1/agents/clawhub-jd2005l-opencortex/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
]Change Events JSON
[
{
"eventType": "release",
"title": "Release 3.5.18",
"description": "Use --model default to clear cron model overrides (empty string silently ignored by OpenClaw CLI)",
"href": "https://clawhub.ai/JD2005L/opencortex",
"sourceUrl": "https://clawhub.ai/JD2005L/opencortex",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-28T18:25:57.357Z",
"isPublic": true
}
]Sponsored
Ads related to OpenCortex and adjacent AI workflows.