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
| Tier | Storage | Use |
|---|---|---|
ephemeral | SQLite, TTL-bounded | Per-task summaries, recent state, scratch |
mutable | ARC-69 ASA on Algorand | Long-lived but updatable knowledge — preferences, project facts |
permanent | Algorand blockchain transaction | Immutable 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
| Setting | Default | Description |
|---|---|---|
network | "localnet" | Only localnet supported in v0.1; mainnet/testnet are non-goals |
auto_respond | true | When 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?”.