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.

fix: revert export agent to sync (#2456)

cthomasabef608ac5f6
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index 23a4104b5..c29903dcf 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -127,7 +127,7 @@ class IndentedORJSONResponse(Response):
@router.get("/{agent_id}/export", response_class=IndentedORJSONResponse, operation_id="export_agent_serialized")
-async def export_agent_serialized(
+def export_agent_serialized(
agent_id: str,
server: "SyncServer" = Depends(get_letta_server),
actor_id: Optional[str] = Header(None, alias="user_id"),
@@ -138,7 +138,7 @@ async def export_agent_serialized(
"""
Export the serialized JSON representation of an agent, formatted with indentation.
"""
- actor = await server.user_manager.get_actor_or_default_async(actor_id=actor_id)
+ actor = server.user_manager.get_user_or_default(user_id=actor_id)
try:
agent = server.agent_manager.serialize(agent_id=agent_id, actor=actor)