Skip to content

Conversation

zhangfengcdt
Copy link
Owner

Summary

This PR adds a comprehensive example demonstrating how to use ProllyTree as a versioned memory backend
for LangGraph applications, enabling Git-like versioning of AI agent memory with cross-thread
persistence.

Key Features Added

🔄 Real LangGraph Workflow Integration

  • StateGraph workflow with proper LLM → Tool → LLM flow
  • Conditional edges for intelligent tool execution routing
  • Cross-thread persistent memory using scratchpad tools
  • Tool nodes for WriteToScratchpad, ReadFromScratchpad, and search functionality

🧠 ProllyTree Memory Backend

  • ProllyVersionedMemoryStore implementing LangGraph's BaseStore interface
  • Git-like versioning with descriptive commit messages for every memory operation
  • Cross-thread data sharing - different threads can read/write shared memory
  • Content-addressed storage with automatic deduplication

🤖 Intelligent LLM Integration

  • OpenAI GPT-4o-mini integration for natural language understanding
  • Automatic fallback to mock LLM when API key unavailable
  • Tool binding with proper function calling capabilities
  • Error-resistant design that never crashes on missing API keys

Workflow Demonstration

The example demonstrates a realistic research workflow:

  1. Thread 1: Writes research data to persistent scratchpad
  2. Thread 2: Reads the same data from different thread
  3. Thread 1: Continues with additional research updates
  4. Thread 3: New user reads latest research data

All memory operations are versioned with Git-like commits showing complete audit trail.

@zhangfengcdt zhangfengcdt merged commit fea792b into main Aug 3, 2025
5 checks passed
@zhangfengcdt zhangfengcdt deleted the feature/python.langgraph.example branch August 12, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant