letta-client 0.1.167__py3-none-any.whl → 0.1.169__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of letta-client might be problematic. Click here for more details.

letta_client/__init__.py CHANGED
@@ -176,6 +176,7 @@ from .types import (
176
176
  ReasoningMessage,
177
177
  ReasoningMessageSource,
178
178
  RedactedReasoningContent,
179
+ RequiredBeforeExitToolRule,
179
180
  ResponseFormatJsonObject,
180
181
  ResponseFormatJsonSchema,
181
182
  ResponseFormatText,
@@ -525,6 +526,7 @@ __all__ = [
525
526
  "ReasoningMessage",
526
527
  "ReasoningMessageSource",
527
528
  "RedactedReasoningContent",
529
+ "RequiredBeforeExitToolRule",
528
530
  "ResponseFormatJsonObject",
529
531
  "ResponseFormatJsonSchema",
530
532
  "ResponseFormatText",
@@ -242,6 +242,7 @@ class AgentsClient:
242
242
  message_buffer_autoclear: typing.Optional[bool] = OMIT,
243
243
  enable_sleeptime: typing.Optional[bool] = OMIT,
244
244
  response_format: typing.Optional[CreateAgentRequestResponseFormat] = OMIT,
245
+ timezone: typing.Optional[str] = OMIT,
245
246
  request_options: typing.Optional[RequestOptions] = None,
246
247
  ) -> AgentState:
247
248
  """
@@ -362,6 +363,9 @@ class AgentsClient:
362
363
  response_format : typing.Optional[CreateAgentRequestResponseFormat]
363
364
  The response format for the agent.
364
365
 
366
+ timezone : typing.Optional[str]
367
+ The timezone of the agent (IANA format).
368
+
365
369
  request_options : typing.Optional[RequestOptions]
366
370
  Request-specific configuration.
367
371
 
@@ -432,6 +436,7 @@ class AgentsClient:
432
436
  "response_format": convert_and_respect_annotation_metadata(
433
437
  object_=response_format, annotation=CreateAgentRequestResponseFormat, direction="write"
434
438
  ),
439
+ "timezone": timezone,
435
440
  },
436
441
  headers={
437
442
  "content-type": "application/json",
@@ -813,6 +818,7 @@ class AgentsClient:
813
818
  response_format: typing.Optional[UpdateAgentResponseFormat] = OMIT,
814
819
  last_run_completion: typing.Optional[dt.datetime] = OMIT,
815
820
  last_run_duration_ms: typing.Optional[int] = OMIT,
821
+ timezone: typing.Optional[str] = OMIT,
816
822
  request_options: typing.Optional[RequestOptions] = None,
817
823
  ) -> AgentState:
818
824
  """
@@ -894,6 +900,9 @@ class AgentsClient:
894
900
  last_run_duration_ms : typing.Optional[int]
895
901
  The duration in milliseconds of the agent's last run.
896
902
 
903
+ timezone : typing.Optional[str]
904
+ The timezone of the agent (IANA format).
905
+
897
906
  request_options : typing.Optional[RequestOptions]
898
907
  Request-specific configuration.
899
908
 
@@ -949,6 +958,7 @@ class AgentsClient:
949
958
  ),
950
959
  "last_run_completion": last_run_completion,
951
960
  "last_run_duration_ms": last_run_duration_ms,
961
+ "timezone": timezone,
952
962
  },
953
963
  headers={
954
964
  "content-type": "application/json",
@@ -1332,6 +1342,7 @@ class AsyncAgentsClient:
1332
1342
  message_buffer_autoclear: typing.Optional[bool] = OMIT,
1333
1343
  enable_sleeptime: typing.Optional[bool] = OMIT,
1334
1344
  response_format: typing.Optional[CreateAgentRequestResponseFormat] = OMIT,
1345
+ timezone: typing.Optional[str] = OMIT,
1335
1346
  request_options: typing.Optional[RequestOptions] = None,
1336
1347
  ) -> AgentState:
1337
1348
  """
@@ -1452,6 +1463,9 @@ class AsyncAgentsClient:
1452
1463
  response_format : typing.Optional[CreateAgentRequestResponseFormat]
1453
1464
  The response format for the agent.
1454
1465
 
1466
+ timezone : typing.Optional[str]
1467
+ The timezone of the agent (IANA format).
1468
+
1455
1469
  request_options : typing.Optional[RequestOptions]
1456
1470
  Request-specific configuration.
1457
1471
 
@@ -1530,6 +1544,7 @@ class AsyncAgentsClient:
1530
1544
  "response_format": convert_and_respect_annotation_metadata(
1531
1545
  object_=response_format, annotation=CreateAgentRequestResponseFormat, direction="write"
1532
1546
  ),
1547
+ "timezone": timezone,
1533
1548
  },
1534
1549
  headers={
1535
1550
  "content-type": "application/json",
@@ -1951,6 +1966,7 @@ class AsyncAgentsClient:
1951
1966
  response_format: typing.Optional[UpdateAgentResponseFormat] = OMIT,
1952
1967
  last_run_completion: typing.Optional[dt.datetime] = OMIT,
1953
1968
  last_run_duration_ms: typing.Optional[int] = OMIT,
1969
+ timezone: typing.Optional[str] = OMIT,
1954
1970
  request_options: typing.Optional[RequestOptions] = None,
1955
1971
  ) -> AgentState:
1956
1972
  """
@@ -2032,6 +2048,9 @@ class AsyncAgentsClient:
2032
2048
  last_run_duration_ms : typing.Optional[int]
2033
2049
  The duration in milliseconds of the agent's last run.
2034
2050
 
2051
+ timezone : typing.Optional[str]
2052
+ The timezone of the agent (IANA format).
2053
+
2035
2054
  request_options : typing.Optional[RequestOptions]
2036
2055
  Request-specific configuration.
2037
2056
 
@@ -2095,6 +2114,7 @@ class AsyncAgentsClient:
2095
2114
  ),
2096
2115
  "last_run_completion": last_run_completion,
2097
2116
  "last_run_duration_ms": last_run_duration_ms,
2117
+ "timezone": timezone,
2098
2118
  },
2099
2119
  headers={
2100
2120
  "content-type": "application/json",
@@ -7,6 +7,7 @@ from ...types.continue_tool_rule import ContinueToolRule
7
7
  from ...types.terminal_tool_rule import TerminalToolRule
8
8
  from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
9
  from ...types.parent_tool_rule import ParentToolRule
10
+ from ...types.required_before_exit_tool_rule import RequiredBeforeExitToolRule
10
11
  from ...types.init_tool_rule import InitToolRule
11
12
 
12
13
  CreateAgentRequestToolRulesItem = typing.Union[
@@ -16,5 +17,6 @@ CreateAgentRequestToolRulesItem = typing.Union[
16
17
  TerminalToolRule,
17
18
  MaxCountPerStepToolRule,
18
19
  ParentToolRule,
20
+ RequiredBeforeExitToolRule,
19
21
  InitToolRule,
20
22
  ]
@@ -7,6 +7,7 @@ from ...types.continue_tool_rule import ContinueToolRule
7
7
  from ...types.terminal_tool_rule import TerminalToolRule
8
8
  from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
9
  from ...types.parent_tool_rule import ParentToolRule
10
+ from ...types.required_before_exit_tool_rule import RequiredBeforeExitToolRule
10
11
  from ...types.init_tool_rule import InitToolRule
11
12
 
12
13
  UpdateAgentToolRulesItem = typing.Union[
@@ -16,5 +17,6 @@ UpdateAgentToolRulesItem = typing.Union[
16
17
  TerminalToolRule,
17
18
  MaxCountPerStepToolRule,
18
19
  ParentToolRule,
20
+ RequiredBeforeExitToolRule,
19
21
  InitToolRule,
20
22
  ]
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "letta-client",
19
- "X-Fern-SDK-Version": "0.1.167",
19
+ "X-Fern-SDK-Version": "0.1.169",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -179,6 +179,7 @@ from .reasoning_content import ReasoningContent
179
179
  from .reasoning_message import ReasoningMessage
180
180
  from .reasoning_message_source import ReasoningMessageSource
181
181
  from .redacted_reasoning_content import RedactedReasoningContent
182
+ from .required_before_exit_tool_rule import RequiredBeforeExitToolRule
182
183
  from .response_format_json_object import ResponseFormatJsonObject
183
184
  from .response_format_json_schema import ResponseFormatJsonSchema
184
185
  from .response_format_text import ResponseFormatText
@@ -428,6 +429,7 @@ __all__ = [
428
429
  "ReasoningMessage",
429
430
  "ReasoningMessageSource",
430
431
  "RedactedReasoningContent",
432
+ "RequiredBeforeExitToolRule",
431
433
  "ResponseFormatJsonObject",
432
434
  "ResponseFormatJsonSchema",
433
435
  "ResponseFormatText",
@@ -180,6 +180,11 @@ class AgentState(UncheckedBaseModel):
180
180
  The duration in milliseconds of the agent's last run.
181
181
  """
182
182
 
183
+ timezone: typing.Optional[str] = pydantic.Field(default=None)
184
+ """
185
+ The timezone of the agent (IANA format).
186
+ """
187
+
183
188
  if IS_PYDANTIC_V2:
184
189
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
185
190
  else:
@@ -7,6 +7,7 @@ from .continue_tool_rule import ContinueToolRule
7
7
  from .terminal_tool_rule import TerminalToolRule
8
8
  from .max_count_per_step_tool_rule import MaxCountPerStepToolRule
9
9
  from .parent_tool_rule import ParentToolRule
10
+ from .required_before_exit_tool_rule import RequiredBeforeExitToolRule
10
11
  from .init_tool_rule import InitToolRule
11
12
 
12
13
  AgentStateToolRulesItem = typing.Union[
@@ -16,5 +17,6 @@ AgentStateToolRulesItem = typing.Union[
16
17
  TerminalToolRule,
17
18
  MaxCountPerStepToolRule,
18
19
  ParentToolRule,
20
+ RequiredBeforeExitToolRule,
19
21
  InitToolRule,
20
22
  ]
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class RequiredBeforeExitToolRule(UncheckedBaseModel):
10
+ """
11
+ Represents a tool rule configuration where this tool must be called before the agent loop can exit.
12
+ """
13
+
14
+ tool_name: str = pydantic.Field()
15
+ """
16
+ The name of the tool. Must exist in the database for the user's organization.
17
+ """
18
+
19
+ type: typing.Literal["required_before_exit"] = "required_before_exit"
20
+ prompt_template: typing.Optional[str] = pydantic.Field(default=None)
21
+ """
22
+ Optional Jinja2 template for generating agent prompt about this tool rule.
23
+ """
24
+
25
+ if IS_PYDANTIC_V2:
26
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
+ else:
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.167
3
+ Version: 0.1.169
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,8 +1,8 @@
1
- letta_client/__init__.py,sha256=Dlv6NmNpxz9fGrD0dBUyZI7NS4IRMN5kESVb4UHT8Vo,17648
1
+ letta_client/__init__.py,sha256=Uv2lKOc9DGdpjZ2KUjxHAWQtEpN24bA5eWpeziiknFI,17714
2
2
  letta_client/agents/__init__.py,sha256=c_9OiE6ofyiPcq9BP37qvo7h0SKmw34PKN3KMxuRja0,1780
3
3
  letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
4
4
  letta_client/agents/blocks/client.py,sha256=ecE03lE5tP1AtCMFLT9FzdYyQMx_D7NI5m42b41pV40,24684
5
- letta_client/agents/client.py,sha256=baQrl1WhyBWCLe5Ve4TIIQRm8_EBk3K8YxH6TetJCaU,87911
5
+ letta_client/agents/client.py,sha256=OBKxImstibXHF0YrEiBFsOfzVkoawmuAtvlM8rNVqYY,88627
6
6
  letta_client/agents/context/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
7
7
  letta_client/agents/context/client.py,sha256=GKKvoG4N_K8Biz9yDjeIHpFG0C8Cwc7tHmEX3pTL_9U,4815
8
8
  letta_client/agents/core_memory/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
@@ -41,9 +41,9 @@ letta_client/agents/types/agents_search_request_search_item_zero.py,sha256=tGjwn
41
41
  letta_client/agents/types/agents_search_request_sort_by.py,sha256=svlezWF0A2JQlEnjjIXTMJnkrCjRot1r7ITCP1nQ4iQ,186
42
42
  letta_client/agents/types/agents_search_response.py,sha256=AQJVKps-bjCx2ujqESzW1Iy9ZYFS17hH_UFIeBeK4S8,815
43
43
  letta_client/agents/types/create_agent_request_response_format.py,sha256=1GUV3rFMj46bYpRHOB_H_WMNrQ5FkKIidKg60u8szHM,409
44
- letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=L3FNsFTG9kVmuPbQhbCKNg3H2E5bB2Rgp92gWmGd-LM,689
44
+ letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=rNdMW67TvB20-ITBdA-1L9181p33yIYkwF9b35OGNX0,800
45
45
  letta_client/agents/types/update_agent_response_format.py,sha256=oCoGofTKP7no6gNbDV6nJOpF8IlIplr1iPn5_7BA0cU,402
46
- letta_client/agents/types/update_agent_tool_rules_item.py,sha256=k9MmcVPsK-EGl8XlT3JQwdlBNLgpGw528jmi8fCFS7g,682
46
+ letta_client/agents/types/update_agent_tool_rules_item.py,sha256=_gXcMqnK0Pp1mhAukhPztLPDhooUOg6xACOhsO2uSZM,793
47
47
  letta_client/base_client.py,sha256=15VzR5nOCvE_tjKedrbjWmyjqSuj2YezfCx6C9S0mpc,10321
48
48
  letta_client/batches/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
49
49
  letta_client/batches/client.py,sha256=3uBs2SZbOP40b-Ck_DvicHuGJe5j3JAsK156zwsofp8,19442
@@ -63,7 +63,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
63
63
  letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
64
64
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
65
65
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
66
- letta_client/core/client_wrapper.py,sha256=xK-OSlOXJBolyODYZ3gnEzjwLlZrMrAUM923EvlWIhQ,1998
66
+ letta_client/core/client_wrapper.py,sha256=oIUTqKunUr5vsf2VVI-19U1rHmXT68XT768drQTdESI,1998
67
67
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
68
68
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
69
69
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -153,16 +153,16 @@ letta_client/tools/types/delete_mcp_server_response_item.py,sha256=YLIBE7OD535NJ
153
153
  letta_client/tools/types/list_mcp_servers_response_value.py,sha256=Eyji5qB7FhowiogsAbpcU_aMyH9zClv9lUMmHOmNPYk,379
154
154
  letta_client/tools/types/update_mcp_server_request.py,sha256=SEMNYHB_mwJNSMHKO7keU0C_CMBktV7lfZUnACPe_fU,314
155
155
  letta_client/tools/types/update_mcp_server_response.py,sha256=muwHagaQBMwQI0of9EBCBtG9lD-jELFAevgTB2MjpFQ,375
156
- letta_client/types/__init__.py,sha256=bREWZobWowUZq4TcXFHFR2SWItxO22fKQ_umQCgaTxw,22148
156
+ letta_client/types/__init__.py,sha256=dL4BviMX9cBydo1RevGw8yjAgEuR2lwbJl50_d2qldg,22253
157
157
  letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
158
158
  letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
159
159
  letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
160
160
  letta_client/types/agent_environment_variable.py,sha256=vutZLcR0yETltgOZ7E_o9kR4vOdBxybVL9lzXSux75w,1698
161
161
  letta_client/types/agent_schema.py,sha256=uTSjFAsnEYdOX-PRD2vHbn69JBe8GKbctvlDOP85k_U,1784
162
162
  letta_client/types/agent_schema_tool_rules_item.py,sha256=TTP7uKYPSe-EAl4p03j0Kd-W9tG5T6gfaWIUBAOVv9U,482
163
- letta_client/types/agent_state.py,sha256=A_ehJ1jirLIBDfYbr8hyWmga3C9f8SmmNHf60j_q4_g,5931
163
+ letta_client/types/agent_state.py,sha256=gPxUWHg-Ie8q2PAfHezDxtz4SQfEirH_r69DSQ7-u9M,6059
164
164
  letta_client/types/agent_state_response_format.py,sha256=HISBgCumQxw6nQeDUMBu-IlghaLeWRb7BHHNaz_e8Hc,377
165
- letta_client/types/agent_state_tool_rules_item.py,sha256=WB-N4uyDTfhYBjQYDcLZDxDj73Xu1mQasBkdofUM-XU,625
165
+ letta_client/types/agent_state_tool_rules_item.py,sha256=jyh3KFcVWnw2kcDgr3M4aXagXpVshOoMRhoC6JhDaSM,728
166
166
  letta_client/types/agent_type.py,sha256=C7krJfPZvZDZrEqizp5UdUF4T6omXIu8m1XgVgg7JKc,321
167
167
  letta_client/types/app_auth_scheme.py,sha256=_6FLlw3drQ3HDSP9SecStBwQyE0DgL6UvKFArCC4yp8,1242
168
168
  letta_client/types/app_auth_scheme_auth_mode.py,sha256=cEj9XAxLgFcang_Irw6h3koWac9A0tpNeBG05NUeGlw,387
@@ -329,6 +329,7 @@ letta_client/types/reasoning_content.py,sha256=aId-87QjQ4sm_fuCmzIdZZghr-9DFeVV-
329
329
  letta_client/types/reasoning_message.py,sha256=YzZMr_orwDVcrbiSED_kN3004MA579xGe-iRW9hLngg,1606
330
330
  letta_client/types/reasoning_message_source.py,sha256=GYOWGm2mje1yYbR8E2kbAeQS--VDrGlpsobEBQHE2cU,186
331
331
  letta_client/types/redacted_reasoning_content.py,sha256=ROAcdqOjM-kaw23HrVJrh0a49TRYuijanHDaCqcMErM,735
332
+ letta_client/types/required_before_exit_tool_rule.py,sha256=4sjR5oYzoESZkeIjd5nhI2pjuHIMS02IyGaEpUHZT7A,1057
332
333
  letta_client/types/response_format_json_object.py,sha256=ZSWmwdN8itFr5q77mxuBhEWRBh2CubAonJUCi88UjbA,611
333
334
  letta_client/types/response_format_json_schema.py,sha256=7CgBQ9Lmst2oz_NoGr-1Sk-7Yq33BBhkqpRoKXh-qPo,675
334
335
  letta_client/types/response_format_text.py,sha256=5HhXaYWDR0zeFLhH5nIqIN3n192UXrMZeSyORjIWFKQ,591
@@ -404,6 +405,6 @@ letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J
404
405
  letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
405
406
  letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
406
407
  letta_client/voice/client.py,sha256=EX79F2D5bieXNP8g1ZPw8xwAzqE1A3hshCHUSlTV1kw,5739
407
- letta_client-0.1.167.dist-info/METADATA,sha256=wTD2-4mwhY99kaRmsPDuYBQc0G_AePosDLOJ5jxeW6Q,5093
408
- letta_client-0.1.167.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
409
- letta_client-0.1.167.dist-info/RECORD,,
408
+ letta_client-0.1.169.dist-info/METADATA,sha256=g0MOjQPCfIDDoqABm0km7aKxHUW5w_xqp2ZTr4Y4LCs,5093
409
+ letta_client-0.1.169.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
410
+ letta_client-0.1.169.dist-info/RECORD,,