Skip to content

Schema mismatch between create_manage_memory_tool and create_memory_store_manager #138

@anantsrivast

Description

@anantsrivast

Bug Description

create_manage_memory_tool and create_memory_store_manager use incompatible storage formats, making them unable to work together.

Storage Format Mismatch

create_manage_memory_tool (tools.py line ~175) saves:

{"content": "User is a data engineer"}

create_memory_store_manager (extraction.py line ~1209) expects:

{"kind": "Memory", "content": {"content": "User is a data engineer"}}

Error When Combined

When using hot path (manage_memory tool) during conversation, then cold path (memory_store_manager) on goodbye, the cold path fails with:

KeyError: 'kind'

At line ~1209 in extraction.py:

store_based = [
    (sid, item.value["kind"], item.value["content"])  # Requires "kind"
    for sid, item in store_map.items()
]

Expected Behavior

Both tools should use the same storage format so they can be used together in a hot path + cold path memory architecture.

Suggested Fix

Either:

  1. Update create_manage_memory_tool to save with {"kind": "Memory", "content": {...}}
  2. Or make create_memory_store_manager handle both formats gracefully

Versions

  • langmem: [0.0.30]
  • langgraph: [1.0.4]
  • Python: [3.11.6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions