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: enable updating agent timezone (#3095)

Sarah Wooders0f5bc65aa2d4
diff --git a/letta/services/agent_manager.py b/letta/services/agent_manager.py
index 0c83848b1..8b9b403d5 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 d873dd7bb..8f6c2a234 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):