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.

fix: sync files loading on event loop (#3327)

cthomaseb6f11fc6f78
diff --git a/letta/orm/agent.py b/letta/orm/agent.py
index 1c78816b5..ce51d7292 100644
--- a/letta/orm/agent.py
+++ b/letta/orm/agent.py
@@ -314,7 +314,7 @@ class Agent(SqlalchemyBase, OrganizationMixin, AsyncAttrs):
state["sources"] = [s.to_pydantic() for s in sources]
state["memory"] = Memory(
blocks=[m.to_pydantic() for m in memory],
- file_blocks=[block for b in self.file_agents if (block := b.to_pydantic_block()) is not None],
+ file_blocks=[block for b in file_agents if (block := b.to_pydantic_block()) is not None],
prompt_template=get_prompt_template_for_agent_type(self.agent_type),
)
state["identity_ids"] = [i.id for i in identities]