Skip to content

Update lancedb version and add lance-namespace packages#4605

Merged
greysonlalonde merged 8 commits intomainfrom
joaomdmoura/memory-tui
Feb 26, 2026
Merged

Update lancedb version and add lance-namespace packages#4605
greysonlalonde merged 8 commits intomainfrom
joaomdmoura/memory-tui

Conversation

@joaomdmoura
Copy link
Collaborator

  • 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.
joaomdmoura and others added 6 commits February 25, 2026 21:34
- 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.
Copy link
Contributor

@greysonlalonde greysonlalonde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@greysonlalonde greysonlalonde merged commit 86d3ee0 into main Feb 26, 2026
65 of 76 checks passed
@greysonlalonde greysonlalonde deleted the joaomdmoura/memory-tui branch February 26, 2026 20:05
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.

3 participants