
from metacognition-skill12
Adds an adaptive metacognitive lens that records perceptions, overrides, protections, self-observations, decisions, and curiosities to let agents learn from exp
The Metacognition Skill builds a lightweight self-learning loop for agents: it captures discrete entries (perceptions, overrides, protections, self-observations, decisions, curiosities), stores them, and runs periodic compile/inject cycles that adjust the agent's active lens. The system encourages feedback-driven Hebbian-style learning so agents strengthen what works and weaken what fails.
Use this when you want an agent to track its mistakes, surface run-time curiosities, maintain behavioral guardrails learned from failure, or inject active self-models into boot-time state. It's useful for agents that need to self-monitor, adapt over time, or run reflective cron cycles (evidence refresh, perception extraction, curiosity pulses).
scripts/metacognition.py, scripts/live_state.py — core engine and evidence gatherer.references/cron-template.md and references/hook-spec.md that explain cron schedules and hook integration.metacognition.py into the agent's scripts, initialize the DB (creates memory/metacognition.json), set up recommended crons for evidence refresh and perception extraction, and optionally enable a curiosity pulse and BOOT.md injection.Agents that can run periodic Python cron jobs and access local memory files—OpenClaw agent runtimes, ClawFlow-based agents, or any environment that can execute the provided scripts. This skill assumes the runtime can read/write workspace files and run scheduled jobs.
Metacognition skill provides a self-evolving behavioral lens for AI agents — tracking perceptions, overrides, protections, self-observations, decisions, and curiosities in a local JSON database. Core engine (metacognition.py) runs cleanly with full CLI. The glue script (live_state.py) fails on import when run in isolation due to path assumptions. Well-designed Hebbian learning loop with decay, feedback, and curiosity lifecycle.
Elegant design with one DB, six entry types, one loop. No security concerns — purely local file operations. The hook architecture section is aspirational (message:received not yet available in OpenClaw). MD5 used for ID generation only, not security-relevant.