crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Home Page:https://crewai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use the MemorySystem class

ken4ward opened this issue · comments

How do I create an object of the MemorySystem class? In what package is it? I could not find it in the crewai package.

memory_system = MemorySystem(
    short_term=True,
    long_term=True,
    entity=True,
    contextual=True,
    embedder={"provider": "openai", "config": {"model": 'text-embedding-3-small'}}
)

Usage in the file to create a Crew class object.

crew = Crew(
    agents=[data_analysis_agent, prediction_agent],
    tasks=[data_analysis_task, prediction_task],
    process=Process.hierarchical,
    manager_llm=ChatOpenAI(model="gpt-4"),
    memory_system=memory_system,
    verbose=True,
    cache=True,
    full_output=True,
    output_log_file='crew_output.log'
)