How do you balance stability and plasticity in memory?

Short answer: Protect hard constraints from casual edits while letting preferences and episodes absorb change through gated updates and slow consolidation.

Too much stability leaves stale facts; too much plasticity thrash-rewrites on noise. Complementary learning suggests fast episodic and slow semantic paths. Engram topics, bounded objects, transforms, and buffers are the dials. Set different plasticity per class and measure stale errors, thrash rate, and forgotten-constraint incidents. Sometimes the extreme is stopping retrieval entirely.

Stability keeps useful memories from dissolving under every new turn. Plasticity lets the agent absorb corrections, drift, and environmental change. Lean too far toward stability and stale catalog pins survive every maintenance job. Lean too far toward plasticity and the store thrash-rewrites on noise, intensifies mild preferences, and forgets hard-won constraints. Complementary learning systems theory says one store cannot maximize both at once. Fast episodic paths learn quickly. Slow semantic paths consolidate what recurs. Weaviate Engram gives you levers for that split: topics, bounded objects, transform rewrite-versus-keep decisions, buffers, and application gates on when to add.

This chapter frames the stability-plasticity trade-off for Engram-backed agents, maps Engram features to each side of the dial, shows how to set different policies per topic class, and walks through a dual-path write policy. Purposeful forgetting is what you do when plasticity still is not enough and a memory should leave the live path on purpose.

Why is “remember everything forever” not the stable choice?

After staleness detection, the instinct is to refresh aggressively. That is plasticity without brakes. Unlimited retention looks stable, yet it destabilizes behavior. Conflicting near-duplicates retrieve together. The model improvises a compromise. Engram’s maintenance philosophy is explicit about this. Memory that is only appended becomes noise. Custodial duties include write control, deduplication, reconciliation, amendment, and purposeful forgetting.

True stability is coherent current state plus recoverable history, not an infinite append log in the prompt path. A rewritten preference with a short “previously” clause is more stable for the agent than ten competing paraphrases. Bounded topics encode that idea. One profile or summary per scope updates in place. The identity of the memory stays fixed while the content flexes under transform rules you control.

How does Engram express plasticity without abandoning structure?

Once stability means coherent state, plasticity is how that state moves. Engram’s write path is plastic by design. New evidence enters through memories.add. Transform retrieves neighbors and may rewrite, keep, or delete. Preference changes and role updates are first-class. Buffers delay consolidation until enough episodic scraps exist, which is plasticity with a waiting room rather than instant overwrite.

Topic descriptions are the soft policy layer. Mutable tastes should be described as changeable. Safety rules should be described as durable and high confidence. Transform instructions can keep more history for legal or clinical domains and less for UI theme prefs. Groups isolate use cases so a hyper-plastic continual-learning group does not churn a conservative personalization group.

Application gates finish the picture. Drift detectors, reconsolidation markers, and staleness probes decide when plasticity is allowed to fire. Without gates, every session rewrite is accidental plasticity. With gates, plasticity becomes a controlled response to prediction error.

How should different memory classes sit on the dial?

Knowing the levers, assign postures. Safety and access constraints: high stability, human-gated plasticity, rare deletes. Tool-routing and environment config: medium stability, high plasticity when ground truth changes, automatic refresh allowed. Taste and tone preferences: medium plasticity with cooldowns so one odd session does not swing the baseline. Episodic work notes: high plasticity into summaries, then demote or delete raw episodes after consolidate. Experience rules: slow plasticity through buffers so one failure does not become doctrine.

Complementary architectures in recent agent research make the same cut. Fast stores absorb. Slow stores abstract. Engram can host both as topics in one project or as separate groups. What matters is that retrieval policies differ. Do not inject a pile of labile episodes with the same confidence as a bounded safety profile.

Measure per class. Track stale-fact errors for config topics. Track thrash rate, meaning rewrites per week, for preference topics. Track forgotten-constraint incidents for safety topics. Tune thresholds until those curves are jointly acceptable.

What does a dual-path stability-plasticity policy look like in code?

Imagine a harpsichord shop agent on harpsichord-voicing-bench-8. Quill stiffness preferences may drift. The “never voice over a cracked soundboard” rule must not. The write policy routes each claim differently.

import os
from engram import EngramClient, HybridRetrieval

client = EngramClient(api_key=os.environ["ENGRAM_API_KEY"])
voicer = "voicer-elena-marsh"
bench = {"bench_id": "harpsichord-voicing-bench-8"}

STABLE_MARKERS = ("never", "must not", "cracked soundboard", "safety")
PLASTIC_MARKERS = ("prefer", "lately", "this week", "quill stiffness")

def classify(text: str) -> str:
    lower = text.lower()
    if any(m in lower for m in STABLE_MARKERS):
        return "stable"
    if any(m in lower for m in PLASTIC_MARKERS):
        return "plastic"
    return "default"

def write_memory(text: str, *, force_plastic: bool = False):
    kind = "plastic" if force_plastic else classify(text)
    props = {**bench, "stability_class": kind}

    if kind == "stable":
        # High bar: only explicit operator confirmations update stable rules.
        if "confirmed:" not in text.lower():
            return {"status": "rejected-unconfirmed-stable", "text": text}
        props["requires_human_gate"] = "true"

    run = client.memories.add(
        text,
        user_id=voicer,
        group="personalization",
        properties=props,
    )
    status = client.runs.wait(run.run_id)
    return {"status": status.status, "kind": kind, "run_id": run.run_id}

def retrieve_for_prompt(query: str):
    hits = client.memories.search(
        query,
        user_id=voicer,
        group="personalization",
        properties=bench,
        retrieval_config=HybridRetrieval(limit=8),
    )
    stable = [m for m in hits if (m.properties or {}).get("stability_class") == "stable"]
    plastic = [m for m in hits if (m.properties or {}).get("stability_class") == "plastic"]
    other = [m for m in hits if m not in stable and m not in plastic]
    # Stable memories always win ordering in the prompt.
    ordered = stable + other + plastic
    return ordered

print(
    write_memory(
        "Confirmed: on harpsichord-voicing-bench-8 must not voice over a cracked soundboard."
    )
)
print(
    write_memory(
        "Lately on harpsichord-voicing-bench-8 prefer slightly softer quill stiffness for Italian disposition."
    )
)
for m in retrieve_for_prompt("voicing quill soundboard"):
    print((m.properties or {}).get("stability_class"), m.content)

Stable writes need an explicit confirmation token. Plastic writes flow freely and rely on Engram transform to merge paraphrases. Retrieval always surfaces stable constraints first. That is the dial expressed in application code on top of Engram storage.

How do you know the balance is right?

If users say the agent “won’t let go” of old advice, increase plasticity for that topic class or lower staleness refresh bars. If users say the agent “changes personality every day,” raise cooldowns, widen drift deltas, and harden transform keep behavior for mild restatements. If safety near-misses appear, freeze those topics and require dual approval for delete or rewrite.

Offline consolidation remains the slow plastic path. Online corrections remain the fast path. Stability is what you protect from casual online edits. The extreme of plasticity is not infinite rewriting. Sometimes the right move is to stop retrieving a memory at all.

Our next chapter, When should an agent forget on purpose?, covers intentional forgetting as a first-class maintenance action rather than an accident of decay.