Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: drop serialized from export/import docs (#2883)
cthomasb5db5134ccbb
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex 417a88a0e..1493bbd8c 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -162,8 +162,8 @@ class IndentedORJSONResponse(Response):return orjson.dumps(content, option=orjson.OPT_INDENT_2)[email protected]("/{agent_id}/export", response_class=IndentedORJSONResponse, operation_id="export_agent_serialized")-async def export_agent_serialized([email protected]("/{agent_id}/export", response_class=IndentedORJSONResponse, operation_id="export_agent")+async def export_agent(agent_id: str,max_steps: int = 100,server: "SyncServer" = Depends(get_letta_server),@@ -256,7 +256,7 @@ def import_agent_legacy(raise HTTPException(status_code=500, detail=f"An unexpected error occurred while uploading the agent: {e!s}")-async def import_agent(+async def _import_agent(agent_file_json: dict,server: "SyncServer",actor: User,@@ -313,8 +313,8 @@ async def import_agent(raise HTTPException(status_code=500, detail=f"An unexpected error occurred while importing agents: {e!s}")[email protected]("/import", response_model=ImportedAgentsResponse, operation_id="import_agent_serialized")-async def import_agent_serialized([email protected]("/import", response_model=ImportedAgentsResponse, operation_id="import_agent")+async def import_agent(file: UploadFile = File(...),server: "SyncServer" = Depends(get_letta_server),actor_id: str | None = Header(None, alias="user_id"),@@ -367,7 +367,7 @@ async def import_agent_serialized(# TODO: This is kind of hacky, but should work as long as dont' change the schemaif "agents" in agent_json and isinstance(agent_json.get("agents"), list):# This is an AgentFileSchema- agent_ids = await import_agent(+ agent_ids = await _import_agent(agent_file_json=agent_json,server=server,actor=actor,