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: rename multi agent group to managed group [LET-5799] (#5672)

cthomasc3c38f2713c6
diff --git a/fern/openapi.json b/fern/openapi.json
index 2c45007f2..bac63d10e 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -16721,6 +16721,18 @@
"description": "If set to True, memory management will move to a background agent thread."
},
"multi_agent_group": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/Group"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The multi-agent group that this agent manages",
+ "deprecated": true
+ },
+ "managed_group": {
"anyOf": [
{
"$ref": "#/components/schemas/Group"
diff --git a/letta/orm/agent.py b/letta/orm/agent.py
index e7a0cac74..cc269bbc9 100644
--- a/letta/orm/agent.py
+++ b/letta/orm/agent.py
@@ -268,6 +268,7 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
"identity_ids": lambda: [i.id for i in self.identities],
"identities": lambda: [i.to_pydantic() for i in self.identities],
"multi_agent_group": lambda: self.multi_agent_group,
+ "managed_group": lambda: self.multi_agent_group,
"tool_exec_environment_variables": lambda: self.tool_exec_environment_variables,
"secrets": lambda: self.tool_exec_environment_variables,
}
@@ -342,6 +343,7 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
"identity_ids": [],
"identities": [],
"multi_agent_group": None,
+ "managed_group": None,
"tool_exec_environment_variables": [],
"secrets": [],
}
@@ -389,6 +391,7 @@ class Agent(SqlalchemyBase, OrganizationMixin, ProjectMixin, TemplateEntityMixin
state["identity_ids"] = [i.id for i in identities]
state["identities"] = [i.to_pydantic() for i in identities]
state["multi_agent_group"] = multi_agent_group
+ state["managed_group"] = multi_agent_group
state["tool_exec_environment_variables"] = tool_exec_environment_variables
state["secrets"] = tool_exec_environment_variables
diff --git a/letta/schemas/agent.py b/letta/schemas/agent.py
index ebd3d9ba8..8cfc0e4fd 100644
--- a/letta/schemas/agent.py
+++ b/letta/schemas/agent.py
@@ -118,8 +118,8 @@ class AgentState(OrmMetadataBase, validate_assignment=True):
description="If set to True, memory management will move to a background agent thread.",
)
- multi_agent_group: Optional[Group] = Field(None, description="The multi-agent group that this agent manages")
-
+ multi_agent_group: Optional[Group] = Field(None, description="The multi-agent group that this agent manages", deprecated=True)
+ managed_group: Optional[Group] = Field(None, description="The multi-agent group that this agent manages")
# Run metrics
last_run_completion: Optional[datetime] = Field(None, description="The timestamp when the agent last completed a run.")
last_run_duration_ms: Optional[int] = Field(None, description="The duration in milliseconds of the agent's last run.")
diff --git a/tests/managers/test_agent_manager.py b/tests/managers/test_agent_manager.py
index 1da064052..d3183cefe 100644
--- a/tests/managers/test_agent_manager.py
+++ b/tests/managers/test_agent_manager.py
@@ -1062,12 +1062,12 @@ async def test_agent_state_schema_unchanged(server: SyncServer):
"description": (str, type(None)),
"metadata": (dict, type(None)),
# Memory and tools
- "memory": Memory,
+ "memory": Memory, # deprecated
"blocks": list,
"tools": list,
"sources": list,
"tags": list,
- "tool_exec_environment_variables": list,
+ "tool_exec_environment_variables": list, # deprecated
"secrets": list,
# Project and template fields
"project_id": (str, type(None)),
@@ -1081,7 +1081,8 @@ async def test_agent_state_schema_unchanged(server: SyncServer):
"message_buffer_autoclear": bool,
"enable_sleeptime": (bool, type(None)),
# Multi-agent
- "multi_agent_group": (Group, type(None)),
+ "multi_agent_group": (Group, type(None)), # deprecated
+ "managed_group": (Group, type(None)),
# Run metrics
"last_run_completion": (datetime, type(None)),
"last_run_duration_ms": (int, type(None)),