FluctlightDB CLI

June 20, 2026 · View on GitHub

Brain-native memory for agents — not SQL, not a vector DB. This guide maps familiar database CLI patterns to Fluctlight commands.

Quick start

# Interactive REPL (tables by default)
fluctlight shell --path ~/.fluctlight/tenants/default/brain

# One-shot JSON (scripting)
fluctlight status
fluctlight activate "wallet balance"

When fluctlight-serve is running, read-only CLI commands prefer HTTP automatically. Use --local in the shell to force opening the brain file directly.

SQL / vector → Fluctlight mapping

You want (SQL)You want (vector DB)Fluctlight
SELECT COUNT(*)collection infostatus
SELECT * LIMIT 10scrolllist 10 (in shell) or query list_engrams
SELECT * WHERE id = ?get pointget UUID
WHERE content LIKE '%x%'similarity searchrecall CUE
INSERTupsertexperience CONTENT
DELETEdelete pointforget UUID (shell, --writable)
EXPLAINpreplay GOAL
verified columnpayload metadataverified / warnings

Interactive shell

fluctlight shell [--path BRAIN] [--writable] [--local]

Example session (agent wallet memory):

fluctlight> status
fluctlight> list 10
fluctlight> recall wallet balance
fluctlight> verified
fluctlight> warnings
fluctlight> preplay wallet balance 3
fluctlight> stage
fluctlight> \json on
fluctlight> quit

REPL commands

CommandDescription
statusStage, engram count, synapses, pressure
list [N]Browse engrams (paginated)
get UUIDFull engram detail
recall CUESpreading activation recall
complete CUEPattern completion
verifiedLedger/file ground truth
warningsUnverified factual chat claims
rag DOC [CHUNK]RAG chunks by document
preplay GOAL [STEPS]Planning / activation path
stageCLS maturation metrics
forget UUIDRemove engram (requires --writable)
export viz|graph|raw [FILE]Export brain snapshot
\json on|offToggle table vs JSON output

HTTP query API

POST /api/v1/query with JSON body:

{"query": {"op": "list_engrams", "page": 0, "page_size": 20}}

Operations:

  • list_engrams — browse all
  • list_verified — verified facts only
  • list_unverified — unverified factual claims
  • get_engram — by UUID
  • search_hybrid — recall with optional vector
  • search_by_rag — doc/chunk lookup
  • stats — brain counters
  • forget / forget_before — admin write

Batch activate (agents)

POST /api/v1/activate-batch:

{
  "batch": [
    {"cue": "wallet balance"},
    {"cue": "redis timeout", "semantic_vector": [0.9, 0.1]}
  ]
}

Python SDK:

from fluctlightdb import FluctlightClient
client = FluctlightClient.from_env()
client.activate_batch([{"cue": "wallet balance"}, {"cue": "my balance"}])

Access modes (SQL vs Fluctlight)

StoreTypical accessProcess model
SQLiteIn-process library (sqlite3, rusqlite)Same process as your app — no HTTP
PostgreSQLTCP client (psql, libpq)Separate server process — not HTTP
Qdrant / WeaviateHTTP or gRPC APISeparate server — network hop every query
Fluctlight workerJSON lines on stdin/stdoutIn-process — brain loaded once, sub-ms recall
Fluctlight serveHTTP on 127.0.0.1:8792Separate process — good for multi-tenant + writes
Fluctlight CLI one-shotSubprocess per commandSlow (~50ms) — avoid in agent hot loops

Agent hot path (recommended): FLUCTLIGHT_WORKER=1 or FLUCTLIGHT_EMBEDDED=1 → persistent fluctlight worker.

# Manual worker (one line per request)
echo '{"op":"activate","cue":"wallet balance"}' | fluctlight worker --path ~/.fluctlight/tenants/default/brain

Python:

from fluctlightdb import get_worker
w = get_worker()
w.activate("wallet balance")  # sub-ms after first call

Environment variables

VariableDefaultPurpose
FLUCTLIGHT_ACTIVATE_CACHE1LRU cache for repeat cues
FLUCTLIGHT_CACHE_TTL_SECS60Cache TTL
FLUCTLIGHT_CANDIDATE_CAP128Max engrams scored per activate
FLUCTLIGHT_SEPARATION_GATE1Block near-duplicate chat ingest
FLUCTLIGHT_WORKER0Agent apps: persistent in-process worker
FLUCTLIGHT_EMBEDDED0Same as FLUCTLIGHT_WORKER=1 (alias)

Visualization

  • fluctlight export-viz → JSON for docs/visual.html
  • fluctlight export-graph → synapse graph
  • fluctlight export-raw → full engrams + synapses (backup)