Skip to content

fix: Update CrewAI integration for compatibility with v0.186.0+#428

Merged
jackaldenryan merged 2 commits intomainfrom
crewai-zep-basic-example
Sep 11, 2025
Merged

fix: Update CrewAI integration for compatibility with v0.186.0+#428
jackaldenryan merged 2 commits intomainfrom
crewai-zep-basic-example

Conversation

@jackaldenryan
Copy link
Contributor

Summary

Fixes compatibility issues between Zep CrewAI integration and CrewAI version 0.186.0+. The core issue was that CrewAI changed its external memory interface to expect search results with a "context" key instead of the previous "memory" key.

Changes Made

  • Storage Classes: Updated ZepUserStorage, ZepGraphStorage, and ZepStorage search methods to return results with "context" key
  • Test Files: Fixed test assertions in test_graph_storage.py and test_user_storage.py to expect "context" key
  • Example Scripts: Updated crewai_graph.py and crewai_user.py to display results using the correct key

Validation

  • ✅ All 60 tests pass (1.47s execution time)
  • ✅ Graph example runs successfully with structured ontologies
  • ✅ User example runs successfully with personalized memory
  • ✅ Memory retrieval performance maintained (200-500ms)
  • ✅ Full compatibility with CrewAI v0.186.1

Root Cause

CrewAI version 0.186.0 introduced breaking changes to the external memory interface. The Storage.search() method results are now expected to contain a "context" key instead of "memory". This change was made to standardize external memory integrations across the CrewAI ecosystem.

Impact

  • Resolves KeyError: 'context' errors when using Zep with CrewAI v0.186.0+
  • Maintains backward compatibility in terms of functionality
  • No performance regressions introduced

🤖 Generated with Claude Code

Changes external memory search results to use "context" key instead of "memory"
to align with CrewAI's updated external memory interface. This fixes KeyError
issues when using Zep with CrewAI v0.186.0 and later versions.

Changes:
- Updated ZepUserStorage, ZepGraphStorage, and ZepStorage search methods
- Fixed test assertions to expect "context" key in results
- Updated example scripts to display results using "context" key
- All 60 tests pass, examples run successfully with CrewAI v0.186.1

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update version for CrewAI v0.186.0+ compatibility bug fix.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jackaldenryan jackaldenryan merged commit e49678e into main Sep 11, 2025
9 checks passed
@jackaldenryan jackaldenryan deleted the crewai-zep-basic-example branch September 11, 2025 17:57
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.

2 participants