agentscope-runtime 1.0.5.post1__py3-none-any.whl → 1.1.0b3__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.
Files changed (71) hide show
  1. agentscope_runtime/__init__.py +3 -0
  2. agentscope_runtime/adapters/agentscope/message.py +85 -295
  3. agentscope_runtime/adapters/agentscope/stream.py +133 -3
  4. agentscope_runtime/adapters/agno/message.py +11 -2
  5. agentscope_runtime/adapters/agno/stream.py +1 -0
  6. agentscope_runtime/adapters/langgraph/__init__.py +1 -3
  7. agentscope_runtime/adapters/langgraph/message.py +11 -106
  8. agentscope_runtime/adapters/langgraph/stream.py +1 -0
  9. agentscope_runtime/adapters/ms_agent_framework/message.py +11 -1
  10. agentscope_runtime/adapters/ms_agent_framework/stream.py +1 -0
  11. agentscope_runtime/adapters/text/stream.py +1 -0
  12. agentscope_runtime/common/container_clients/agentrun_client.py +0 -3
  13. agentscope_runtime/common/container_clients/boxlite_client.py +26 -15
  14. agentscope_runtime/common/container_clients/fc_client.py +0 -11
  15. agentscope_runtime/common/utils/deprecation.py +14 -17
  16. agentscope_runtime/common/utils/logging.py +44 -0
  17. agentscope_runtime/engine/app/agent_app.py +5 -5
  18. agentscope_runtime/engine/app/celery_mixin.py +43 -4
  19. agentscope_runtime/engine/deployers/adapter/agui/__init__.py +8 -1
  20. agentscope_runtime/engine/deployers/adapter/agui/agui_adapter_utils.py +6 -1
  21. agentscope_runtime/engine/deployers/adapter/agui/agui_protocol_adapter.py +2 -2
  22. agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py +13 -0
  23. agentscope_runtime/engine/runner.py +31 -6
  24. agentscope_runtime/engine/schemas/agent_schemas.py +28 -0
  25. agentscope_runtime/engine/services/sandbox/sandbox_service.py +41 -9
  26. agentscope_runtime/sandbox/box/base/base_sandbox.py +4 -0
  27. agentscope_runtime/sandbox/box/browser/browser_sandbox.py +4 -0
  28. agentscope_runtime/sandbox/box/dummy/dummy_sandbox.py +9 -2
  29. agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py +4 -0
  30. agentscope_runtime/sandbox/box/gui/gui_sandbox.py +5 -1
  31. agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py +4 -0
  32. agentscope_runtime/sandbox/box/sandbox.py +122 -13
  33. agentscope_runtime/sandbox/client/async_http_client.py +1 -0
  34. agentscope_runtime/sandbox/client/base.py +0 -1
  35. agentscope_runtime/sandbox/client/http_client.py +0 -2
  36. agentscope_runtime/sandbox/manager/heartbeat_mixin.py +486 -0
  37. agentscope_runtime/sandbox/manager/sandbox_manager.py +740 -153
  38. agentscope_runtime/sandbox/manager/server/app.py +18 -11
  39. agentscope_runtime/sandbox/manager/server/config.py +10 -2
  40. agentscope_runtime/sandbox/mcp_server.py +0 -1
  41. agentscope_runtime/sandbox/model/__init__.py +2 -1
  42. agentscope_runtime/sandbox/model/container.py +90 -3
  43. agentscope_runtime/sandbox/model/manager_config.py +45 -1
  44. agentscope_runtime/version.py +1 -1
  45. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/METADATA +37 -54
  46. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/RECORD +50 -69
  47. agentscope_runtime/adapters/agentscope/long_term_memory/__init__.py +0 -6
  48. agentscope_runtime/adapters/agentscope/long_term_memory/_long_term_memory_adapter.py +0 -258
  49. agentscope_runtime/adapters/agentscope/memory/__init__.py +0 -6
  50. agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py +0 -152
  51. agentscope_runtime/engine/services/agent_state/__init__.py +0 -25
  52. agentscope_runtime/engine/services/agent_state/redis_state_service.py +0 -166
  53. agentscope_runtime/engine/services/agent_state/state_service.py +0 -179
  54. agentscope_runtime/engine/services/agent_state/state_service_factory.py +0 -52
  55. agentscope_runtime/engine/services/memory/__init__.py +0 -33
  56. agentscope_runtime/engine/services/memory/mem0_memory_service.py +0 -128
  57. agentscope_runtime/engine/services/memory/memory_service.py +0 -292
  58. agentscope_runtime/engine/services/memory/memory_service_factory.py +0 -126
  59. agentscope_runtime/engine/services/memory/redis_memory_service.py +0 -290
  60. agentscope_runtime/engine/services/memory/reme_personal_memory_service.py +0 -109
  61. agentscope_runtime/engine/services/memory/reme_task_memory_service.py +0 -11
  62. agentscope_runtime/engine/services/memory/tablestore_memory_service.py +0 -301
  63. agentscope_runtime/engine/services/session_history/__init__.py +0 -32
  64. agentscope_runtime/engine/services/session_history/redis_session_history_service.py +0 -283
  65. agentscope_runtime/engine/services/session_history/session_history_service.py +0 -267
  66. agentscope_runtime/engine/services/session_history/session_history_service_factory.py +0 -73
  67. agentscope_runtime/engine/services/session_history/tablestore_session_history_service.py +0 -288
  68. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/WHEEL +0 -0
  69. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/entry_points.txt +0 -0
  70. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/licenses/LICENSE +0 -0
  71. {agentscope_runtime-1.0.5.post1.dist-info → agentscope_runtime-1.1.0b3.dist-info}/top_level.txt +0 -0
@@ -1,31 +1,27 @@
1
- agentscope_runtime/__init__.py,sha256=LMAUeUpPo2qzqh3zyZ-JJwc8GrsiT9b-yNhQMxlKmfE,84
2
- agentscope_runtime/version.py,sha256=L6eXK2K0owgqy6NEpFiCLA_J-gPiMQBHpYv-sAvAZ-k,53
1
+ agentscope_runtime/__init__.py,sha256=a_5aBl8PX21Kv54vwJsu5vera_RrNTUeAsSnwlQLaXo,147
2
+ agentscope_runtime/version.py,sha256=9FOOdYI0Y47t1oRrH25ZmP0ZL6Eh1HVZ8arME4zflDw,49
3
3
  agentscope_runtime/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  agentscope_runtime/adapters/utils.py,sha256=lL6RrSwxyj2WHWgUaCtscbP9aD_Rf3UY_FCtDPJ_ISI,180
5
5
  agentscope_runtime/adapters/agentscope/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- agentscope_runtime/adapters/agentscope/message.py,sha256=Bhb3V6TOv8s9uAhuZSl7uN728bFvnDzRYqejs0u_bNU,23057
7
- agentscope_runtime/adapters/agentscope/stream.py,sha256=cjOpxL_aPFNL5oCb3XSQbmuJpSZ1E-mi8j1AP6TrQjI,23065
8
- agentscope_runtime/adapters/agentscope/long_term_memory/__init__.py,sha256=Hg4ghENb8u49svojY_q89HEjKImvLjKMQwmL8Y3wGgE,135
9
- agentscope_runtime/adapters/agentscope/long_term_memory/_long_term_memory_adapter.py,sha256=dwUS6-xvn9g4VlVcHL89gCbHjdw-VWKEBNpVkmzUAgE,7873
10
- agentscope_runtime/adapters/agentscope/memory/__init__.py,sha256=zqVxvsJv1t1mjJKdOjtP6dUGNOrc0LLwZx_yZCNq7Xs,137
11
- agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py,sha256=DDyhzzT2Y-3q4L0AkS8am1y5jsylxZpgJXWxB2abefQ,4535
6
+ agentscope_runtime/adapters/agentscope/message.py,sha256=ubww3cNY0wVbJKvn2uFftMOo5PxgnjvHejGUI8OmIhc,14862
7
+ agentscope_runtime/adapters/agentscope/stream.py,sha256=QL_C49y65Odp-A_SqiFOPt9cQscFiMPWhgDj33ZRO9I,29005
12
8
  agentscope_runtime/adapters/agentscope/tool/__init__.py,sha256=wrBKu2FidSJuGBuhy2BEG0Xy9J9pZldtHxsKBs3iWQ0,249
13
9
  agentscope_runtime/adapters/agentscope/tool/sandbox_tool.py,sha256=amwtmhtCXDw9TVMUNFiFakNsfj3pp4fllHCBEXzvSEE,2002
14
10
  agentscope_runtime/adapters/agentscope/tool/tool.py,sha256=rgANo-1fByWIlyQk1Bmhscas3QVCVgDuSLMT1XFX76M,7235
15
11
  agentscope_runtime/adapters/agno/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- agentscope_runtime/adapters/agno/message.py,sha256=p9PyXgPtGrv9lkoQO8X8RRvoEGYG5d9AbflSZ_t5AYk,870
17
- agentscope_runtime/adapters/agno/stream.py,sha256=CMNEBtdnsoqG15cJjEnce1wyCCyzApI5TDGgAvledi4,3835
12
+ agentscope_runtime/adapters/agno/message.py,sha256=zfGncCelC5SxODUF7wx-vDXKXJLzAuZ0oA49edIGghg,1340
13
+ agentscope_runtime/adapters/agno/stream.py,sha256=SkFxX_ROvRQ60YeE1TrXE3baNibcyO3HTwTx_p5TZio,3883
18
14
  agentscope_runtime/adapters/autogen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
15
  agentscope_runtime/adapters/autogen/tool/__init__.py,sha256=FJXusI2gPKYOuAIN_eqMIPUxnJ34_NCPwtScTKosrWM,152
20
16
  agentscope_runtime/adapters/autogen/tool/tool.py,sha256=NFSitBvL5uP3sVwHQfxprbsG6B39SmDVlT2vHTguUII,6587
21
- agentscope_runtime/adapters/langgraph/__init__.py,sha256=yLNYabjNXn6BgIVdWCP7m3DOqzqOFsVm_Qu1FV5MyeU,309
22
- agentscope_runtime/adapters/langgraph/message.py,sha256=T2RNsrhCSkyelo4NRZeZf7abK1iK8VvpyEWUunS_XZQ,9267
23
- agentscope_runtime/adapters/langgraph/stream.py,sha256=hMzrOPBuvJjIPqTI_g3Xf0Sq-JNOnR37a8Z-L2zgAEc,10200
17
+ agentscope_runtime/adapters/langgraph/__init__.py,sha256=qHf0jWNfpsmJmKKs19zaurnUCFnX8HdRLR5PchBP9Ro,229
18
+ agentscope_runtime/adapters/langgraph/message.py,sha256=xlUqq70lLLCh4pJQdsE6P7OgR-1EEy0evCsIkAjKFN8,6036
19
+ agentscope_runtime/adapters/langgraph/stream.py,sha256=euWjRNSd3I7TJUSrD6-yA21IC_c12EhxNGIo24o4YR0,10248
24
20
  agentscope_runtime/adapters/ms_agent_framework/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- agentscope_runtime/adapters/ms_agent_framework/message.py,sha256=JbgdC1vEasTowl_NPtnfm99F9_24UrEWIfHGEtG-HP0,7184
26
- agentscope_runtime/adapters/ms_agent_framework/stream.py,sha256=FlGoffKW6nRD4I7yBsnhu4J0pAmQyGV-cQrNKN80F9M,14096
21
+ agentscope_runtime/adapters/ms_agent_framework/message.py,sha256=ce1HO6m8rfu8DyS3Z6QIESmmpyN86yccu-9HcO_0Zac,7758
22
+ agentscope_runtime/adapters/ms_agent_framework/stream.py,sha256=ndGK2ZXe4yrXkxz5PjDqfGhgjAum7rc0r2hXLVVwaRU,14144
27
23
  agentscope_runtime/adapters/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- agentscope_runtime/adapters/text/stream.py,sha256=qtk-WIj8itvOUZO0IHzNPBNWX4V5Dm13nhsNlDyYWKc,682
24
+ agentscope_runtime/adapters/text/stream.py,sha256=mXf4XvSn_3DWd4gvv_CVJQZKe38s8dcTkmZXyptb91w,730
29
25
  agentscope_runtime/cli/__init__.py,sha256=aAc30JEk1UNLLmxcQeTiNMJXbFczjym4Oses4ULIsFI,181
30
26
  agentscope_runtime/cli/cli.py,sha256=_STqVMgRSaOa0GhWQDSMYEDY3r3yAHmEXbfk1Zfjb6s,1431
31
27
  agentscope_runtime/cli/commands/__init__.py,sha256=MylJNzS3HeGgqekkD0pYg5MALiK_GK7pDArFXZDF9pk,59
@@ -56,24 +52,25 @@ agentscope_runtime/common/collections/redis_mapping.py,sha256=bi2ku7SO9T6Z9jSUS4
56
52
  agentscope_runtime/common/collections/redis_queue.py,sha256=4MCIDs7SgSfdngTvqxWWv2H-8XTpFQOmXG4-fxN20ew,792
57
53
  agentscope_runtime/common/collections/redis_set.py,sha256=eRCnMXc4hcDF2qyxFiNnrn2o4QjvtgDb6rEcblmV1o8,654
58
54
  agentscope_runtime/common/container_clients/__init__.py,sha256=ttZ47magysMBF20S7lciRiQO3UyaC7iiHtFNnapeewE,1576
59
- agentscope_runtime/common/container_clients/agentrun_client.py,sha256=KboYNHoEsJ2cjbKy3_ig39OhbsxIsUTpw7INhhyILcs,40855
55
+ agentscope_runtime/common/container_clients/agentrun_client.py,sha256=BgPSXT3NJh95kvhGAX7eM2LK5n3sjv9wEcIXh5SE2YQ,40739
60
56
  agentscope_runtime/common/container_clients/base_client.py,sha256=_uvxRh65lbMNXDcHjq01aYuNUrcxRlNzRtRIPMgWFGc,992
61
- agentscope_runtime/common/container_clients/boxlite_client.py,sha256=FsjgUBWUNWEOe6p1jdxG5dn0GpyQr3fyo65PSv2JPYk,14294
57
+ agentscope_runtime/common/container_clients/boxlite_client.py,sha256=p7APSYGOixvJB0Ek4aDuQgkKoGtt-Xi-1bBuaZwTGaU,14936
62
58
  agentscope_runtime/common/container_clients/docker_client.py,sha256=IGzj7pOraYSAG6DtrmqkG-nbueQmGAJodgA_5bPO_dE,7222
63
- agentscope_runtime/common/container_clients/fc_client.py,sha256=0Cv_EO3ZLstTZA10XF1i2-QaHhKxiQD-QX8P1uO7CdI,32860
59
+ agentscope_runtime/common/container_clients/fc_client.py,sha256=QwZzN2sdGj5PQSVVgUOE-BIdjenqCAfitEGwogflNAI,32518
64
60
  agentscope_runtime/common/container_clients/gvisor_client.py,sha256=vDXMhesnQg6f0QwS7YnaLsqbeO1C92wn9M2sbzToqsY,849
65
61
  agentscope_runtime/common/container_clients/knative_client.py,sha256=LLmo3aeR8T3kvtHAXWXl7PW-KxwF6efhkA8ZjPoW_MM,15895
66
62
  agentscope_runtime/common/container_clients/kubernetes_client.py,sha256=8_X091fbcR97_chFVMiWNDj5QmkBPG3tkS5zlXs-OCk,39550
67
63
  agentscope_runtime/common/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- agentscope_runtime/common/utils/deprecation.py,sha256=cNrhkwT6JpPkhpr06rN2U73k73O8ukHY19wobaOH3Sg,4226
64
+ agentscope_runtime/common/utils/deprecation.py,sha256=6DdovkwcW75RK15t40e0m9vDLq1XEkzrkHNPw5b-77E,3981
69
65
  agentscope_runtime/common/utils/lazy_loader.py,sha256=YbhbKNJrm1d3adCZ6gM6ljZE0QCCcpt4yGDCjNWtkJ4,1937
66
+ agentscope_runtime/common/utils/logging.py,sha256=SddoGZi4NpvZdOygW-2CgTLPQ5gAEkwW1NPu_WvEoaY,1158
70
67
  agentscope_runtime/engine/__init__.py,sha256=qDdrSixs7QjlZ4DxNCt7NdjVPEIIk2wREpYzDxuZYCU,798
71
68
  agentscope_runtime/engine/constant.py,sha256=PQzLbA2T19vprS6lvb0xhM26zt_umjQ6VbNcsQo2Ylc,154
72
- agentscope_runtime/engine/runner.py,sha256=JH34SpHQWIEtsmBg_x4mwMm2pqfDNxnNW51Opfgx8Ss,10517
69
+ agentscope_runtime/engine/runner.py,sha256=b3jl0eKYDav7x9KraDSzutIatQwNY9XfupamjlU1tTA,11317
73
70
  agentscope_runtime/engine/app/__init__.py,sha256=8asUQNRTjIEyoWjl955mn3gLkcYna8-CK4A810Eol0Y,87
74
- agentscope_runtime/engine/app/agent_app.py,sha256=4QC6HR8m6WrX8mZAVWFwQilaDLlf1xLS0-sm-AEaegY,13182
71
+ agentscope_runtime/engine/app/agent_app.py,sha256=MzxtWIkU1GmJKfulSxK3sjnvYF6TwQNcLFEeqpzPJes,13127
75
72
  agentscope_runtime/engine/app/base_app.py,sha256=ILLp4GUVslRtLxSjCTrpTX6f1E5QhM9oXefxy4sA28I,2290
76
- agentscope_runtime/engine/app/celery_mixin.py,sha256=fDPc4loHieUXvgJYRYWAv-3qOSssdbfKH9Fiu-ShrIs,2929
73
+ agentscope_runtime/engine/app/celery_mixin.py,sha256=-v651UoF4rUXnuXyABdmD4efdei5rItChw_T1Nt3fck,4455
77
74
  agentscope_runtime/engine/deployers/__init__.py,sha256=S6aDWUtxNT3CEA2ElVSz7JTPNqaZE01FAG8KqwGljoc,1371
78
75
  agentscope_runtime/engine/deployers/agentrun_deployer.py,sha256=flJRl6b_RnpoiiRCv9Z0GlyuxIDszf8FRvnLOcE_rAw,106119
79
76
  agentscope_runtime/engine/deployers/base.py,sha256=X4Vdu1x_ln0GK3aB_SSMaFoWDRYjh9nQT-mPOxWwkXY,1393
@@ -92,9 +89,9 @@ agentscope_runtime/engine/deployers/adapter/a2a/a2a_agent_adapter.py,sha256=h7ww
92
89
  agentscope_runtime/engine/deployers/adapter/a2a/a2a_protocol_adapter.py,sha256=7Rt_vRjHroGaLEhpk32w6SmzRl9vN9qVhWt0mWAeMlE,16681
93
90
  agentscope_runtime/engine/deployers/adapter/a2a/a2a_registry.py,sha256=sDnR1iIGP_vpgRrIcyrAJ26SFJ_RgolyJDkA2StRihA,2274
94
91
  agentscope_runtime/engine/deployers/adapter/a2a/nacos_a2a_registry.py,sha256=K3-289h7xddz3b0nefw-4WyEwIFZTDiwdJOeEJPzdSo,27914
95
- agentscope_runtime/engine/deployers/adapter/agui/__init__.py,sha256=FkPsoF8W7VaGFZsHUU3CEnATJnlD7OpmRLckkcWb9qA,217
96
- agentscope_runtime/engine/deployers/adapter/agui/agui_adapter_utils.py,sha256=TGT37a1euevRAvhUyphk99OjcVGhROHrsbUULrLLguc,22380
97
- agentscope_runtime/engine/deployers/adapter/agui/agui_protocol_adapter.py,sha256=9r0SpO4zYb_R42HwjQAsCgD6FKMHwJHhnp6Y81bOjeY,6994
92
+ agentscope_runtime/engine/deployers/adapter/agui/__init__.py,sha256=wL3ktecf0SMXbdxHp1C8Rb0D5mvki1SfRKPiW8ZazKE,306
93
+ agentscope_runtime/engine/deployers/adapter/agui/agui_adapter_utils.py,sha256=XPgBWURCJhlqUDu_9dXc-kC0Axiz6ofCqQY-0e9TCTI,22654
94
+ agentscope_runtime/engine/deployers/adapter/agui/agui_protocol_adapter.py,sha256=HKl2ogAB8fiErC9Cyr9wm4OXJ31dfA3NL9OgmOZhyHI,7004
98
95
  agentscope_runtime/engine/deployers/adapter/responses/__init__.py,sha256=0f1SVBagTz0Kex8kX9_QapqmBPJUHcRejnV4P39PaBc,93
99
96
  agentscope_runtime/engine/deployers/adapter/responses/response_api_adapter_utils.py,sha256=MmvLkHDbb1cQMS2kQKnS3FT_6DUOQRdL2vb_HMA6eFo,98448
100
97
  agentscope_runtime/engine/deployers/adapter/responses/response_api_agent_adapter.py,sha256=B3F1GOvu_HFFdH8gnKJtVlr8u34jjRV3iKMgVz1XHVY,1593
@@ -117,7 +114,7 @@ agentscope_runtime/engine/deployers/utils/docker_image_utils/docker_image_builde
117
114
  agentscope_runtime/engine/deployers/utils/docker_image_utils/dockerfile_generator.py,sha256=f0uES7mM8n0qAM7-M4z-jFbQkWmHgBPsp9qo4CYgLC0,7946
118
115
  agentscope_runtime/engine/deployers/utils/docker_image_utils/image_factory.py,sha256=LUwi3uxgr47C1DqYiWmslm08vD06vRoj3y11TSNUwkQ,13804
119
116
  agentscope_runtime/engine/deployers/utils/service_utils/__init__.py,sha256=qYPjEoNP_eJXPc3j-ClR0GnQKYDa0udJ-ymVGV-IsOs,169
120
- agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py,sha256=9e5qlsNbCuvHPrFvNSxL8XUh80p13MBvnrjvk2-J7NU,39030
117
+ agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py,sha256=D-L7c0yO9Y54_qoS7HoFkSQsL5ROpTifrB5R28Ld068,39603
121
118
  agentscope_runtime/engine/deployers/utils/service_utils/fastapi_templates.py,sha256=xsfoQWKidfT-S9sQWLygcNG_vGsppLQDlwXtBw1nziE,4784
122
119
  agentscope_runtime/engine/deployers/utils/service_utils/process_manager.py,sha256=rZIN4RP2cbPeqrHsNm5xll0KPwGL-exj0krO8qGo0sk,13777
123
120
  agentscope_runtime/engine/deployers/utils/templates/app_main.py.j2,sha256=cgaSFV7_SNu6wfI4myTku1tgBcAgykv9a10QMFGAaSI,2175
@@ -128,7 +125,7 @@ agentscope_runtime/engine/helpers/agent_api_client.py,sha256=kKhmNPeIK4segqDeZMR
128
125
  agentscope_runtime/engine/helpers/runner.py,sha256=xB9F95nkAxM7J8ZCwPhZSidvD9y4DN_bw3CQOICGZEY,855
129
126
  agentscope_runtime/engine/misc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
127
  agentscope_runtime/engine/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
131
- agentscope_runtime/engine/schemas/agent_schemas.py,sha256=DndktloMZ5aEOU4VQrC7L-hOPaPDWUNnJplqJu6bm5Y,27210
128
+ agentscope_runtime/engine/schemas/agent_schemas.py,sha256=qu7y93Wghd1d8xId85V1g4tq_90G4i0K4aZ9ZABOlhM,27832
132
129
  agentscope_runtime/engine/schemas/embedding.py,sha256=yn6VaKPXkze0bvJuaLKzWIOus_AuT-8Z_XRABk4NH60,891
133
130
  agentscope_runtime/engine/schemas/exception.py,sha256=eVZpZD77Dva5l_UsxRzCsgJ6bUOH1XQChP-iid5m37E,16003
134
131
  agentscope_runtime/engine/schemas/modelstudio_llm.py,sha256=mi_1IWjaPq1W4IaVtVtIy-kwfUSFMfWKM3kaPu2KLC4,9803
@@ -139,26 +136,9 @@ agentscope_runtime/engine/schemas/session.py,sha256=ctSMlTJHdd2HaJ_6tEOxNDZbLcex
139
136
  agentscope_runtime/engine/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
137
  agentscope_runtime/engine/services/base.py,sha256=g2hTc3ivj2MPjnsu5_09m6_MZ3KDHBfiYKu4F2pLA1I,2096
141
138
  agentscope_runtime/engine/services/service_factory.py,sha256=LTLU6sxlaRL1GtBmXKvBxRD2E8eh2xla6XLVyFH_CFQ,3580
142
- agentscope_runtime/engine/services/agent_state/__init__.py,sha256=fCUbsBy1zxGTsBBhzidpvlY-Ox3DgQOg6C3aCNhsF_0,739
143
- agentscope_runtime/engine/services/agent_state/redis_state_service.py,sha256=XjZ0y05Wkc0JoQEZevBhaC-eCvJxVKQZBoq21RLH1YM,5883
144
- agentscope_runtime/engine/services/agent_state/state_service.py,sha256=Z7vaZidnU963ldkqCEPTt5MiE5IJGJq0YnMMn5sehQc,5302
145
- agentscope_runtime/engine/services/agent_state/state_service_factory.py,sha256=Ze-smpoJXaQxZG4OuzCjQ9fPqfvoMM3xCT7-ZvYmU8I,1589
146
- agentscope_runtime/engine/services/memory/__init__.py,sha256=2P0HUftkluvEcEw15XudEb-BkEAFpty7ORnRbV6_Pw4,1261
147
- agentscope_runtime/engine/services/memory/mem0_memory_service.py,sha256=jmiaFncOBAlx-plEcnz8ljck1Pwi0_czWBOSM7JIJnA,3694
148
- agentscope_runtime/engine/services/memory/memory_service.py,sha256=QNNvG3ccUiWznQfKNTtSbYqqcuoA2IJW_9xmNb1KMQI,8591
149
- agentscope_runtime/engine/services/memory/memory_service_factory.py,sha256=XLWriAldbRHHczcdzDK3tKaNfK5KrOYCNUUgeE5spbU,4031
150
- agentscope_runtime/engine/services/memory/redis_memory_service.py,sha256=YJcDmLG4_SUywakktorokuJPG5sF23CewKLY2MBSvqs,10719
151
- agentscope_runtime/engine/services/memory/reme_personal_memory_service.py,sha256=6wbCL5IRJG5GPQqFuy4yN-tARDG30CgKtJ--iKiUowQ,3007
152
- agentscope_runtime/engine/services/memory/reme_task_memory_service.py,sha256=dLIhWfqKZEeXB1r7f8EKPftL2lk4f60TdlCNdQNolNk,330
153
- agentscope_runtime/engine/services/memory/tablestore_memory_service.py,sha256=Pf1nyk5d5X7h8Iuy1e7ROCNlap9cmG--TFm7fZNUZ90,10335
154
139
  agentscope_runtime/engine/services/sandbox/__init__.py,sha256=eaneUQzqUfWrfdtc8MdzpGmrQDO_MSzGje1nZJ6Aay4,407
155
- agentscope_runtime/engine/services/sandbox/sandbox_service.py,sha256=KwJ0FRKxaiAMHKc1w4O6wmLigI_wBmZcgSyMu3L4X1k,6559
140
+ agentscope_runtime/engine/services/sandbox/sandbox_service.py,sha256=wtQVj5KGqccVsaup89XVrZ4a-IsHlRGU5o82FioVkRc,7855
156
141
  agentscope_runtime/engine/services/sandbox/sandbox_service_factory.py,sha256=VMx-TeY4gghYU-CEY38M5Q9NoinfE05IfVq57Cu4X08,1595
157
- agentscope_runtime/engine/services/session_history/__init__.py,sha256=HEXiXR9ZWYejb5Fn4ejgFo3eIZyeTBkMfei-nDAyAbA,1096
158
- agentscope_runtime/engine/services/session_history/redis_session_history_service.py,sha256=c-ULzpQS8yAm1FReETkcUJWUMqookT4ZycUVBdMFCA8,10142
159
- agentscope_runtime/engine/services/session_history/session_history_service.py,sha256=-UHa_OVC8TYPcZcATXE6-pTI0o5dtPwQoVpVi-OjwNE,8476
160
- agentscope_runtime/engine/services/session_history/session_history_service_factory.py,sha256=r8Ro_IdRSzAN6iSHo5MzHSld5UGr-GuHmfIhwQ1iQMM,2307
161
- agentscope_runtime/engine/services/session_history/tablestore_session_history_service.py,sha256=4PuUC7j7ZROD_cBTVMpmzgea410bnRy4oLu8H7cA2Xg,10160
162
142
  agentscope_runtime/engine/services/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
163
143
  agentscope_runtime/engine/services/utils/tablestore_service_utils.py,sha256=YA4gojQy9c0SdXD6XJwTrBWVEPRjJmnzTYRDExPYuHg,11599
164
144
  agentscope_runtime/engine/tracing/__init__.py,sha256=yUmXYDqApqGOlZJqJ_jb8TvSYUAUk4VInmNSSiICGoI,1237
@@ -173,31 +153,31 @@ agentscope_runtime/sandbox/__init__.py,sha256=zDqWKH69cRv0IhrtY746lNxm428pwyi38w
173
153
  agentscope_runtime/sandbox/build.py,sha256=WS1nTvVmFwt5JIJiYb1qBcnSnTucC6_R4ps0wSivQX0,8509
174
154
  agentscope_runtime/sandbox/constant.py,sha256=NzpxJ1hBDkP9J_c45FsG3iDgBkfEkIlkSKjc4X78tiU,1011
175
155
  agentscope_runtime/sandbox/enums.py,sha256=sAQyJHvqmy-Cs3sggI4dvLXmvwL414lsxibD7g7kVeU,2111
176
- agentscope_runtime/sandbox/mcp_server.py,sha256=UT3aRZqyeHqEhhm-wZ0Ilhew3eDMHzz9DCN6Qb-eKFk,6012
156
+ agentscope_runtime/sandbox/mcp_server.py,sha256=R-nTb1_wG4yCtk-UFGztkwVQXGoq_5TRZseFLVRBYrs,5972
177
157
  agentscope_runtime/sandbox/registry.py,sha256=3ukwbTOjSINWH7DIOmG1iPgze5nb-zXl2X8M7_AeBwg,4190
178
158
  agentscope_runtime/sandbox/utils.py,sha256=XH0t0QJMUt5RFACa_7FGo5YIC0Z3tPtdBsOtnCovPJU,3199
179
159
  agentscope_runtime/sandbox/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
180
- agentscope_runtime/sandbox/box/sandbox.py,sha256=h4Texj9VFRoQU8AgTwGB--GroDD1jGOLSGYDIB0te28,6338
160
+ agentscope_runtime/sandbox/box/sandbox.py,sha256=tnlRe9imH3oCAZkVzU5NB0HlZW8XF-7rFBCmBf3UjQ0,11031
181
161
  agentscope_runtime/sandbox/box/agentbay/__init__.py,sha256=R-KRTawGZwblLBh0ZrXz2ESaV8biE3pLqVXUcLUI1-g,101
182
162
  agentscope_runtime/sandbox/box/agentbay/agentbay_sandbox.py,sha256=id19HKUq2RFDZHW90UlGj74ZKkknbK5juL1w4qniC0g,17827
183
163
  agentscope_runtime/sandbox/box/base/__init__.py,sha256=iOx8xRc929N4FBURgrfTJ_X2exGWq41GwYVaOwCZqDU,127
184
- agentscope_runtime/sandbox/box/base/base_sandbox.py,sha256=ByvpG16LgKKQ2KR9MClY7QuhyhgqF_xh6O3q6zDGYCI,2693
164
+ agentscope_runtime/sandbox/box/base/base_sandbox.py,sha256=i1Ri0JaXiCBPVB8meajqLi0iqNS9Drv4EoMzRIq6cY4,2837
185
165
  agentscope_runtime/sandbox/box/base/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
186
166
  agentscope_runtime/sandbox/box/browser/__init__.py,sha256=io0rQzUVdH3c5vEqMegr0Z1YMfYPFqIkHKz4SAYqWGk,142
187
- agentscope_runtime/sandbox/box/browser/browser_sandbox.py,sha256=Bbe2wDMYA4ddImKcJLEQmNvYC66XfWmlngTtGZkV-gQ,15417
167
+ agentscope_runtime/sandbox/box/browser/browser_sandbox.py,sha256=qC_Qwp9vyEto-WGongk_8yTCkZVjvybsqU9q0dQA_aE,15561
188
168
  agentscope_runtime/sandbox/box/browser/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
189
169
  agentscope_runtime/sandbox/box/cloud/__init__.py,sha256=eydrq0JZ55M6WQry4E0N-By7P-3NnrXS1GwBYWbIovk,92
190
170
  agentscope_runtime/sandbox/box/cloud/cloud_sandbox.py,sha256=y5lh5C3UqgzHUmkb_VqQ7627653r2MZ7YLmxLna-Htw,7660
191
171
  agentscope_runtime/sandbox/box/dummy/__init__.py,sha256=RErHmUx7hFXX69nohtYBS_QSHEWENZHZbWG3434ZDls,92
192
- agentscope_runtime/sandbox/box/dummy/dummy_sandbox.py,sha256=KAsCEbgZu48qklNMWLd7yPCb7TP1RPFXVi8CQ9Z-kPo,705
172
+ agentscope_runtime/sandbox/box/dummy/dummy_sandbox.py,sha256=iWB6v4mQixMSJqmJniyAKFqPGHJGp0N1jWxWMYLaL0w,853
193
173
  agentscope_runtime/sandbox/box/filesystem/__init__.py,sha256=hn2leixVtV4EElud-tntd_v0RaFW5o_wGgxGTxGnSbo,157
194
- agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py,sha256=N5Bl4R5mNH6QdXV1Yyvo0vPXqxebPjTQvdfAhYet2c8,8233
174
+ agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py,sha256=s-BlDoqgWX8Opwb3TXFTZxNvwWJfOUzX0Gm8PPhmCjA,8377
195
175
  agentscope_runtime/sandbox/box/filesystem/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
196
176
  agentscope_runtime/sandbox/box/gui/__init__.py,sha256=CG-1to4gkfpePx3v4IHYMDJI0PKM58tRZTXcevoNWPU,176
197
- agentscope_runtime/sandbox/box/gui/gui_sandbox.py,sha256=o4knVahT51aWsHJ0Grd5lVKiSaR-zDTPrrFokGq2dsQ,9989
177
+ agentscope_runtime/sandbox/box/gui/gui_sandbox.py,sha256=KzV-MSUEdAu0MCZWNIEY2DjskFVWF7Zo5ytkqGH2Op4,10125
198
178
  agentscope_runtime/sandbox/box/gui/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
199
179
  agentscope_runtime/sandbox/box/mobile/__init__.py,sha256=-pDTAO_tMeS3uJloT6F8zAuaPGMM4vKklvjKHMWN43k,137
200
- agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py,sha256=rGtLL3OPkE7MMsURkxVTzh1W5DeORZAl6G_NGgTm1AY,15187
180
+ agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py,sha256=_6cmM43RC60yeaehncLLkdnG1wDgFIZi65aKyDPUwiM,15331
201
181
  agentscope_runtime/sandbox/box/mobile/box/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
182
  agentscope_runtime/sandbox/box/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
203
183
  agentscope_runtime/sandbox/box/shared/app.py,sha256=bw6l0XPVF86yuh0jO_Sx9S-B-luFE3U3lIb6Qjc3dGU,1107
@@ -221,27 +201,28 @@ agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_env.py,sha256
221
201
  agentscope_runtime/sandbox/box/training_box/environments/bfcl/env_handler.py,sha256=T-W9w4nKI7_BXgF9caqV3KMeX5d6yvdfhQu0o2oWTUE,30114
222
202
  agentscope_runtime/sandbox/box/training_box/src/trajectory.py,sha256=cFr3uVUPq5gHKPa6ALi7QCLBVkgYOyPgyJrOzgBHf3k,7885
223
203
  agentscope_runtime/sandbox/client/__init__.py,sha256=xGsWWx5FNBeMbv-u14U19nud2RTS-jUsLhjMol8EEUo,271
224
- agentscope_runtime/sandbox/client/async_http_client.py,sha256=dadHqpKTYhH03gShlsx6rAkDdH5unQvJOQnUpqtu83s,10179
225
- agentscope_runtime/sandbox/client/base.py,sha256=6kbYyxbWyOCJluWJZSbyC3vGnsmgeS7AsaGD72Ib-Y8,2414
226
- agentscope_runtime/sandbox/client/http_client.py,sha256=2WOx-Cj8RTlHjs7KoEInp4Vsh5ogkrQzeZPsJus0mHI,9963
204
+ agentscope_runtime/sandbox/client/async_http_client.py,sha256=YLio985thxwZbJoqCVc6PNEuUZnyAiBlruclEy0kLNA,10232
205
+ agentscope_runtime/sandbox/client/base.py,sha256=Ts-0T0Y5VeVRPMWxOskU6nigUY0Xnuux_SAqF7oU5Hw,2374
206
+ agentscope_runtime/sandbox/client/http_client.py,sha256=_RHmPR4Co5zq1KmDOfa2TKobHdKZyC8sV0PeGmlWhkI,9869
227
207
  agentscope_runtime/sandbox/client/training_client.py,sha256=WIhGBib2IWQZwUoSJUn8kuIGrtd6Yz3VOxCh0tft630,7625
228
208
  agentscope_runtime/sandbox/custom/__init__.py,sha256=wpu0DlzdLohYzOVM9yZloIWid3w_ME6dPtOjCZKbRZ8,463
229
209
  agentscope_runtime/sandbox/custom/custom_sandbox.py,sha256=ZKE7otTimLZ2-ZV9PMVLRA6P1hH0a4fT-d_K4Ga59og,1008
230
210
  agentscope_runtime/sandbox/custom/example.py,sha256=iU5G7Vb-oq3wsJ_Kl8oFAwi0HNbt5V_8fWAAyiQ8RuY,964
231
211
  agentscope_runtime/sandbox/manager/__init__.py,sha256=KNHc1uDaUWBH_ZnWjH5NHRBiQM_zDyi9B2xKVNtAWIg,98
232
- agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=y6UbaKhKJJr6239Y7clOtkwJWjeidSh7_JF2Q0haZaM,36175
212
+ agentscope_runtime/sandbox/manager/heartbeat_mixin.py,sha256=hKoy782mkfVl3SaYM-y3Cdnz0l6EspYNdDYFc5QWkj0,15869
213
+ agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=oUhHiiXNqVesIOu7gMmv8_PEF6eYg21sYsCLcXDHAr8,57794
233
214
  agentscope_runtime/sandbox/manager/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
234
- agentscope_runtime/sandbox/manager/server/app.py,sha256=JgvKwcMJtgcQRKbNw2AOzHBZrTPOUWT7Xg6YpQJqwYI,13877
235
- agentscope_runtime/sandbox/manager/server/config.py,sha256=VnsOXhZwYi2FSxkpUlo_g9SsXK9jYp7kdmdERUZNxjs,4488
215
+ agentscope_runtime/sandbox/manager/server/app.py,sha256=cuQUL2CEAUvCKu9viDIoqrQMgtFuuxbsxaSNDd86SBE,14130
216
+ agentscope_runtime/sandbox/manager/server/config.py,sha256=wiOv889wqXgC31O-GSET04blPtyk7BISr9c8huoVZLo,4732
236
217
  agentscope_runtime/sandbox/manager/server/models.py,sha256=rCibF0HsotFcqsQVTSUoOTJCFQU3oqKvpOiWMWIRLyY,304
237
218
  agentscope_runtime/sandbox/manager/storage/__init__.py,sha256=jGmpfXV1E2X7AqkGeF1xu1EHiSTvbH3TSIviLbKBFh4,210
238
219
  agentscope_runtime/sandbox/manager/storage/data_storage.py,sha256=mGwf7LYbp_fRjLN9BZay6cm3eNziEdU6OlSBeFnIBMQ,475
239
220
  agentscope_runtime/sandbox/manager/storage/local_storage.py,sha256=o6fkV-yUtBihhfZtLEdBUhF1K8_psSl92AWJFtYQxtk,1521
240
221
  agentscope_runtime/sandbox/manager/storage/oss_storage.py,sha256=fIUxgOkOaH_1vlgWBnCM-e4UvD3xS_ycFe2yvSyXzBE,2970
241
- agentscope_runtime/sandbox/model/__init__.py,sha256=WoDOSD_67T-UkZdXOtJzwG4-0E8ABwUBJF6WSCs_sO0,182
222
+ agentscope_runtime/sandbox/model/__init__.py,sha256=nidTEQ5NalKs1g5jCpEchNH_JpXIOU1gLwX7aYv1-RM,220
242
223
  agentscope_runtime/sandbox/model/api.py,sha256=Sjxw6DHkGa8Sp5dUU5kaajkHPj7eiX1EgFZk-zOPafM,400
243
- agentscope_runtime/sandbox/model/container.py,sha256=f7dj4ir4sxXjZ_zm4iEkjskraacZLX2SR_l1WSl0FOo,1405
244
- agentscope_runtime/sandbox/model/manager_config.py,sha256=phNj1FQk3235jKuSFz1IhkRuOsTkYXOoCuyGoD6eu14,10530
224
+ agentscope_runtime/sandbox/model/container.py,sha256=ASn7TGawGnjyJvMYm2Ke-fCixcStC3oh23dKTCUqIfQ,3916
225
+ agentscope_runtime/sandbox/model/manager_config.py,sha256=Bb-J0lYAI2dVfit0yDtwGOWrwGBadhr1fp2EzpyuceI,11820
245
226
  agentscope_runtime/tools/__init__.py,sha256=YdRrEv_DTUEdgSSTSURYObrbv_CTe9QqJpmbpTelFuI,3660
246
227
  agentscope_runtime/tools/_constants.py,sha256=DFjHNMaAkX__104b8_cyn6-nLuoJ3eVOr3wMpNBY-EA,525
247
228
  agentscope_runtime/tools/base.py,sha256=InY9_1Ys9eVA5UgZ8aQM_IEFI9BFNZt3PZlhUNskjLg,7759
@@ -294,9 +275,9 @@ agentscope_runtime/tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
294
275
  agentscope_runtime/tools/utils/api_key_util.py,sha256=xIIUsvWgSt4etgYP7lS0WnqVIhZ-REzrBLwzAT-TrVI,1210
295
276
  agentscope_runtime/tools/utils/crypto_utils.py,sha256=Wqq4cn3FHQge-2Q1zGSMUyKh4V4A2baiZm8ZNhMqhPo,3382
296
277
  agentscope_runtime/tools/utils/mcp_util.py,sha256=n3GGKBEQPJ-fiNXdYnBx_90GVKWvm9eaNbR2G0q2lOw,905
297
- agentscope_runtime-1.0.5.post1.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
298
- agentscope_runtime-1.0.5.post1.dist-info/METADATA,sha256=pf0x4o6H29BhJwQXqkfYeDXDTYBhM4dJljuGv87elyQ,48331
299
- agentscope_runtime-1.0.5.post1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
300
- agentscope_runtime-1.0.5.post1.dist-info/entry_points.txt,sha256=Mpjpwe0A9lYNsFtWe_VeoGhtDVsKLIi6w9ZKzyhc17M,425
301
- agentscope_runtime-1.0.5.post1.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
302
- agentscope_runtime-1.0.5.post1.dist-info/RECORD,,
278
+ agentscope_runtime-1.1.0b3.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
279
+ agentscope_runtime-1.1.0b3.dist-info/METADATA,sha256=UJ8v1FXHj-Q2CUB2Ff0pLKevHZYdezOpzVxSQ4ozfuA,49019
280
+ agentscope_runtime-1.1.0b3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
281
+ agentscope_runtime-1.1.0b3.dist-info/entry_points.txt,sha256=Mpjpwe0A9lYNsFtWe_VeoGhtDVsKLIi6w9ZKzyhc17M,425
282
+ agentscope_runtime-1.1.0b3.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
283
+ agentscope_runtime-1.1.0b3.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from ._long_term_memory_adapter import AgentScopeLongTermMemory
3
-
4
- __all__ = [
5
- "AgentScopeLongTermMemory",
6
- ]
@@ -1,258 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # pylint:disable=protected-access,unused-argument
3
- """AgentScope Long Memory implementation based on MemoryService."""
4
- import asyncio
5
-
6
- from typing import Any
7
-
8
- from agentscope.memory import LongTermMemoryBase
9
- from agentscope.message import Msg, TextBlock, ThinkingBlock
10
- from agentscope.tool import ToolResponse
11
-
12
- from ..message import agentscope_msg_to_message
13
- from ....engine.services.memory import MemoryService
14
-
15
-
16
- class AgentScopeLongTermMemory(LongTermMemoryBase):
17
- """
18
- AgentScope Long Memory subclass based on LongTermMemoryBase.
19
-
20
- This class stores messages in an underlying MemoryService instance.
21
-
22
- Args:
23
- service (MemoryService): The backend memory service.
24
- user_id (str): The user ID linked to this memory.
25
- session_id (str): The session ID linked to this memory.
26
- """
27
-
28
- def __init__(
29
- self,
30
- service: MemoryService,
31
- user_id: str,
32
- session_id: str,
33
- ):
34
- super().__init__()
35
- self._service = service
36
- self.user_id = user_id
37
- self.session_id = session_id
38
-
39
- async def record(
40
- self,
41
- msgs: list[Msg | None],
42
- **kwargs: Any,
43
- ) -> None:
44
- """
45
- Record a list of messages into the memory service.
46
-
47
- Args:
48
- msgs (list[Msg | None]):
49
- A list of AgentScope `Msg` objects to store. `None` entries
50
- in the list will be ignored. If the list is empty, nothing
51
- will be recorded.
52
- **kwargs (Any):
53
- Additional keyword arguments, currently unused but kept for
54
- compatibility/future extensions.
55
-
56
- Returns:
57
- None
58
- """
59
- if not msgs:
60
- return
61
-
62
- messages = agentscope_msg_to_message(msgs)
63
- await self._service.add_memory(
64
- user_id=self.user_id,
65
- session_id=self.session_id,
66
- messages=messages,
67
- )
68
-
69
- async def retrieve(
70
- self,
71
- msg: Msg | list[Msg] | None,
72
- limit: int = 5,
73
- **kwargs: Any,
74
- ) -> str:
75
- """Retrieve the content from the long-term memory.
76
-
77
- Args:
78
- msg (`Msg | list[Msg] | None`):
79
- The message to search for in the memory, which should be
80
- specific and concise, e.g. the person's name, the date, the
81
- location, etc.
82
- limit (`int`, optional):
83
- The maximum number of memories to retrieve per search, i.e.,
84
- the number of memories to retrieve for the message. if the
85
- message is a list of messages, the limit will be applied to
86
- each message. If the message is a single message, then the
87
- limit is the total number of memories to retrieve for the
88
- message.
89
- **kwargs (`Any`):
90
- Additional keyword arguments.
91
-
92
- Returns:
93
- `str`:
94
- The retrieved memory
95
- """
96
-
97
- if not msg:
98
- # Build a none message
99
- msg = [
100
- Msg(
101
- name="assistant",
102
- content=[
103
- TextBlock(
104
- type="text",
105
- text="",
106
- ),
107
- ],
108
- role="assistant",
109
- ),
110
- ]
111
-
112
- if isinstance(msg, Msg):
113
- msg = [msg]
114
-
115
- tasks = [
116
- self._service.search_memory(
117
- user_id=self.user_id,
118
- messages=agentscope_msg_to_message(m),
119
- filters={"top_k": limit},
120
- )
121
- for m in msg
122
- ]
123
- results_lists = await asyncio.gather(*tasks, return_exceptions=True)
124
-
125
- processed_results = []
126
- for result in results_lists:
127
- if isinstance(result, Exception):
128
- processed_results.append(f"Error: {result}")
129
- else:
130
- processed_results.append("\n".join(str(r) for r in result))
131
-
132
- # Convert results to string
133
- return "\n".join(processed_results)
134
-
135
- async def record_to_memory(
136
- self,
137
- thinking: str,
138
- content: list[str],
139
- **kwargs: Any,
140
- ) -> ToolResponse:
141
- """Use this function to record important information that you may
142
- need later. The target content should be specific and concise, e.g.
143
- who, when, where, do what, why, how, etc.
144
-
145
- Args:
146
- thinking (`str`):
147
- Your thinking and reasoning about what to record
148
- content (`list[str]`):
149
- The content to remember, which is a list of strings.
150
- """
151
- # Building agentscope msgs
152
- try:
153
- thinking_blocks = [
154
- ThinkingBlock(
155
- type="thinking",
156
- thinking=thinking,
157
- ),
158
- ]
159
-
160
- text_blocks = [
161
- TextBlock(
162
- type="text",
163
- text=cnt,
164
- )
165
- for cnt in content
166
- ]
167
-
168
- msgs = [
169
- Msg(
170
- name="assistant",
171
- content=thinking_blocks + text_blocks,
172
- role="assistant",
173
- ),
174
- ]
175
-
176
- await self.record(msgs)
177
-
178
- return ToolResponse(
179
- content=[
180
- TextBlock(
181
- type="text",
182
- text="Successfully recorded content to memory",
183
- ),
184
- ],
185
- )
186
- except Exception as e:
187
- return ToolResponse(
188
- content=[
189
- TextBlock(
190
- type="text",
191
- text=f"Error recording content to memory: {str(e)}",
192
- ),
193
- ],
194
- )
195
-
196
- async def retrieve_from_memory(
197
- self,
198
- keywords: list[str],
199
- limit: int = 5,
200
- **kwargs: Any,
201
- ) -> ToolResponse:
202
- """Retrieve the memory based on the given keywords.
203
-
204
- Args:
205
- keywords (`list[str]`):
206
- Concise search cues—such as a person's name, a specific date,
207
- a location, or a short description of the memory you want to
208
- retrieve. Each keyword is executed as an independent query
209
- against the memory store.
210
- limit (`int`, optional):
211
- The maximum number of memories to retrieve per search, i.e.,
212
- the number of memories to retrieve for each keyword.
213
- Returns:
214
- `ToolResponse`:
215
- A ToolResponse containing the retrieved memories as JSON text.
216
- """
217
-
218
- try:
219
- results = []
220
- msgs = []
221
-
222
- for keyword in keywords:
223
- msgs.append(
224
- Msg(
225
- name="assistant",
226
- content=[
227
- TextBlock(
228
- type="text",
229
- text=keyword,
230
- ),
231
- ],
232
- role="assistant",
233
- ),
234
- )
235
- results = await self.retrieve(
236
- msgs,
237
- limit=limit,
238
- **kwargs,
239
- )
240
-
241
- return ToolResponse(
242
- content=[
243
- TextBlock(
244
- type="text",
245
- text=results,
246
- ),
247
- ],
248
- )
249
-
250
- except Exception as e:
251
- return ToolResponse(
252
- content=[
253
- TextBlock(
254
- type="text",
255
- text=f"Error retrieving memory: {str(e)}",
256
- ),
257
- ],
258
- )
@@ -1,6 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from ._memory_adapter import AgentScopeSessionHistoryMemory
3
-
4
- __all__ = [
5
- "AgentScopeSessionHistoryMemory",
6
- ]