Skip to main content

SerenLoci

The left brain. A keyed facts-and-logic store for the Seren constellation - addressable, deterministic, exactly one live value per key.

Where SerenMemory (the right brain) holds fuzzy, episodic memory - "we ground on the embedder migration for a week, it was a slog" - Loci holds facts:

{ project, key, value, why }

camelCase is life. braces on a new line in posh. GGML_CUDA_NO_VMM=ON must be set at compile time - because the env var isn't honored at runtime on Jetson. A locus has an address. You go to it and get the thing - you don't grope around for something that rhymes.


Why it's shaped like this

One live value per key, enforced by the database. Set a new value for a key and the old one is superseded - kept as history, pointed at by the new row, never blended. A vibed-together fact is worse than no fact, so the rule is strict, and it's not enforced by hope: a PARTIAL UNIQUE INDEX makes sqlite physically refuse a second live row per (project, key).

Two tiers. A reserved project of * is the fundamentals tier - cross-project truths. A concrete project name (seren-memory) is the per-project tier - the targeted override. Same split as nano/xavier/dgx prebuilts: the platform-wide truth and the per-board variant.

The why is the point. A logic store without rationale is just a dictionary. The value tells you what; the why is what stops you re-learning it the painful way - and it's searchable, so "that CUDA thing" finds a fact whose reason mentions CUDA even when the key doesn't.


The floor is free

Three access rungs, cheapest first:

  1. Exact - get_fact(project, key) returns the live value, deterministically. No embedding, no ranking. You know the address, you get the thing.
  2. Lexical - FTS5 full-text over (key, value, why) of the live rows. The "I sort of remember the words" path.
  3. Vector (additive) - a sqlite-vec index for the "this smells like that CUDA thing" associative jump. Built only when you name an embedder.

Rungs 1 and 2 need nothing but sqlite (stdlib) and the web stack - no torch, no GPU, the 4GB-laptop floor. The vector finder is the ceiling, opted into by install, never required. Where does it sit? How much does it need? - the floor needs almost nothing.


Install

pip install seren-loci                 # the floor: exact + FTS5 lexical
pip install seren-loci[vector]         # + the sqlite-vec associative finder (pulls torch)
pip install seren-loci[mcp]            # + the MCP surface (model reaches facts directly)
pip install seren-loci[corp]           # + OS-trust-store TLS for corp-proxied boxes

Extras stack: pip install seren-loci[vector,mcp].

Run

seren-loci                             # or: python -m seren_loci
seren-loci --config ./seren-loci.yaml

Listens on 7422 by default (neighbor convention: memory 7420, margin 7421, loci 7422).

# set a fundamental truth
curl -X POST localhost:7422/fact -H 'content-type: application/json' \
  -d '{"key":"posh.brace_style","value":"curly brackets on a new line","why":"readability"}'

# get it back, deterministically
curl 'localhost:7422/fact?key=posh.brace_style'

# discovery search (exact-key first, then the finder)
curl -X POST localhost:7422/search -H 'content-type: application/json' \
  -d '{"query":"cuda runtime"}'

API

Method Path What
POST /fact Set/replace a fact (strict supersede). Names the superseded id, or null.
GET /fact The live value for ?project=&key= (project defaults to *). 404 if none.
GET /fact/history Every value a key has held, newest first.
DELETE /fact Retire (soft-supersede) the live value for a key.
GET /facts List facts in scope (?project=&include_superseded=).
GET /counts {live, history, projects}.
POST /search Exact + finder discovery, ranked.
GET / /health Service info / liveness.

Every search hit carries a normalized 0-1 score (exact->1.0, vector->1/(1+distance), lexical->bm25 mapped above 0). That's the common currency a future SerenCorpusCallosum uses to merge left-brain and right-brain results on one axis instead of comparing cosines to key-hits.


Config

seren-loci.yaml (all optional - defaults are a working zero-config dev setup). Env vars (SEREN_LOCI_*) override the file.

server:
  host: 0.0.0.0
  port: 7422
  bearer_token: ""        # empty = no auth (trusted LAN)
storage:
  db_path: ~/.seren-loci/loci.db
  embedding_model:        # null = floor (no torch). name one to light the vector finder.
  embedding_device: cpu
tls:
  trust_system_store: false   # true (+ [corp]) for TLS-intercepting corp proxies

Where it sits in the constellation

  • SerenMemory - the right brain. Fuzzy, consolidated, episodic. General-purpose AI memory protocol.
  • SerenLoci - this. The left brain. Keyed facts, deterministic, strict-supersede.
  • SerenCorpusCallosum (planned) - fans a query across both hemispheres and merges on the shared score currency.

Build for the floor, not the ceiling. The Nano is the floor, not the cap. GPL-3.0-or-later. Rip it and win.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seren_loci-1.2.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seren_loci-1.2.0-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

Details for the file seren_loci-1.2.0.tar.gz.

File metadata

  • Download URL: seren_loci-1.2.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for seren_loci-1.2.0.tar.gz
Algorithm Hash digest
SHA256 427a167e5748f5b551c533809100663a9feb9df531c8eaeb6f87a76735f22d63
MD5 279efc98d9f4130bc6961ac858a93d56
BLAKE2b-256 943e084150a5272b7760eaea44af63ab10d1ce36ec5272bfc97058dfcab08fb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for seren_loci-1.2.0.tar.gz:

Publisher: release.yml on ChadRoesler/SerenLoci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seren_loci-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: seren_loci-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 54.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for seren_loci-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a0f1fbdd82ff534712fb7e3af6b676d7896876edef20c11bf345bbe477ba250
MD5 a2d3f71562f9ca012b22916f572080fe
BLAKE2b-256 6b0cbcec7ec5571fef8630bdeab396558ded325e3af6a9f08358ebb4dd1cea89

See more details on using hashes here.

Provenance

The following attestation bundles were made for seren_loci-1.2.0-py3-none-any.whl:

Publisher: release.yml on ChadRoesler/SerenLoci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.0.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

This release

1.2.0 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page