[PR #4443] Feat/persona memory node #3823

Closed
opened 2026-02-20 17:49:13 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/4443

State: closed
Merged: No


Summary

This PR adds a new PersonaMemory module to langgraph.experimental.memory, enabling:

  • Extraction of personality traits from text based on adjectives using spaCy
  • Extraction of associated people, places, and events
  • Tracking of evolving persona traits and associations across a session
  • Saving and loading PersonaMemory state to/from the LangGraph checkpoint system (both sync and async)
  • Support for extending trait extraction with user-provided extra synonyms

Changes

  • New persona_memory.py module with sync and async save/load support
  • New tests:
    • test_persona_memory.py
    • test_persona_memory_db.py
    • test_persona_memory_db_async.py
  • spaCy added to pyproject.toml as a new dependency
  • All new functionality is isolated within experimental/, fully backward compatible

Notes

  • All new tests pass
  • No breaking changes
  • Only new dependency is spacy (added to project dependencies)

Checklist

  • Follows LangGraph coding and contribution standards
  • Isolated scope to experimental memory system
  • Thorough tests for added functionality
  • No unrelated file changes
  • Clear docstrings for all public methods
  • Updated pyproject.toml with new required dependency (spaCy)
**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/4443 **State:** closed **Merged:** No --- ## Summary This PR adds a new `PersonaMemory` module to `langgraph.experimental.memory`, enabling: - Extraction of personality traits from text based on adjectives using **spaCy** - Extraction of associated people, places, and events - Tracking of evolving persona traits and associations across a session - Saving and loading PersonaMemory state to/from the LangGraph checkpoint system (both sync and async) - Support for extending trait extraction with user-provided extra synonyms ## Changes - New `persona_memory.py` module with sync and async save/load support - New tests: - `test_persona_memory.py` - `test_persona_memory_db.py` - `test_persona_memory_db_async.py` - spaCy added to `pyproject.toml` as a new dependency - All new functionality is isolated within `experimental/`, fully backward compatible ## Notes - All new tests pass - No breaking changes - Only new dependency is `spacy` (added to project dependencies) ## Checklist - [x] Follows LangGraph coding and contribution standards - [x] Isolated scope to experimental memory system - [x] Thorough tests for added functionality - [x] No unrelated file changes - [x] Clear docstrings for all public methods - [x] Updated `pyproject.toml` with new required dependency (spaCy)
yindo added the pull-request label 2026-02-20 17:49:13 -05:00
yindo closed this issue 2026-02-20 17:49:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#3823