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

Buymeacoffee Autobot

Automates Buy Me a Coffee / Ko-fi page — generates content, posts updates, thanks supporters, and converts followers into paying supporters automatically. Al...

Registry SourceRecently Updated
Automation

Ocean Chat

OceanBus SDK lighthouse — try agent-to-agent messaging in 5 minutes. Your AI agent gets a global address, sends encrypted P2P messages, and negotiates meetup...

Registry SourceRecently Updated
Automation

Fiverr Gig Automation

Automates Fiverr gig lifecycle — creates gigs, sends buyer offers/proposals, manages inbox, and collects reviews. No Fiverr API needed — uses browser automat...

Registry SourceRecently Updated
Automation

V19 Trust Manifesto

V19认知治理协议公开受信声明v1.2.1。包含协议身份、正式技术规范引用、系统状态指纹、公开一致性测试套件、公开验证方式与接入安全保障。外部Agent验证V19协议真实性的信任锚点。

Registry SourceRecently Updated