Update lancedb version and add lance-namespace packages#4605
Merged
greysonlalonde merged 8 commits intomainfrom Feb 26, 2026
Merged
Update lancedb version and add lance-namespace packages#4605greysonlalonde merged 8 commits intomainfrom
greysonlalonde merged 8 commits intomainfrom
Conversation
Collaborator
joaomdmoura
commented
Feb 26, 2026
- Updated lancedb dependency version from 0.4.0 to 0.29.2 in multiple files.
- Added new packages: lance-namespace and lance-namespace-urllib3-client with version 0.5.2, including their dependencies and installation details.
- Enhanced MemoryTUI to display a limit on entries and improved the LanceDBStorage class with automatic background compaction and index creation for better performance.
- Updated lancedb dependency version from 0.4.0 to 0.29.2 in multiple files. - Added new packages: lance-namespace and lance-namespace-urllib3-client with version 0.5.2, including their dependencies and installation details. - Enhanced MemoryTUI to display a limit on entries and improved the LanceDBStorage class with automatic background compaction and index creation for better performance.
- Reduced the memory recall limit from 10 to 5 in multiple locations within the Agent class. - Updated the memory formatting to use a new `format` method in the MemoryMatch class for improved readability and metadata inclusion.
- Updated memory-related classes and methods to support read-only functionality, allowing for silent no-ops when attempting to remember data in read-only mode. - Modified the LiteAgent and CrewAgentExecutorMixin classes to check for read-only status before saving memories. - Adjusted MemorySlice and Memory classes to reflect changes in behavior when read-only is enabled. - Updated tests to verify that memory operations behave correctly under read-only conditions.
- Updated unit tests in test_unified_memory.py to set mock_memory._read_only to False, ensuring that memory operations can be tested in a writable state.
Contributor
greysonlalonde
left a comment
There was a problem hiding this comment.
Review Notes
1. MemoryMatch.format() filters out falsy metadata values
In lib/crewai/src/crewai/memory/types.py, the format() method uses if value: which will silently drop metadata entries where the value is 0, False, or "":
if self.record.metadata:
for key, value in self.record.metadata.items():
if value: # ← drops 0, False, ""
lines.append(f" {key}: {value}")Suggest changing to if value is not None: to only skip actual nulls.
2. Memory.remember() return type annotation mismatch
In lib/crewai/src/crewai/memory/unified_memory.py:510, a # type: ignore[return-value] is used because remember() now returns None when read-only, but the method signature still declares -> MemoryRecord. The MemorySlice.remember() signature was correctly updated to -> MemoryRecord | None, but Memory.remember() was not. Updating the return type annotation on Memory.remember() to -> MemoryRecord | None would remove the need for the type ignore.
lorenzejay
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.