How can I setup memory for my Multi Agent System in Langgraph ? #1821
Replies: 2 comments 2 replies
-
You can add memory while you create your graph. from langgraph.checkpoint.memory import MemorySaver memory = MemorySaver() Next define the graph. from langgraph.graph.message import add_messages class State(TypedDict): graph_builder = StateGraph(State) graph = graph_builder.compile(checkpointer=memory) |
Beta Was this translation helpful? Give feedback.
-
Hi @Arokamals , this way of adding memory to hierarchical agent system does not work as intended . This method only works for single agent systems . Have you tried adding memory to multi-agent systems ? |
Beta Was this translation helpful? Give feedback.
-
Hello everyone , I'm working on a project that is built on Langgraph's multi-agent system ( Hierarchical architecture ) .
My multi-agent system is derived from here : https://langchain-ai.github.io/langgraph/tutorials/multi_agent/hierarchical_agent_teams
I want to add memory to the system now but haven't been successful so far . Every doc that I refer to is using memory on a single agent .
Has anyone tried setting up memory for multi agent system using Langgraph yet ? Can I get some references ?
Here is my Github repo link : https://github.com/MindzKonnectedAI/SkillSync/tree/gaurav
I've also attached my full code below :
app.py
sql_agent_team_supervisor.py
github_team_supervisor.py
github_agent.py
csv_to_sql.py
create_team_supervisor_func.py
from IPython.display import Image, display
import os
def create_graph_image(chain, image_name="graph_image", folder_path="images"):
"""
Saves and displays an image generated by the chain's graph in a specified folder.
Beta Was this translation helpful? Give feedback.
All reactions