self-evolving memory for AI agents · no fine-tuning, no weight updates

Memory that earns its place.

Wolfie is a runtime memory library for AI agents. Every memory carries a learned utility score that rises when it helps and decays when it doesn't — so retrieval gets sharper with every episode, and the product gets better with every user.

not a metaphor — utility-ranked retrieval is the core mechanism

the problem

Retrieval isn't learning.

Most agent "memory" is a vector store bolted onto a prompt: embed, search, inject, repeat. It can find similar text. It has no idea what worked. Three failure modes show up in every naive implementation:

bloat

Duplicates pile up

"Chased an entry", "chasing after a loss", and "FOMO chasing" get stored as three separate facts. Free-text dedup by exact match doesn't dedup anything, and the store fills with near-copies of the same idea.

recency ≠ relevance

Newest-N retrieval

When ranking is "the last six things saved," today's context gets whatever arrived most recently — not what actually matches the situation at hand.

no signal

Nothing ever learns

Every stored item keeps equal weight forever. Advice that changed an outcome and advice that was ignored are indistinguishable. A problem the user fixed months ago still surfaces like it's day one.

how it works

Every retrieval is a bet. Every outcome settles it.

Wolfie treats memory as a reinforcement-learning problem: retrieval is an action, the episode's outcome is the reward, and each memory's utility is the running estimate of how much it helps. The loop:

01

Store the episode

An interaction becomes a memory: what was asked, what was done, and — once known — how it turned out. Near-duplicates are caught in embedding space, not by string matching.

02

Phase A — broad recall

Cosine similarity casts a wide net over memories and knowledge chunks: the top-k candidates that look relevant to the current query.

03

Phase B — utility re-rank

Candidates are re-scored by a blend of similarity, learned utility, and lesson confidence — each z-score normalized so no signal drowns the others. An exploration bonus gives knowledge chunks with no track record a fair shot, and decays as they prove out.

04

Inject context + lessons

Winning memories enter the prompt as structured experience — including distilled lessons, with failures explicitly marked as warnings rather than examples to follow.

05

Reward the outcome

When the episode resolves — explicit feedback, a measured result, or implicit signals like the user acting on the advice — every memory that participated gets a reward, and its utility moves by exponential moving average. Help and get promoted; mislead and decay.

06

Write the lesson back

A small model compresses the episode into a reusable lesson attached to the memory — so the next retrieval carries not just the fact, but what experience taught about it.

↺  next query retrieves against the updated utilities — the loop compounds

also shipped · intrinsic reward

Explicit feedback is sparse, so wolfie also computes an intrinsic signal: a response that lands close to what has historically succeeded earns credit, and one that resembles a known failure is penalized — before any human weighs in. It's deliberately under-weighted so it can never promote a memory on its own: self-reinforcement is mathematically capped below the success threshold, a provable guard against echo chambers.

the loop · running

every glow is a memory · brightness is earned

the primitive

Packs: memory with a job description.

Applications don't integrate "a vector database." They integrate a Pack — wolfie's unit of deployable memory.

A Pack is a scoped, self-contained memory with its own store, its own reward wiring, and its own maturity signals.

store

Its own store

Each Pack owns its memories, embeddings, utilities, and lessons. A trading journal's Pack and an energy-trading Pack share machinery, never data.

rewards

Its own reward wiring

What "worked" means is defined per Pack: a measured outcome, explicit ratings, majority vote across attempts, implicit behavioral signals — or a validation hook that checks the output before it ever ships.

state

Its own maturity signals

Every Pack continuously measures how developed its memory is — episode volume, utility convergence, retrieval hit rate, coverage — so consumers can see a Pack warming up from cold start toward earned confidence.

Knowledge Pack Generation Pack Coding Pack — research one taxonomy across every deployment

Why "Packs"? Wolves travel in packs — tight-knit groups that learn and hunt together. Every memory in a Pack earns its standing.

data structure

What a memory actually is.

Not a string in an array. Each memory is a structured row whose learned fields change over its lifetime:

memories · one row
intent_text / _embeddingwhat the situation was — the retrieval key
response_summarywhat was done about it
response_embeddingvector of the response — powers intrinsic reward
utilitylearned Q-value in [−1, 1] — moves with every reward
confidencehow reliable the lesson has proven, in [0, 1]
signal_polaritysuccess or failure — failures inject as warnings
experience_summarythe distilled, reusable lesson
usage_counthow often this memory has been retrieved and used

SQLite — the ledger

Memories, utilities, feedback events, retrieval logs, and state traces live in a single embeddable database. Auditable, portable, no infrastructure tax.

Vector index — the recall

Embeddings are indexed for Phase A similarity search across memories and ingested knowledge, with pluggable embedding providers.

Feedback log — the receipts

Every reward event is persisted with its type and magnitude — explicit, implicit, or intrinsic — so learning is inspectable, not folklore.

in production

One memory engine, very different jobs.

The same Pack primitives run across domains that share nothing but the need to get better with use:

tradeshot.ai

A trading journal that learns your biases

Traders journal their trades and reflect with an AI that remembers. Wolfie stores each trader's behavioral patterns as memories, recalls the ones relevant to today's state of mind, and surfaces them as pre-trade warnings.

the loop in the wild: a pattern warns a trader before a trade → the trade resolves with real profit or loss → the reward is graded by outcome size and whether the warning was heeded → the pattern's utility updates → tomorrow's warnings are sharper. Bias profiles that once accumulated forever now compound instead.

gaspro online

Energy trading & risk management

An ETRM platform serving some of the largest oil & gas companies in the United States. Wolfie holds the memory of a twenty-year system — form specifications, database schema, scheduling and nomination workflows — over a thousand indexed knowledge chunks served through a chat assistant that learns which answers hold up.

ascend

Commercial eLearning for energy trading

A training platform that teaches natural-gas trading, built on wolfie's Generation Pack: course content is authored with validation hooks, served with memory-aware chat, and improved by the same reward loop — with a whitelabel sibling platform running the identical stack for new domains.

mojo voice · shade.ai · mojo-audio

A realtime voice & audio stack

A GPU-accelerated audio engine written in Mojo — mel spectrograms and neural inference 20–40% faster than the standard tooling — powering local, private developer dictation and studio voice conversion. Wolfie is the memory layer coming online across the stack: per-user vocabulary, corrections, and preferences that persist and sharpen with use.

osrs.maximus.tools

25 years of game knowledge

A scale proof: Old School RuneScape's deeply interconnected world — quests, items, mechanics, and two-plus decades of accumulated lore — embedded into a knowledge base, with multi-hour gameplay video processed through the same media pipeline that runs the business deployments.

under the hood

The mechanics, for people who read the math.

Wolfie is a production implementation of the MemRL framework — "Self-Evolving Agents via Runtime Reinforcement Learning on Episodic Memory" (Zhang et al., 2026) — extended with its own reward vocabulary, confidence tracking, intrinsic feedback, and maturity instrumentation.

Two-phase retrieval

Phase A recalls the top-k₁ candidates by cosine similarity. Phase B re-ranks them:

score = β·z(utility) + (1−β)·z(cosine) + γ·z(confidence) β = 0.5, γ = 0.2

All three signals are z-score normalized before blending, so no scale dominates. Knowledge chunks without a track record get a UCB-style exploration bonus, 0.1/√(1+uses) — generous while untested, gone once the data speaks.

Learning rule

Utility is an exponential moving average over reward signals in [−1, 1]:

qₜ₊₁ = (1−α)·qₜ + α·reward α = 0.1, per the MemRL paper

Rewards come from wherever truth lives in the domain: explicit ratings, measured outcomes scaled by magnitude, majority vote across generations, or a vocabulary of implicit signals — the user accepting, editing, ignoring, or acting on what memory surfaced. Lesson confidence updates on a separate, slower track.

Intrinsic reward, with a safety proof

Adapted from Memory-R+ into cosine space: the exploit term scores a response against the centroid of past successful responses to similar intents; the explore term is a pure penalty for resembling known failures (never a bonus). It stays silent on cold stores — below a minimum of qualifying neighbors it returns nothing rather than noise.

Blended at weight 0.2, its EMA fixed point sits below the success threshold that gates the exploit pool — so intrinsic feedback alone can never promote a memory into the success set it's scored against. The echo-chamber guard is an invariant, not a hope.

PackState: measured maturity

Every Pack instruments five signals continuously:

episode_counthow much experience exists
q_varianceutility convergence vs. the EMA noise floor
hit_ratehow often retrieved memories get used
coverageentropy of what's being exercised
feedback_densityrewards per episode

This is the instrumentation-first answer to "how does it improve as users generate data": deployments log these traces in production now, so the adaptive behavior that consumes them — state-aware retrieval, self-tuned hyperparameters — is calibrated on real episodes, not defaults.

Beyond text

A media pipeline turns long-form video — screen recordings, meetings, training sessions — into memory: checkpointed multi-step processing with transcription, chunking, and embedding, so a seven-hour recording becomes a queryable Pack for about the price of a coffee. An eval harness with typed metrics keeps retrieval quality measurable as Packs grow.

roadmap

Where this is going.

"Memory should be a graph, not a list."

Flat vector stores are the legacy pattern. The research frontier — and wolfie's north star — is associative structure with learned traversal. The themes:

associative linking

Memories that know their neighbors

Explicit links between related memories, so retrieving one activates the cluster of experience around it — not just its nearest lexical lookalikes.

world model

Knowledge-graph memory with spreading activation

Relevance that propagates through the graph with lateral inhibition — retrieval that follows meaning across hops instead of tunneling into one similarity cluster.

adaptive exploration

Hyperparameters that tune themselves

The retrieval blend and learning rates are hand-set today, honestly labeled as such. Next: per-Pack self-tuning driven by the production traces already accumulating.

state-aware packs

Behavior that respects maturity

A cold Pack should explore and hedge; a warm Pack should exploit and commit. PackState signals become a classifier, and Pack behavior becomes conditional on earned confidence.

admission control

A gate at the write path

Quality control before storage — utility, novelty, and confidence factors deciding what deserves to be remembered at all, paired with the ranking that already decides what deserves to be retrieved.

the through-line

Compounding, on purpose

Every theme serves the same property: a Pack's value should compound with use. More episodes → better estimates → sharper retrieval → better outcomes → richer episodes.