Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: allow for >50 files to be attached to an agent [LET-4606] (#5139)
Sarah Woodersa8e6afc12c0b
diff --git a/letta/agents/letta_agent_v2.py b/letta/agents/letta_agent_v2.pyindex e12a23063..3c672b27d 100644--- a/letta/agents/letta_agent_v2.py+++ b/letta/agents/letta_agent_v2.py@@ -694,6 +694,9 @@ class LettaAgentV2(BaseAgentV2):curr_dynamic_section = extract_dynamic_section(curr_system_message_text)+ # refresh files+ agent_state = await self.agent_manager.refresh_file_blocks(agent_state=agent_state, actor=self.actor)+# generate just the memory string with current state for comparisoncurr_memory_str = agent_state.memory.compile(tool_usage_rules=tool_constraint_block, sources=agent_state.sources, max_files_open=agent_state.max_files_opendiff --git a/letta/services/file_manager.py b/letta/services/file_manager.pyindex 75ae0466c..efff3da9d 100644--- a/letta/services/file_manager.py+++ b/letta/services/file_manager.py@@ -406,7 +406,7 @@ class FileManager:actor: PydanticUser,before: Optional[str] = None,after: Optional[str] = None,- limit: Optional[int] = 50,+ limit: Optional[int] = None,ascending: Optional[bool] = True,include_content: bool = False,strip_directory_prefix: bool = False,