From 0f5bc65aa2d4bff2a5d596daa7f2e97c8451141a Mon Sep 17 00:00:00 2001 From: Sarah Wooders Date: Sun, 29 Jun 2025 11:30:47 -0700 Subject: [PATCH] fix: enable updating agent timezone (#3095) --- letta/services/agent_manager.py | 1 + tests/test_client.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/letta/services/agent_manager.py b/letta/services/agent_manager.py index 0c83848b..8b9b403d 100644 --- a/letta/services/agent_manager.py +++ b/letta/services/agent_manager.py @@ -779,6 +779,7 @@ class AgentManager: "response_format": agent_update.response_format, "last_run_completion": agent_update.last_run_completion, "last_run_duration_ms": agent_update.last_run_duration_ms, + "timezone": agent_update.timezone, } for col, val in scalar_updates.items(): if val is not None: diff --git a/tests/test_client.py b/tests/test_client.py index d873dd7b..8f6c2a23 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -687,6 +687,11 @@ def test_timezone(client: Letta): or "PST" in response.messages[1].content ) + # test updating the timezone + client.agents.modify(agent_id=agent.id, timezone="America/New_York") + agent = client.agents.retrieve(agent_id=agent.id) + assert agent.timezone == "America/New_York" + def test_attach_sleeptime_block(client: Letta):