self-evolving memory for AI agents · no fine-tuning, no weight updates
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
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:
"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.
When ranking is "the last six things saved," today's context gets whatever arrived most recently — not what actually matches the situation at hand.
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
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:
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.
Cosine similarity casts a wide net over memories and knowledge chunks: the top-k candidates that look relevant to the current query.
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.
Winning memories enter the prompt as structured experience — including distilled lessons, with failures explicitly marked as warnings rather than examples to follow.
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.
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.
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
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.
Each Pack owns its memories, embeddings, utilities, and lessons. A trading journal's Pack and an energy-trading Pack share machinery, never data.
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.
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.
Why "Packs"? Wolves travel in packs — tight-knit groups that learn and hunt together. Every memory in a Pack earns its standing.
data structure
Not a string in an array. Each memory is a structured row whose learned fields change over its lifetime:
intent_text / _embeddingwhat the situation was — the retrieval keyresponse_summarywhat was done about itresponse_embeddingvector of the response — powers intrinsic rewardutilitylearned Q-value in [−1, 1] — moves with every rewardconfidencehow reliable the lesson has proven, in [0, 1]signal_polaritysuccess or failure — failures inject as warningsexperience_summarythe distilled, reusable lessonusage_counthow often this memory has been retrieved and usedMemories, utilities, feedback events, retrieval logs, and state traces live in a single embeddable database. Auditable, portable, no infrastructure tax.
Embeddings are indexed for Phase A similarity search across memories and ingested knowledge, with pluggable embedding providers.
Every reward event is persisted with its type and magnitude — explicit, implicit, or intrinsic — so learning is inspectable, not folklore.
in production
The same Pack primitives run across domains that share nothing but the need to get better with use:
tradeshot.ai
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.
gaspro online
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
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 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
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
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.
Phase A recalls the top-k₁ candidates by cosine similarity. Phase B re-ranks them:
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.
Utility is an exponential moving average over reward signals in [−1, 1]:
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.
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.
Every Pack instruments five signals continuously:
episode_counthow much experience existsq_varianceutility convergence vs. the EMA noise floorhit_ratehow often retrieved memories get usedcoverageentropy of what's being exercisedfeedback_densityrewards per episodeThis 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.
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
"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
Explicit links between related memories, so retrieving one activates the cluster of experience around it — not just its nearest lexical lookalikes.
world model
Relevance that propagates through the graph with lateral inhibition — retrieval that follows meaning across hops instead of tunneling into one similarity cluster.
adaptive exploration
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
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
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
Every theme serves the same property: a Pack's value should compound with use. More episodes → better estimates → sharper retrieval → better outcomes → richer episodes.