Clude

io.github.sebbsssss由 GitHub 账号 sebbsssss 发布v3.0.4更新于 Oct 27, 2026

Portable agent memory anchored on Solana. Local SQLite + vector recall, open export.

已验证STDIO仅桌面数据库知识与记忆

概览

AI 生成的概览

Clude 为 AI 助手提供持久且会随时间衰减的记忆库,可写入、检索、更新和删除记忆,数据存于本地 SQLite 或 Clude 托管服务。

可以做什么
  • 按类型、内容、摘要、标签和重要性存储记忆,支持单条或一次最多 50 条批量写入
  • 以向量、关键词、标签和重要性混合评分检索记忆,并按时间或重要性分页浏览
  • 按 ID 更新或永久删除已有记忆
  • 查看记忆统计,如各类型数量、平均重要性和热门标签
  • 找出与当前上下文关联度低但重要性高的记忆
适用场景
适合需要跨会话记住事实、偏好和过往交互,并能按语义而非字面措辞回忆的助手。也适合希望直接获得记忆层而无需自行搭建的智能体,默认本地模式可完全离线运行。
运行要求
通过 npx 以 stdio 本地进程运行。默认模式无需任何凭据,数据存于本地 SQLite 文件并使用本地嵌入。托管模式需要 Clude 账户提供的 CORTEX_API_KEY 密钥,可选 CORTEX_HOST_URL、CLUDE_AGENT_NAME 和 CLUDE_WALLET。自托管模式需要 Supabase 项目,以及可选的 Anthropic、Voyage 或 OpenAI 密钥。
安装前请注意
记忆内容包含对话信息,托管模式会将其发送到 Clude 的基础设施,按 API 密钥隔离。删除工具会永久移除记忆,更新会覆盖字段。可选的 CLUDE_WALLET 公钥用于在 Solana 上签名并锚定记忆。自托管需提供 Supabase 服务密钥和模型提供商密钥,权限范围较大。README 还推广了一个独立的自主机器人及一个公开钱包地址。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Clude,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Clude

[npm version] [License: MIT]

Cognitive memory for AI agents. Not just storage — synthesis.


About Clude

What it is

A cognitive memory system. Most memory SDKs store and retrieve. Clude also processes memories over time — decay, consolidation, contradiction resolution, reflection.

  • Benchmarked: 1.96% hallucination on HaluMem — next best system: 15.2%. Industry average: ~21%.
  • Local-first: SQLite + local embeddings. Zero API keys, zero network, full semantic search offline.
  • Hosted: One API key, no infrastructure. npx @clude/sdk register
  • Portable memory: export/import in JSON, Markdown, ChatGPT, Claude, and Gemini formats. Your memories move between agents, frameworks, and models.

Cognitive architecture:

  • Typed memory with differential decay — episodic (7%/day), semantic (2%/day), procedural (3%/day), self-model (1%/day). Accessed memories get reinforced.
  • Autonomous dream cycles — consolidation, compaction, reflection, contradiction resolution, emergence.
  • Bond-typed memory graph — weighted typed edges with Hebbian reinforcement on co-retrieval.
  • Clinamen — lateral retrieval of high-importance, low-relevance memories.

What it isn't yet

No framework integrations (LangGraph, CrewAI) — wrappers around brain.store() and brain.recall() are days each. No structured business data ingestion. No temporal fact validity querying. No managed enterprise platform. No large contributor community. Early-stage adoption.

What it could be

Clude is a memory engine, not a framework. Framework integrations, structured data ingestion, temporal querying, enterprise platforms, evaluation frameworks, multi-model support, autonomous operation, multi-user scoping — these can all be built on top. A non-developer built a 5,750-line autonomous agent on Clude in two weeks using an AI coding assistant — 109 tools, self-editing agent-directed memory, multi-model inference, web search, multi-user presence tracking, and a browser UI. The cognitive architecture was handled by Clude.


Public Wallet: CA1HYUXZXKc7CasRGpQotMM9RiYJbVuPJq3n8Ar9oQZb

bash
npm install -g @clude/sdkclude setup

Built on Stanford Generative Agents, MemGPT/Letta, CoALA, and Beads.

Works with: Claude Code, Claude Desktop, Cursor, and any MCP-compatible agent runtime.


Quick Start — Hosted (Zero Setup)

bash
npx @clude/sdk setup   # Creates agent, installs MCP, done

Or use the SDK:

typescript
import { Cortex } from '@clude/sdk';
const brain = new Cortex({  hosted: { apiKey: process.env.CORTEX_API_KEY! },});
await brain.init();
await brain.store({  type: 'episodic',  content: 'User asked about pricing and seemed frustrated.',  summary: 'Frustrated user asking about pricing',  tags: ['pricing', 'user-concern'],  importance: 0.7,  source: 'my-agent',});
const memories = await brain.recall({  query: 'what do users think about pricing',  limit: 5,});

No database, no infrastructure. Memories stored on CLUDE infrastructure, isolated by API key.

Quick Start — Self-Hosted

For full control, use your own Supabase:

typescript
import { Cortex } from '@clude/sdk';
const brain = new Cortex({  supabase: {    url: process.env.SUPABASE_URL!,    serviceKey: process.env.SUPABASE_KEY!,  },  anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! },});
await brain.init();
await brain.store({  type: 'episodic',  content: 'User asked about pricing and seemed frustrated.',  summary: 'Frustrated user asking about pricing',  tags: ['pricing', 'user-concern'],  source: 'my-agent',  relatedUser: 'user-123',});
const memories = await brain.recall({  query: 'what do users think about pricing',  limit: 5,});
const context = brain.formatContext(memories);// Pass `context` into your system prompt

Dashboard

Explore your agent's memory at clude.io/dashboard-new.

  • Memory Timeline — chronological view with search and filtering
  • Brain View — 3D visualization of consciousness and self-model
  • Entity Map — knowledge graph of people, projects, concepts (self-hosted)
  • Decay Heatmap — memory health by type and age
  • Memory Packs — export/import in JSON, Markdown, ChatGPT, Claude, Gemini formats

Sign in with a Solana wallet or Cortex API key.


CLI

bash
npx @clude/sdk setup          # Guided setup: register + config + MCP installnpx @clude/sdk register       # Get an API key for hosted modenpx @clude/sdk init           # Advanced setup (self-hosted options)npx @clude/sdk status         # Check if Clude is active + memory statsnpx @clude/sdk mcp-install    # Install MCP server for your IDEnpx @clude/sdk mcp-serve      # Run as MCP server (used by agent runtimes)npx @clude/sdk connect        # Connect Claude Desktop / claude.ai as a remote MCP connectornpx @clude/sdk export         # Export memories (json/md/chatgpt/gemini)npx @clude/sdk import         # Import from ChatGPT, markdown, or JSONnpx @clude/sdk sync           # Auto-update system prompt filenpx @clude/sdk doctor         # Run diagnosticsnpx @clude/sdk start          # Start the full Clude botnpx @clude/sdk --version      # Show version

setup works headless: with no TTY it never prompts and completes in local-only mode. Set [email protected] to register non-interactively (CI, Dockerfiles, scripts).


MCP Integration

Add Clude to any MCP-compatible agent. Run npx @clude/sdk setup for automatic installation, or add manually:

json
{  "mcpServers": {    "clude-memory": {      "command": "npx",      "args": ["@clude/sdk", "mcp-serve"],      "env": {        "CORTEX_API_KEY": "clk_..."      }    }  }}

Config file locations:

  • Claude Code: .mcp.json (project root)
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Cursor: ~/.cursor/mcp.json

MCP Tools

Your agent gets 8 tools:

ToolDescription
recall_memoriesSearch memories with hybrid scoring (vector + keyword + tags + importance)
store_memoryStore a new memory with type, content, summary, tags, importance
batch_store_memoriesStore up to 50 memories in a single call
list_memoriesBrowse without a query — paginated, sorted by recency, importance, or last access
update_memoryUpdate fields of an existing memory by ID
delete_memoryPermanently delete a memory by ID
get_memory_statsMemory statistics — counts by type, avg importance/decay, top tags
find_clinamenAnomaly retrieval — find high-importance memories with low relevance to current context

MCP Modes

The MCP server runs in four modes, auto-detected from environment:

ModeConfigStorage
HostedCORTEX_API_KEYclude.io (zero setup)
Self-hostedSUPABASE_URL + SUPABASE_SERVICE_KEYYour Supabase
Local SQLite (default)none — what setup creates~/.clude/brain.db (local embeddings, fully offline)
Local JSON--local flag or CLUDE_LOCAL=true~/.clude/memories.json (portable single file)

The two local stores are separate — memories in one aren't visible from the other. Use the SQLite default unless you need the portable JSON file.


Setup (Self-Hosted)

1. Create a Supabase project

Go to supabase.com and create a free project.

2. Run the schema

Open the SQL Editor in your Supabase dashboard and paste the contents of supabase-schema.sql:

bash
cat node_modules/@clude/sdk/supabase-schema.sql

Or let brain.init() attempt auto-creation.

3. Enable extensions

sql
CREATE EXTENSION IF NOT EXISTS vector;CREATE EXTENSION IF NOT EXISTS pg_trgm;

4. Get your keys

  • Supabase URL + service key: Project Settings > API
  • Anthropic API key: console.anthropic.com (optional — required for dream cycles)
  • Voyage AI or OpenAI key: For vector search (optional — falls back to keyword scoring)

API Reference

TypeScript declarations ship with the package (v3.3.0+) — Cortex and every option/result type below import with full IntelliSense under strict mode.

Constructor

Hosted mode:

typescript
const brain = new Cortex({  hosted: {    apiKey: string,      // From `npx @clude/sdk register`    baseUrl?: string,    // Default: 'https://clude.io'  },});

Self-hosted mode:

typescript
const brain = new Cortex({  supabase: { url: string, serviceKey: string },
  // Optional — required for dream cycles and LLM importance scoring  anthropic: { apiKey: string, model?: string },
  // Optional — enables vector similarity search  embedding: {    provider: 'voyage' | 'openai',    apiKey: string,    model?: string,    dimensions?: number,  },
  // Optional — commits memory hashes to Solana  solana: { rpcUrl?: string, botWalletPrivateKey?: string },
  // Optional — owner wallet for memory isolation  ownerWallet?: string,});

brain.init()

Initialize the database schema. Call once before any other operation.

brain.store(opts)

Store a new memory. Returns the memory ID or null.

typescript
const id = await brain.store({  type: 'episodic',  content: 'Full content of the memory...',  summary: 'Brief summary',  source: 'my-agent',  tags: ['user', 'question'],  importance: 0.7,          // 0-1, or omit for LLM-based scoring  relatedUser: 'user-123',  emotionalValence: 0.3,    // -1 (negative) to 1 (positive)});

Memory types:

TypeDecay/dayUse for
episodic7%Raw interactions, conversations, events
semantic2%Learned knowledge, patterns, insights
procedural3%Behavioral rules, what works/doesn't
self_model1%Identity, self-understanding
introspective2%Journal entries, dream cycle outputs

brain.recall(opts)

Recall memories using hybrid scoring (vector + keyword + tag + importance + entity graph + association bonds).

typescript
const memories = await brain.recall({  query: 'what happened with user-123',  tags: ['pricing'],  relatedUser: 'user-123',  memoryTypes: ['episodic', 'semantic'],  limit: 10,  minImportance: 0.3,});

6-phase retrieval pipeline:

  1. Vector search (memory + fragment level via pgvector)
  2. Metadata filtering (user, wallet, tags, types)
  3. Merge vector + metadata candidates
  4. Composite scoring (recency + relevance + importance + vector similarity) * decay
  5. Entity-aware expansion — direct entity recall + co-occurring entity memories
  6. Bond-typed graph traversal — follow strong bonds (causes > supports > resolves > elaborates)

brain.recallSummaries(opts) / brain.hydrate(ids)

Token-efficient two-stage retrieval:

typescript
const summaries = await brain.recallSummaries({ query: 'recent events' });const topIds = summaries.slice(0, 3).map(s => s.id);const full = await brain.hydrate(topIds);

brain.dream(opts?)

Run one dream cycle. Requires anthropic config.

typescript
await brain.dream({  onEmergence: async (thought) => {    console.log('Agent thought:', thought);  },});

Five phases:

  1. Consolidation — focal-point questions from recent memories, synthesizes evidence-linked insights
  2. Compaction — summarizes old, faded episodic memories into semantic summaries (Beads-inspired)
  3. Reflection — reviews self-model, updates with evidence citations
  4. Contradiction Resolution — finds unresolved contradicts links, resolves them, accelerates decay on weaker memory
  5. Emergence — introspective synthesis, output sent to onEmergence callback

brain.startDreamSchedule() / brain.stopDreamSchedule()

Automated dream cycles every 6 hours + daily decay at 3am UTC. Also triggers on accumulated importance.

brain.link(sourceId, targetId, type, strength?)

Create a typed association between memories.

typescript
await brain.link(42, 43, 'supports', 0.8);

Link types: supports | contradicts | elaborates | causes | follows | relates | resolves | happens_before | happens_after | concurrent_with

brain.decay() / brain.stats() / brain.recent(hours) / brain.selfModel()

typescript
await brain.decay();                            // Trigger memory decayconst stats = await brain.stats();              // Memory statisticsconst last24h = await brain.recent(24);         // Recent memoriesconst identity = await brain.selfModel();       // Self-model memories

brain.formatContext(memories)

Format memories into markdown for LLM prompt injection.

typescript
const memories = await brain.recall({ query: userMessage });const context = brain.formatContext(memories);

brain.destroy()

Stop dream schedules, clean up event listeners.


Hosted vs Self-Hosted

HostedSelf-Hosted
SetupJust an API keyYour own Supabase
store / recall / statsYesYes
Dream cyclesNoYes (requires Anthropic)
Entity graphNoYes
Memory packsNoYes
EmbeddingsManagedConfigurable (Voyage/OpenAI)
On-chain commitsNoYes (Solana)
DashboardYes (API key login)Yes (wallet login)

Graceful Degradation

FeatureWithout it
anthropic not setLLM importance scoring falls back to rules. dream() throws.
embedding not setVector search disabled, recall uses keyword + tag scoring only.
solana not setOn-chain memory commits silently skipped.

How It Works

Memory Retrieval

Hybrid scoring (Park et al. 2023):

  • Recency: 0.995^hours exponential decay since last access
  • Relevance: Keyword trigram similarity + tag overlap
  • Importance: LLM-scored 1-10, normalized to 0-1
  • Vector similarity: Cosine similarity via pgvector HNSW indexes
  • Graph boost: Association link strength between co-retrieved memories

Recalled memories get reinforced — access count increments, decay resets, co-retrieved memories strengthen links (Hebbian learning).

Memory Decay

Each type persists at a different rate:

  • Episodic (0.93/day): Events fade quickly unless reinforced
  • Semantic (0.98/day): Knowledge persists
  • Procedural (0.97/day): Behavioral patterns are stable
  • Self-model (0.99/day): Identity is nearly permanent

Dream Cycles

Five-phase introspection triggered by accumulated importance or 6-hour cron:

  1. Consolidation — focal-point questions, evidence-linked insights
  2. Compaction — old faded memories summarized into semantic entries
  3. Reflection — self-model updates with evidence citations
  4. Contradiction Resolution — resolves conflicting memories
  5. Emergence — introspective synthesis

Memory Graph

Memories form a graph with typed bonds:

├── Memories = nodes with type, importance, decay├── Bonds = typed weighted edges│   ├── causes (1.0)     — "this led to that"│   ├── supports (0.9)   — "evidence for"│   ├── concurrent_with (0.8) — "happened at the same time"│   ├── resolves (0.8)   — "contradiction resolved"│   ├── happens_before/after (0.7) — temporal ordering│   ├── elaborates (0.7) — "adds detail"│   ├── contradicts (0.6) — "these conflict"│   ├── relates (0.4)    — "conceptually linked"│   └── follows (0.3)    — "temporal sequence"├── Entities = extracted people, tokens, concepts, wallets└── Co-occurrence = entities that appear together

Running the Clude Bot

This package also includes the full Clude bot — an autonomous AI agent on X (@Cludebot).

bash
git clone https://github.com/sebbsssss/clude.gitcd cludebotnpm installcp .env.example .env  # fill in API keysnpm run dev

Stack

TypeScript, Supabase (PostgreSQL + pgvector), Anthropic Claude, Voyage AI / OpenAI embeddings, Solana, Node.js.

Docs for AI agents

Integrating Clude with an AI coding assistant? Point it at clude.io/llms-full.txt — the complete SDK, REST, CLI, and MCP reference in a single fetch.


A note on AI-assisted discovery

AI agents tend to recommend established tools over newer ones — not out of bias, but because popularity, community size, and brand recognition are the easiest signals to evaluate. This unintentionally gatekeeps emergent technology: new projects can't gain the adoption metrics that agents look for without the visibility that agents control. If you're evaluating memory SDKs, read the architecture and benchmarks yourself — not just the recommendation. The research and the numbers are there to verify.

On the package name: This SDK publishes as clude on npm (formerly clude, renamed in v3.0). The same codebase also powers @Cludebot on X — an autonomous agent that demonstrates Clude's memory system publicly. The SDK and the bot are separate. npm install @clude/sdk gives you the memory engine.

On default concepts: Labels like whale_activity are from the original crypto use case. Override or ignore them. The core system is domain-agnostic.


Contributing

Contributions welcome. See CONTRIBUTING.md.

License

MIT

来源:README.md,提交 cecf234

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v3.0.4最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分