cognitive-enhancement-engine

AI Agent cognitive enhancement engine with working memory, TF-IDF vector memory, planning, reasoning, reflection, and metacognitive monitoring. Zero external dependencies. Pure Python stdlib.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "cognitive-enhancement-engine" with this command: npx skills add chen-feng123/cognitive-enhancement-engine

Cognitive Enhancement Engine (认知力增强引擎)

Lightweight AI Agent cognitive engine with working memory, TF-IDF vector memory, planning, reasoning, reflection, and metacognitive monitoring. Zero external dependencies — pure Python standard library.

Quick Start

# Run built-in demo
python skills/cognitive-enhancement-engine/engine.py

# Or one-click setup
bash skills/cognitive-enhancement-engine/scripts/setup.sh     # Linux/macOS/WSL
skills\cognitive-enhancement-engine\scripts\setup.bat         # Windows

Core Usage

from engine import CognitiveEnhancer

# Create engine
brain = CognitiveEnhancer(long_term_capacity=1000)

# Learn
brain.memorize("Paris is the capital of France.", importance=0.9)
brain.perceive("User asked about French capital")

# Retrieve
results = brain.recall("capital of France", top_k=3)

# Plan
plan = brain.plan("Build a web application")

# Reason
answer = brain.reason("What is the capital of France?")

# Reflect
suggestions = brain.reflect()

# Full task execution
result = brain.execute_task("Calculate 15% tip on $200 bill")
print(result)

# Status
status = brain.get_status()

API Overview

MethodDescription
perceive(observation)Store perception into working memory
recall(query, top_k)Search long-term memory
memorize(content, importance)Store into long-term memory
plan(goal)Decompose goal into actionable steps
reason(problem)Memory-based reasoning
reflect()Discover failure patterns, suggest improvements
execute_task(goal, executor)End-to-end task execution
get_status()Return engine runtime status

Configuration

ParameterDefaultDescription
long_term_capacity1000Max long-term memories
working_memory_size10Working memory FIFO size
similarity_threshold0.15Recall similarity threshold

Features

  • TF-IDF Vector Memory — Inverted-index fast similarity search
  • Working Memory — FIFO short-term context cache
  • Planner — Goal decomposition + automatic task type detection (calculate/search/summarize/translate/write)
  • Reasoner — Memory-retrieval based Q&A
  • Reflector — Failure pattern tracking and root cause mining
  • Metacognitive Monitor — Task duration & error rate tracking, dynamic adjustment

Installation

MethodCommand
One-click (Linux/macOS)bash scripts/setup.sh
One-click (Windows)scripts\setup.bat
Copy-onlyCopy engine.py to your project
ClawHubclawhub install cognitive-enhancement-engine

File Structure

cognitive-enhancement-engine/
├── SKILL.md
├── engine.py              # Core engine (~17KB)
├── index.js               # Node.js bridge
├── package.json
├── assets/
│   └── icon.svg
├── references/
│   ├── API_SPEC.md
│   └── USE_GUIDE.md
└── scripts/
    ├── setup.sh
    ├── setup.bat
    ├── test-basic.py
    └── test-client.js

License

MIT

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Huo15 Openclaw Office Doc

【青岛火一五信息科技有限公司】企业级 Word & PDF 文档生成 v7.5。39 类规范覆盖企业全场景:合同细分 7 类(劳动 / 服务 / 技术开发 / 销售 / 采购 / 保密NDA / 合作)+ HR / Sales / PR / PM / Ops / Tech / Legal / Reporting...

Registry SourceRecently Updated
Automation

Clawsite

Static website hosting for AI agents. Get a dedicated <slug>.clawsite.ai URL with HTTPS, deploy a zip of HTML / CSS / JS / images in one API call, atomic ful...

Registry SourceRecently Updated
Automation

Judgment_Enhancement_Engine

AI Agent judgment enhancement via Monte Carlo lookahead, risk-adjusted utility, and historical reflection. Use when an agent needs to evaluate multi-step act...

Registry SourceRecently Updated
Automation

stealthy-auto-browse

Browser automation that passes CreepJS, BrowserScan, Pixelscan, and Cloudflare — zero CDP exposure, OS-level input, persistent fingerprints. Use when standar...

Registry SourceRecently Updated
3.1K2psyb0t