HeartFlow for Openclaw

HeartFlow is a local-first cognitive and memory reasoning engine designed to empower AI agents with self-healing, dual-speed reasoning, and multi-tier memory.

mark-heartflow
v2.9.0
Jun 10, 2026
0
556
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install heartflow-v1

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install heartflow-v1 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is HeartFlow?

HeartFlow is a robust, local-first cognitive engine designed for AI coding agents that prioritizes reasoning, structured memory, and self-evolution over transient context accumulation. Engineered to resist computational chaos (entropy reduction), it acts as an architectural framework for agents looking to achieve structural growth rather than just prompt updates. Operating within a strict local sandbox, it enforces a philosophical approach to intelligence by translating raw noise into structured signal, helping developers configure highly conscious AI agents using Openclaw Skills.

At the center of its technical architecture is the HeartLogic workflow—a rigid four-step reasoning process executed in code rather than memory. It balances fast intuition and deep reasoning through separate execution pipelines, enabling agents to understand their situational boundaries, identify user distress or technical bottlenecks, and choose silence when silent operation yields cleaner outcomes than excessive output. This local-first paradigm is fully integrated with Openclaw Skills, allowing secure memory-injection setups with zero external cloud dependencies.

HeartFlow Use Cases

  • Implementing a cross-session memory architecture (CORE, LEARNED, EPHEMERAL) to persist user preferences and lessons learned securely without leaking API keys.
  • Activating self-healing reinforcement learning (RL) workflows that record execution errors inside local Q-tables for automated strategy adjustments.
  • Structuring AI reasoning pipelines with deep execution audits, ensuring that code modification proposals go through strict semantic and security validation.
  • Building advanced cognitive context layers for LLMs operating in high-privacy developer environments where external communication is completely blocked.

How HeartFlow Works

  1. Initialization: The developer instantiates the HeartFlow framework locally, defining a project-specific root path to anchor memory operations.
  2. Cognitive Audit (HeartLogic): For every prompt or challenge, the engine forces the AI agent through a four-stage assessment: What is this about? Is it the correct action? Is the user/codebase in a critical or painful state? Should the agent choice silence over verbose logs?
  3. Multi-tier Memory Routing: The system categorizes generated insights. Immutable directives go into CORE memory; cross-session learned habits write to LEARNED memory; temporary context populates EPHEMERAL memory.
  4. Self-Healing Q-Learning: If failures occur, the engine records the errors to a local Q-table (self-heal.js) so the agent automatically refines its future operational strategies without external telemetry.
  5. Injection & Compilation: Memory modules compile and inject themselves directly into system prompts utilizing lightweight local Node.js scripts or Hermes plugins, empowering agents with Openclaw Skills.

HeartFlow Setup

HeartFlow runs as a local Node.js and Python module. Make sure Node.js is installed on your local machine.

To manage and search your cognitive memories locally, utilize the included memory tool:

# List all existing memories stored in local JSON
node scripts/heartflow-memory-tool.js list

# Search through memory using semantic keywords
node scripts/heartflow-memory-tool.js search <keyword>

# Get current memory statistics
node scripts/heartflow-memory-tool.js stats

# Manually write key-value pairs into learned memory
node scripts/heartflow-memory-tool.js write <key> <value>

To download the local semantic search model (powered by ModelScope) for vector capabilities, execute:

python scripts/download-model.py

HeartFlow Data Schema & Taxonomy

HeartFlow systematically separates its data architecture into dedicated files within the local memory/ directory. No external databases or cloud endpoints are involved in managing these Openclaw Skills.

Memory Tier Architecture

Memory Tier Storage Scope Update Frequency Purpose
CORE Permanent Read-Only Houses identity rules, 7 core directives, and baseline safety frameworks
LEARNED Cross-session JSON Dynamic Accumulates lessons, user-specific coding style preferences, and past mistakes
EPHEMERAL In-memory session state Per-execution Tracks current runtime execution context and temporary signals

Technical Execution Mapping

  • Q-Table Local Storage: Tracks runtime errors and strategy weights for the reinforcement learning engine.
  • Semantic Index: Created locally using the downloaded ModelScope embeddings to handle semantic search and metaphor indexing.

HeartFlow Advanced Features

  • Dual-Speed Reasoning Pipelines: Offers explicit API hooks for fast intuition (thinkFast) versus deep, slow reasoning loops (thinkDeep).
  • Multivariate Cognitive Engines: Includes a Metaphor Library, Common Sense Engine (supporting 6 reasoning modes), and Pattern Detector to process codebase trends.
  • Autonomous Self-Auditing: Scans local code modifications across 6 distinct evaluation dimensions using self-audit.js before applying modifications.
  • Privacy-First Security Guardrails: Completely lacks system/network permissions, restricting all read/write activities to the isolated local memory directory, setting a new safety standard for Openclaw Skills.
  • Local Entropy Measurement: Uses four-dimensional entropy tracking to determine whether an intervention simplifies or complicates codebase architecture.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*