Memory & AlgoChat

Memory and AlgoChat are external concerns — the heavy lifting is done by fledge-plugin-memory and fledge-plugin-algochat, and merlin-core is a thin adapter.

Memory

At task start, Merlin queries memory with the task description and injects any matches as context. At task end, it writes a one-line ephemeral summary keyed by the task text.

Tiers

TierStorageUse
ephemeralSQLite, TTL-boundedPer-task summaries, recent state, scratch
mutableARC-69 ASA on AlgorandLong-lived but updatable knowledge — preferences, project facts
permanentAlgorand blockchain transactionImmutable record — decisions, milestones

Merlin currently writes everything as ephemeral. The tier-selection heuristic (when to promote a memory to mutable or permanent) is a future sprint.

Recall

use merlin_core::memory;

let entries = memory::recall("parser refactor", &config.memory);
let context = memory::format_context(&entries);

recall shells out to fledge plugins run memory-recall <query>. The plugin does the actual scoring; merlin-core only formats results.

Search from the REPL

> /memory parser refactor
  task-add error handling to the parser [ephemeral] -- Added Result returns and three error variants...

AlgoChat

AlgoChat is messaging over Algorand. With --listen, Merlin polls the inbox every 5 seconds, runs each incoming message as a task, and auto-replies with the summary.

merlin --listen
SettingDefaultDescription
network"localnet"Only localnet supported in v0.1; mainnet/testnet are non-goals
auto_respondtrueWhen false, incoming messages are logged but not run

Inspecting Contacts

> /contacts
  alice -- ABCD1234...
  bob -- WXYZ5678...

Requires fledge-plugin-algochat to be installed. If it isn’t, you’ll see “No contacts found. Is AlgoChat plugin installed?”.