Describe the bug
The current LangGraph example in the repository does not work and fails during execution when adding memories. The error is raised in the MemMachine tools integration with LangGraph, specifically in the demonstration script using the v2 APIs.
Steps to reproduce
Run the LangGraph integration demo as follows:
- Set up the environment according to the documentation.
- From within the
integrations/langgraph/ directory, execute:
- You will see the initialization succeed, but when adding memories, the following error is produced (this is repeated):
Failed to add memory
Traceback (most recent call last):
File "/home/leoq/memtest/.venv/lib/python3.12/site-packages/memmachine/rest_client/memory.py", line 274, in add
message = self._build_memory_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/leoq/memtest/.venv/lib/python3.12/site-packages/memmachine/rest_client/memory.py", line 196, in _build_memory_message
combined_metadata["episode_type"] = episode_type.value
^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'value'
❌ Failed: Error adding memory
Expected behavior
The demo should run without errors and successfully add memories using the v2 APIs with the LangGraph integration.
Environment
- OS: Mac OS X
- MemMachine Version: v0.2.5
- Development language version: Python 3.12
- MemMachine LangGraph integration (demo.py) from the current repository main branch
Additional context
The error suggests that episode_type is being passed as a str, but the code expects an Enum that has a .value attribute. Passing the string type results in an AttributeError. This breaks compatibility with the intended v2 APIs.
Please review the demo and supporting function calls to ensure correct data types are used with episode_type and that the LangGraph example works out-of-the-box with v2 APIs.
Describe the bug
The current LangGraph example in the repository does not work and fails during execution when adding memories. The error is raised in the MemMachine tools integration with LangGraph, specifically in the demonstration script using the v2 APIs.
Steps to reproduce
Run the LangGraph integration demo as follows:
integrations/langgraph/directory, execute:Expected behavior
The demo should run without errors and successfully add memories using the v2 APIs with the LangGraph integration.
Environment
Additional context
The error suggests that
episode_typeis being passed as astr, but the code expects an Enum that has a.valueattribute. Passing the string type results in anAttributeError. This breaks compatibility with the intended v2 APIs.Please review the demo and supporting function calls to ensure correct data types are used with
episode_typeand that the LangGraph example works out-of-the-box with v2 APIs.