Skip to content
Awsaf Alam
GitHubLinkedIn

All work

Designing memory for agents

A design for how agents remember: what to keep, what to forget, and how to find it again. Research and design, not shipped.

R&D Lead at Sourcy · 2026

Problem

Agents that talk to buyers and suppliers keep meeting the same people and the same problems, but start every conversation from zero. Stuffing everything into the prompt doesn't scale, and a vector search over everything returns plausible but stale context.

Approach

This was design and research work, and it has not shipped. We specified the architecture and data structure for a CRM that doubles as a unified memory backend for agents. The design separates three kinds of memory: episodic (what happened), semantic (what is true) and procedural (how to do something). Retrieval uses progressive disclosure, so an agent sees short descriptions first and pulls full detail only when it needs it. Older memories fade with time decay, and keyword-style retrieval was studied as a simpler, more predictable alternative to vector-based RAG.

Agentunified memory backendEpisodicwhat happenedSemanticwhat is trueProceduralhow to do itRetrievekeyword match × time decayProgressive disclosuresummaries first, detail on demand
Illustrative. The proposed memory design, simplified.

We also explored AI-generated trigger tests: generate the requests that should and shouldn't pull in a given skill or memory, then tune its description until it fires on the right ones. And we reviewed the evaluation method and experiment design for this work, so the results could be trusted when it moves forward.

Result

A specification and a set of design decisions the team can build on, not a shipped system. Pick a query and move the decay slider to see which memories would surface: episodic ones drop out first, procedural ones never fade.

Design study

3 of 7 memories surface for “Quote totes for a repeat buyer”.

Episodic

what happened · fades fastest

  • Surfaced: Buyer approved a tote bag quote
    3 days old · score 0.93

    Repeat buyer accepted the second-cheapest canvas tote quote because of the shorter lead time.

  • Supplier went quiet for two days
    20 days old · score 0.00 · faded
  • Logo print came out blurred
    75 days old · score 0.06 · faded

Semantic

what is true · fades slowly

  • Surfaced: Buyer prefers recycled materials
    40 days old · score 0.53

    This buyer asks for recycled or organic fabric whenever it's offered.

  • Screen printing needs vector logos
    120 days old · score 0.00 · faded

Procedural

how to do it · doesn't fade

  • How to follow up a silent supplier
    200 days old · score 0.00 · faded
  • Surfaced: How to check a quote before sending
    150 days old · score 0.33

    Confirm price, minimum order and lead time are present and match the request.

Sample memories and a simple scoring rule, made up for the demo.

Need something like this built?

Pick a 30-minute slot and tell me what you're building.

Book a 30-min callNext: AI insights for TikTok and Instagram
© 2026 Awsaf Alam