Table of Contents
Fetching ...

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.

Episodic Memory in Agentic Frameworks: Suggesting Next Tasks

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 on leaf-step sequences and , 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.

Paper Structure

This paper contains 4 sections, 4 figures.

Figures (4)

  • Figure 1: Overview of the approach: (a) general architecture of the solution; (b) flow of the solution, starting on the UI with the user instruction.
  • Figure 2: Overview of Chemist Agent and sub-agents in the domain crew. Each sub-agent has a single tool at its disposal and can also infer information by itself.
  • Figure 3: Chemist crew execution. The chatbot comes up with suggestions based on episodic memory of previous workflows.
  • Figure 4: Execution trace when no suggestion could be made based on episodic memory. The task suggestion follows from the crew description.