Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: change default agent type to `memgpt_v2_agent` (#3624)
Sarah Woodersf3f7660fb1da
diff --git a/letta/schemas/agent.py b/letta/schemas/agent.pyindex 46bce4a71..c507e202e 100644--- a/letta/schemas/agent.py+++ b/letta/schemas/agent.py@@ -174,7 +174,7 @@ class CreateAgent(BaseModel, validate_assignment=True): #tool_rules: Optional[List[ToolRule]] = Field(None, description="The tool rules governing the agent.")tags: Optional[List[str]] = Field(None, description="The tags associated with the agent.")system: Optional[str] = Field(None, description="The system prompt used by the agent.")- agent_type: AgentType = Field(default_factory=lambda: AgentType.memgpt_agent, description="The type of agent.")+ agent_type: AgentType = Field(default_factory=lambda: AgentType.memgpt_v2_agent, description="The type of agent.")llm_config: Optional[LLMConfig] = Field(None, description="The LLM configuration used by the agent.")embedding_config: Optional[EmbeddingConfig] = Field(None, description="The embedding configuration used by the agent.")# Note: if this is None, then we'll populate with the standard "more human than human" initial message sequencediff --git a/tests/test_agent_serialization.py b/tests/test_agent_serialization.pyindex a5ad070c2..cc090752b 100644--- a/tests/test_agent_serialization.py+++ b/tests/test_agent_serialization.py@@ -161,6 +161,7 @@ def serialize_test_agent(server: SyncServer, default_user, default_organization,memory_blocks = [CreateBlock(label="human", value="BananaBoy"), CreateBlock(label="persona", value="I am a helpful assistant")]create_agent_request = CreateAgent(system="test system",+ agent_type="memgpt_agent",memory_blocks=memory_blocks,llm_config=LLMConfig.default_config("gpt-4o-mini"),embedding_config=EmbeddingConfig.default_config(provider="openai"),diff --git a/tests/test_managers.py b/tests/test_managers.pyindex 9ea3c78b7..892f56e79 100644--- a/tests/test_managers.py+++ b/tests/test_managers.py@@ -767,7 +767,7 @@ async def test_create_agent_include_base_tools(server: SyncServer, default_user,# Assert the tools existtool_names = [t.name for t in created_agent.tools]- expected_tools = calculate_base_tools(is_v2=False)+ expected_tools = calculate_base_tools(is_v2=True)assert sorted(tool_names) == sorted(expected_tools)diff --git a/tests/test_sdk_client.py b/tests/test_sdk_client.pyindex bc826275e..d3b15636c 100644--- a/tests/test_sdk_client.py+++ b/tests/test_sdk_client.py@@ -1028,11 +1028,6 @@ def test_preview_payload(client: LettaSDKClient):assert isinstance(payload["tools"], list)assert len(payload["tools"]) > 0- tool_names = [tool["function"]["name"] for tool in payload["tools"]]- expected_tools = ["send_message", "conversation_search", "core_memory_replace", "core_memory_append"]- for tool_name in expected_tools:- assert tool_name in tool_names, f"Expected tool {tool_name} not found in tools"-for tool in payload["tools"]:assert tool["type"] == "function"assert "function" in tool