letta-client 0.1.324__py3-none-any.whl → 1.0.0a2__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.

Files changed (251) hide show
  1. letta_client/__init__.py +229 -59
  2. letta_client/agents/__init__.py +15 -17
  3. letta_client/agents/blocks/__init__.py +3 -0
  4. letta_client/agents/blocks/client.py +77 -4
  5. letta_client/agents/blocks/raw_client.py +63 -2
  6. letta_client/agents/blocks/types/__init__.py +7 -0
  7. letta_client/agents/blocks/types/blocks_list_request_order.py +5 -0
  8. letta_client/agents/client.py +46 -13
  9. letta_client/agents/files/__init__.py +3 -0
  10. letta_client/agents/files/client.py +71 -10
  11. letta_client/agents/files/raw_client.py +51 -10
  12. letta_client/agents/files/types/__init__.py +7 -0
  13. letta_client/{types/tool_return_status.py → agents/files/types/files_list_request_order.py} +1 -1
  14. letta_client/agents/folders/__init__.py +3 -0
  15. letta_client/agents/folders/client.py +77 -4
  16. letta_client/agents/folders/raw_client.py +63 -2
  17. letta_client/agents/folders/types/__init__.py +7 -0
  18. letta_client/agents/folders/types/folders_list_request_order.py +5 -0
  19. letta_client/agents/groups/__init__.py +3 -0
  20. letta_client/agents/groups/client.py +71 -2
  21. letta_client/agents/groups/raw_client.py +51 -0
  22. letta_client/agents/groups/types/__init__.py +7 -0
  23. letta_client/agents/groups/types/groups_list_request_order.py +5 -0
  24. letta_client/agents/messages/__init__.py +2 -0
  25. letta_client/agents/messages/client.py +57 -18
  26. letta_client/agents/messages/raw_client.py +37 -18
  27. letta_client/agents/messages/types/__init__.py +2 -0
  28. letta_client/agents/messages/types/messages_list_request_order.py +5 -0
  29. letta_client/agents/passages/client.py +29 -0
  30. letta_client/agents/raw_client.py +4 -4
  31. letta_client/agents/sources/__init__.py +3 -0
  32. letta_client/agents/sources/client.py +77 -4
  33. letta_client/agents/sources/raw_client.py +63 -2
  34. letta_client/agents/sources/types/__init__.py +7 -0
  35. letta_client/agents/sources/types/sources_list_request_order.py +5 -0
  36. letta_client/agents/tools/__init__.py +3 -0
  37. letta_client/agents/tools/client.py +77 -4
  38. letta_client/agents/tools/raw_client.py +63 -2
  39. letta_client/agents/tools/types/__init__.py +7 -0
  40. letta_client/agents/tools/types/tools_list_request_order.py +5 -0
  41. letta_client/archives/client.py +16 -2
  42. letta_client/base_client.py +3 -0
  43. letta_client/batches/client.py +12 -2
  44. letta_client/batches/messages/client.py +10 -0
  45. letta_client/blocks/agents/client.py +8 -0
  46. letta_client/blocks/client.py +32 -2
  47. letta_client/chat/__init__.py +7 -0
  48. letta_client/chat/client.py +255 -0
  49. letta_client/chat/raw_client.py +269 -0
  50. letta_client/chat/types/__init__.py +8 -0
  51. letta_client/chat/types/chat_completion_request_messages_item.py +19 -0
  52. letta_client/chat/types/chat_completion_request_stop.py +5 -0
  53. letta_client/client_side_access_tokens/client.py +10 -2
  54. letta_client/core/client_wrapper.py +2 -2
  55. letta_client/errors/__init__.py +2 -0
  56. letta_client/errors/gone_error.py +10 -0
  57. letta_client/folders/agents/client.py +8 -0
  58. letta_client/folders/client.py +20 -4
  59. letta_client/folders/files/client.py +14 -0
  60. letta_client/folders/passages/client.py +8 -0
  61. letta_client/groups/client.py +16 -2
  62. letta_client/groups/messages/client.py +14 -0
  63. letta_client/identities/agents/client.py +8 -0
  64. letta_client/identities/blocks/client.py +8 -0
  65. letta_client/identities/client.py +20 -2
  66. letta_client/jobs/__init__.py +3 -0
  67. letta_client/jobs/client.py +61 -12
  68. letta_client/jobs/raw_client.py +29 -8
  69. letta_client/jobs/types/__init__.py +7 -0
  70. letta_client/jobs/types/jobs_list_request_order.py +5 -0
  71. letta_client/models/client.py +8 -2
  72. letta_client/projects/client.py +10 -2
  73. letta_client/providers/client.py +90 -2
  74. letta_client/providers/raw_client.py +102 -0
  75. letta_client/runs/__init__.py +11 -2
  76. letta_client/runs/client.py +152 -20
  77. letta_client/runs/messages/client.py +30 -2
  78. letta_client/runs/messages/raw_client.py +10 -0
  79. letta_client/runs/raw_client.py +146 -16
  80. letta_client/runs/steps/__init__.py +3 -0
  81. letta_client/runs/steps/client.py +39 -30
  82. letta_client/runs/steps/raw_client.py +19 -28
  83. letta_client/runs/steps/types/__init__.py +7 -0
  84. letta_client/runs/steps/types/steps_list_request_order.py +5 -0
  85. letta_client/runs/types/__init__.py +2 -1
  86. letta_client/runs/types/runs_list_request_order.py +5 -0
  87. letta_client/sources/client.py +8 -2
  88. letta_client/sources/files/client.py +12 -0
  89. letta_client/sources/passages/client.py +6 -0
  90. letta_client/steps/client.py +26 -2
  91. letta_client/steps/messages/client.py +8 -0
  92. letta_client/tags/client.py +16 -2
  93. letta_client/templates/__init__.py +88 -36
  94. letta_client/templates/client.py +165 -4
  95. letta_client/templates/raw_client.py +205 -2
  96. letta_client/templates/types/__init__.py +176 -72
  97. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config.py +4 -0
  98. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_display_name.py +14 -0
  99. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_display_name_item.py +5 -0
  100. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item.py +4 -0
  101. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item_value_enc.py +14 -0
  102. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_secrets_item_value_enc_item.py +5 -0
  103. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item.py +6 -0
  104. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_value_enc.py +16 -0
  105. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_value_enc_item.py +7 -0
  106. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args.py} +11 -7
  107. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_args.py} +4 -5
  108. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_args_args_item.py +7 -0
  109. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_prompt_template.py} +4 -4
  110. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_prompt_template_item.py} +1 -1
  111. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_args_type.py} +1 -1
  112. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes.py} +13 -7
  113. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes.py +16 -0
  114. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item.py +12 -0
  115. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_args.py +17 -0
  116. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_args_item.py +7 -0
  117. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_one.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item.py} +8 -10
  118. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item_args.py +17 -0
  119. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item_item_args_item.py +7 -0
  120. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_prompt_template.py} +4 -4
  121. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_prompt_template_item.py} +1 -1
  122. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_child_arg_nodes_type.py} +1 -1
  123. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item.py +8 -8
  124. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args.py} +11 -8
  125. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_args.py +13 -0
  126. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_args_item.py +7 -0
  127. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_prompt_template.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_prompt_template.py} +4 -4
  128. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_zero_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_prompt_template_item.py} +1 -1
  129. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_type.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_args_type.py} +1 -1
  130. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes.py +37 -0
  131. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes.py +18 -0
  132. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item.py +12 -0
  133. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_args.py +17 -0
  134. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_args_item.py +7 -0
  135. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item.py +28 -0
  136. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item_args.py +17 -0
  137. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_child_arg_nodes_item_item_args_item.py +7 -0
  138. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_prompt_template.py +18 -0
  139. letta_client/templates/types/{templates_create_agents_from_template_response_agents_item_tool_rules_item_zero_prompt_template_item.py → templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_prompt_template_item.py} +1 -1
  140. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_arg_nodes_type.py +7 -0
  141. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_tool_type.py +1 -1
  142. letta_client/templates/types/templates_create_template_request_agent_file.py +5 -0
  143. letta_client/templates/types/templates_get_template_snapshot_response_agents_item_tool_rules_item.py +8 -8
  144. letta_client/templates/types/{templates_get_template_snapshot_response_agents_item_tool_rules_item_one.py → templates_get_template_snapshot_response_agents_item_tool_rules_item_args.py} +2 -1
  145. letta_client/templates/types/templates_get_template_snapshot_response_agents_item_tool_rules_item_child_arg_nodes.py +29 -0
  146. letta_client/templates/types/{templates_get_template_snapshot_response_agents_item_tool_rules_item_zero.py → templates_get_template_snapshot_response_agents_item_tool_rules_item_child_arg_nodes_child_arg_nodes_item.py} +3 -5
  147. letta_client/templates/types/templates_update_current_template_from_agent_file_response.py +21 -0
  148. letta_client/tools/client.py +30 -220
  149. letta_client/tools/raw_client.py +0 -292
  150. letta_client/types/__init__.py +134 -22
  151. letta_client/types/agent_environment_variable.py +5 -0
  152. letta_client/types/{action_parameters_model.py → annotation.py} +4 -10
  153. letta_client/types/{action_response_model.py → annotation_url_citation.py} +4 -9
  154. letta_client/types/approval_create.py +8 -2
  155. letta_client/types/approval_create_approvals_item.py +8 -0
  156. letta_client/types/approval_response_message.py +8 -2
  157. letta_client/types/approval_response_message_approvals_item.py +8 -0
  158. letta_client/types/approval_return.py +34 -0
  159. letta_client/{agents/templates/types/templates_migrate_response.py → types/audio.py} +4 -4
  160. letta_client/types/chat_completion.py +30 -0
  161. letta_client/types/chat_completion_assistant_message_param.py +30 -0
  162. letta_client/types/chat_completion_assistant_message_param_content.py +9 -0
  163. letta_client/types/chat_completion_assistant_message_param_content_item.py +10 -0
  164. letta_client/types/chat_completion_assistant_message_param_tool_calls_item.py +10 -0
  165. letta_client/types/chat_completion_audio.py +23 -0
  166. letta_client/types/chat_completion_content_part_image_param.py +22 -0
  167. letta_client/types/chat_completion_content_part_input_audio_param.py +22 -0
  168. letta_client/types/chat_completion_content_part_refusal_param.py +21 -0
  169. letta_client/types/chat_completion_content_part_text_param.py +21 -0
  170. letta_client/types/chat_completion_developer_message_param.py +23 -0
  171. letta_client/types/chat_completion_developer_message_param_content.py +7 -0
  172. letta_client/types/chat_completion_function_message_param.py +22 -0
  173. letta_client/types/chat_completion_message.py +30 -0
  174. letta_client/types/chat_completion_message_custom_tool_call.py +23 -0
  175. letta_client/types/chat_completion_message_custom_tool_call_param.py +23 -0
  176. letta_client/types/chat_completion_message_function_tool_call_input.py +25 -0
  177. letta_client/types/{chat_completion_message_function_tool_call.py → chat_completion_message_function_tool_call_output.py} +3 -3
  178. letta_client/types/chat_completion_message_function_tool_call_param.py +25 -0
  179. letta_client/types/chat_completion_message_tool_calls_item.py +10 -0
  180. letta_client/types/chat_completion_service_tier.py +5 -0
  181. letta_client/types/chat_completion_system_message_param.py +23 -0
  182. letta_client/types/chat_completion_system_message_param_content.py +7 -0
  183. letta_client/types/chat_completion_token_logprob.py +24 -0
  184. letta_client/types/chat_completion_tool_message_param.py +23 -0
  185. letta_client/types/chat_completion_tool_message_param_content.py +7 -0
  186. letta_client/types/chat_completion_user_message_param.py +23 -0
  187. letta_client/types/chat_completion_user_message_param_content.py +7 -0
  188. letta_client/types/chat_completion_user_message_param_content_item.py +15 -0
  189. letta_client/types/child_tool_rule.py +6 -0
  190. letta_client/types/choice.py +26 -0
  191. letta_client/types/choice_finish_reason.py +7 -0
  192. letta_client/types/choice_logprobs.py +22 -0
  193. letta_client/types/completion_tokens_details.py +23 -0
  194. letta_client/types/{auth_scheme_field.py → completion_usage.py} +8 -13
  195. letta_client/types/custom_input.py +21 -0
  196. letta_client/types/custom_output.py +21 -0
  197. letta_client/types/file.py +22 -0
  198. letta_client/types/file_file.py +22 -0
  199. letta_client/types/function_call_input.py +21 -0
  200. letta_client/types/function_call_output.py +21 -0
  201. letta_client/types/{function.py → function_output.py} +1 -1
  202. letta_client/types/image_url.py +22 -0
  203. letta_client/types/image_url_detail.py +5 -0
  204. letta_client/types/init_tool_rule.py +5 -0
  205. letta_client/types/input_audio.py +22 -0
  206. letta_client/types/input_audio_format.py +5 -0
  207. letta_client/types/internal_template_agent_create.py +2 -2
  208. letta_client/types/letta_schemas_agent_file_agent_schema.py +2 -2
  209. letta_client/types/letta_schemas_agent_file_message_schema.py +27 -4
  210. letta_client/types/letta_schemas_agent_file_message_schema_approvals_item.py +8 -0
  211. letta_client/types/letta_schemas_letta_message_tool_return.py +26 -0
  212. letta_client/types/letta_schemas_letta_message_tool_return_status.py +5 -0
  213. letta_client/types/{tool_return.py → letta_schemas_message_tool_return.py} +9 -3
  214. letta_client/types/letta_schemas_message_tool_return_status.py +5 -0
  215. letta_client/types/llm_config.py +5 -0
  216. letta_client/types/message.py +15 -4
  217. letta_client/types/message_approvals_item.py +8 -0
  218. letta_client/types/omitted_reasoning_content.py +4 -0
  219. letta_client/types/openai_types_chat_chat_completion_message_function_tool_call_function.py +21 -0
  220. letta_client/types/openai_types_chat_chat_completion_message_function_tool_call_param_function.py +21 -0
  221. letta_client/types/prompt_tokens_details.py +21 -0
  222. letta_client/types/provider.py +10 -0
  223. letta_client/types/run.py +28 -41
  224. letta_client/types/run_metrics.py +58 -0
  225. letta_client/types/run_status.py +5 -0
  226. letta_client/types/sandbox_environment_variable.py +5 -0
  227. letta_client/types/step.py +2 -2
  228. letta_client/types/step_metrics.py +2 -2
  229. letta_client/types/text_content.py +5 -0
  230. letta_client/types/tool_call_content.py +5 -0
  231. letta_client/types/tool_call_message.py +2 -0
  232. letta_client/types/tool_call_message_tool_calls.py +8 -0
  233. letta_client/types/tool_call_node.py +35 -0
  234. letta_client/types/tool_return_message.py +8 -5
  235. letta_client/types/tool_type.py +1 -1
  236. letta_client/types/top_logprob.py +22 -0
  237. letta_client/voice/client.py +14 -0
  238. letta_client/voice/raw_client.py +37 -0
  239. letta_client-1.0.0a2.dist-info/METADATA +422 -0
  240. {letta_client-0.1.324.dist-info → letta_client-1.0.0a2.dist-info}/RECORD +241 -141
  241. letta_client/agents/templates/__init__.py +0 -7
  242. letta_client/agents/templates/client.py +0 -307
  243. letta_client/agents/templates/raw_client.py +0 -275
  244. letta_client/agents/templates/types/__init__.py +0 -7
  245. letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_one_type.py +0 -5
  246. letta_client/types/action_model.py +0 -39
  247. letta_client/types/app_auth_scheme.py +0 -35
  248. letta_client/types/app_auth_scheme_auth_mode.py +0 -19
  249. letta_client/types/app_model.py +0 -45
  250. letta_client-0.1.324.dist-info/METADATA +0 -211
  251. {letta_client-0.1.324.dist-info → letta_client-1.0.0a2.dist-info}/WHEEL +0 -0
@@ -18,6 +18,7 @@ from .raw_client import AsyncRawMessagesClient, RawMessagesClient
18
18
  from .types.letta_async_request_messages_item import LettaAsyncRequestMessagesItem
19
19
  from .types.letta_streaming_response import LettaStreamingResponse
20
20
  from .types.message_search_request_search_mode import MessageSearchRequestSearchMode
21
+ from .types.messages_list_request_order import MessagesListRequestOrder
21
22
  from .types.messages_modify_request import MessagesModifyRequest
22
23
  from .types.messages_modify_response import MessagesModifyResponse
23
24
  from .types.messages_preview_request import MessagesPreviewRequest
@@ -45,9 +46,11 @@ class MessagesClient:
45
46
  self,
46
47
  agent_id: str,
47
48
  *,
48
- after: typing.Optional[str] = None,
49
49
  before: typing.Optional[str] = None,
50
+ after: typing.Optional[str] = None,
50
51
  limit: typing.Optional[int] = None,
52
+ order: typing.Optional[MessagesListRequestOrder] = None,
53
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
51
54
  group_id: typing.Optional[str] = None,
52
55
  use_assistant_message: typing.Optional[bool] = None,
53
56
  assistant_message_tool_name: typing.Optional[str] = None,
@@ -62,14 +65,20 @@ class MessagesClient:
62
65
  ----------
63
66
  agent_id : str
64
67
 
65
- after : typing.Optional[str]
66
- Message after which to retrieve the returned messages.
67
-
68
68
  before : typing.Optional[str]
69
- Message before which to retrieve the returned messages.
69
+ Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
70
+
71
+ after : typing.Optional[str]
72
+ Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
70
73
 
71
74
  limit : typing.Optional[int]
72
- Maximum number of messages to retrieve.
75
+ Maximum number of messages to return
76
+
77
+ order : typing.Optional[MessagesListRequestOrder]
78
+ Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
79
+
80
+ order_by : typing.Optional[typing.Literal["created_at"]]
81
+ Field to sort by
73
82
 
74
83
  group_id : typing.Optional[str]
75
84
  Group ID to filter messages by.
@@ -104,13 +113,24 @@ class MessagesClient:
104
113
  )
105
114
  client.agents.messages.list(
106
115
  agent_id="agent_id",
116
+ before="before",
117
+ after="after",
118
+ limit=1,
119
+ order="asc",
120
+ group_id="group_id",
121
+ use_assistant_message=True,
122
+ assistant_message_tool_name="assistant_message_tool_name",
123
+ assistant_message_tool_kwarg="assistant_message_tool_kwarg",
124
+ include_err=True,
107
125
  )
108
126
  """
109
127
  _response = self._raw_client.list(
110
128
  agent_id,
111
- after=after,
112
129
  before=before,
130
+ after=after,
113
131
  limit=limit,
132
+ order=order,
133
+ order_by=order_by,
114
134
  group_id=group_id,
115
135
  use_assistant_message=use_assistant_message,
116
136
  assistant_message_tool_name=assistant_message_tool_name,
@@ -489,8 +509,7 @@ class MessagesClient:
489
509
  Asynchronously process a user message and return a run object.
490
510
  The actual processing happens in the background, and the status can be checked using the run ID.
491
511
 
492
- This is "asynchronous" in the sense that it's a background job and explicitly must be fetched by the run ID.
493
- This is more like `send_message_job`
512
+ This is "asynchronous" in the sense that it's a background run and explicitly must be fetched by the run ID.
494
513
 
495
514
  Parameters
496
515
  ----------
@@ -599,6 +618,7 @@ class MessagesClient:
599
618
  )
600
619
  client.agents.messages.reset(
601
620
  agent_id="agent_id",
621
+ add_default_initial_messages=True,
602
622
  )
603
623
  """
604
624
  _response = self._raw_client.reset(
@@ -718,9 +738,11 @@ class AsyncMessagesClient:
718
738
  self,
719
739
  agent_id: str,
720
740
  *,
721
- after: typing.Optional[str] = None,
722
741
  before: typing.Optional[str] = None,
742
+ after: typing.Optional[str] = None,
723
743
  limit: typing.Optional[int] = None,
744
+ order: typing.Optional[MessagesListRequestOrder] = None,
745
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
724
746
  group_id: typing.Optional[str] = None,
725
747
  use_assistant_message: typing.Optional[bool] = None,
726
748
  assistant_message_tool_name: typing.Optional[str] = None,
@@ -735,14 +757,20 @@ class AsyncMessagesClient:
735
757
  ----------
736
758
  agent_id : str
737
759
 
738
- after : typing.Optional[str]
739
- Message after which to retrieve the returned messages.
740
-
741
760
  before : typing.Optional[str]
742
- Message before which to retrieve the returned messages.
761
+ Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
762
+
763
+ after : typing.Optional[str]
764
+ Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
743
765
 
744
766
  limit : typing.Optional[int]
745
- Maximum number of messages to retrieve.
767
+ Maximum number of messages to return
768
+
769
+ order : typing.Optional[MessagesListRequestOrder]
770
+ Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
771
+
772
+ order_by : typing.Optional[typing.Literal["created_at"]]
773
+ Field to sort by
746
774
 
747
775
  group_id : typing.Optional[str]
748
776
  Group ID to filter messages by.
@@ -782,6 +810,15 @@ class AsyncMessagesClient:
782
810
  async def main() -> None:
783
811
  await client.agents.messages.list(
784
812
  agent_id="agent_id",
813
+ before="before",
814
+ after="after",
815
+ limit=1,
816
+ order="asc",
817
+ group_id="group_id",
818
+ use_assistant_message=True,
819
+ assistant_message_tool_name="assistant_message_tool_name",
820
+ assistant_message_tool_kwarg="assistant_message_tool_kwarg",
821
+ include_err=True,
785
822
  )
786
823
 
787
824
 
@@ -789,9 +826,11 @@ class AsyncMessagesClient:
789
826
  """
790
827
  _response = await self._raw_client.list(
791
828
  agent_id,
792
- after=after,
793
829
  before=before,
830
+ after=after,
794
831
  limit=limit,
832
+ order=order,
833
+ order_by=order_by,
795
834
  group_id=group_id,
796
835
  use_assistant_message=use_assistant_message,
797
836
  assistant_message_tool_name=assistant_message_tool_name,
@@ -1213,8 +1252,7 @@ class AsyncMessagesClient:
1213
1252
  Asynchronously process a user message and return a run object.
1214
1253
  The actual processing happens in the background, and the status can be checked using the run ID.
1215
1254
 
1216
- This is "asynchronous" in the sense that it's a background job and explicitly must be fetched by the run ID.
1217
- This is more like `send_message_job`
1255
+ This is "asynchronous" in the sense that it's a background run and explicitly must be fetched by the run ID.
1218
1256
 
1219
1257
  Parameters
1220
1258
  ----------
@@ -1336,6 +1374,7 @@ class AsyncMessagesClient:
1336
1374
  async def main() -> None:
1337
1375
  await client.agents.messages.reset(
1338
1376
  agent_id="agent_id",
1377
+ add_default_initial_messages=True,
1339
1378
  )
1340
1379
 
1341
1380
 
@@ -28,6 +28,7 @@ from ...types.run import Run
28
28
  from .types.letta_async_request_messages_item import LettaAsyncRequestMessagesItem
29
29
  from .types.letta_streaming_response import LettaStreamingResponse
30
30
  from .types.message_search_request_search_mode import MessageSearchRequestSearchMode
31
+ from .types.messages_list_request_order import MessagesListRequestOrder
31
32
  from .types.messages_modify_request import MessagesModifyRequest
32
33
  from .types.messages_modify_response import MessagesModifyResponse
33
34
  from .types.messages_preview_request import MessagesPreviewRequest
@@ -44,9 +45,11 @@ class RawMessagesClient:
44
45
  self,
45
46
  agent_id: str,
46
47
  *,
47
- after: typing.Optional[str] = None,
48
48
  before: typing.Optional[str] = None,
49
+ after: typing.Optional[str] = None,
49
50
  limit: typing.Optional[int] = None,
51
+ order: typing.Optional[MessagesListRequestOrder] = None,
52
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
50
53
  group_id: typing.Optional[str] = None,
51
54
  use_assistant_message: typing.Optional[bool] = None,
52
55
  assistant_message_tool_name: typing.Optional[str] = None,
@@ -61,14 +64,20 @@ class RawMessagesClient:
61
64
  ----------
62
65
  agent_id : str
63
66
 
64
- after : typing.Optional[str]
65
- Message after which to retrieve the returned messages.
66
-
67
67
  before : typing.Optional[str]
68
- Message before which to retrieve the returned messages.
68
+ Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
69
+
70
+ after : typing.Optional[str]
71
+ Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
69
72
 
70
73
  limit : typing.Optional[int]
71
- Maximum number of messages to retrieve.
74
+ Maximum number of messages to return
75
+
76
+ order : typing.Optional[MessagesListRequestOrder]
77
+ Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
78
+
79
+ order_by : typing.Optional[typing.Literal["created_at"]]
80
+ Field to sort by
72
81
 
73
82
  group_id : typing.Optional[str]
74
83
  Group ID to filter messages by.
@@ -97,9 +106,11 @@ class RawMessagesClient:
97
106
  f"v1/agents/{jsonable_encoder(agent_id)}/messages",
98
107
  method="GET",
99
108
  params={
100
- "after": after,
101
109
  "before": before,
110
+ "after": after,
102
111
  "limit": limit,
112
+ "order": order,
113
+ "order_by": order_by,
103
114
  "group_id": group_id,
104
115
  "use_assistant_message": use_assistant_message,
105
116
  "assistant_message_tool_name": assistant_message_tool_name,
@@ -606,8 +617,7 @@ class RawMessagesClient:
606
617
  Asynchronously process a user message and return a run object.
607
618
  The actual processing happens in the background, and the status can be checked using the run ID.
608
619
 
609
- This is "asynchronous" in the sense that it's a background job and explicitly must be fetched by the run ID.
610
- This is more like `send_message_job`
620
+ This is "asynchronous" in the sense that it's a background run and explicitly must be fetched by the run ID.
611
621
 
612
622
  Parameters
613
623
  ----------
@@ -872,9 +882,11 @@ class AsyncRawMessagesClient:
872
882
  self,
873
883
  agent_id: str,
874
884
  *,
875
- after: typing.Optional[str] = None,
876
885
  before: typing.Optional[str] = None,
886
+ after: typing.Optional[str] = None,
877
887
  limit: typing.Optional[int] = None,
888
+ order: typing.Optional[MessagesListRequestOrder] = None,
889
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
878
890
  group_id: typing.Optional[str] = None,
879
891
  use_assistant_message: typing.Optional[bool] = None,
880
892
  assistant_message_tool_name: typing.Optional[str] = None,
@@ -889,14 +901,20 @@ class AsyncRawMessagesClient:
889
901
  ----------
890
902
  agent_id : str
891
903
 
892
- after : typing.Optional[str]
893
- Message after which to retrieve the returned messages.
894
-
895
904
  before : typing.Optional[str]
896
- Message before which to retrieve the returned messages.
905
+ Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
906
+
907
+ after : typing.Optional[str]
908
+ Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
897
909
 
898
910
  limit : typing.Optional[int]
899
- Maximum number of messages to retrieve.
911
+ Maximum number of messages to return
912
+
913
+ order : typing.Optional[MessagesListRequestOrder]
914
+ Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
915
+
916
+ order_by : typing.Optional[typing.Literal["created_at"]]
917
+ Field to sort by
900
918
 
901
919
  group_id : typing.Optional[str]
902
920
  Group ID to filter messages by.
@@ -925,9 +943,11 @@ class AsyncRawMessagesClient:
925
943
  f"v1/agents/{jsonable_encoder(agent_id)}/messages",
926
944
  method="GET",
927
945
  params={
928
- "after": after,
929
946
  "before": before,
947
+ "after": after,
930
948
  "limit": limit,
949
+ "order": order,
950
+ "order_by": order_by,
931
951
  "group_id": group_id,
932
952
  "use_assistant_message": use_assistant_message,
933
953
  "assistant_message_tool_name": assistant_message_tool_name,
@@ -1434,8 +1454,7 @@ class AsyncRawMessagesClient:
1434
1454
  Asynchronously process a user message and return a run object.
1435
1455
  The actual processing happens in the background, and the status can be checked using the run ID.
1436
1456
 
1437
- This is "asynchronous" in the sense that it's a background job and explicitly must be fetched by the run ID.
1438
- This is more like `send_message_job`
1457
+ This is "asynchronous" in the sense that it's a background run and explicitly must be fetched by the run ID.
1439
1458
 
1440
1459
  Parameters
1441
1460
  ----------
@@ -5,6 +5,7 @@
5
5
  from .letta_async_request_messages_item import LettaAsyncRequestMessagesItem
6
6
  from .letta_streaming_response import LettaStreamingResponse
7
7
  from .message_search_request_search_mode import MessageSearchRequestSearchMode
8
+ from .messages_list_request_order import MessagesListRequestOrder
8
9
  from .messages_modify_request import MessagesModifyRequest
9
10
  from .messages_modify_response import MessagesModifyResponse
10
11
  from .messages_preview_request import MessagesPreviewRequest
@@ -13,6 +14,7 @@ __all__ = [
13
14
  "LettaAsyncRequestMessagesItem",
14
15
  "LettaStreamingResponse",
15
16
  "MessageSearchRequestSearchMode",
17
+ "MessagesListRequestOrder",
16
18
  "MessagesModifyRequest",
17
19
  "MessagesModifyResponse",
18
20
  "MessagesPreviewRequest",
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ MessagesListRequestOrder = typing.Union[typing.Literal["asc", "desc"], typing.Any]
@@ -80,6 +80,11 @@ class PassagesClient:
80
80
  )
81
81
  client.agents.passages.list(
82
82
  agent_id="agent_id",
83
+ after="after",
84
+ before="before",
85
+ limit=1,
86
+ search="search",
87
+ ascending=True,
83
88
  )
84
89
  """
85
90
  _response = self._raw_client.list(
@@ -195,6 +200,8 @@ class PassagesClient:
195
200
 
196
201
  Examples
197
202
  --------
203
+ import datetime
204
+
198
205
  from letta_client import Letta
199
206
 
200
207
  client = Letta(
@@ -204,6 +211,14 @@ class PassagesClient:
204
211
  client.agents.passages.search(
205
212
  agent_id="agent_id",
206
213
  query="query",
214
+ tag_match_mode="any",
215
+ top_k=1,
216
+ start_datetime=datetime.datetime.fromisoformat(
217
+ "2024-01-15 09:30:00+00:00",
218
+ ),
219
+ end_datetime=datetime.datetime.fromisoformat(
220
+ "2024-01-15 09:30:00+00:00",
221
+ ),
207
222
  )
208
223
  """
209
224
  _response = self._raw_client.search(
@@ -357,6 +372,11 @@ class AsyncPassagesClient:
357
372
  async def main() -> None:
358
373
  await client.agents.passages.list(
359
374
  agent_id="agent_id",
375
+ after="after",
376
+ before="before",
377
+ limit=1,
378
+ search="search",
379
+ ascending=True,
360
380
  )
361
381
 
362
382
 
@@ -484,6 +504,7 @@ class AsyncPassagesClient:
484
504
  Examples
485
505
  --------
486
506
  import asyncio
507
+ import datetime
487
508
 
488
509
  from letta_client import AsyncLetta
489
510
 
@@ -497,6 +518,14 @@ class AsyncPassagesClient:
497
518
  await client.agents.passages.search(
498
519
  agent_id="agent_id",
499
520
  query="query",
521
+ tag_match_mode="any",
522
+ top_k=1,
523
+ start_datetime=datetime.datetime.fromisoformat(
524
+ "2024-01-15 09:30:00+00:00",
525
+ ),
526
+ end_datetime=datetime.datetime.fromisoformat(
527
+ "2024-01-15 09:30:00+00:00",
528
+ ),
500
529
  )
501
530
 
502
531
 
@@ -311,10 +311,10 @@ class RawAgentsClient:
311
311
  Whether to enable reasoning for this agent.
312
312
 
313
313
  from_template : typing.Optional[str]
314
- The template id used to configure the agent
314
+ Deprecated: please use the 'create agents from a template' endpoint instead.
315
315
 
316
316
  template : typing.Optional[bool]
317
- Whether the agent is a template
317
+ Deprecated: No longer used
318
318
 
319
319
  project : typing.Optional[str]
320
320
  Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
@@ -1352,10 +1352,10 @@ class AsyncRawAgentsClient:
1352
1352
  Whether to enable reasoning for this agent.
1353
1353
 
1354
1354
  from_template : typing.Optional[str]
1355
- The template id used to configure the agent
1355
+ Deprecated: please use the 'create agents from a template' endpoint instead.
1356
1356
 
1357
1357
  template : typing.Optional[bool]
1358
- Whether the agent is a template
1358
+ Deprecated: No longer used
1359
1359
 
1360
1360
  project : typing.Optional[str]
1361
1361
  Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below.
@@ -2,3 +2,6 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
+ from .types import SourcesListRequestOrder
6
+
7
+ __all__ = ["SourcesListRequestOrder"]
@@ -7,6 +7,7 @@ from ...core.request_options import RequestOptions
7
7
  from ...types.agent_state import AgentState
8
8
  from ...types.source import Source
9
9
  from .raw_client import AsyncRawSourcesClient, RawSourcesClient
10
+ from .types.sources_list_request_order import SourcesListRequestOrder
10
11
 
11
12
 
12
13
  class SourcesClient:
@@ -96,7 +97,17 @@ class SourcesClient:
96
97
  _response = self._raw_client.detach(agent_id, source_id, request_options=request_options)
97
98
  return _response.data
98
99
 
99
- def list(self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[Source]:
100
+ def list(
101
+ self,
102
+ agent_id: str,
103
+ *,
104
+ before: typing.Optional[str] = None,
105
+ after: typing.Optional[str] = None,
106
+ limit: typing.Optional[int] = None,
107
+ order: typing.Optional[SourcesListRequestOrder] = None,
108
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
109
+ request_options: typing.Optional[RequestOptions] = None,
110
+ ) -> typing.List[Source]:
100
111
  """
101
112
  Get the sources associated with an agent.
102
113
 
@@ -104,6 +115,21 @@ class SourcesClient:
104
115
  ----------
105
116
  agent_id : str
106
117
 
118
+ before : typing.Optional[str]
119
+ Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order
120
+
121
+ after : typing.Optional[str]
122
+ Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order
123
+
124
+ limit : typing.Optional[int]
125
+ Maximum number of sources to return
126
+
127
+ order : typing.Optional[SourcesListRequestOrder]
128
+ Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first
129
+
130
+ order_by : typing.Optional[typing.Literal["created_at"]]
131
+ Field to sort by
132
+
107
133
  request_options : typing.Optional[RequestOptions]
108
134
  Request-specific configuration.
109
135
 
@@ -122,9 +148,21 @@ class SourcesClient:
122
148
  )
123
149
  client.agents.sources.list(
124
150
  agent_id="agent_id",
151
+ before="before",
152
+ after="after",
153
+ limit=1,
154
+ order="asc",
125
155
  )
126
156
  """
127
- _response = self._raw_client.list(agent_id, request_options=request_options)
157
+ _response = self._raw_client.list(
158
+ agent_id,
159
+ before=before,
160
+ after=after,
161
+ limit=limit,
162
+ order=order,
163
+ order_by=order_by,
164
+ request_options=request_options,
165
+ )
128
166
  return _response.data
129
167
 
130
168
 
@@ -232,7 +270,15 @@ class AsyncSourcesClient:
232
270
  return _response.data
233
271
 
234
272
  async def list(
235
- self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
273
+ self,
274
+ agent_id: str,
275
+ *,
276
+ before: typing.Optional[str] = None,
277
+ after: typing.Optional[str] = None,
278
+ limit: typing.Optional[int] = None,
279
+ order: typing.Optional[SourcesListRequestOrder] = None,
280
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
281
+ request_options: typing.Optional[RequestOptions] = None,
236
282
  ) -> typing.List[Source]:
237
283
  """
238
284
  Get the sources associated with an agent.
@@ -241,6 +287,21 @@ class AsyncSourcesClient:
241
287
  ----------
242
288
  agent_id : str
243
289
 
290
+ before : typing.Optional[str]
291
+ Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order
292
+
293
+ after : typing.Optional[str]
294
+ Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order
295
+
296
+ limit : typing.Optional[int]
297
+ Maximum number of sources to return
298
+
299
+ order : typing.Optional[SourcesListRequestOrder]
300
+ Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first
301
+
302
+ order_by : typing.Optional[typing.Literal["created_at"]]
303
+ Field to sort by
304
+
244
305
  request_options : typing.Optional[RequestOptions]
245
306
  Request-specific configuration.
246
307
 
@@ -264,10 +325,22 @@ class AsyncSourcesClient:
264
325
  async def main() -> None:
265
326
  await client.agents.sources.list(
266
327
  agent_id="agent_id",
328
+ before="before",
329
+ after="after",
330
+ limit=1,
331
+ order="asc",
267
332
  )
268
333
 
269
334
 
270
335
  asyncio.run(main())
271
336
  """
272
- _response = await self._raw_client.list(agent_id, request_options=request_options)
337
+ _response = await self._raw_client.list(
338
+ agent_id,
339
+ before=before,
340
+ after=after,
341
+ limit=limit,
342
+ order=order,
343
+ order_by=order_by,
344
+ request_options=request_options,
345
+ )
273
346
  return _response.data
@@ -13,6 +13,7 @@ from ...errors.unprocessable_entity_error import UnprocessableEntityError
13
13
  from ...types.agent_state import AgentState
14
14
  from ...types.http_validation_error import HttpValidationError
15
15
  from ...types.source import Source
16
+ from .types.sources_list_request_order import SourcesListRequestOrder
16
17
 
17
18
 
18
19
  class RawSourcesClient:
@@ -122,7 +123,15 @@ class RawSourcesClient:
122
123
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
123
124
 
124
125
  def list(
125
- self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
126
+ self,
127
+ agent_id: str,
128
+ *,
129
+ before: typing.Optional[str] = None,
130
+ after: typing.Optional[str] = None,
131
+ limit: typing.Optional[int] = None,
132
+ order: typing.Optional[SourcesListRequestOrder] = None,
133
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
134
+ request_options: typing.Optional[RequestOptions] = None,
126
135
  ) -> HttpResponse[typing.List[Source]]:
127
136
  """
128
137
  Get the sources associated with an agent.
@@ -131,6 +140,21 @@ class RawSourcesClient:
131
140
  ----------
132
141
  agent_id : str
133
142
 
143
+ before : typing.Optional[str]
144
+ Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order
145
+
146
+ after : typing.Optional[str]
147
+ Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order
148
+
149
+ limit : typing.Optional[int]
150
+ Maximum number of sources to return
151
+
152
+ order : typing.Optional[SourcesListRequestOrder]
153
+ Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first
154
+
155
+ order_by : typing.Optional[typing.Literal["created_at"]]
156
+ Field to sort by
157
+
134
158
  request_options : typing.Optional[RequestOptions]
135
159
  Request-specific configuration.
136
160
 
@@ -142,6 +166,13 @@ class RawSourcesClient:
142
166
  _response = self._client_wrapper.httpx_client.request(
143
167
  f"v1/agents/{jsonable_encoder(agent_id)}/sources",
144
168
  method="GET",
169
+ params={
170
+ "before": before,
171
+ "after": after,
172
+ "limit": limit,
173
+ "order": order,
174
+ "order_by": order_by,
175
+ },
145
176
  request_options=request_options,
146
177
  )
147
178
  try:
@@ -278,7 +309,15 @@ class AsyncRawSourcesClient:
278
309
  raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
279
310
 
280
311
  async def list(
281
- self, agent_id: str, *, request_options: typing.Optional[RequestOptions] = None
312
+ self,
313
+ agent_id: str,
314
+ *,
315
+ before: typing.Optional[str] = None,
316
+ after: typing.Optional[str] = None,
317
+ limit: typing.Optional[int] = None,
318
+ order: typing.Optional[SourcesListRequestOrder] = None,
319
+ order_by: typing.Optional[typing.Literal["created_at"]] = None,
320
+ request_options: typing.Optional[RequestOptions] = None,
282
321
  ) -> AsyncHttpResponse[typing.List[Source]]:
283
322
  """
284
323
  Get the sources associated with an agent.
@@ -287,6 +326,21 @@ class AsyncRawSourcesClient:
287
326
  ----------
288
327
  agent_id : str
289
328
 
329
+ before : typing.Optional[str]
330
+ Source ID cursor for pagination. Returns sources that come before this source ID in the specified sort order
331
+
332
+ after : typing.Optional[str]
333
+ Source ID cursor for pagination. Returns sources that come after this source ID in the specified sort order
334
+
335
+ limit : typing.Optional[int]
336
+ Maximum number of sources to return
337
+
338
+ order : typing.Optional[SourcesListRequestOrder]
339
+ Sort order for sources by creation time. 'asc' for oldest first, 'desc' for newest first
340
+
341
+ order_by : typing.Optional[typing.Literal["created_at"]]
342
+ Field to sort by
343
+
290
344
  request_options : typing.Optional[RequestOptions]
291
345
  Request-specific configuration.
292
346
 
@@ -298,6 +352,13 @@ class AsyncRawSourcesClient:
298
352
  _response = await self._client_wrapper.httpx_client.request(
299
353
  f"v1/agents/{jsonable_encoder(agent_id)}/sources",
300
354
  method="GET",
355
+ params={
356
+ "before": before,
357
+ "after": after,
358
+ "limit": limit,
359
+ "order": order,
360
+ "order_by": order_by,
361
+ },
301
362
  request_options=request_options,
302
363
  )
303
364
  try:
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .sources_list_request_order import SourcesListRequestOrder
6
+
7
+ __all__ = ["SourcesListRequestOrder"]