Install
The pip line, then a brain
FluctlightDB runs inside your Python process. A brain is a directory. There is no server to start and no account to open. The software is beta.
Install
pip install "fluctlightdb[native]"
The [native] extra pulls the compiled Rust core. Without it you get the pure-Python fallback, which is slower and is not what the measurements were taken on.
A first brain
This is the canonical sample. It was run against the published package, and it is the same sample the rest of the site shows.
from fluctlightdb import connect_embedded
brain = connect_embedded("./my-agent-brain") # one directory per agent, in-process
brain.experience("User prefers dark mode", context="settings", salience=0.7)
brain.experience("Wallet balance is $42.10", context="ledger:wallet",
verified=True, source_uri="file://wallet.json")
hits = brain.activate("dark mode") # cue -> ranked recalls
brain.checkpoint() # durable; survives restart - from fluctlightdb import connect_embedded; brain = connect_embedded("./my-agent-brain") — a brain is a directory, and the engine runs in your process.
- brain.experience("User prefers dark mode", context="settings", salience=0.7)
- hits = brain.activate("dark mode")["recalls"]
Make it durable
brain.checkpoint() — nothing is durable until it returns.
A write-ahead log and atomic checkpoints put the brain directory on disk. Crash recovery is exercised in CI with SIGKILL mid-write and torn WAL tails.
Where this goes next
- The quickstart, the same sample with the lexical-recall limit beside it.
- The documentation, including the return shapes and the mistakes agents make against this API.