Skip to content

Quickstart

Get your first MindFry instance running and create your first memory.

Terminal window
docker run -d -p 9527:9527 ghcr.io/laphilosophia/mindfry:latest
Terminal window
git clone https://github.com/laphilosophia/mindfry.git
cd mindfry
cargo run --release --bin mindfry-server
Terminal window
cargo install mindfry
mindfry-server

Use the CLI to verify the server is running:

Terminal window
# Using cargo
cargo run --bin mfcli -- ping
# Or if installed globally
mfcli ping

Expected output:

PONG (server uptime: 0.5s)
  1. Create a lineage (memory unit)

    Terminal window
    mfcli create fire 0.9

    This creates a memory called “fire” with initial energy of 0.9.

  2. Check the database stats

    Terminal window
    mfcli stats

    You should see lineage_count: 1.

  3. Stimulate the memory

    Terminal window
    mfcli stimulate fire 0.5

    This adds energy to the memory. Watch it propagate to connected memories!

  4. Retrieve the memory

    Terminal window
    mfcli get fire

Install the SDK:

Terminal window
npm install @mindfry/client

Connect and interact:

import { MindFry } from '@mindfry/client'
const brain = new MindFry({ host: 'localhost', port: 9527 })
await brain.connect()
// Create a memory
await brain.lineage.create({ key: 'hello', energy: 0.8 })
// Create a bond (synergy)
await brain.bond.connect({
from: 'hello',
to: 'world',
strength: 0.7,
polarity: 1, // +1 = synergy, -1 = antagonism
})
// Stimulate and watch propagation
await brain.lineage.stimulate({ key: 'hello', delta: 1.0 })
// The 'world' memory now has increased energy due to synaptic propagation!
const world = await brain.lineage.get('world')
console.log(world.energy) // Increased by ~0.35 (damped propagation)
await brain.disconnect()