from langchain.agents import initialize_agent, AgentType, Tool from langchain.memory import ConversationBufferMemory def get_conversation_memory(): return ConversationBufferMemory(memory_key="chat_history", return_messages=True) def init_multi_agent(tools, llm, memory): return initialize_agent( tools=tools, llm=llm, agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION, memory=memory, verbose=True )