agentscope-runtime 1.0.1__tar.gz → 1.0.2__tar.gz

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 (282) hide show
  1. {agentscope_runtime-1.0.1/src/agentscope_runtime.egg-info → agentscope_runtime-1.0.2}/PKG-INFO +24 -7
  2. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/README.md +16 -4
  3. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/pyproject.toml +13 -3
  4. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/message.py +32 -7
  5. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/stream.py +121 -91
  6. agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/agno/message.py +30 -0
  7. agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/agno/stream.py +122 -0
  8. agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/langgraph/__init__.py +12 -0
  9. agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/langgraph/message.py +257 -0
  10. agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/langgraph/stream.py +205 -0
  11. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/__init__.py +7 -0
  12. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/cli.py +63 -0
  13. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/__init__.py +2 -0
  14. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/chat.py +815 -0
  15. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/deploy.py +1062 -0
  16. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/invoke.py +58 -0
  17. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/list_cmd.py +103 -0
  18. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/run.py +176 -0
  19. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/sandbox.py +128 -0
  20. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/status.py +60 -0
  21. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/stop.py +185 -0
  22. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/commands/web.py +166 -0
  23. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/loaders/__init__.py +6 -0
  24. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/loaders/agent_loader.py +295 -0
  25. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/state/__init__.py +10 -0
  26. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/utils/__init__.py +18 -0
  27. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/utils/console.py +378 -0
  28. agentscope_runtime-1.0.2/src/agentscope_runtime/cli/utils/validators.py +118 -0
  29. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/app/agent_app.py +7 -4
  30. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/__init__.py +1 -0
  31. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/agentrun_deployer.py +152 -22
  32. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/base.py +43 -0
  33. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/kubernetes_deployer.py +158 -31
  34. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/local_deployer.py +188 -25
  35. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/modelstudio_deployer.py +109 -18
  36. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/state/__init__.py +9 -0
  37. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/state/manager.py +388 -0
  38. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/state/schema.py +96 -0
  39. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/utils/build_cache.py +736 -0
  40. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/detached_app.py +105 -30
  41. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/docker_image_builder.py +31 -10
  42. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/dockerfile_generator.py +15 -8
  43. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/image_factory.py +30 -2
  44. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/utils/k8s_utils.py +241 -0
  45. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/package.py +56 -6
  46. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/service_utils/fastapi_factory.py +16 -2
  47. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/service_utils/process_manager.py +155 -5
  48. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/wheel_packager.py +107 -123
  49. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/runner.py +25 -6
  50. agentscope_runtime-1.0.2/src/agentscope_runtime/engine/schemas/exception.py +580 -0
  51. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py +113 -39
  52. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/mcp_utils.py +20 -4
  53. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/utils.py +2 -0
  54. agentscope_runtime-1.0.2/src/agentscope_runtime/tools/utils/__init__.py +0 -0
  55. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/version.py +1 -1
  56. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2/src/agentscope_runtime.egg-info}/PKG-INFO +24 -7
  57. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime.egg-info/SOURCES.txt +30 -0
  58. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime.egg-info/entry_points.txt +1 -0
  59. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime.egg-info/requires.txt +7 -2
  60. agentscope_runtime-1.0.1/src/agentscope_runtime/engine/deployers/base.py +0 -18
  61. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/LICENSE +0 -0
  62. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/setup.cfg +0 -0
  63. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/setup.py +0 -0
  64. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/__init__.py +0 -0
  65. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/__init__.py +0 -0
  66. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/__init__.py +0 -0
  67. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/long_term_memory/__init__.py +0 -0
  68. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/long_term_memory/_long_term_memory_adapter.py +0 -0
  69. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/memory/__init__.py +0 -0
  70. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/memory/_memory_adapter.py +0 -0
  71. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/tool/__init__.py +0 -0
  72. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/tool/sandbox_tool.py +0 -0
  73. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/agentscope/tool/tool.py +0 -0
  74. {agentscope_runtime-1.0.1/src/agentscope_runtime/adapters/autogen → agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/agno}/__init__.py +0 -0
  75. {agentscope_runtime-1.0.1/src/agentscope_runtime/adapters/text → agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/autogen}/__init__.py +0 -0
  76. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/autogen/tool/__init__.py +0 -0
  77. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/autogen/tool/tool.py +0 -0
  78. {agentscope_runtime-1.0.1/src/agentscope_runtime/common → agentscope_runtime-1.0.2/src/agentscope_runtime/adapters/text}/__init__.py +0 -0
  79. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/adapters/text/stream.py +0 -0
  80. {agentscope_runtime-1.0.1/src/agentscope_runtime/common/container_clients → agentscope_runtime-1.0.2/src/agentscope_runtime/common}/__init__.py +0 -0
  81. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/__init__.py +0 -0
  82. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/base_mapping.py +0 -0
  83. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/base_queue.py +0 -0
  84. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/base_set.py +0 -0
  85. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/in_memory_mapping.py +0 -0
  86. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/in_memory_queue.py +0 -0
  87. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/in_memory_set.py +0 -0
  88. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/redis_mapping.py +0 -0
  89. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/redis_queue.py +0 -0
  90. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/collections/redis_set.py +0 -0
  91. {agentscope_runtime-1.0.1/src/agentscope_runtime/common/utils → agentscope_runtime-1.0.2/src/agentscope_runtime/common/container_clients}/__init__.py +0 -0
  92. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/container_clients/agentrun_client.py +0 -0
  93. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/container_clients/base_client.py +0 -0
  94. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/container_clients/docker_client.py +0 -0
  95. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/container_clients/fc_client.py +0 -0
  96. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/container_clients/kubernetes_client.py +0 -0
  97. {agentscope_runtime-1.0.1/src/agentscope_runtime/engine/deployers → agentscope_runtime-1.0.2/src/agentscope_runtime/common}/utils/__init__.py +0 -0
  98. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/common/utils/lazy_loader.py +0 -0
  99. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/__init__.py +0 -0
  100. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/app/__init__.py +0 -0
  101. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/app/base_app.py +0 -0
  102. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/app/celery_mixin.py +0 -0
  103. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/constant.py +0 -0
  104. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/__init__.py +0 -0
  105. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/a2a/__init__.py +0 -0
  106. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_adapter_utils.py +0 -0
  107. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_agent_adapter.py +0 -0
  108. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/a2a/a2a_protocol_adapter.py +0 -0
  109. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/protocol_adapter.py +0 -0
  110. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/responses/__init__.py +0 -0
  111. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_adapter_utils.py +0 -0
  112. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_agent_adapter.py +0 -0
  113. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/adapter/responses/response_api_protocol_adapter.py +0 -0
  114. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/cli_fc_deploy.py +0 -0
  115. {agentscope_runtime-1.0.1/src/agentscope_runtime/engine/misc → agentscope_runtime-1.0.2/src/agentscope_runtime/engine/deployers/utils}/__init__.py +0 -0
  116. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/app_runner_utils.py +0 -0
  117. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/deployment_modes.py +0 -0
  118. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/docker_image_utils/__init__.py +0 -0
  119. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/service_utils/__init__.py +0 -0
  120. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/service_utils/fastapi_templates.py +0 -0
  121. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/templates/app_main.py.j2 +0 -0
  122. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/templates/runner_main.py.j2 +0 -0
  123. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/deployers/utils/templates/standalone_main.py.j2 +0 -0
  124. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/helpers/agent_api_builder.py +0 -0
  125. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/helpers/runner.py +0 -0
  126. {agentscope_runtime-1.0.1/src/agentscope_runtime/engine/schemas → agentscope_runtime-1.0.2/src/agentscope_runtime/engine/misc}/__init__.py +0 -0
  127. {agentscope_runtime-1.0.1/src/agentscope_runtime/engine/services → agentscope_runtime-1.0.2/src/agentscope_runtime/engine/schemas}/__init__.py +0 -0
  128. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/agent_schemas.py +0 -0
  129. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/embedding.py +0 -0
  130. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/modelstudio_llm.py +0 -0
  131. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/oai_llm.py +0 -0
  132. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/realtime.py +0 -0
  133. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/response_api.py +0 -0
  134. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/schemas/session.py +0 -0
  135. {agentscope_runtime-1.0.1/src/agentscope_runtime/engine/services/utils → agentscope_runtime-1.0.2/src/agentscope_runtime/engine/services}/__init__.py +0 -0
  136. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/agent_state/__init__.py +0 -0
  137. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/agent_state/redis_state_service.py +0 -0
  138. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/agent_state/state_service.py +0 -0
  139. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/agent_state/state_service_factory.py +0 -0
  140. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/base.py +0 -0
  141. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/__init__.py +0 -0
  142. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/mem0_memory_service.py +0 -0
  143. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/memory_service.py +0 -0
  144. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/memory_service_factory.py +0 -0
  145. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/redis_memory_service.py +0 -0
  146. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/reme_personal_memory_service.py +0 -0
  147. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/reme_task_memory_service.py +0 -0
  148. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/memory/tablestore_memory_service.py +0 -0
  149. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/sandbox/__init__.py +0 -0
  150. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/sandbox/sandbox_service.py +0 -0
  151. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/sandbox/sandbox_service_factory.py +0 -0
  152. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/service_factory.py +0 -0
  153. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/session_history/__init__.py +0 -0
  154. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/session_history/redis_session_history_service.py +0 -0
  155. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/session_history/session_history_service.py +0 -0
  156. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/session_history/session_history_service_factory.py +0 -0
  157. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/session_history/tablestore_session_history_service.py +0 -0
  158. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box → agentscope_runtime-1.0.2/src/agentscope_runtime/engine/services/utils}/__init__.py +0 -0
  159. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/services/utils/tablestore_service_utils.py +0 -0
  160. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/__init__.py +0 -0
  161. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/asyncio_util.py +0 -0
  162. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/base.py +0 -0
  163. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/local_logging_handler.py +0 -0
  164. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/message_util.py +0 -0
  165. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/tracing_metric.py +0 -0
  166. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/tracing_util.py +0 -0
  167. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/engine/tracing/wrapper.py +0 -0
  168. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/__init__.py +0 -0
  169. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/base → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox}/box/__init__.py +0 -0
  170. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/agentbay/__init__.py +0 -0
  171. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/agentbay/agentbay_sandbox.py +0 -0
  172. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/base/__init__.py +0 -0
  173. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/base/base_sandbox.py +0 -0
  174. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/browser → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/base}/box/__init__.py +0 -0
  175. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/browser/__init__.py +0 -0
  176. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/filesystem → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/browser}/box/__init__.py +0 -0
  177. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/browser/browser_sandbox.py +0 -0
  178. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/cloud/__init__.py +0 -0
  179. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/cloud/cloud_sandbox.py +0 -0
  180. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/dummy/__init__.py +0 -0
  181. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/dummy/dummy_sandbox.py +0 -0
  182. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/filesystem/__init__.py +0 -0
  183. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/gui → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/filesystem}/box/__init__.py +0 -0
  184. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py +0 -0
  185. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/gui/__init__.py +0 -0
  186. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/mobile → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/gui}/box/__init__.py +0 -0
  187. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/gui/gui_sandbox.py +0 -0
  188. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/mobile/__init__.py +0 -0
  189. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/shared → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/mobile/box}/__init__.py +0 -0
  190. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/sandbox.py +0 -0
  191. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/box/training_box/environments → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/shared}/__init__.py +0 -0
  192. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/app.py +0 -0
  193. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/dependencies/__init__.py +0 -0
  194. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/dependencies/deps.py +0 -0
  195. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/__init__.py +0 -0
  196. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/generic.py +0 -0
  197. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/mcp.py +0 -0
  198. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/runtime_watcher.py +0 -0
  199. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/shared/routers/workspace.py +0 -0
  200. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/__init__.py +0 -0
  201. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/base.py +0 -0
  202. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/env_service.py +0 -0
  203. {agentscope_runtime-1.0.1/src/agentscope_runtime/sandbox/manager/server → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/box/training_box/environments}/__init__.py +0 -0
  204. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/environments/appworld/appworld_env.py +0 -0
  205. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_dataprocess.py +0 -0
  206. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_env.py +0 -0
  207. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/environments/bfcl/env_handler.py +0 -0
  208. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/registry.py +0 -0
  209. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/src/trajectory.py +0 -0
  210. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/box/training_box/training_box.py +0 -0
  211. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/build.py +0 -0
  212. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/client/__init__.py +0 -0
  213. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/client/http_client.py +0 -0
  214. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/client/training_client.py +0 -0
  215. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/constant.py +0 -0
  216. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/custom/__init__.py +0 -0
  217. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/custom/custom_sandbox.py +0 -0
  218. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/custom/example.py +0 -0
  219. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/enums.py +0 -0
  220. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/__init__.py +0 -0
  221. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/sandbox_manager.py +0 -0
  222. {agentscope_runtime-1.0.1/src/agentscope_runtime/tools/RAGs → agentscope_runtime-1.0.2/src/agentscope_runtime/sandbox/manager/server}/__init__.py +0 -0
  223. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/server/app.py +0 -0
  224. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/server/config.py +0 -0
  225. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/server/models.py +0 -0
  226. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/storage/__init__.py +0 -0
  227. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/storage/data_storage.py +0 -0
  228. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/storage/local_storage.py +0 -0
  229. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/manager/storage/oss_storage.py +0 -0
  230. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/mcp_server.py +0 -0
  231. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/model/__init__.py +0 -0
  232. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/model/api.py +0 -0
  233. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/model/container.py +0 -0
  234. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/model/manager_config.py +0 -0
  235. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/sandbox/registry.py +0 -0
  236. {agentscope_runtime-1.0.1/src/agentscope_runtime/tools/cli → agentscope_runtime-1.0.2/src/agentscope_runtime/tools/RAGs}/__init__.py +0 -0
  237. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/RAGs/modelstudio_rag.py +0 -0
  238. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/RAGs/modelstudio_rag_lite.py +0 -0
  239. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/__init__.py +0 -0
  240. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/_constants.py +0 -0
  241. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/alipay/__init__.py +0 -0
  242. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/alipay/base.py +0 -0
  243. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/alipay/payment.py +0 -0
  244. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/alipay/subscribe.py +0 -0
  245. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/base.py +0 -0
  246. {agentscope_runtime-1.0.1/src/agentscope_runtime/tools/utils → agentscope_runtime-1.0.2/src/agentscope_runtime/tools/cli}/__init__.py +0 -0
  247. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/cli/modelstudio_mcp_server.py +0 -0
  248. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/__init__.py +0 -0
  249. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/async_image_to_video.py +0 -0
  250. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/async_image_to_video_wan25.py +0 -0
  251. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/async_speech_to_video.py +0 -0
  252. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/async_text_to_video.py +0 -0
  253. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/async_text_to_video_wan25.py +0 -0
  254. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_edit.py +0 -0
  255. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_edit_wan25.py +0 -0
  256. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_generation.py +0 -0
  257. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_generation_wan25.py +0 -0
  258. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_style_repaint.py +0 -0
  259. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/image_to_video.py +0 -0
  260. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/qwen_image_edit.py +0 -0
  261. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/qwen_image_generation.py +0 -0
  262. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/qwen_text_to_speech.py +0 -0
  263. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/speech_to_text.py +0 -0
  264. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/speech_to_video.py +0 -0
  265. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/generations/text_to_video.py +0 -0
  266. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/mcp_wrapper.py +0 -0
  267. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/__init__.py +0 -0
  268. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/asr_client.py +0 -0
  269. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/azure_asr_client.py +0 -0
  270. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/azure_tts_client.py +0 -0
  271. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/modelstudio_asr_client.py +0 -0
  272. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/modelstudio_tts_client.py +0 -0
  273. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/realtime_tool.py +0 -0
  274. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/realtime_clients/tts_client.py +0 -0
  275. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/searches/__init__.py +0 -0
  276. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/searches/modelstudio_search.py +0 -0
  277. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/searches/modelstudio_search_lite.py +0 -0
  278. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/utils/api_key_util.py +0 -0
  279. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/utils/crypto_utils.py +0 -0
  280. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime/tools/utils/mcp_util.py +0 -0
  281. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime.egg-info/dependency_links.txt +0 -0
  282. {agentscope_runtime-1.0.1 → agentscope_runtime-1.0.2}/src/agentscope_runtime.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentscope-runtime
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -26,6 +26,8 @@ Requires-Dist: psutil
26
26
  Requires-Dist: dashscope>=1.25.0
27
27
  Requires-Dist: jsonref
28
28
  Requires-Dist: asgiref
29
+ Requires-Dist: click>=8.0.0
30
+ Requires-Dist: rich>=13.0.0
29
31
  Provides-Extra: dev
30
32
  Requires-Dist: pytest>=8.3.5; extra == "dev"
31
33
  Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
@@ -37,9 +39,11 @@ Requires-Dist: fakeredis>=2.31.0; extra == "dev"
37
39
  Requires-Dist: sphinx-autoapi>=3.6.0; extra == "dev"
38
40
  Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
39
41
  Requires-Dist: sphinxcontrib-mermaid>=1.2.3; extra == "dev"
40
- Requires-Dist: langgraph>=0.4.0; extra == "dev"
41
- Requires-Dist: autogen-agentchat>=0.7.0; extra == "dev"
42
42
  Provides-Extra: ext
43
+ Requires-Dist: langchain>=1.1.3; extra == "ext"
44
+ Requires-Dist: langchain_openai>=1.0.1; extra == "ext"
45
+ Requires-Dist: langgraph>=1.0.4; extra == "ext"
46
+ Requires-Dist: autogen-agentchat>=0.7.0; extra == "ext"
43
47
  Requires-Dist: reme-ai>=0.2.0.2; extra == "ext"
44
48
  Requires-Dist: mem0ai>=0.1.117; extra == "ext"
45
49
  Requires-Dist: alibabacloud-agentrun20250910>=2.0.1; extra == "ext"
@@ -61,6 +65,7 @@ Requires-Dist: setuptools>=40.8.0; extra == "ext"
61
65
  Requires-Dist: wheel; extra == "ext"
62
66
  Requires-Dist: alibabacloud-credentials; extra == "ext"
63
67
  Requires-Dist: PyYAML; extra == "ext"
68
+ Requires-Dist: agno>=2.3.8; extra == "ext"
64
69
  Dynamic: license-file
65
70
 
66
71
  <div align="center">
@@ -71,6 +76,7 @@ Dynamic: license-file
71
76
  [![PyPI](https://img.shields.io/pypi/v/agentscope-runtime?label=PyPI&color=brightgreen&logo=python)](https://pypi.org/project/agentscope-runtime/)
72
77
  [![Downloads](https://static.pepy.tech/badge/agentscope-runtime)](https://pepy.tech/project/agentscope-runtime)
73
78
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg?logo=python&label=Python)](https://python.org)
79
+ [![Last Commit](https://img.shields.io/github/last-commit/agentscope-ai/agentscope-runtime)](https://github.com/agentscope-ai/agentscope-runtime)
74
80
  [![License](https://img.shields.io/badge/license-Apache%202.0-red.svg?logo=apache&label=License)](LICENSE)
75
81
  [![Code Style](https://img.shields.io/badge/code%20style-black-black.svg?logo=python&label=CodeStyle)](https://github.com/psf/black)
76
82
  [![GitHub Stars](https://img.shields.io/github/stars/agentscope-ai/agentscope-runtime?style=flat&logo=github&color=yellow&label=Stars)](https://github.com/agentscope-ai/agentscope-runtime/stargazers)
@@ -114,7 +120,15 @@ Dynamic: license-file
114
120
 
115
121
  > [!NOTE]
116
122
  >
117
- > **About Framework-Agnostic**: Currently, AgentScope Runtime supports the **AgentScope** framework. We plan to extend compatibility to more agent development frameworks in the future.
123
+ > **About Framework-Agnostic**: Currently, AgentScope Runtime supports the **AgentScope** framework. We plan to extend compatibility to more agent development frameworks in the future. This table shows the current version’s adapter support for different frameworks. The level of support for each functionality varies across frameworks:
124
+ >
125
+ > | Framework/Feature | Message/Event | Tool | Service |
126
+ > | ------------------------------------------------------------ | ------------- | ---- | ------- |
127
+ > | AgentScope | ✅ | ✅ | ✅ |
128
+ > | [LangGraph](https://runtime.agentscope.io/en/langgraph_guidelines.html) | ✅ | 🚧 | 🚧 |
129
+ > | AutoGen | 🚧 | ✅ | 🚧 |
130
+ > | Microsoft Agent Framework | 🚧 | 🚧 | 🚧 |
131
+ > | [Agno](https://runtime.agentscope.io/en/agno_guidelines.html) | ✅ | ✅ | 🚧 |
118
132
 
119
133
  ---
120
134
 
@@ -124,7 +138,7 @@ Welcome to join our community on
124
138
 
125
139
  | [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |
126
140
  | ------------------------------------------------------------ | ------------------------------------------------------------ |
127
- | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i1/O1CN01LxzZha1thpIN2cc2E_!!6000000005934-2-tps-497-477.png" width="100" height="100"> |
141
+ | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="100" height="100"> |
128
142
 
129
143
  ---
130
144
 
@@ -389,6 +403,8 @@ with FilesystemSandbox() as box:
389
403
 
390
404
  Provides a **sandboxed Android emulator environment** that allows executing various mobile operations, such as tapping, swiping, inputting text, and taking screenshots.
391
405
 
406
+ <img src="https://img.alicdn.com/imgextra/i4/O1CN01yPnBC21vOi45fLy7V_!!6000000006163-2-tps-544-865.png" alt="Mobile Sandbox" height="500">
407
+
392
408
  ##### Prerequisites
393
409
 
394
410
  - **Linux Host**:
@@ -410,7 +426,7 @@ with MobileSandbox() as box:
410
426
  # By default, pulls 'agentscope/runtime-sandbox-mobile:latest' from DockerHub
411
427
  print(box.list_tools()) # List all available tools
412
428
  print(box.mobile_get_screen_resolution()) # Get the screen resolution
413
- print(box.mobile_tap(x=500, y=1000)) # Tap at coordinate (500, 1000)
429
+ print(box.mobile_tap([500, 1000])) # Tap at coordinate (500, 1000)
414
430
  print(box.mobile_input_text("Hello from AgentScope!")) # Input text
415
431
  print(box.mobile_key_event(3)) # Sends a HOME key event (KeyCode: 3)
416
432
  screenshot_result = box.mobile_get_screenshot() # Get the current screenshot
@@ -636,7 +652,7 @@ limitations under the License.
636
652
 
637
653
  ## Contributors ✨
638
654
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
639
- [![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
655
+ [![All Contributors](https://img.shields.io/badge/all_contributors-26-orange.svg?style=flat-square)](#contributors-)
640
656
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
641
657
 
642
658
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/emoji-key/)):
@@ -678,6 +694,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/e
678
694
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/XiuShenAl"><img src="https://avatars.githubusercontent.com/u/242360128?v=4?s=100" width="100px;" alt="XiuShenAl"/><br /><sub><b>XiuShenAl</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=XiuShenAl" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=XiuShenAl" title="Documentation">📖</a></td>
679
695
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/k-farruh"><img src="https://avatars.githubusercontent.com/u/33511681?v=4?s=100" width="100px;" alt="Farruh Kushnazarov"/><br /><sub><b>Farruh Kushnazarov</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=k-farruh" title="Documentation">📖</a></td>
680
696
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/fengxsong"><img src="https://avatars.githubusercontent.com/u/7008971?v=4?s=100" width="100px;" alt="fengxsong"/><br /><sub><b>fengxsong</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Afengxsong" title="Bug reports">🐛</a></td>
697
+ <td align="center" valign="top" width="14.28%"><a href="https://m4n5ter.github.io"><img src="https://avatars.githubusercontent.com/u/68144809?v=4?s=100" width="100px;" alt="Wang"/><br /><sub><b>Wang</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=M4n5ter" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3AM4n5ter" title="Bug reports">🐛</a></td>
681
698
  </tr>
682
699
  </tbody>
683
700
  <tfoot>
@@ -6,6 +6,7 @@
6
6
  [![PyPI](https://img.shields.io/pypi/v/agentscope-runtime?label=PyPI&color=brightgreen&logo=python)](https://pypi.org/project/agentscope-runtime/)
7
7
  [![Downloads](https://static.pepy.tech/badge/agentscope-runtime)](https://pepy.tech/project/agentscope-runtime)
8
8
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg?logo=python&label=Python)](https://python.org)
9
+ [![Last Commit](https://img.shields.io/github/last-commit/agentscope-ai/agentscope-runtime)](https://github.com/agentscope-ai/agentscope-runtime)
9
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-red.svg?logo=apache&label=License)](LICENSE)
10
11
  [![Code Style](https://img.shields.io/badge/code%20style-black-black.svg?logo=python&label=CodeStyle)](https://github.com/psf/black)
11
12
  [![GitHub Stars](https://img.shields.io/github/stars/agentscope-ai/agentscope-runtime?style=flat&logo=github&color=yellow&label=Stars)](https://github.com/agentscope-ai/agentscope-runtime/stargazers)
@@ -49,7 +50,15 @@
49
50
 
50
51
  > [!NOTE]
51
52
  >
52
- > **About Framework-Agnostic**: Currently, AgentScope Runtime supports the **AgentScope** framework. We plan to extend compatibility to more agent development frameworks in the future.
53
+ > **About Framework-Agnostic**: Currently, AgentScope Runtime supports the **AgentScope** framework. We plan to extend compatibility to more agent development frameworks in the future. This table shows the current version’s adapter support for different frameworks. The level of support for each functionality varies across frameworks:
54
+ >
55
+ > | Framework/Feature | Message/Event | Tool | Service |
56
+ > | ------------------------------------------------------------ | ------------- | ---- | ------- |
57
+ > | AgentScope | ✅ | ✅ | ✅ |
58
+ > | [LangGraph](https://runtime.agentscope.io/en/langgraph_guidelines.html) | ✅ | 🚧 | 🚧 |
59
+ > | AutoGen | 🚧 | ✅ | 🚧 |
60
+ > | Microsoft Agent Framework | 🚧 | 🚧 | 🚧 |
61
+ > | [Agno](https://runtime.agentscope.io/en/agno_guidelines.html) | ✅ | ✅ | 🚧 |
53
62
 
54
63
  ---
55
64
 
@@ -59,7 +68,7 @@ Welcome to join our community on
59
68
 
60
69
  | [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |
61
70
  | ------------------------------------------------------------ | ------------------------------------------------------------ |
62
- | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i1/O1CN01LxzZha1thpIN2cc2E_!!6000000005934-2-tps-497-477.png" width="100" height="100"> |
71
+ | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="100" height="100"> |
63
72
 
64
73
  ---
65
74
 
@@ -324,6 +333,8 @@ with FilesystemSandbox() as box:
324
333
 
325
334
  Provides a **sandboxed Android emulator environment** that allows executing various mobile operations, such as tapping, swiping, inputting text, and taking screenshots.
326
335
 
336
+ <img src="https://img.alicdn.com/imgextra/i4/O1CN01yPnBC21vOi45fLy7V_!!6000000006163-2-tps-544-865.png" alt="Mobile Sandbox" height="500">
337
+
327
338
  ##### Prerequisites
328
339
 
329
340
  - **Linux Host**:
@@ -345,7 +356,7 @@ with MobileSandbox() as box:
345
356
  # By default, pulls 'agentscope/runtime-sandbox-mobile:latest' from DockerHub
346
357
  print(box.list_tools()) # List all available tools
347
358
  print(box.mobile_get_screen_resolution()) # Get the screen resolution
348
- print(box.mobile_tap(x=500, y=1000)) # Tap at coordinate (500, 1000)
359
+ print(box.mobile_tap([500, 1000])) # Tap at coordinate (500, 1000)
349
360
  print(box.mobile_input_text("Hello from AgentScope!")) # Input text
350
361
  print(box.mobile_key_event(3)) # Sends a HOME key event (KeyCode: 3)
351
362
  screenshot_result = box.mobile_get_screenshot() # Get the current screenshot
@@ -571,7 +582,7 @@ limitations under the License.
571
582
 
572
583
  ## Contributors ✨
573
584
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
574
- [![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
585
+ [![All Contributors](https://img.shields.io/badge/all_contributors-26-orange.svg?style=flat-square)](#contributors-)
575
586
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
576
587
 
577
588
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/emoji-key/)):
@@ -613,6 +624,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/e
613
624
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/XiuShenAl"><img src="https://avatars.githubusercontent.com/u/242360128?v=4?s=100" width="100px;" alt="XiuShenAl"/><br /><sub><b>XiuShenAl</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=XiuShenAl" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=XiuShenAl" title="Documentation">📖</a></td>
614
625
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/k-farruh"><img src="https://avatars.githubusercontent.com/u/33511681?v=4?s=100" width="100px;" alt="Farruh Kushnazarov"/><br /><sub><b>Farruh Kushnazarov</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=k-farruh" title="Documentation">📖</a></td>
615
626
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/fengxsong"><img src="https://avatars.githubusercontent.com/u/7008971?v=4?s=100" width="100px;" alt="fengxsong"/><br /><sub><b>fengxsong</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Afengxsong" title="Bug reports">🐛</a></td>
627
+ <td align="center" valign="top" width="14.28%"><a href="https://m4n5ter.github.io"><img src="https://avatars.githubusercontent.com/u/68144809?v=4?s=100" width="100px;" alt="Wang"/><br /><sub><b>Wang</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=M4n5ter" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3AM4n5ter" title="Bug reports">🐛</a></td>
616
628
  </tr>
617
629
  </tbody>
618
630
  <tfoot>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentscope-runtime"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -26,6 +26,8 @@ dependencies = [
26
26
  "dashscope>=1.25.0",
27
27
  "jsonref",
28
28
  "asgiref",
29
+ "click>=8.0.0",
30
+ "rich>=13.0.0",
29
31
  ]
30
32
 
31
33
  [tool.setuptools]
@@ -40,6 +42,7 @@ requires = ["setuptools>=42", "wheel"]
40
42
  build-backend = "setuptools.build_meta"
41
43
 
42
44
  [project.scripts]
45
+ agentscope = "agentscope_runtime.cli.cli:main"
43
46
  runtime-sandbox-mcp = "agentscope_runtime.sandbox.mcp_server:main"
44
47
  runtime-sandbox-server = "agentscope_runtime.sandbox.manager.server.app:main"
45
48
  runtime-sandbox-builder = "agentscope_runtime.sandbox.build:main"
@@ -58,11 +61,13 @@ dev = [
58
61
  "sphinx-autoapi>=3.6.0",
59
62
  "pytest-mock>=3.15.1",
60
63
  "sphinxcontrib-mermaid>=1.2.3",
61
- "langgraph>=0.4.0",
62
- "autogen-agentchat>=0.7.0",
63
64
  ]
64
65
 
65
66
  ext = [
67
+ "langchain>=1.1.3",
68
+ "langchain_openai>=1.0.1",
69
+ "langgraph>=1.0.4",
70
+ "autogen-agentchat>=0.7.0",
66
71
  "reme-ai>=0.2.0.2",
67
72
  "mem0ai>=0.1.117",
68
73
  "alibabacloud-agentrun20250910>=2.0.1",
@@ -84,4 +89,9 @@ ext = [
84
89
  "wheel",
85
90
  "alibabacloud-credentials",
86
91
  "PyYAML",
92
+ "agno>=2.3.8",
87
93
  ]
94
+
95
+ [tool.pytest.ini_options]
96
+ asyncio_mode = "auto"
97
+ asyncio_default_fixture_loop_scope = "function"
@@ -374,9 +374,10 @@ def message_to_agentscope_msg(
374
374
 
375
375
  if message.type in (
376
376
  MessageType.PLUGIN_CALL,
377
+ MessageType.MCP_TOOL_CALL,
377
378
  MessageType.FUNCTION_CALL,
378
379
  ):
379
- # convert PLUGIN_CALL, FUNCTION_CALL to ToolUseBlock
380
+ # convert CALL to ToolUseBlock
380
381
  tool_args = None
381
382
  for cnt in reversed(message.content):
382
383
  if hasattr(cnt, "data"):
@@ -398,10 +399,10 @@ def message_to_agentscope_msg(
398
399
  ]
399
400
  elif message.type in (
400
401
  MessageType.PLUGIN_CALL_OUTPUT,
402
+ MessageType.MCP_TOOL_CALL_OUTPUT,
401
403
  MessageType.FUNCTION_CALL_OUTPUT,
402
404
  ):
403
- # convert PLUGIN_CALL_OUTPUT, FUNCTION_CALL_OUTPUT to
404
- # ToolResultBlock
405
+ # convert CALL_OUTPUT to ToolResultBlock
405
406
  out = None
406
407
  raw_output = ""
407
408
  for cnt in reversed(message.content):
@@ -425,6 +426,22 @@ def message_to_agentscope_msg(
425
426
 
426
427
  if isinstance(blk, list):
427
428
  if not all(is_valid_block(item) for item in blk):
429
+ try:
430
+ # Try to convert MCP content list to blocks
431
+ call_tool_result = {
432
+ "content": blk,
433
+ "structuredContent": None,
434
+ "isError": False,
435
+ }
436
+ blk = MCPClientBase._convert_mcp_content_to_as_blocks(
437
+ CallToolResult.model_validate(
438
+ call_tool_result,
439
+ ).content,
440
+ )
441
+ except Exception:
442
+ blk = raw_output
443
+ elif isinstance(blk, dict):
444
+ if not is_valid_block(blk):
428
445
  try:
429
446
  # Try to convert to MCP CallToolResult then to blocks
430
447
  blk = CallToolResult.model_validate(blk)
@@ -433,9 +450,6 @@ def message_to_agentscope_msg(
433
450
  )
434
451
  except Exception:
435
452
  blk = raw_output
436
- elif isinstance(blk, dict):
437
- if not is_valid_block(blk):
438
- blk = raw_output
439
453
  else:
440
454
  blk = raw_output
441
455
 
@@ -459,6 +473,7 @@ def message_to_agentscope_msg(
459
473
  "text": (TextBlock, "text"),
460
474
  "image": (ImageBlock, "image_url"),
461
475
  "audio": (AudioBlock, "data"),
476
+ "data": (TextBlock, "data"),
462
477
  # "video": (VideoBlock, "video_url", True),
463
478
  # TODO: support video
464
479
  }
@@ -533,7 +548,17 @@ def message_to_agentscope_msg(
533
548
  block_cls(type=cnt_type, source=base64_source),
534
549
  )
535
550
  else:
536
- msg_content.append(block_cls(type=cnt_type, text=value))
551
+ # text & data
552
+ if isinstance(value, str):
553
+ msg_content.append(
554
+ TextBlock(type="text", text=value),
555
+ )
556
+ else:
557
+ try:
558
+ json_str = json.dumps(value, ensure_ascii=False)
559
+ except Exception:
560
+ json_str = str(value)
561
+ msg_content.append(TextBlock(text=json_str))
537
562
 
538
563
  result["content"] = msg_content
539
564
  _msg = Msg(**result)
@@ -3,13 +3,15 @@
3
3
  import copy
4
4
  import json
5
5
 
6
- from typing import AsyncIterator, Tuple, List
6
+ from typing import AsyncIterator, Tuple, List, Union
7
7
  from urllib.parse import urlparse
8
8
 
9
+ from agentscope import setup_logger
9
10
  from agentscope.message import Msg
10
11
 
11
12
  from ...engine.schemas.agent_schemas import (
12
13
  Message,
14
+ Content,
13
15
  TextContent,
14
16
  ImageContent,
15
17
  AudioContent,
@@ -21,6 +23,8 @@ from ...engine.schemas.agent_schemas import (
21
23
  MessageType,
22
24
  )
23
25
 
26
+ setup_logger("ERROR")
27
+
24
28
 
25
29
  def _update_obj_attrs(obj, **attrs):
26
30
  for key, value in attrs.items():
@@ -31,7 +35,7 @@ def _update_obj_attrs(obj, **attrs):
31
35
 
32
36
  async def adapt_agentscope_message_stream(
33
37
  source_stream: AsyncIterator[Tuple[Msg, bool]],
34
- ) -> AsyncIterator[Message]:
38
+ ) -> AsyncIterator[Union[Message, Content]]:
35
39
  # Initialize variables to avoid uncaught errors
36
40
  msg_id = None
37
41
  last_content = ""
@@ -48,6 +52,7 @@ async def adapt_agentscope_message_stream(
48
52
  should_start_message = True
49
53
  should_start_reasoning_message = True
50
54
  tool_use_messages_dict = {}
55
+ tool_result_messages_dict = {}
51
56
  index = None
52
57
 
53
58
  # Run agent
@@ -262,95 +267,69 @@ async def adapt_agentscope_message_stream(
262
267
  fc_cls = FunctionCall
263
268
  fc_kwargs = {}
264
269
 
265
- if last:
266
- plugin_call_message = tool_use_messages_dict.get(
267
- call_id,
268
- )
269
-
270
- if plugin_call_message is None:
271
- # Only one tool use message yields, we fake
272
- # Build a new tool call message
273
- plugin_call_message = Message(
274
- type=msg_type,
275
- role="assistant",
276
- )
277
-
278
- data_delta_content = DataContent(
279
- index=0,
280
- data=fc_cls(
281
- call_id=element.get("id"),
282
- name=element.get("name"),
283
- arguments="",
284
- **fc_kwargs,
285
- ).model_dump(),
286
- delta=False,
287
- )
288
-
289
- plugin_call_message = _update_obj_attrs(
290
- plugin_call_message,
291
- metadata=metadata,
292
- usage=usage,
293
- )
294
- yield plugin_call_message.in_progress()
295
- yield data_delta_content.in_progress()
270
+ plugin_call_message = tool_use_messages_dict.get(
271
+ call_id,
272
+ )
296
273
 
297
- json_str = json.dumps(
298
- element.get("input"),
299
- ensure_ascii=False,
274
+ if plugin_call_message is None:
275
+ # Create a new message
276
+ plugin_call_message = Message(
277
+ type=msg_type,
278
+ role="assistant",
300
279
  )
301
280
  data_delta_content = DataContent(
302
- index=None, # Will be set by `add_content`
281
+ index=0,
303
282
  data=fc_cls(
304
- call_id=element.get("id"),
283
+ call_id=element["id"],
305
284
  name=element.get("name"),
306
- arguments=json_str,
285
+ arguments="",
307
286
  **fc_kwargs,
308
287
  ).model_dump(),
309
288
  delta=False,
310
289
  )
311
- plugin_call_message.add_content(
312
- new_content=data_delta_content,
313
- )
314
- yield data_delta_content.completed()
315
290
  plugin_call_message = _update_obj_attrs(
316
291
  plugin_call_message,
317
292
  metadata=metadata,
318
293
  usage=usage,
319
294
  )
320
- yield plugin_call_message.completed()
321
- index = None
322
- else:
323
- if call_id in tool_use_messages_dict:
324
- pass
325
- else:
326
- # Build a new tool call message
327
- plugin_call_message = Message(
328
- type=msg_type,
329
- role="assistant",
330
- )
331
-
332
- data_delta_content = DataContent(
333
- index=0,
334
- data=fc_cls(
335
- call_id=element.get("id"),
336
- name=element.get("name"),
337
- arguments="",
338
- **fc_kwargs,
339
- ).model_dump(),
340
- delta=False,
341
- )
295
+ yield plugin_call_message.in_progress()
296
+ data_delta_content.msg_id = plugin_call_message.id
297
+ yield data_delta_content.in_progress()
298
+ tool_use_messages_dict[
299
+ call_id
300
+ ] = plugin_call_message
301
+
302
+ # Update arguments
303
+ json_str = json.dumps(
304
+ element.get("input"),
305
+ ensure_ascii=False,
306
+ )
307
+ data_delta_content = DataContent(
308
+ index=None if last else 0,
309
+ data=fc_cls(
310
+ call_id=element["id"],
311
+ name=element.get("name"),
312
+ arguments=json_str,
313
+ **fc_kwargs,
314
+ ).model_dump(),
315
+ delta=False,
316
+ )
342
317
 
343
- plugin_call_message = _update_obj_attrs(
344
- plugin_call_message,
345
- metadata=metadata,
346
- usage=usage,
347
- )
348
- yield plugin_call_message.in_progress()
349
- yield data_delta_content.in_progress()
318
+ plugin_call_message = _update_obj_attrs(
319
+ plugin_call_message,
320
+ metadata=metadata,
321
+ usage=usage,
322
+ )
350
323
 
351
- tool_use_messages_dict[
352
- call_id
353
- ] = plugin_call_message
324
+ if last:
325
+ plugin_call_message.add_content(
326
+ new_content=data_delta_content,
327
+ )
328
+ yield data_delta_content.completed()
329
+ yield plugin_call_message.completed()
330
+ else:
331
+ data_delta_content.msg_id = plugin_call_message.id
332
+ yield data_delta_content.in_progress()
354
333
 
355
334
  elif element.get("type") == "tool_result": # Tool result
356
335
  call_id = element.get("id")
@@ -372,35 +351,86 @@ async def adapt_agentscope_message_stream(
372
351
  msg_type = MessageType.MCP_TOOL_CALL_OUTPUT
373
352
  fc_cls = McpCallOutput
374
353
 
375
- json_str = json.dumps(
376
- element.get("output"),
377
- ensure_ascii=False,
354
+ plugin_output_message = tool_result_messages_dict.get(
355
+ call_id,
378
356
  )
357
+
358
+ if plugin_output_message is None:
359
+ # Create a new message
360
+ plugin_output_message = Message(
361
+ type=msg_type,
362
+ role="tool",
363
+ )
364
+ data_delta_content = DataContent(
365
+ index=0,
366
+ data=fc_cls(
367
+ call_id=element.get("id"),
368
+ name=element.get("name"),
369
+ output="",
370
+ ).model_dump(),
371
+ delta=False,
372
+ )
373
+ plugin_output_message = _update_obj_attrs(
374
+ plugin_output_message,
375
+ metadata=metadata,
376
+ usage=usage,
377
+ )
378
+ yield plugin_output_message.in_progress()
379
+ data_delta_content.msg_id = (
380
+ plugin_output_message.id
381
+ )
382
+ yield data_delta_content.in_progress()
383
+ tool_result_messages_dict[
384
+ call_id
385
+ ] = plugin_output_message
386
+
387
+ # Update output
388
+ try:
389
+ json_str = json.dumps(
390
+ element.get("output"),
391
+ ensure_ascii=False,
392
+ )
393
+ except Exception:
394
+ # For non-JSON outputs, we just use the string
395
+ # representation
396
+ json_str = str(element.get("output"))
397
+
379
398
  data_delta_content = DataContent(
380
- index=index,
399
+ index=None if last else 0,
381
400
  data=fc_cls(
382
401
  call_id=element.get("id"),
383
402
  name=element.get("name"),
384
403
  output=json_str,
385
404
  ).model_dump(),
405
+ delta=False,
386
406
  )
387
- plugin_output_message = Message(
388
- type=msg_type,
389
- role="tool",
390
- content=[data_delta_content],
391
- )
407
+
392
408
  plugin_output_message = _update_obj_attrs(
393
409
  plugin_output_message,
394
410
  metadata=metadata,
395
411
  usage=usage,
396
412
  )
397
- yield plugin_output_message.completed()
398
- message = Message(
399
- type=MessageType.MESSAGE,
400
- role="assistant",
401
- )
402
- should_start_message = True
403
- index = None
413
+
414
+ if last:
415
+ plugin_output_message.add_content(
416
+ new_content=data_delta_content,
417
+ )
418
+ yield data_delta_content.completed()
419
+ yield plugin_output_message.completed()
420
+
421
+ message = Message(
422
+ type=MessageType.MESSAGE,
423
+ role="assistant",
424
+ )
425
+ should_start_message = True
426
+ index = None
427
+
428
+ else:
429
+ data_delta_content.msg_id = (
430
+ plugin_output_message.id
431
+ )
432
+ yield data_delta_content.in_progress()
433
+
404
434
  else:
405
435
  # TODO: handle image/audio/video block
406
436
  if should_start_message:
@@ -0,0 +1,30 @@
1
+ # -*- coding: utf-8 -*-
2
+ from typing import Union, List
3
+
4
+ from agentscope.formatter import OpenAIChatFormatter
5
+
6
+ from ...engine.schemas.agent_schemas import Message
7
+ from ..agentscope.message import message_to_agentscope_msg
8
+
9
+
10
+ async def message_to_agno_message(
11
+ messages: Union[Message, List[Message]],
12
+ ) -> Union[dict, List[dict]]:
13
+ """
14
+ Convert AgentScope runtime Message(s) to Agno Message(s).
15
+
16
+ Args:
17
+ messages: A single AgentScope runtime Message or list of Messages.
18
+
19
+ Returns:
20
+ A single AgnoMessage object or a list of AgnoMessage objects.
21
+ """
22
+
23
+ as_msgs = message_to_agentscope_msg(messages)
24
+ raw_list = isinstance(as_msgs, list)
25
+ as_msgs = as_msgs if raw_list else [as_msgs]
26
+
27
+ formatter = OpenAIChatFormatter()
28
+ agno_message = await formatter.format(as_msgs)
29
+
30
+ return agno_message if raw_list else agno_message[0]