Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

trivago tech 11 min read Case study mediumAdept

"I'm Sorry, Have We Met?" — Frictionless Memory for AI

LLM APIs are stateless, so conversational memory must be built in the application layer, and the right design depends on scale. Resending full history grows token cost linearly with conversation length. RAG over memory (Mem0-style) and hybrid agent-framework memory trade that cost for retrieval infrastructure. SimpleMem's three-stage pipeline of semantic compression, recursive consolidation and adaptive retrieval suits lifelong memory. trivago's 10-turn hotel concierge demo keeps only compression into structured fields with a direct thread-ID lookup, beating naive resending on input tokens by message 4 (914 vs 1016). A hypothesis applies the same compress-consolidate-retrieve pattern to AI search, using canonical-query match confidence to decide how many cached results to prepend.

Related posts

  • How to build a retrieval system for agents

    Turso mediumAdept

    Memelord is a fully local memory system for coding agents that keeps a per-project SQLite database (via Turso) of corrections, insights and user-requested memories, embedded with all-MiniLM-L6-v2 and retrieved by cosine vector search at task start. Each memory carries a weight updated by exponential moving average from the agent's 0-3 usefulness ratings, plus time decay for unused memories, and memories flagged as wrong are deleted immediately. Integration with Claude Code uses an MCP server and lifecycle hooks, and a TypeScript SDK accepts a bring-your-own embedding function for custom agents. The argument is that retrieval beats dumping lessons into .md system prompts, which wastes the finite context window.

  • Give Your Coding Agents a Memory You Own

    Hugging Face mediumAdept

    funes is an open-source, single-binary memory layer that indexes the session traces of coding agents (Claude Code, Codex, pi, Hermes) so any agent can recall past decisions and rationale with exact provenance. A deterministic pipeline parses traces into a common turn-and-block shape, chunks and embeds them locally into an append-only Lance dataset, and answers queries with hybrid vector+BM25 search, rank fusion, cross-encoder reranking, recency reweighting and neighbor-chunk expansion. Memories can be published to a private Hugging Face dataset with secret redaction, letting them follow you across machines, agents and teammates. On a handoff-vs-recall benchmark, recall was 4-8x cheaper than a written handoff, while compaction failed on one task because its summary flattened key findings.

  • Context Engineering (Agent Memory) for AI Agents Starts with Retrieval

    LangChain mediumAdept

    Agent retrieval fails in three ways: inefficient searching, too much context at once, and irrelevant or stale context. The fix is to keep searches small and keep raw results out of the main agent's context window. Deep Agents does this with glob/grep before reads, paged read_file (100 lines by default with offset/limit), and automatic offloading of tool results over ~20k tokens to files with a preview. For custom RAG tools, the recommended pattern is "retrieve, offload, delegate": write results to files, return only paths, and have parallel subagents read each file and return key facts with sources and dates. Other advice covers using grep with synonyms before semantic search, agentic rather than single-shot retrieval, skills for progressive disclosure, and treating retrieved text as untrusted.

  • ReasoningBank: Enabling agents to learn from experience

    Google Research hardMaster

    ReasoningBank is an agent memory framework that distills generalizable reasoning strategies from both successful and failed trajectories, stored as structured items (title, description, content) in a closed loop of retrieval, LLM-as-a-judge self-assessment, extraction and append-only consolidation. Memory-aware test-time scaling (MaTTS) feeds parallel (self-contrast across k trajectories) or sequential (iterative refinement) exploration back into memory. With Gemini-2.5-Flash and ReAct, it beat a memory-free baseline by 8.3% on WebArena and 4.6% on SWE-Bench-Verified, saved about 3 steps per task on SWE-Bench, and MaTTS (k=5) added another 3% success on WebArena. Learning from failures yields preventative rules, and memories evolve from simple checklists into compositional strategies over time.

  • The components of agent memory

    Anthropic Engineering mediumAdept

    Agent memory works best as a layered hierarchy: transcripts as an event log, notes Claude writes in-session, richer representations such as wikis, and context injected into every session, with an offline "dreaming" pass that reflects on transcripts to correct and reorganize memory. On a CL-Bench database task, newer Claude models closed the learning loop by recording validated rules, raising mean reward from about 0.56–0.66 to about 0.83. In Pokémon Red, a model that kept 10 focused files earned four badges, while one that logged everything into 413 files earned one. Stronger models do better when told what memory is for rather than given fixed rules, and dreaming caught a wrong navigation note that otherwise trapped the agent in a loop.

The quest for software engineering knowledge.

Look:
Layout: