Skip to content

How can I implement the ChatMemory in an agentic workflow? #1408

Closed
@FredLiu0813

Description

@FredLiu0813

I am working on an agentic workflow project using SpringAI, now I have a question/problem with ChatMemory.

Question
How can I implement the memories in a workflow?

Example
I have an agentic workflow that includes the following steps:

  1. Perform a GoogleSearch based on user input.
  2. Send the Google result to a LLM(e.g., OpenAI) to summarize them into a short article.
  3. Return the summarized result.

Workflow: Start→GoogleSearch→OpenAI LLM→End

Problem
When I running this workflow and enter "NBA" for the first time, and it returns an article about "NBA".
However, when I input "please reduce the content of previous answer to 20 words" for the second time, the workflow does not retain the memory. Instead, It transmits the "please reduce the content of previous answer to 20 words" to Google and generates a new article.

Is there any way to solve this problem? I would greatly appreciate any responses.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions