Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: add letta_agent_v1 flag for docker image and some patches (#5081)

Sarah Wooders1edb21a652eb
diff --git a/letta/agents/letta_agent_v2.py b/letta/agents/letta_agent_v2.py
index 3951e96c4..1f56dd6d7 100644
--- a/letta/agents/letta_agent_v2.py
+++ b/letta/agents/letta_agent_v2.py
@@ -99,16 +99,16 @@ class LettaAgentV2(BaseAgentV2):
self.step_manager = StepManager()
self.telemetry_manager = TelemetryManager()
- # TODO: Expand to more
- if summarizer_settings.enable_summarization and model_settings.openai_api_key:
- self.summarization_agent = EphemeralSummaryAgent(
- target_block_label="conversation_summary",
- agent_id=self.agent_state.id,
- block_manager=self.block_manager,
- message_manager=self.message_manager,
- agent_manager=self.agent_manager,
- actor=self.actor,
- )
+ ## TODO: Expand to more
+ # if summarizer_settings.enable_summarization and model_settings.openai_api_key:
+ # self.summarization_agent = EphemeralSummaryAgent(
+ # target_block_label="conversation_summary",
+ # agent_id=self.agent_state.id,
+ # block_manager=self.block_manager,
+ # message_manager=self.message_manager,
+ # agent_manager=self.agent_manager,
+ # actor=self.actor,
+ # )
# Initialize summarizer for context window management
self.summarizer = Summarizer(
@@ -117,7 +117,7 @@ class LettaAgentV2(BaseAgentV2):
if self.agent_state.agent_type == AgentType.voice_convo_agent
else summarizer_settings.mode
),
- summarizer_agent=self.summarization_agent,
+ summarizer_agent=None, # self.summarization_agent,
message_buffer_limit=summarizer_settings.message_buffer_limit,
message_buffer_min=summarizer_settings.message_buffer_min,
partial_evict_summarizer_percentage=summarizer_settings.partial_evict_summarizer_percentage,
diff --git a/letta/settings.py b/letta/settings.py
index 7d47288fd..f62bd56d3 100644
--- a/letta/settings.py
+++ b/letta/settings.py
@@ -329,6 +329,9 @@ class Settings(BaseSettings):
file_processing_timeout_minutes: int = 30
file_processing_timeout_error_message: str = "File processing timed out after {} minutes. Please try again."
+ # enabling letta_agent_v1 architecture
+ use_letta_v1_agent: bool = False
+
@property
def letta_pg_uri(self) -> str:
if self.pg_uri: