🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@sebbsssss/clude-brain

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sebbsssss/clude-brain

Cognitive memory engine for AI agents — store, recall, and learn from experience

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@clude/brain

Cognitive memory engine for AI agents. The core of Clude — extracted as a standalone, provider-agnostic package.

What is this?

@clude/brain is the memory engine that powers Clude. It handles:

  • Multi-type memory — episodic, semantic, procedural, self_model
  • Scoring & ranking — vector similarity, importance, decay, recency, Hebbian reinforcement
  • Entity extraction — automatic entity and concept detection
  • Memory linking — typed bonds between related memories
  • Provider-agnostic — bring your own storage and embeddings

Install

npm install @clude/brain

Quick Start

import { CludeEngine } from '@clude/brain';
import type { StorageProvider, EmbeddingProvider } from '@clude/brain';

// Bring your own providers
const engine = new CludeEngine({
  storage: myStorageProvider,
  embeddings: myEmbeddingProvider,
});

// Store a memory
await engine.store({
  content: "Auth bug was caused by expired JWT refresh token",
  type: "procedural",
  tags: ["auth", "debugging"],
  importance: 0.8,
});

// Recall relevant memories
const memories = await engine.recall({
  query: "authentication issues",
  limit: 5,
});

Provider Interface

Implement these interfaces to connect any storage or embedding backend:

interface StorageProvider {
  store(memory: Memory): Promise<string>;
  recall(options: RecallOptions): Promise<Memory[]>;
  get(id: string): Promise<Memory | null>;
  update(id: string, patch: Partial<Memory>): Promise<void>;
  delete(id: string): Promise<boolean>;
  stats(): Promise<MemoryStats>;
}

interface EmbeddingProvider {
  embed(text: string): Promise<number[]>;
  embedBatch(texts: string[]): Promise<(number[] | null)[]>;
  readonly dimensions: number;
}

Available Providers

Memory Types

TypePurposeDecay Rate
episodicEvents, conversationsFast
semanticFacts, knowledgeSlow
proceduralHow-to, patternsVery slow
self_modelSelf-awarenessVery slow

Scoring

Memories are ranked by a weighted combination of:

  • Vector similarity to the query
  • Importance (0-1, with Hebbian reinforcement)
  • Recency (time-decayed)
  • Decay factor (type-dependent)
  • Access count (frequently recalled memories rank higher)

Part of the Clude ecosystem

  • @clude/brain — This package. The memory engine.
  • @clude/cloud — Supabase + Voyage providers.
  • @clude/local — SQLite + local embeddings.
  • @clude/mcp — MCP server for Claude Desktop / Cursor.
  • cludePython SDK (pip install clude)
  • clude-botFull bot with X integration, dream cycles, etc.

License

MIT — Pixl64 LLP

Keywords

ai

FAQs

Package last updated on 11 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts