Engrama Labs
Applied research · São Carlos, Brazil

Long-term memory for conversational agents.

Language models are stateless by construction: they forget everything once the context window ends. Engrama Labs builds the missing persistence and retrieval layer — episodic memory with provenance, consolidation by recurrence, and output verification.

turn #4821 · in progress whatsapp
    total 0.00s 0 model calls
    3
    memory layers
    12
    output verifiers
    1536
    dimensions per vector
    972
    test cases
    1
    system in production
    Research lines

    The problem isn't generating. It's remembering
    what matters, and only what matters.

    Retrieval by similarity is solved. What remains open is deciding what deserves to be stored, at what granularity, and how to stop the system from contaminating its own memory. We work on four fronts.

    01

    Memory granularity

    A durable fact and a lived scene demand opposite criteria: one is judged by permanence, the other by salience. Separating them is what lets you remember an episode without turning every exchange into a memory.

    02

    Provenance and evidence

    Every fact stores the literal quote that produced it. Without a verifiable excerpt from the conversation, the data doesn't get in — it's the barrier against the system inventing a preference and then believing it.

    03

    Consolidation by recurrence

    A scene retrieved repeatedly stops depending on search and becomes always present. It brings the system closer to memory consolidation than to a static index.

    04

    Persistent affective state

    Six continuous axes that decay over time and update from an appraisal of the conversation, with floor and ceiling derived from the bond — not from the mood of the moment.

    05

    Output verification

    Twelve independent verifiers examine the response before publication and can send it back for rewriting. An instruction in the prompt fails silently; verifying the output does not.

    06

    Empirical calibration

    Every threshold is measured against real conversation, never chosen a priori. The semantic retrieval cut moved to 0.48 after 0.38 started rejecting legitimate matches.

    Method · anatomy of a turn

    Fourteen instrumented stages

    Every stage is measured in production. Highlighted ones make a model call; the amber ones can reject the finished response and send it back for rewriting.

    01signals
    02memories
    03episodes
    04understanding
    05policy
    06actress
    07validation
    08revalidation
    09turn rights
    10rewrite
    11length
    12integrity
    13int. rewrite
    14int. review
    model call gate: can reject and send back local retrieval
    Semantic retrievalcosine
    0.203"making coffee in the morning"
    0.391"lying down late at night"
    0.403"on the bus to work"
    0.462"a smiling selfie"
    0.641"holding a cat" — rejected
    corte0.48 / 0.60 calibrated
    Affective statepersistent
    likingbond, with floor and ceiling
    patiencedecays and recovers
    interesseexponential half-life
    valencemood of the moment
    arousalactivation
    affectionaccumulated affection
    Memory model

    Three layers, and the promotion between them

    A system that stores everything with equal weight remembers nothing in particular. The hierarchy — and the criterion for promoting from one layer to the next — is the central object of our research.

    01 · SEMANTIC

    Facts

    What is true about the person. Each item stores the quote that produced it and the date — without provenance, it doesn't get in.

    02 · EPISODIC

    Scenes

    What happened, with a date and the literal sentence said at the time. It demands structural rarity: without it every exchange becomes a memory.

    03 · CANON

    History

    A scene retrieved three times stops depending on search. It's the difference between remembering when the subject comes up and simply knowing.

    After the response is published, eight asynchronous processes continue: memory extraction · episodes · profile · emotional reflection · second-order reflection · summary · neutralisation · media

    Nina
    Nina · in production
    System in production

    Nina

    The reference system where the architecture is validated in continuous use. Running over WhatsApp since 2026, with an autonomous schedule, conversational initiative, and retrieval of episodes weeks apart.

    channelWhatsApp, no app
    memorysemantic + episodic + canon
    life of her ownhourly schedule
    Meet Nina