Was getting error while importing memory using the same method displayed in docs

I was trying to import memory using the method displayed in docs
from crewai import Memory

I got this error

Traceback (most recent call last):File “C:\Users\yugni\Desktop\Stratzi Chatbot\Crewai_implementation\flow_with_memory.py”, line 10, in from crewai import MemoryImportError: cannot import name ‘Memory’ from ‘crewai’ (C:\Users\yugni\Desktop\Stratzi Chatbot\chatbot\Lib\site-packages\crewai_init_.py). Did you mean: ‘memory’?

I tried importing using
from crewai import memory
But I was unable to create an object using it

Then I checked the class inside my vs code and found a complete different implementation with distinct types of memories instead of an unified memory

from crewai.memory.entity.entity_memory import EntityMemory
from crewai.memory.external.external_memory import ExternalMemory
from crewai.memory.long_term.long_term_memory import LongTermMemory
from crewai.memory.short_term.short_term_memory import ShortTermMemory

__all__ = [
    "EntityMemory",
    "ExternalMemory",
    "LongTermMemory",
    "ShortTermMemory",
]

And there was a complete different import statement/ implementation in the current repo

"""Memory module: unified Memory with LLM analysis and pluggable storage."""

from crewai.memory.encoding_flow import EncodingFlow
from crewai.memory.memory_scope import MemoryScope, MemorySlice
from crewai.memory.types import (
    MemoryMatch,
    MemoryRecord,
    ScopeInfo,
    compute_composite_score,
    embed_text,
    embed_texts,
)
from crewai.memory.unified_memory import Memory


__all__ = [
    "EncodingFlow",
    "Memory",
    "MemoryMatch",
    "MemoryRecord",
    "MemoryScope",
    "MemorySlice",
    "ScopeInfo",
    "compute_composite_score",
    "embed_text",
    "embed_texts",
]

I also updated the crewai version, but am still getting the same issues

I got the solution

We need to import like this:
from crewai.memory.memory import Memory

But why? I’m having the exact same issue. Everything about memory is different than the documentation. even the boilerplate code is different than the code in the getting started. print(memory.tree()) doesn’t work because tree doesn’t exist. Even trying to create a memory object fails, its asking for a storage argument. It’s like the whole memory system is different even though we have the same version.

This: New Unified Memory System by joaomdmoura · Pull Request #4420 · crewAIInc/crewAI · GitHub seems relevant, but its in 1.10.0a1 pre release. its almost like the documentation got updated before the tool?

Python 3.12.3 (main, Jan 22 2026, 20:57:42) [GCC 13.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

from crewai import Memory
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name ‘Memory’ from ‘crewai’ (/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/crewai/init.py). Did you mean: ‘memory’?

Traceback (most recent call last):
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/crewai/telemetry/telemetry.py”, line 210, in handler
original_handler(signum, frame)
KeyboardInterrupt

from crewai.memory.memory import Memory
memory = Memory()
Traceback (most recent call last):
File “”, line 1, in
TypeError: Memory.init() missing 1 required positional argument: ‘storage’
memory = Memory(recency_weight=0.5, recency_half_life_days=7)
Traceback (most recent call last):
File “”, line 1, in
TypeError: Memory.init() missing 1 required positional argument: ‘storage’
memory = Memory(embedder={“provider”: “openai”, “config”: {“model_name”: “text-embedding-3-small”}})
Traceback (most recent call last):
File “”, line 1, in
TypeError: Memory.init() missing 1 required positional argument: ‘storage’
memory = Memory(‘test.db’)
print(memory.tree())
Traceback (most recent call last):
File “”, line 1, in
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 991, in getattr
raise AttributeError(f’{type(self).name!r} object has no attribute {item!r}‘)
AttributeError: ‘Memory’ object has no attribute ‘tree’
print(memory.tree())
Traceback (most recent call last):
File “”, line 1, in
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 991, in getattr
raise AttributeError(f’{type(self).name!r} object has no attribute {item!r}‘)
AttributeError: ‘Memory’ object has no attribute ‘tree’
print(memory.info(“/”))
Traceback (most recent call last):
File “”, line 1, in
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 991, in getattr
raise AttributeError(f’{type(self).name!r} object has no attribute {item!r}‘)
AttributeError: ‘Memory’ object has no attribute ‘info’
memory.remember(“The API rate limit is 1000 requests per minute.”)
Traceback (most recent call last):
File “”, line 1, in
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 991, in getattr
raise AttributeError(f’{type(self).name!r} object has no attribute {item!r}‘)
AttributeError: ‘Memory’ object has no attribute ‘remember’
memory.remember(“Our staging environment uses port 8080.”)
Traceback (most recent call last):
File “”, line 1, in
File “/home/victoria/projects/crewtest/latest_ai_development/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 991, in getattr
raise AttributeError(f’{type(self).name!r} object has no attribute {item!r}')
AttributeError: ‘Memory’ object has no attribute ‘remember’

from crewai import memory
memory.
memory.EntityMemory( memory.ShortTermMemory( memory.external memory.short_term
memory.ExternalMemory( memory.contextual memory.long_term memory.storage
memory.LongTermMemory( memory.entity memory.memory

Yes we do need to pass a storage parameter, I passed lancedb, which is by default used by CrewAI as far as I know

Also if you aren’t using OpenAI you need to pass the provider information too

See this:

custom_memory = Memory(

  storage= "lancedb",

  embedder={"provider": "google-generativeai", "config": {"model_name": "gemini-embedding-001"}},

)

Though you can successfully create the object, but still the methods like save, search (which I found by checking the Memory class inside my IDE) don’t work. They throw weird errors. Also they are different from the remember and recall methods in their docs

See I tried this:
print(type(custom_memory))
custom_memory.save(placeAndDays)

Output was this:
Output:
<class 'crewai.memory.memory.Memory'>

AttributeError: 'str' object has no attribute 'save'

So even though the type of object is Memory class, still it throws this weird error

If you find any solution for this, please let everyone know