Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: remove `identities` from .af (#1388)
Sarah Woodersbd4a23a1f92a
diff --git a/letta/serialize_schemas/marshmallow_agent.py b/letta/serialize_schemas/marshmallow_agent.pyindex 182fb559c..12ce873d7 100644--- a/letta/serialize_schemas/marshmallow_agent.py+++ b/letta/serialize_schemas/marshmallow_agent.py@@ -105,4 +105,7 @@ class MarshmallowAgentSchema(BaseSchema):"sources","source_passages","agent_passages",+ "identities",+ "is_deleted",+ "groups",)diff --git a/letta/serialize_schemas/marshmallow_block.py b/letta/serialize_schemas/marshmallow_block.pyindex 6432f6423..6325f2c88 100644--- a/letta/serialize_schemas/marshmallow_block.py+++ b/letta/serialize_schemas/marshmallow_block.py@@ -12,4 +12,4 @@ class SerializedBlockSchema(BaseSchema):class Meta(BaseSchema.Meta):model = Block- exclude = BaseSchema.Meta.exclude + ("agents",)+ exclude = BaseSchema.Meta.exclude + ("agents", "identities", "is_deleted")diff --git a/letta/serialize_schemas/marshmallow_tool.py b/letta/serialize_schemas/marshmallow_tool.pyindex 3ae65ceb9..44f64a97a 100644--- a/letta/serialize_schemas/marshmallow_tool.py+++ b/letta/serialize_schemas/marshmallow_tool.py@@ -12,4 +12,4 @@ class SerializedToolSchema(BaseSchema):class Meta(BaseSchema.Meta):model = Tool- exclude = BaseSchema.Meta.exclude+ exclude = BaseSchema.Meta.exclude + ("is_deleted",)diff --git a/letta/serialize_schemas/pydantic_agent_schema.py b/letta/serialize_schemas/pydantic_agent_schema.pyindex a3ab28e3a..5cd1805f0 100644--- a/letta/serialize_schemas/pydantic_agent_schema.py+++ b/letta/serialize_schemas/pydantic_agent_schema.py@@ -10,8 +10,6 @@ from letta.schemas.llm_config import LLMConfigclass CoreMemoryBlockSchema(BaseModel):created_at: strdescription: Optional[str]- identities: List[Any]- is_deleted: boolis_template: boollabel: strlimit: int@@ -42,7 +40,6 @@ class TagSchema(BaseModel):class ToolEnvVarSchema(BaseModel):created_at: strdescription: Optional[str]- is_deleted: boolkey: strupdated_at: strvalue: str@@ -76,7 +73,6 @@ class ToolSchema(BaseModel):args_json_schema: Optional[Any]created_at: strdescription: str- is_deleted: booljson_schema: ToolJSONSchemaname: strreturn_char_limit: int@@ -94,9 +90,6 @@ class AgentSchema(BaseModel):created_at: strdescription: Optional[str]embedding_config: EmbeddingConfig- groups: List[Any]- identities: List[Any]- is_deleted: boolllm_config: LLMConfigmessage_buffer_autoclear: boolmessages: List[MessageSchema]diff --git a/tests/test_agent_serialization.py b/tests/test_agent_serialization.pyindex b2607291a..6d8c25c97 100644--- a/tests/test_agent_serialization.py+++ b/tests/test_agent_serialization.py@@ -351,6 +351,11 @@ def test_append_copy_suffix_simple(local_client, server, serialize_test_agent, d"""Test deserializing JSON into an Agent instance."""result = server.agent_manager.serialize(agent_id=serialize_test_agent.id, actor=default_user)+ # write file+ with open("test_agent_serialization.json", "w") as f:+ # write json+ f.write(json.dumps(result.model_dump(), indent=4))+# Deserialize the agentagent_copy = server.agent_manager.deserialize(serialized_agent=result, actor=other_user, append_copy_suffix=append_copy_suffix)