Is long term memory activated by default?

Hello,

I was wondering if Long term memory was enabled by default when we activate memory, if it is, how to deactivate it ?

Because in my crew I only use Short term memory and Entity memory but I always have those messages :

  • Give Feedback / Get Help: Sign in to GitHub · GitHub
  • LiteLLM.Info: If you need to debug this error, use `litellm._turn_on_debug()'.
  • Failed to add to long term memory: Failed to convert text into a Pydantic model due to error: litellm.APIError: AzureException APIError - argument of type ‘NoneType’ is not iterable

Here is my config :

@crew
def crew(self) -> Crew:
    """Creates the Research Crew"""
    # To learn how to add knowledge sources to your crew, check out the documentation:
    # https://docs.crewai.com/concepts/knowledge#what-is-knowledge

    return Crew(
        agents=[
            ...
        ],
        tasks=[
            ...
        ],
        process=Process.sequential,
        verbose=True,
        output_log_file="checking_crew.log",
        memory=True,
        short_term_memory=ShortTermMemory(
            storage=RAGStorage(
                embedder_config=EMBEDDER_CONFIG,
                type="short_term",
                path="src/csc_flow_analyzer/crews/checking_crew/data/stm",
            )
        ),
        entity_memory = EntityMemory(
            storage=RAGStorage(
                embedder_config=EMBEDDER_CONFIG,
                type="short_term",
                path="src/csc_flow_analyzer/crews/checking_crew/data/em"
            )
        ),
        embedder=EMBEDDER_CONFIG,
    )

And even when I enable litellm._turn_on_debug(), i have no log related to it so I’m a bit confused

Yes, as far as I understand, all memory types are automatically enabled when you set memory=True, just like I mentioned in another thread:

As far as I know, there’s currently no way to selectively enable or disable individual memory modules.

So I need to remove it from the validator, right ?

Honestly, I wouldn’t advise modifying a library’s (CrewAI’s) base class unless you’re absolutely certain about everything involved in your changes.

Perhaps a much less risky approach is opening an issue here.

1 Like