Skip to content

Recipes Overview

This section contains practical, copy-paste-ready patterns for common MindFry use cases. Each recipe demonstrates a specific cognitive behavior.

Each recipe follows a consistent format:

  1. The Problem: What cognitive behavior are we modeling?
  2. The Pattern: MindFry primitives used (bonds, decay, mood)
  3. The Code: Working TypeScript implementation
  4. The Insight: Why MindFry makes this natural

Before diving into recipes, here’s a quick reference of MindFry primitives:

PrimitivePurposeExample
lineage.createCreate a memory{ key: 'topic', energy: 0.8 }
lineage.stimulateAdd energy (cascade){ key: 'topic', delta: 0.5 }
bond.connectLink memories{ from, to, strength, polarity }
system.setMoodAdjust accessibility0.8 (euphoric)
query.neighborsFind connected memoriesKey lookup
graph LR
    A[Source] -->|+1 Synergy| B[Target: +E]
    A -->|0 Neutral| C[Target: ±0]
    A -->|-1 Antagonism| D[Target: -E]

Ready to start? Pick a recipe from the sidebar or continue with the Chatbot Memory pattern.