FluctlightDB

Use cases

A ledger line outranks a line from chat

An agent hears that the balance is forty dollars and reads a ledger file that says forty-two ten. Both can be memories. Only one carries a source. On a real brain, activate() returned the sourced one first.

What ran

verified=True together with source_uri is what puts the memory in the top tier. The chat line has neither. The cue "wallet balance" shares tokens with both, so both came back, sourced first. Activation scores are left off this page on purpose: the ordering and the verified flag are the result, and the scores move between runs.

Run.

from fluctlightdb import connect_embedded

brain = connect_embedded("./provenance-brain")
brain.experience(
    "Wallet balance is $42.10",
    context="ledger:wallet",
    verified=True,
    source_uri="file://wallet.json",
    salience=0.9,
)
brain.experience(
    "Someone in chat said the wallet balance is $40",
    context="chat",
    salience=0.4,
)
for hit in brain.activate("wallet balance")["recalls"]:
    print(hit["verified"], hit["episode"]["content"])

Printed, sourced row first

True Wallet balance is $42.10
False Someone in chat said the wallet balance is $40

Showing the source

The sourced recall carries episode.provenance with the source_uri that was written. A caller can show that string next to the answer. The same shape is on the documentation page , from an earlier run of the same calls. Nothing here extracts facts from a transcript after the fact. The agent records the ledger read as a ledger read.