STTP memory infrastructure · Apache-2.0

The ground
beneath
the signal.

Agents are stateless. Context evaporates. Locus gives cognitive state a coordinate — typed, persistent, and verifiable across every session, model, and transport.

What Locus is

Not a product.
Infrastructure.

Locus is the standalone memory layer for the STTP protocol. It handles storage, retrieval, validation, and transport — so everything built on top can treat memory as a solved problem.

MCP server for assistants. HTTP/gRPC gateway for services. Rust SDK for in-process embedding. CLI for operators. One contract, every surface.

locus-mcp stdio · MCP tools for assistants + agents
locus-gateway HTTP + gRPC · deployable host for services
locus-sdk Rust · transport-agnostic in-process memory
locus-cli terminal · operator workflows, no service code
all backed by → locus-core-rs · parser · validator · retrieval
The protocol

Every node is self-sufficient.

Four ordered layers. Layer order is semantic — reordering alters meaning. Every field typed. Every confidence annotated. A stateless receiver needs nothing else.

⊕⟨ PROVENANCE trigger manual format temporal_node session "abc-123" attractor_config { stability: 0.90 friction: 0.20 logic: 0.98 autonomy: 0.85 } ORIENTATION ⦿⟨ ENVELOPE timestamp "2026-04-25T…" tier raw user_avec { stability: 0.90 friction: 0.20 psi: 2.93 } IDENTITY ◈⟨ CONTENT confidence-annotated fields: focus(.99): "parser" decision(.96): {…} insight(.88): "…" confidence ∈ [0.0, 1.0] · max depth 5 MEANING ⍉⟨ METRICS signal quality rho: 0.95 kappa: 0.94 psi: 2.93 compression_avec { stability: 0.90 psi: 2.93 } VERIFICATION
⊕ PROVENANCE
Trigger, response contract, lineage, and attractor baseline. Defines orientation for everything that follows.
⦿ ENVELOPE
Timestamp, tier, session identity, and dual AVEC state. Anchors the node in time and actor context.
◈ CONTENT
Confidence-annotated meaning payload. Typed fields preserve semantic structure across transport and time.
⍉ METRICS
Signal quality and compression profile (ρ, κ, ψ). Enables verification and drift-aware recall behavior.

strict profile fails closed · tolerant profile recovers with diagnostics · additive evolution — old nodes always survive

Six primitives

Like NAND gates —
compose into anything.

Each primitive is deterministic, transport-neutral, and policy-explicit. Combine them into any memory workflow. The composition layer is just primitives, wired.

find recall aggregate transform explain compose any workflow recall_with_explain daily_rollup transform_verify + any workflow
01 · deterministic
find

Filter, sort, and paginate nodes with explicit scope. No ranking — pure predicate logic. Stable sort semantics.

02 · resonant
recall

AVEC-driven ranked retrieval. Surfaces nodes that resonate with the current cognitive state — optionally amplified by semantic signal.

03 · temporal
aggregate

Grouped statistics and rollups across time windows. The foundation of daily, weekly, and monthly timeline compression.

04 · controlled
transform

Bulk mutation with dry-run support. Embedding backfill, schema migration, reindexing — bounded, explicit, reversible.

05 · transparent
explain

Stage-level visibility into the retrieval pipeline. Know exactly why a node was returned — or wasn't. Every decision, auditable.

06 · introspective
schema

Runtime capability discovery. Dynamic UIs and agent planners ask the schema what's possible — no hardcoded assumptions.

Memory in motion

Context doesn't disappear.
It compresses.

Raw sessions accumulate. Locus aggregates them into daily rollups, weekly summaries, monthly signals — each tier retaining the attractor fingerprint of what came before. The signal survives. The noise doesn't.

RAW sessions DAILY rolled up WEEKLY compressed MONTHLY signal only session · 04-21 parser hardening · ψ 2.93 session · 04-22 grammar update · ψ 2.87 session · 04-23 retrieval tuning · ψ 2.91 session · 04-24 sdk design · ψ 2.78 session · 04-25 transport layer · ψ 2.82 daily · 04-21 to 04-23 3 sessions merged focus: parser · grammar ψ̄ 2.90 · κ 0.94 daily · 04-24 to 04-25 2 sessions merged ψ̄ 2.80 · κ 0.91 weekly · Apr W4 5 sessions → 2 rollups dominant: parser work secondary: sdk design ψ̄ 2.87 · κ 0.93 · ρ 0.95 avec preserved ↓ monthly · April 2026 protocol + infra work signal: high logic · low friction ψ̄ 2.88 · compressed information compresses · attractor state persists
Rawsessions
Individual session nodes retain full detail and highest variance.
↓ roll up
Dailymerged
Nearby sessions compress into daily summaries while preserving attractor signature.
↓ compress
Weeklycondensed
Pattern-level memory remains: sustained work streams, strategic pivots, and signal continuity.
↓ distill
Monthlysignal
Only durable trend survives. Lower noise, stable attractor fingerprint, long-horizon recall readiness.

memory_aggregate rolls up tiers · memory_recall retrieves across all tiers simultaneously · AVEC fingerprint survives every compression

See it in action

From intent
to primitive.

An agent — or a human — asks something. Locus maps it to the right primitive automatically. Here's what that looks like under the hood.

natural language

"What did we work on last Tuesday?"

User asks an assistant about a past session

primitive fired
find
scope: tier=raw
filter: date range last Tuesday
sort: timestamp desc · limit 10
natural language

"Find something relevant to what I'm thinking about right now."

Agent wants resonant retrieval by current cognitive state

primitive fired
recall
current_avec: {stability, friction…}
scoring: resonanceWeight 1.0
fallback_policy: on_empty
natural language

"Give me a summary of everything from last month."

Monthly digest — the classic timeline compression request

primitive fired
aggregate
group_by: day
scope: tier=monthly · last 30d
→ composition: daily_rollup
natural language

"Why did it surface that memory and not the one from Thursday?"

User wants to understand a retrieval decision

primitive fired
explain
→ recall_with_explain
returns: stage counts
fallback_reason · scoring_profile
dev query

"memory_transform · embed_backfill · dry_run=true"

Engineer runs an embedding migration pass safely first

primitive fired
transform
dry_run: true → preview only
op: embed_backfill
→ then: transform_then_verify
Cognitive state

The attractor
vector.

Every node carries an AVEC — a four-dimensional fingerprint of cognitive state at the moment of encoding. Recall surfaces nodes that resonate with the current state, not just keyword matches.

ψ coherence is derived — not stored. A receiving agent computes it independently, verifying drift without shared history.

stability
0.90
friction
0.20
logic
0.98
autonomy
0.85
ψ coherence 2.93 high resonance
stability 0.90 friction 0.20 logic 0.98 autonomy 0.85 ψ 2.93
Part of the ecosystem

Built on STTP. Powers Resonantia.

Locus is the infrastructure STTP agents stand on. Any agent, tool, or service that speaks STTP can use Locus as its memory layer.

resonantia · your app · any STTP agent
locus — memory layer
⏣ STTP · typed IR · cognitive state
MCP server · one command
$ docker run --rm -i \
  -v "$PWD/locus-data:/data" \
  ghcr.io/entasislabs/locus-mcp:0.1.0