From 6a47bf4946ca5a670c5bed5e226d937bf439d922 Mon Sep 17 00:00:00 2001 From: cthomas Date: Thu, 20 Nov 2025 16:18:46 -0800 Subject: [PATCH] feat: add fk reference for agent groups [LET-6260] (#6313) feat: add fk reference for agent groups --- letta/orm/agent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/letta/orm/agent.py b/letta/orm/agent.py index 83690c75..744ffe43 100644 --- a/letta/orm/agent.py +++ b/letta/orm/agent.py @@ -164,6 +164,8 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin lazy="selectin", viewonly=True, back_populates="manager_agent", + foreign_keys="[Group.manager_agent_id]", + uselist=False, ) batch_items: Mapped[List["LLMBatchItem"]] = relationship("LLMBatchItem", back_populates="agent", lazy="raise") file_agents: Mapped[List["FileAgent"]] = relationship(