본문으로 건너뛰기
cccskills
무료GitHub에 공개

cognee-memory

AI knowledge engine - a memory system in 6 lines of code. remember/recall/forget/improve loop, vector + graph search, OpenClaw plugin supported.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md5.2 KB
  • skill-card.md2.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Cognee Memory System

AI knowledge engine — a memory system in 6 lines of code.

Provenance: contributed by ClawHub user @smseow001 (originally published as cognee-memory v1.0.0, MIT-0). Translated from Chinese and adapted for this repository; the verbatim original is preserved in this file's git history.

Website: https://cognee.ai GitHub: https://github.com/topoteretes/cognee Install: pip install cognee OpenClaw plugin: @cognee/cognee-openclaw


Core API

The four operations

OperationPurposeNotes
rememberStore a memoryPersisted into the knowledge graph
recallQuery memoriesAutomatically routes to the best search strategy
forgetDelete memoriesRemove outdated or incorrect memories
improveOptimize learningContinuous learning improves accuracy

Quick start

Python API

import cognee
import asyncio


async def main():
    # Store into the knowledge graph
    await cognee.remember("Cognee turns documents into AI memory.")

    # Store into the session cache (fast)
    await cognee.remember("User prefers detailed explanations.", session_id="chat_1")

    # Query (auto-routed)
    results = await cognee.recall("What does Cognee do?")
    for result in results:
        print(result)

    # Delete
    await cognee.forget(dataset="main_dataset")


asyncio.run(main())

CLI

cognee-cli remember "Cognee turns documents into AI memory."
cognee-cli recall "What does Cognee do?"
cognee-cli forget --all
cognee-cli -ui  # open the local UI

Configuration

Environment variables

# LLM API key (required)
export LLM_API_KEY="your-openai-key"

# Or use another LLM provider
# See: https://docs.cognee.ai/setup-configuration/llm-providers

# Cognee Cloud (optional)
export COGNEE_SERVICE_URL="https://your-instance.cognee.ai"
export COGNEE_API_KEY="ck_..."

Use cases

1. Customer-support agent

User: "My invoice issue still isn't resolved"
Cognee tracks: interaction history, failed operations, resolved cases, product history
Agent reply: "Found 2 similar billing cases resolved last month; the issue was
caused by a payment-system sync delay"

2. SQL copilot (knowledge distillation)

User: "How do I compute customer retention?"
Cognee tracks: expert SQL queries, workflow patterns, schema structure, successful implementations
Agent reply: "A senior analyst solved a similar retention query — here is their approach..."

3. Cross-session memory

# Session 1
await cognee.remember("User prefers detailed explanations", session_id="user_123")

# Session 2 (query across sessions)
results = await cognee.recall("What does the user prefer?", session_id="user_123")

OpenClaw plugin installation

# Install through OpenClaw's plugin manager (not plain npm):
openclaw plugins install @cognee/cognee-openclaw

# Then configure Cognee as the memory provider:
openclaw cognee setup

The plugin integrates automatically via OpenClaw's hook system:

  • before_prompt_build → inject relevant memories into the prompt (auto-recall)
  • after_tool_call → capture tool activity as trace entries
  • llm_output → capture prompt/answer pairs into the session cache
  • agent_end → sync changed memory files after each run
  • session_end → bridge the session cache into the permanent knowledge graph

See the plugin README for required hook permissions (allowPromptInjection, allowConversationAccess) and configuration options.


vs. file-based memory

CapabilityFile-based memoryCognee
StorageFilesVector + graph dual store
SearchKeywordsSemantic + relational
LearningNoneforget + improve
Cross-agentUnsupportedShared knowledge graph
VisualizationNoneCLI UI

Deployment options

PlatformNotes
Cognee CloudManaged service
ModalServerless, GPU autoscaling
RailwaySimplified PaaS
Fly.ioEdge deployment
RenderSimple PaaS

Example code

Full memory loop

import cognee
import asyncio


async def memory_loop():
    # 1. Learn new knowledge
    await cognee.remember("The user is learning Python programming")
    await cognee.remember("The user prefers learning by doing")

    # 2. Query related memories
    results = await cognee.recall("What are the user's learning preferences?")

    # 3. Improve based on feedback
    await cognee.improve("Correct the misunderstanding of the user's preferences")

    # 4. Forget incorrect memories
    await cognee.forget("The incorrect assumption")


asyncio.run(memory_loop())

Installation status

  • Python package: install cognee
  • OpenClaw plugin: install @cognee/cognee-openclaw separately

Powered by Cognee | https://cognee.ai

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

codebase

무료

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Antigravity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

codebase

무료

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Codex.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

Explain a repository's architecture (modules, routes, storage, services), find risky hotspots, draw a Mermaid diagram of the code graph, or review how far a change reaches, from Cognee's code graph.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

Index a repository (local path or git URL) into Cognee's code graph and answer exact structural queries with no LLM calls: callers, dependencies, impact of changing a symbol, call paths, endpoints, re-index changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

A digest of a week or more of the user's own coding-agent sessions (default 7 days): sessions per day and project, most-edited files and the lessons Cognee learned, written up as shipped, decided and still open.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or asks for the `cognee-digest` skill by name. Not for questions about code or the current task.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

topoteretes/cognee-integrations1012026년 10월 20일 업데이트

topoteretes의 스킬 모두 보기

이 스킬의 문제 신고