letta-nightly 0.6.39.dev20250313162623__py3-none-any.whl → 0.6.40.dev20250314173529__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-nightly might be problematic. Click here for more details.

Files changed (59) hide show
  1. letta/agent.py +13 -3
  2. letta/agents/ephemeral_agent.py +2 -1
  3. letta/agents/low_latency_agent.py +8 -0
  4. letta/dynamic_multi_agent.py +274 -0
  5. letta/functions/function_sets/base.py +1 -0
  6. letta/functions/function_sets/extras.py +2 -1
  7. letta/functions/function_sets/multi_agent.py +17 -0
  8. letta/functions/helpers.py +41 -0
  9. letta/helpers/converters.py +67 -0
  10. letta/helpers/mcp_helpers.py +26 -5
  11. letta/llm_api/openai.py +1 -1
  12. letta/memory.py +2 -1
  13. letta/orm/__init__.py +2 -0
  14. letta/orm/agent.py +69 -20
  15. letta/orm/custom_columns.py +15 -0
  16. letta/orm/group.py +33 -0
  17. letta/orm/groups_agents.py +13 -0
  18. letta/orm/message.py +7 -4
  19. letta/orm/organization.py +1 -0
  20. letta/orm/sqlalchemy_base.py +3 -3
  21. letta/round_robin_multi_agent.py +152 -0
  22. letta/schemas/agent.py +3 -0
  23. letta/schemas/enums.py +0 -4
  24. letta/schemas/group.py +65 -0
  25. letta/schemas/letta_message.py +167 -106
  26. letta/schemas/letta_message_content.py +192 -0
  27. letta/schemas/message.py +28 -36
  28. letta/serialize_schemas/__init__.py +1 -1
  29. letta/serialize_schemas/marshmallow_agent.py +108 -0
  30. letta/serialize_schemas/{agent_environment_variable.py → marshmallow_agent_environment_variable.py} +1 -1
  31. letta/serialize_schemas/marshmallow_base.py +52 -0
  32. letta/serialize_schemas/{block.py → marshmallow_block.py} +1 -1
  33. letta/serialize_schemas/{custom_fields.py → marshmallow_custom_fields.py} +12 -0
  34. letta/serialize_schemas/marshmallow_message.py +42 -0
  35. letta/serialize_schemas/{tag.py → marshmallow_tag.py} +12 -2
  36. letta/serialize_schemas/{tool.py → marshmallow_tool.py} +1 -1
  37. letta/serialize_schemas/pydantic_agent_schema.py +111 -0
  38. letta/server/rest_api/app.py +15 -0
  39. letta/server/rest_api/routers/v1/__init__.py +2 -0
  40. letta/server/rest_api/routers/v1/agents.py +46 -40
  41. letta/server/rest_api/routers/v1/groups.py +233 -0
  42. letta/server/rest_api/routers/v1/tools.py +31 -3
  43. letta/server/rest_api/utils.py +1 -1
  44. letta/server/server.py +267 -12
  45. letta/services/agent_manager.py +65 -28
  46. letta/services/group_manager.py +147 -0
  47. letta/services/helpers/agent_manager_helper.py +151 -1
  48. letta/services/message_manager.py +11 -3
  49. letta/services/passage_manager.py +15 -0
  50. letta/settings.py +5 -0
  51. letta/supervisor_multi_agent.py +103 -0
  52. {letta_nightly-0.6.39.dev20250313162623.dist-info → letta_nightly-0.6.40.dev20250314173529.dist-info}/METADATA +1 -2
  53. {letta_nightly-0.6.39.dev20250313162623.dist-info → letta_nightly-0.6.40.dev20250314173529.dist-info}/RECORD +56 -46
  54. letta/serialize_schemas/agent.py +0 -80
  55. letta/serialize_schemas/base.py +0 -64
  56. letta/serialize_schemas/message.py +0 -29
  57. {letta_nightly-0.6.39.dev20250313162623.dist-info → letta_nightly-0.6.40.dev20250314173529.dist-info}/LICENSE +0 -0
  58. {letta_nightly-0.6.39.dev20250313162623.dist-info → letta_nightly-0.6.40.dev20250314173529.dist-info}/WHEEL +0 -0
  59. {letta_nightly-0.6.39.dev20250313162623.dist-info → letta_nightly-0.6.40.dev20250314173529.dist-info}/entry_points.txt +0 -0
@@ -1,10 +1,10 @@
1
1
  letta/__init__.py,sha256=q6k2pwvx7XD4fcSf0faPYn9dD9Yj6778hhgrULdXd6s,918
2
2
  letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
- letta/agent.py,sha256=2n0GTPjWnBT9jQib_qulOlq4_hdcLIfgzIB9A2u1LbE,67778
3
+ letta/agent.py,sha256=CK6E-ZeFOuzoJxgegogDNVcgfUMS9SAebpYI7HTvS2Q,68128
4
4
  letta/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  letta/agents/base_agent.py,sha256=8IMB7UK4ft-Wi-ZYjX7akqQUhk_cSswRgepqeZyvCMs,1550
6
- letta/agents/ephemeral_agent.py,sha256=XOQ5rj3cn7i7Imr_aFaL8DbH7oAizrHbmUy8QZuz9yk,2704
7
- letta/agents/low_latency_agent.py,sha256=CfldT1b0jZ_iTySES4woyXLOQUsIzCnlEHP8treekN4,13990
6
+ letta/agents/ephemeral_agent.py,sha256=DBMXT50UQoqjkvl_Piwle3Fy7iXopy15oMWwnWzbpvo,2751
7
+ letta/agents/low_latency_agent.py,sha256=kDX9pKomyn9IptnVCcxzBNGZBLWQudrexHSfNsJCGvw,14396
8
8
  letta/benchmark/benchmark.py,sha256=ebvnwfp3yezaXOQyGXkYCDYpsmre-b9hvNtnyx4xkG0,3701
9
9
  letta/benchmark/constants.py,sha256=aXc5gdpMGJT327VuxsT5FngbCK2J41PQYeICBO7g_RE,536
10
10
  letta/cli/cli.py,sha256=zJz78-qDUz-depb7VQWkg87RBKiETQU4h9DI6ukQBa8,16477
@@ -18,23 +18,24 @@ letta/config.py,sha256=JFGY4TWW0Wm5fTbZamOwWqk5G8Nn-TXyhgByGoAqy2c,12375
18
18
  letta/constants.py,sha256=_QI06HD6yLmGFrTqexLkUnUWSsKUiBlM1QtbiLGEq4k,7773
19
19
  letta/data_sources/connectors.py,sha256=R2AssXpqS7wN6VI8AfxvqaZs5S1ZACc4E_FewmR9iZI,7022
20
20
  letta/data_sources/connectors_helper.py,sha256=oQpVlc-BjSz9sTZ7sp4PsJSXJbBKpZPi3Dam03CURTQ,3376
21
+ letta/dynamic_multi_agent.py,sha256=syJ-uODfZR_OHd4Acx19yMvjSJ2jwjyX0SOPaeLsZ38,12056
21
22
  letta/embeddings.py,sha256=zqlfbN3aCgSOlNd9M2NW9zrwx4WwQzketb8oa5BzzE8,10831
22
23
  letta/errors.py,sha256=6fQXg2unP-2fo3R7db0ayKKWlD2XMusOPNi9TgJplCg,5558
23
24
  letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
25
  letta/functions/ast_parsers.py,sha256=CQI0rUoIXcLKAev_GYrXcldRIGN5ZQtk5u4FLoHe5sE,5728
25
- letta/functions/function_sets/base.py,sha256=Rc1fKCExxTR66DmEh4OTCtvHIpC0s28ggx9tFgh_0QQ,6010
26
- letta/functions/function_sets/extras.py,sha256=R1a97EKepEPDxJKsxQPFdXXWQrkVppOvKbEkRc_79tc,4852
27
- letta/functions/function_sets/multi_agent.py,sha256=MmLw42ztpjoZj6bPR6BKq9ttRWa9NMwuod48YQq5Qzw,4024
26
+ letta/functions/function_sets/base.py,sha256=RKc_edeBxP5MXmHEDI_LKP7ktO0XuDGLbqYDAgRbvjQ,6114
27
+ letta/functions/function_sets/extras.py,sha256=mG7jCd2RUsf1w9G8mVcv26twJWpiDhbWI6VvnLZoEOk,4899
28
+ letta/functions/function_sets/multi_agent.py,sha256=QTRvK7G-B_2ShIP7hw6Xw50P5VMMc0IHRIS9qMJJT8s,4660
28
29
  letta/functions/functions.py,sha256=NyWLh7a-f4mXti5vM1oWDwXzfA58VmVVqL03O9vosKY,5672
29
- letta/functions/helpers.py,sha256=Eh-6FLVCv7eJZP_IwP4Ib374oYzfvdkAOtYJX7p1t6c,27495
30
+ letta/functions/helpers.py,sha256=0I-ezZeM3slhAifpdlR5k2Rn6GxExD6xACCKuoYmE8M,29119
30
31
  letta/functions/interface.py,sha256=s_PPp5WDvGH_y9KUpMlORkdC141ITczFk3wsevrrUD8,2866
31
32
  letta/functions/schema_generator.py,sha256=wbV8tDx5RIkrSP9JNVo3PUuulN-WZie1WWLg69QTOjE,22320
32
33
  letta/helpers/__init__.py,sha256=p0luQ1Oe3Skc6sH4O58aHHA3Qbkyjifpuq0DZ1GAY0U,59
33
34
  letta/helpers/composio_helpers.py,sha256=6CWV483vE3N-keQlblexxBiQHxorMAgQuvbok4adGO4,949
34
- letta/helpers/converters.py,sha256=yM0slUU4YMW6K260JT88xnCxK2jB4RstSmaOezsT_Ik,6679
35
+ letta/helpers/converters.py,sha256=3qHoPDPa7ycPeeE6eLYZ8mad1mA6oGPgY95lDyhb3_A,8971
35
36
  letta/helpers/datetime_helpers.py,sha256=7U5ZJkE0cLki4sG8ukIHZSAoFfQpLWQu2kFekETy6Zg,2633
36
37
  letta/helpers/json_helpers.py,sha256=PWZ5HhSqGXO4e563dM_8M72q7ScirjXQ4Rv1ckohaV8,396
37
- letta/helpers/mcp_helpers.py,sha256=kq2CH4PtnawUuO409_G3Q1ZUB0WSB0fzYb7JDpPUxo4,4196
38
+ letta/helpers/mcp_helpers.py,sha256=T1Jz2emYlDBbTsqZKckUGWiDjeoD_7lOUGx7GWU1mM8,4789
38
39
  letta/helpers/tool_execution_helper.py,sha256=bskCscuz2nqoUboFcYA7sQGeikdEyqiYnNpO4gLQTdc,7469
39
40
  letta/helpers/tool_rule_solver.py,sha256=z-2Zq_qWykgWanFZYxtxUee4FkMnxqvntXe2tomoH68,6774
40
41
  letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -61,7 +62,7 @@ letta/llm_api/llm_api_tools.py,sha256=g6Rm7srSNzJKDEUDIKA-dJ9W9GLynLOSgt_2lHj2Lq
61
62
  letta/llm_api/llm_client.py,sha256=u7nnmtSgwhqNDiaNmv6i0G-I-WgwLH35uxJnXM0C33o,1767
62
63
  letta/llm_api/llm_client_base.py,sha256=754JOj33J2kowxSYdP7hkQ_dx47zZ5qCQXy2w5NiywM,4881
63
64
  letta/llm_api/mistral.py,sha256=fHdfD9ug-rQIk2qn8tRKay1U6w9maF11ryhKi91FfXM,1593
64
- letta/llm_api/openai.py,sha256=UnCh2NYYJWpwUai6P2enFop3K_5JS4-VHuoFoBx7yRs,22398
65
+ letta/llm_api/openai.py,sha256=XyUdtWEeKEsxmryomgKn65157R1TJFEVAhfJJBGILzY,22401
65
66
  letta/local_llm/README.md,sha256=hFJyw5B0TU2jrh9nb0zGZMgdH-Ei1dSRfhvPQG_NSoU,168
66
67
  letta/local_llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
68
  letta/local_llm/chat_completion_proxy.py,sha256=k8_8kIKglMSXnthIdc4TnR3ACJVQsk6MHJY_Y3lM6B0,13845
@@ -101,35 +102,37 @@ letta/local_llm/webui/legacy_settings.py,sha256=BLmd3TSx5StnY3ibjwaxYATPt_Lvq-o1
101
102
  letta/local_llm/webui/settings.py,sha256=gmLHfiOl1u4JmlAZU2d2O8YKF9lafdakyjwR_ftVPh8,552
102
103
  letta/log.py,sha256=FbFwU9KEX7k0FBYhPl7fJ6uQ3NO3-ZbsnM2OpcTFXjo,2217
103
104
  letta/main.py,sha256=_agyaYPJq70OL0goNwO34zENL2KupnTgqlg-HVcNaTY,15379
104
- letta/memory.py,sha256=26cwXeUxlB_UfTMPjKyXs19foNxMe-gecEggOiR5Eiw,3364
105
+ letta/memory.py,sha256=JjKripPdzsCxXCPYBmFP_yRVN_PSqEQW5s8EKK-Mt9M,3411
105
106
  letta/offline_memory_agent.py,sha256=P_rm6GmKAH6lg7-njuv7dK29f7v5-tAQy-rMOwcPfwk,7499
106
107
  letta/openai_backcompat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
108
  letta/openai_backcompat/openai_object.py,sha256=GSzeCTwLpLD2fH4X8wVqzwdmoTjKK2I4PnriBY453lc,13505
108
109
  letta/orm/__all__.py,sha256=2gh2MZTkA3Hw67VWVKK3JIStJOqTeLdpCvYSVYNeEDA,692
109
- letta/orm/__init__.py,sha256=QNrBCBcz4Z-xVObkWngCkJTp7LWJfIZQ1IMWUylFPyg,996
110
- letta/orm/agent.py,sha256=LYMAfDfUlLTpOu5hw8mrQ1AKOOkT39BvLMp12IdGrik,7742
110
+ letta/orm/__init__.py,sha256=t9ZXn6Y7Cp1Ia0iZXBhXw9JZ6-ff8bSavKD4uy2mBN8,1079
111
+ letta/orm/agent.py,sha256=X2H_wDIvX7K0uBO5aoXfIH1C3b31FZ8IywWfgmDc0J8,9602
111
112
  letta/orm/agents_tags.py,sha256=dYSnHz4IWBjyOiQ4RJomX3P0QN76JTlEZEw5eJM6Emg,925
112
113
  letta/orm/base.py,sha256=VjvxF9TwKF9Trf8BJkDgf7D6KrWWopOkUiF18J3IElk,3071
113
114
  letta/orm/block.py,sha256=Ci_CO54CDb4vpZkrRircmYjc-Y00Zhs9T14s3Bf_dF4,4134
114
115
  letta/orm/blocks_agents.py,sha256=W0dykl9OchAofSuAYZD5zNmhyMabPr9LTJrz-I3A0m4,983
115
- letta/orm/custom_columns.py,sha256=UW_qhIJGYlPn7TMMeTILYKXibdZ2CKVlhXDX5UmnNxA,2567
116
+ letta/orm/custom_columns.py,sha256=A6FSbwnweFwcnunH38ZIebjI2zWufW_aPz6WK1aF9ps,3007
116
117
  letta/orm/enums.py,sha256=gUmlsCN04RiwtbN1FysjgqDqbR7WiU546iNPjCEzTNk,610
117
118
  letta/orm/errors.py,sha256=Se0Guz-gqi-D36NUWSh7AP9zTVCSph9KgZh_trwng4o,734
118
119
  letta/orm/file.py,sha256=7_p7LxityP3NQZVURQYG0kgcZhEkVuMN0Fj4h9YOe1w,1780
120
+ letta/orm/group.py,sha256=O_Eehn7Ceu0NGc12wtoiss2J1XoGFifVMj0Vwt4y_kU,1462
121
+ letta/orm/groups_agents.py,sha256=1J6ZyXlTjC8CG0fXPuzfcFo_Bg0cpZSyktYRkoFOUt4,483
119
122
  letta/orm/identities_agents.py,sha256=cfIQ6UsbwmjxtGVmFt1ArK2zbKr9k6VWoELuISDnLSc,502
120
123
  letta/orm/identities_blocks.py,sha256=oS0DnDXKzcWtlH2dDFREkNF1JHJ3Kyg8fN9GI8DKtcg,501
121
124
  letta/orm/identity.py,sha256=DQlyqQtszv8AlP0HYftBbewoHbCr-_vQllzEvNuGrxA,2867
122
125
  letta/orm/job.py,sha256=G2P-xUpTapD4lhU2FwMZET1b5QR4ju9WOB3uiTKD_mw,2157
123
126
  letta/orm/job_messages.py,sha256=SgwaYPYwwAC3dBtl9Xye_TWUl9H_-m95S95TTcfPyOg,1245
124
- letta/orm/message.py,sha256=Q3Tx8MqImgmyxiGnfxrgkosZdhWeOiHP9XUOM4Y9KFk,3085
127
+ letta/orm/message.py,sha256=cdQvpTY8HN-Ld5ky2d7CoADcM70xUhzo8vVNlQvzAjc,3466
125
128
  letta/orm/mixins.py,sha256=9c79Kfr-Z1hL-SDYKeoptx_yMTbBwJJBo9nrKEzSDAc,1622
126
- letta/orm/organization.py,sha256=ciF2ffCBMddfOQ9O1gHv_cFMTPUlSQZNDYYXFgH_z1E,3070
129
+ letta/orm/organization.py,sha256=ALFdILLT09Nm_oH1IxPr6eInasA6OBk0X5rDhCBANPw,3189
127
130
  letta/orm/passage.py,sha256=tQi-fZZFBFVz0KZxd0foKPkAOaempgiYOHHK6lJ98gw,3332
128
131
  letta/orm/provider.py,sha256=-qA9tvKTZgaM4D7CoDZZiA7zTgjaaWDV4jZvifQv_MM,805
129
132
  letta/orm/sandbox_config.py,sha256=DyOy_1_zCMlp13elCqPcuuA6OwUove6mrjhcpROTg50,4150
130
133
  letta/orm/source.py,sha256=z89VZUHV9K8Ew9JCYoZqUeRb1WEUKmrn0MMFkppaphE,2117
131
134
  letta/orm/sources_agents.py,sha256=Ik_PokCBrXRd9wXWomeNeb8EtLUwjb9VMZ8LWXqpK5A,473
132
- letta/orm/sqlalchemy_base.py,sha256=IKkMSQ5LLGqP6gNL_Q4pdsYlOd5XM_8YM0vh606Gyc4,22501
135
+ letta/orm/sqlalchemy_base.py,sha256=IaiVDy7q5mZsP2x2ME0IFyI6KYMwMiKb5oHODqfiDNs,22491
133
136
  letta/orm/sqlite_functions.py,sha256=JCScKiRlYCKxy9hChQ8wsk4GMKknZE24MunnG3fM1Gw,4255
134
137
  letta/orm/step.py,sha256=fjm7fLtYLCtFM6Mj6e2boP6P7dHSFG24Nem85VfVqHg,3216
135
138
  letta/orm/tool.py,sha256=x58lmVG5IhXTVt82CnoN-ExuObnQCbeSMx_yOhUMmA4,2515
@@ -163,24 +166,27 @@ letta/prompts/system/memgpt_modified_o1.txt,sha256=objnDgnxpF3-MmU28ZqZ7-TOG8UlH
163
166
  letta/prompts/system/memgpt_offline_memory.txt,sha256=rWEJeF-6aiinjkJM9hgLUYCmlEcC_HekYB1bjEUYq6M,2460
164
167
  letta/prompts/system/memgpt_offline_memory_chat.txt,sha256=ituh7gDuio7nC2UKFB7GpBq6crxb8bYedQfJ0ADoPgg,3949
165
168
  letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
- letta/schemas/agent.py,sha256=4pTHrTV_FYyJuujtSglRsJQ2ouF0FRYWNmvObbLeL2g,14123
169
+ letta/round_robin_multi_agent.py,sha256=up9x_9Zb20sPZT-iAkheM5RsrplMAeTdYPkK-18P3y4,6220
170
+ letta/schemas/agent.py,sha256=YjjzBIA4txW5LzQjVoDfXHgNZQh8HCYZ7tOyYVlbU0s,14276
167
171
  letta/schemas/block.py,sha256=rMWflyj982qW86dQK-9saXBHKaLCu3aUG2gQTckG3Ik,4984
168
172
  letta/schemas/embedding_config.py,sha256=ufboqW9ctSBJdhwzJRbrGtTzOTwSKfT0LY0mowpr6fs,3398
169
173
  letta/schemas/embedding_config_overrides.py,sha256=lkTa4y-EQ2RnaEKtKDM0sEAk7EwNa67REw8DGNNtGQY,84
170
- letta/schemas/enums.py,sha256=jfuke35XP_AKfHHBnH1rx1wYjUDWqgDsKnRxdrCpTKA,1213
174
+ letta/schemas/enums.py,sha256=zBNS0iIDtAS9mrDafin4mY33LLPUxq_SoPx6z5BiM_g,1156
171
175
  letta/schemas/environment_variables.py,sha256=VRtzOjdeQdHcSHXisk7oJUQlheruxhSWNS0xqlfGzbs,2429
172
176
  letta/schemas/file.py,sha256=ChN2CWzLI2TT9WLItcfElEH0E8b7kzPylF2OQBr6Beg,1550
177
+ letta/schemas/group.py,sha256=fniDxIkgrYxo8yR1br-ZqhjjhOIaFqG-JMYHWo2J81Y,2141
173
178
  letta/schemas/health.py,sha256=zT6mYovvD17iJRuu2rcaQQzbEEYrkwvAE9TB7iU824c,139
174
179
  letta/schemas/identity.py,sha256=9emyusE65zFSW7IDKDMsGzMwqDbadF0eKjvYNDtpS1s,3220
175
180
  letta/schemas/job.py,sha256=MX9EiLDDIeHm3q52ImOjp7UzXEdYTXAWWobRCAxwV0w,2225
176
181
  letta/schemas/letta_base.py,sha256=DuMqiNFmYwTAsXUHYdX--EWgtFUVzph5ptLZvu7aguI,3988
177
- letta/schemas/letta_message.py,sha256=3AXGiSwXf9m3Ta2A0Z8BlCq80n4fRC3c66V7LkiDUHw,10648
182
+ letta/schemas/letta_message.py,sha256=mMbo6n4iO1cZJXRC7N497agtqcMTvs2o_x0163E8mes,13302
183
+ letta/schemas/letta_message_content.py,sha256=CeIgyOy8HYMh_oGoPYlATp6d3Hp5v7SU3St9HPSbIqo,6402
178
184
  letta/schemas/letta_request.py,sha256=dzy3kwb5j2QLaSV0sDlwISEMt2xxH3IiK-vR9xJV65k,1123
179
185
  letta/schemas/letta_response.py,sha256=pq-SxXQy5yZo1-DiAwV2mMURlUvz1Uu7HHR_tB1hMho,7139
180
186
  letta/schemas/llm_config.py,sha256=bqq4LGE9layPcnnkzd_8d2SB8o1x8XdDzfd2ZkYQwcY,5611
181
187
  letta/schemas/llm_config_overrides.py,sha256=-oRglCTcajF6UAK3RAa0FLWVuKODPI1v403fDIWMAtA,1815
182
188
  letta/schemas/memory.py,sha256=GOYDfPKzbWftUWO9Hv4KW7xAi1EIQmC8zpP7qvEkVHw,10245
183
- letta/schemas/message.py,sha256=73F0UwRpi1DkQi_MOTLYctIgIUkxoeMqLaA-EiKdqX4,39544
189
+ letta/schemas/message.py,sha256=1V9_1OZxVkkKeBx9Y9WcrnHF0ggc2zeV3K-Wix8mYBA,39339
184
190
  letta/schemas/openai/chat_completion_request.py,sha256=3tALmbBV2pv1CcqzNLBxxIPOQ8Z85woucT7FN0fuDic,3402
185
191
  letta/schemas/openai/chat_completion_response.py,sha256=koEb_NTiz5YsAAX81Z0cSqSFX4a6MdD2lhoXtxF_rw4,4100
186
192
  letta/schemas/openai/chat_completions.py,sha256=l0e9sT9boTD5VBU5YtJ0s7qUtCfFGB2K-gQLeEZ2LHU,3599
@@ -197,21 +203,22 @@ letta/schemas/tool.py,sha256=A6HS_nHoxAOVyv4u6NMxzMNsp0PG40kY2uDS8FA06M4,12284
197
203
  letta/schemas/tool_rule.py,sha256=2YQZba4fXS3u4j8pIk7BDujfq8rnxSVMwJSyaVgApH4,2149
198
204
  letta/schemas/usage.py,sha256=8oYRH-JX0PfjIu2zkT5Uu3UWQ7Unnz_uHiO8hRGI4m0,912
199
205
  letta/schemas/user.py,sha256=V32Tgl6oqB3KznkxUz12y7agkQicjzW7VocSpj78i6Q,1526
200
- letta/serialize_schemas/__init__.py,sha256=mflGEZvM3NuMG9Q6dccEdVk73BUHoX-v7hmfk025Gmc,64
201
- letta/serialize_schemas/agent.py,sha256=BqtIBiMbGnupr6CGCF4Z4wKtkT90ACnxLN0qcRgkieM,3281
202
- letta/serialize_schemas/agent_environment_variable.py,sha256=IDcivP-xB1j6Fn0onSM4T1l4CSlXhOLWNmKHG2psOoU,641
203
- letta/serialize_schemas/base.py,sha256=X5cs1U4P0Vjem4SKNCYBiSAIboThJdM2Oyphu_Nl9Ag,2040
204
- letta/serialize_schemas/block.py,sha256=BeZ2FZO59IWUHiPMSNKlZMi9dH9Gbys0rJpsoCFBjdg,420
205
- letta/serialize_schemas/custom_fields.py,sha256=HPonsK5DIU9EezXmQG0vAq2CWZVucld6Fqm3-VcJBg8,2101
206
- letta/serialize_schemas/message.py,sha256=Tdj_ixjjqM2j29gqxLgrdWpTgh5mR3YF5wTbPTnSsHY,920
207
- letta/serialize_schemas/tag.py,sha256=wbCTERsLqN5_bitTMwIuYjt-yZ4XmAewOwEN6ObtbNM,443
208
- letta/serialize_schemas/tool.py,sha256=x13LlwOvbAwnS7Jf5M1nOQCUnDhm4oTFY_mYJu3aJhM,392
206
+ letta/serialize_schemas/__init__.py,sha256=cosMjvWz7cubC1azbUofzYrcDBTuSgjJImUdsrSs3p0,77
207
+ letta/serialize_schemas/marshmallow_agent.py,sha256=Ks0RQK5LcuxOHIyB7GKdD2yKK0mh06RCxb-k6YE9kcc,4304
208
+ letta/serialize_schemas/marshmallow_agent_environment_variable.py,sha256=9RYJkaNH2UiRoIFzrNklVAGl3uMmu3n6NwzFdviPPVA,653
209
+ letta/serialize_schemas/marshmallow_base.py,sha256=GP0ImCRfJ-BqNKe-T44Feal18pmFQG-p8JllOsSSNRk,1379
210
+ letta/serialize_schemas/marshmallow_block.py,sha256=e6xT1SEOBf5Nh4ed1UJ0O05S8o-BKFcLH6yxmvxw5zE,432
211
+ letta/serialize_schemas/marshmallow_custom_fields.py,sha256=_rXV4eGY4wKqzZQPyk3ohHq4rt_oXa4r9QoHfoE-DbM,2500
212
+ letta/serialize_schemas/marshmallow_message.py,sha256=vkBlIFONzsiREXo507sWl1mjVjCLV97RtB7jyE0N_fw,1336
213
+ letta/serialize_schemas/marshmallow_tag.py,sha256=ssNGdD-z9UafhoTTOcvWRXju__NSx1bPijae_vljMr4,682
214
+ letta/serialize_schemas/marshmallow_tool.py,sha256=98dzHzKcH_HE5n_gCkU683iHvg1M9IGmRZ2BWnh__j4,404
215
+ letta/serialize_schemas/pydantic_agent_schema.py,sha256=4FfF405nyH3lpTpU6r1vkZmP5916FhuEcgaEqpiAMko,2633
209
216
  letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
217
  letta/server/constants.py,sha256=yAdGbLkzlOU_dLTx0lKDmAnj0ZgRXCEaIcPJWO69eaE,92
211
218
  letta/server/db.py,sha256=cA1MHpMCTTC1MX7VWppJ-cKq1XW93Vws_vTV0-bKmTE,3642
212
219
  letta/server/generate_openapi_schema.sh,sha256=0OtBhkC1g6CobVmNEd_m2B6sTdppjbJLXaM95icejvE,371
213
220
  letta/server/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
214
- letta/server/rest_api/app.py,sha256=_rJ6XzvmACjaZwtuGbTLPcqd40pa9FIUyAUHPJCTvow,12723
221
+ letta/server/rest_api/app.py,sha256=gP558sE9dY4914GYVPuypPwYiGHaVtfeWSsOUZBq67c,13618
215
222
  letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
223
  letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
217
224
  letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
@@ -221,9 +228,10 @@ letta/server/rest_api/optimistic_json_parser.py,sha256=1z4d9unmxMb0ou7owJ62uUQoN
221
228
  letta/server/rest_api/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
222
229
  letta/server/rest_api/routers/openai/chat_completions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
230
  letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=OgjWs4zJaIi5Ps67iCTeOLmLXcW0S5Xccd-TcNa9obQ,5321
224
- letta/server/rest_api/routers/v1/__init__.py,sha256=Zi2th-okqT_RWAjB8MYGHX8CpHt1OSRyO5V8SJEp6UU,1361
225
- letta/server/rest_api/routers/v1/agents.py,sha256=ViQuKsVtqYciLXHkQkC03gz5TtF2CORZg4d6fhH9D0M,29458
231
+ letta/server/rest_api/routers/v1/__init__.py,sha256=AV_uopcsNQIK-paX-9X23dNmLMUDDe_fgLTfeNyjWk8,1456
232
+ letta/server/rest_api/routers/v1/agents.py,sha256=ytRWTFvBW8zQZ0JOStK6QiXMjoNo2QESGZ6nOzW_sOY,29879
226
233
  letta/server/rest_api/routers/v1/blocks.py,sha256=OqX-YHC8e-yi-IoZ8OQJQjZ4QIjJ4xcio0tUlRhv8H0,4168
234
+ letta/server/rest_api/routers/v1/groups.py,sha256=v53Ekx9HmcabvBuUsvxlJyRvUiStgVrzAFoqzwC4cOs,9826
227
235
  letta/server/rest_api/routers/v1/health.py,sha256=MoOjkydhGcJXTiuJrKIB0etVXiRMdTa51S8RQ8-50DQ,399
228
236
  letta/server/rest_api/routers/v1/identities.py,sha256=gRTcOXxbpiTzQzzVA_I1Sc9aUSKhW6YcQcJb__HxOX4,5957
229
237
  letta/server/rest_api/routers/v1/jobs.py,sha256=4oeJfI2odNGubU_g7WSORJhn_usFsbRaD-qm86rve1E,2746
@@ -235,12 +243,12 @@ letta/server/rest_api/routers/v1/sandbox_configs.py,sha256=9hqnnMwJ3wCwO-Bezu3Xl
235
243
  letta/server/rest_api/routers/v1/sources.py,sha256=rpQhaRHyzGUK43LX623L8BBLqL85HJ6fUYPMvI4k3kA,8434
236
244
  letta/server/rest_api/routers/v1/steps.py,sha256=DVVwaxLNbNAgWpr2oQkrNjdS-wi0bP8kVJZUO-hiaf8,3275
237
245
  letta/server/rest_api/routers/v1/tags.py,sha256=coydgvL6-9cuG2Hy5Ea7QY3inhTHlsf69w0tcZenBus,880
238
- letta/server/rest_api/routers/v1/tools.py,sha256=1nBJdYijMVf1RYHgVw01QPnAVsFI5LEYqC5z69AE6YQ,16060
246
+ letta/server/rest_api/routers/v1/tools.py,sha256=UVEl7nQr74C-VV02Enw6dx9S8UvPMnM97Ju-X92GswA,17204
239
247
  letta/server/rest_api/routers/v1/users.py,sha256=G5DBHSkPfBgVHN2Wkm-rVYiLQAudwQczIq2Z3YLdbVo,2277
240
248
  letta/server/rest_api/routers/v1/voice.py,sha256=7J0L-Nkz65m0PXcpQI2ATMIZzumDDSUzgtIus7d-tv8,2461
241
249
  letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
242
- letta/server/rest_api/utils.py,sha256=TlVzgtsg0jmaXzvGubtzOE9WSyvRe6_DFoIBK9EDYt8,13820
243
- letta/server/server.py,sha256=CaG1oIS_uAI6MwuNDNZA_l7mfWyDn9ouITzmOLTi0HU,62929
250
+ letta/server/rest_api/utils.py,sha256=aF0u__Q33-aPWAiHi9JA0jKAjqnwbVKzJdD5NgFpnOU,13828
251
+ letta/server/server.py,sha256=w2vCdTz4rETNA_pmVmEMniUIygIlIeD6Qud_dZNcfVQ,75772
244
252
  letta/server/startup.sh,sha256=eo7zz4HGu5ryOshfbOSGbXpUDDyoaP7fTq4z8269uaw,1939
245
253
  letta/server/static_files/assets/index-048c9598.js,sha256=mR16XppvselwKCcNgONs4L7kZEVa4OEERm4lNZYtLSk,146819
246
254
  letta/server/static_files/assets/index-0e31b727.css,sha256=SBbja96uiQVLDhDOroHgM6NSl7tS4lpJRCREgSS_hA8,7672
@@ -254,15 +262,16 @@ letta/server/ws_api/interface.py,sha256=TWl9vkcMCnLsUtgsuENZ-ku2oMDA-OUTzLh_yNRo
254
262
  letta/server/ws_api/protocol.py,sha256=5mDgpfNZn_kNwHnpt5Dsuw8gdNH298sgxTGed3etzYg,1836
255
263
  letta/server/ws_api/server.py,sha256=cBSzf-V4zT1bL_0i54OTI3cMXhTIIxqjSRF8pYjk7fg,5835
256
264
  letta/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
257
- letta/services/agent_manager.py,sha256=Lb3dr3n-La2-yKsQQPwQDjZIgiQetjaqTsu3QFYusD4,60233
265
+ letta/services/agent_manager.py,sha256=2xLGa_BBil9OwFylC16MN1wz1QrpFhLbue1aNiKEs3A,62613
258
266
  letta/services/block_manager.py,sha256=vfFs7T00WZWKfyKn50QjK5N1T7b2xjuxou7ffjGVf0Y,5838
259
- letta/services/helpers/agent_manager_helper.py,sha256=0xpFUQlLoben1_1sARDFSULOk2_ueWiCtGvl1UMJqTg,11643
267
+ letta/services/group_manager.py,sha256=rzfy7w1yYtUtI0cBlr3mdQjfcWKqKahT1q2v9s6_RBI,6202
268
+ letta/services/helpers/agent_manager_helper.py,sha256=YPlsDrExprwOuaHW6ZDv-j3tkGi6bNYJ2-XcYIzcKLo,18267
260
269
  letta/services/helpers/tool_execution_helper.py,sha256=lLoebs1kZKjw62y1PxHbIDkHq_heJN2ZT0gKje-R8oo,6941
261
270
  letta/services/identity_manager.py,sha256=DJzvq5TqzgmVdnH401YAJUycXTE0tNN70KRZTwu6ko8,8505
262
271
  letta/services/job_manager.py,sha256=ejcv_nMljByimiWJjvj7aqUFQktL1kK-vx_cra2L2cs,16317
263
- letta/services/message_manager.py,sha256=ZcHn3xQC86LY0_6mecux9WyxPQqMDAhMRjXIjAFLVdc,13079
272
+ letta/services/message_manager.py,sha256=75JGDC0v3SKdxhr85nAxbNza0aI1fvCxXJkoKdwB_nM,13499
264
273
  letta/services/organization_manager.py,sha256=dhQ3cFPXWNYLfMjdahr2HsOAMJ1JtCEWj1G8Nei5MQc,3388
265
- letta/services/passage_manager.py,sha256=mwShFO_xRaTi82fvANb_ngO0TmGaZPA9FPu8KuZ6Gd8,8643
274
+ letta/services/passage_manager.py,sha256=GeEsQZx3uBe4E509LaZtwKVjIeIw4Lra9jOqFgbk1yg,9102
266
275
  letta/services/per_agent_lock_manager.py,sha256=porM0cKKANQ1FvcGXOO_qM7ARk5Fgi1HVEAhXsAg9-4,546
267
276
  letta/services/provider_manager.py,sha256=QOKMSZOM6eAWa2-nANWQc1frKBh8N3gqDq0V87fnSuc,3748
268
277
  letta/services/sandbox_config_manager.py,sha256=ATgZNWNpkdIQDUPy4ABsguHQba2PZf51-c4Ji60MzLE,13361
@@ -274,14 +283,15 @@ letta/services/summarizer/summarizer.py,sha256=qPcR7VsHsgUsUtxmKx_73l3XdDhFvDzZ8
274
283
  letta/services/tool_execution_sandbox.py,sha256=6AB3rFS34PzoyE9dxtUmuaUUWvKrwdE083NuBRa1eC0,22969
275
284
  letta/services/tool_manager.py,sha256=rXOdB2quTWE9EGjkg9Q4EY6-hAwX2R9gGBCXFs8hR4w,9862
276
285
  letta/services/user_manager.py,sha256=ScHbdJK9kNF8QXjsd3ZWGEL87n_Uyp3YwfKetOJmpHs,4304
277
- letta/settings.py,sha256=wBgZgIFQaoUOyeTRl-vD61gY2M1Q89FHP0X1IS0yz50,6885
286
+ letta/settings.py,sha256=2uvCG4UEJt0hss--f0HC2bhbsu4uqOBSaHJWBRVxKhw,7011
278
287
  letta/streaming_interface.py,sha256=1vuAckIxo1p1UsXtDzE8LTUve5RoTZRdXUe-WBIYDWU,15818
279
288
  letta/streaming_utils.py,sha256=jLqFTVhUL76FeOuYk8TaRQHmPTf3HSRc2EoJwxJNK6U,11946
289
+ letta/supervisor_multi_agent.py,sha256=dw6XPAxZcyjAXEVYkMIxJFhZdR2m2_rq-fYev5hZE50,3936
280
290
  letta/system.py,sha256=dnOrS2FlRMwijQnOvfrky0Lg8wEw-FUq2zzfAJOUSKA,8477
281
291
  letta/tracing.py,sha256=h_-c2lIKHmA7yCLOvgaHijMabmRC__FAl2rZtVKufUM,8017
282
292
  letta/utils.py,sha256=AdHrQ2OQ3V4XhJ1LtYwbLUO71j2IJY37cIUxXPgaaRY,32125
283
- letta_nightly-0.6.39.dev20250313162623.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
284
- letta_nightly-0.6.39.dev20250313162623.dist-info/METADATA,sha256=wPTuL0MtsBV1tT-wE8Ih52nIEuY1pA2zbKi6cjCbEP8,22928
285
- letta_nightly-0.6.39.dev20250313162623.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
286
- letta_nightly-0.6.39.dev20250313162623.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
287
- letta_nightly-0.6.39.dev20250313162623.dist-info/RECORD,,
293
+ letta_nightly-0.6.40.dev20250314173529.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
294
+ letta_nightly-0.6.40.dev20250314173529.dist-info/METADATA,sha256=vByuTR-Z0aV0d2OsTuIqBwOJjtb41l7WPqM62GTdUvQ,22886
295
+ letta_nightly-0.6.40.dev20250314173529.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
296
+ letta_nightly-0.6.40.dev20250314173529.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
297
+ letta_nightly-0.6.40.dev20250314173529.dist-info/RECORD,,
@@ -1,80 +0,0 @@
1
- from typing import Dict
2
-
3
- from marshmallow import fields, post_dump
4
-
5
- from letta.orm import Agent
6
- from letta.schemas.agent import AgentState as PydanticAgentState
7
- from letta.schemas.user import User
8
- from letta.serialize_schemas.agent_environment_variable import SerializedAgentEnvironmentVariableSchema
9
- from letta.serialize_schemas.base import BaseSchema
10
- from letta.serialize_schemas.block import SerializedBlockSchema
11
- from letta.serialize_schemas.custom_fields import EmbeddingConfigField, LLMConfigField, ToolRulesField
12
- from letta.serialize_schemas.message import SerializedMessageSchema
13
- from letta.serialize_schemas.tag import SerializedAgentTagSchema
14
- from letta.serialize_schemas.tool import SerializedToolSchema
15
- from letta.server.db import SessionLocal
16
-
17
-
18
- class SerializedAgentSchema(BaseSchema):
19
- """
20
- Marshmallow schema for serializing/deserializing Agent objects.
21
- Excludes relational fields.
22
- """
23
-
24
- __pydantic_model__ = PydanticAgentState
25
-
26
- llm_config = LLMConfigField()
27
- embedding_config = EmbeddingConfigField()
28
- tool_rules = ToolRulesField()
29
-
30
- messages = fields.List(fields.Nested(SerializedMessageSchema))
31
- core_memory = fields.List(fields.Nested(SerializedBlockSchema))
32
- tools = fields.List(fields.Nested(SerializedToolSchema))
33
- tool_exec_environment_variables = fields.List(fields.Nested(SerializedAgentEnvironmentVariableSchema))
34
- tags = fields.List(fields.Nested(SerializedAgentTagSchema))
35
-
36
- def __init__(self, *args, session: SessionLocal, actor: User, **kwargs):
37
- super().__init__(*args, actor=actor, **kwargs)
38
- self.session = session
39
-
40
- # Propagate session and actor to nested schemas automatically
41
- for field in self.fields.values():
42
- if isinstance(field, fields.List) and isinstance(field.inner, fields.Nested):
43
- field.inner.schema.session = session
44
- field.inner.schema.actor = actor
45
- elif isinstance(field, fields.Nested):
46
- field.schema.session = session
47
- field.schema.actor = actor
48
-
49
- @post_dump
50
- def sanitize_ids(self, data: Dict, **kwargs):
51
- data = super().sanitize_ids(data, **kwargs)
52
-
53
- # Remap IDs of messages
54
- # Need to do this in post, so we can correctly map the in-context message IDs
55
- # TODO: Remap message_ids to reference objects, not just be a list
56
- id_remapping = dict()
57
- for message in data.get("messages"):
58
- message_id = message.get("id")
59
- if message_id not in id_remapping:
60
- id_remapping[message_id] = SerializedMessageSchema.__pydantic_model__.generate_id()
61
- message["id"] = id_remapping[message_id]
62
- else:
63
- raise ValueError(f"Duplicate message IDs in agent.messages: {message_id}")
64
-
65
- # Remap in context message ids
66
- data["message_ids"] = [id_remapping[message_id] for message_id in data.get("message_ids")]
67
-
68
- return data
69
-
70
- class Meta(BaseSchema.Meta):
71
- model = Agent
72
- # TODO: Serialize these as well...
73
- exclude = BaseSchema.Meta.exclude + (
74
- "project_id",
75
- "template_id",
76
- "base_template_id",
77
- "sources",
78
- "source_passages",
79
- "agent_passages",
80
- )
@@ -1,64 +0,0 @@
1
- from typing import Dict, Optional
2
-
3
- from marshmallow import post_dump, pre_load
4
- from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
5
- from sqlalchemy.inspection import inspect
6
-
7
- from letta.schemas.user import User
8
-
9
-
10
- class BaseSchema(SQLAlchemyAutoSchema):
11
- """
12
- Base schema for all SQLAlchemy models.
13
- This ensures all schemas share the same session.
14
- """
15
-
16
- __pydantic_model__ = None
17
- sensitive_ids = {"_created_by_id", "_last_updated_by_id"}
18
- sensitive_relationships = {"organization"}
19
- id_scramble_placeholder = "xxx"
20
-
21
- def __init__(self, *args, actor: Optional[User] = None, **kwargs):
22
- super().__init__(*args, **kwargs)
23
- self.actor = actor
24
-
25
- def generate_id(self) -> Optional[str]:
26
- if self.__pydantic_model__:
27
- return self.__pydantic_model__.generate_id()
28
-
29
- return None
30
-
31
- @post_dump
32
- def sanitize_ids(self, data: Dict, **kwargs) -> Dict:
33
- if self.Meta.model:
34
- mapper = inspect(self.Meta.model)
35
- if "id" in mapper.columns:
36
- generated_id = self.generate_id()
37
- if generated_id:
38
- data["id"] = generated_id
39
-
40
- for sensitive_id in BaseSchema.sensitive_ids.union(BaseSchema.sensitive_relationships):
41
- if sensitive_id in data:
42
- data[sensitive_id] = BaseSchema.id_scramble_placeholder
43
-
44
- return data
45
-
46
- @pre_load
47
- def regenerate_ids(self, data: Dict, **kwargs) -> Dict:
48
- if self.Meta.model:
49
- mapper = inspect(self.Meta.model)
50
- for sensitive_id in BaseSchema.sensitive_ids:
51
- if sensitive_id in mapper.columns:
52
- data[sensitive_id] = self.actor.id
53
-
54
- for relationship in BaseSchema.sensitive_relationships:
55
- if relationship in mapper.relationships:
56
- data[relationship] = self.actor.organization_id
57
-
58
- return data
59
-
60
- class Meta:
61
- model = None
62
- include_relationships = True
63
- load_instance = True
64
- exclude = ()
@@ -1,29 +0,0 @@
1
- from typing import Dict
2
-
3
- from marshmallow import post_dump
4
-
5
- from letta.orm.message import Message
6
- from letta.schemas.message import Message as PydanticMessage
7
- from letta.serialize_schemas.base import BaseSchema
8
- from letta.serialize_schemas.custom_fields import ToolCallField
9
-
10
-
11
- class SerializedMessageSchema(BaseSchema):
12
- """
13
- Marshmallow schema for serializing/deserializing Message objects.
14
- """
15
-
16
- __pydantic_model__ = PydanticMessage
17
-
18
- tool_calls = ToolCallField()
19
-
20
- @post_dump
21
- def sanitize_ids(self, data: Dict, **kwargs):
22
- # We don't want to remap here
23
- # Because of the way that message_ids is just a JSON field on agents
24
- # We need to wait for the agent dumps, and then keep track of all the message IDs we remapped
25
- return data
26
-
27
- class Meta(BaseSchema.Meta):
28
- model = Message
29
- exclude = BaseSchema.Meta.exclude + ("step", "job_message", "agent")