Episodic Memory in Agentic Frameworks: Suggesting Next Tasks
Sandro Rama Fiorini, Leonardo G. Azevedo, Raphael M. Thiago, Valesca M. de Sousa, Anton B. Labate, Viviane Torres da Silva
TL;DR
The paper addresses the problem of unreliable next-step recommendations in agentic LLM workflows by introducing an episodic-memory architecture that stores and retrieves executed workflows from a ProvLake-based provenance database. The approach enables similarity-based retrieval of past task sequences and uses an EM Agent to compile a current workflow from trajectory data, then prompts an LLM to suggest plausible next tasks based on retrieved memories or crew capabilities. Key contributions include a concrete workflow memory scheme, a tree- and embedding-based matching mechanism with a similarity threshold $T$ on leaf-step sequences $S_c$ and $S_i$, and a practical demonstration in PFAS hazard assessment within materials science. This framework supports more reliable human-AI co-creation in scientific workflows and offers a path toward reducing hallucinations while enabling reuse of prior results.
Abstract
Agentic frameworks powered by Large Language Models (LLMs) can be useful tools in scientific workflows by enabling human-AI co-creation. A key challenge is recommending the next steps during workflow creation without relying solely on LLMs, which risk hallucination and require fine-tuning with scarce proprietary data. We propose an episodic memory architecture that stores and retrieves past workflows to guide agents in suggesting plausible next tasks. By matching current workflows with historical sequences, agents can recommend steps based on prior patterns.
