agentrun-inner-test 0.0.40__tar.gz → 0.0.64__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 (159) hide show
  1. {agentrun_inner_test-0.0.40/agentrun_inner_test.egg-info → agentrun_inner_test-0.0.64}/PKG-INFO +4 -2
  2. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/__init__.py +34 -1
  3. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/__endpoint_async_template.py +40 -0
  4. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/api/control.py +1 -1
  5. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/endpoint.py +79 -0
  6. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/api/control.py +1 -1
  7. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/__init__.py +2 -1
  8. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/builtin.py +23 -0
  9. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/builtin/__init__.py +2 -0
  10. agentrun_inner_test-0.0.64/agentrun/integration/builtin/knowledgebase.py +137 -0
  11. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/crewai/__init__.py +2 -1
  12. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/crewai/builtin.py +23 -0
  13. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/crewai/model_adapter.py +5 -1
  14. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/__init__.py +2 -1
  15. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/builtin.py +23 -0
  16. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/model_adapter.py +4 -1
  17. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/__init__.py +2 -1
  18. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/builtin.py +23 -0
  19. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langgraph/__init__.py +2 -1
  20. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langgraph/builtin.py +23 -0
  21. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/pydantic_ai/__init__.py +2 -1
  22. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/pydantic_ai/builtin.py +23 -0
  23. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/pydantic_ai/model_adapter.py +4 -4
  24. agentrun_inner_test-0.0.64/agentrun/knowledgebase/__client_async_template.py +173 -0
  25. agentrun_inner_test-0.0.64/agentrun/knowledgebase/__init__.py +53 -0
  26. agentrun_inner_test-0.0.64/agentrun/knowledgebase/__knowledgebase_async_template.py +438 -0
  27. agentrun_inner_test-0.0.64/agentrun/knowledgebase/api/__data_async_template.py +414 -0
  28. agentrun_inner_test-0.0.64/agentrun/knowledgebase/api/__init__.py +19 -0
  29. agentrun_inner_test-0.0.64/agentrun/knowledgebase/api/control.py +606 -0
  30. agentrun_inner_test-0.0.64/agentrun/knowledgebase/api/data.py +624 -0
  31. agentrun_inner_test-0.0.64/agentrun/knowledgebase/client.py +311 -0
  32. agentrun_inner_test-0.0.64/agentrun/knowledgebase/knowledgebase.py +748 -0
  33. agentrun_inner_test-0.0.64/agentrun/knowledgebase/model.py +270 -0
  34. agentrun_inner_test-0.0.64/agentrun/memory_collection/__client_async_template.py +178 -0
  35. agentrun_inner_test-0.0.64/agentrun/memory_collection/__init__.py +37 -0
  36. agentrun_inner_test-0.0.64/agentrun/memory_collection/__memory_collection_async_template.py +457 -0
  37. agentrun_inner_test-0.0.64/agentrun/memory_collection/api/__init__.py +5 -0
  38. agentrun_inner_test-0.0.64/agentrun/memory_collection/api/control.py +610 -0
  39. agentrun_inner_test-0.0.64/agentrun/memory_collection/client.py +323 -0
  40. agentrun_inner_test-0.0.64/agentrun/memory_collection/memory_collection.py +844 -0
  41. agentrun_inner_test-0.0.64/agentrun/memory_collection/model.py +162 -0
  42. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/api/control.py +1 -1
  43. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__client_async_template.py +32 -7
  44. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__init__.py +11 -0
  45. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__sandbox_async_template.py +43 -10
  46. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__template_async_template.py +29 -27
  47. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/aio_sandbox.py +11 -4
  48. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/__sandbox_data_async_template.py +15 -8
  49. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/control.py +1 -1
  50. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/sandbox_data.py +29 -15
  51. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/browser_sandbox.py +2 -2
  52. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/client.py +60 -13
  53. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/model.py +113 -14
  54. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/sandbox.py +58 -10
  55. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/template.py +29 -27
  56. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/api/control.py +1 -1
  57. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/toolset.py +1 -0
  58. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/__data_api_async_template.py +1 -0
  59. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/config.py +12 -0
  60. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/control_api.py +27 -0
  61. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/data_api.py +1 -0
  62. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64/agentrun_inner_test.egg-info}/PKG-INFO +4 -2
  63. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun_inner_test.egg-info/SOURCES.txt +19 -0
  64. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun_inner_test.egg-info/requires.txt +3 -1
  65. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/pyproject.toml +5 -3
  66. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/LICENSE +0 -0
  67. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/README.md +0 -0
  68. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/__client_async_template.py +0 -0
  69. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/__init__.py +0 -0
  70. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/__runtime_async_template.py +0 -0
  71. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/api/__data_async_template.py +0 -0
  72. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/api/__init__.py +0 -0
  73. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/api/data.py +0 -0
  74. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/client.py +0 -0
  75. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/model.py +0 -0
  76. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/agent_runtime/runtime.py +0 -0
  77. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/__client_async_template.py +0 -0
  78. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/__credential_async_template.py +0 -0
  79. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/__init__.py +0 -0
  80. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/api/__init__.py +0 -0
  81. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/client.py +0 -0
  82. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/credential.py +0 -0
  83. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/credential/model.py +0 -0
  84. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/__init__.py +0 -0
  85. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/adapter.py +0 -0
  86. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/message_adapter.py +0 -0
  87. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/model_adapter.py +0 -0
  88. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/agentscope/tool_adapter.py +0 -0
  89. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/builtin/model.py +0 -0
  90. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/builtin/sandbox.py +0 -0
  91. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/builtin/toolset.py +0 -0
  92. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/crewai/adapter.py +0 -0
  93. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/crewai/tool_adapter.py +0 -0
  94. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/adapter.py +0 -0
  95. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/message_adapter.py +0 -0
  96. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/google_adk/tool_adapter.py +0 -0
  97. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/adapter.py +0 -0
  98. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/message_adapter.py +0 -0
  99. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/model_adapter.py +0 -0
  100. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langchain/tool_adapter.py +0 -0
  101. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langgraph/adapter.py +0 -0
  102. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/langgraph/agent_converter.py +0 -0
  103. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/pydantic_ai/adapter.py +0 -0
  104. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/pydantic_ai/tool_adapter.py +0 -0
  105. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/__init__.py +0 -0
  106. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/adapter.py +0 -0
  107. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/canonical.py +0 -0
  108. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/converter.py +0 -0
  109. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/model.py +0 -0
  110. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/integration/utils/tool.py +0 -0
  111. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/__client_async_template.py +0 -0
  112. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/__init__.py +0 -0
  113. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/__model_proxy_async_template.py +0 -0
  114. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/__model_service_async_template.py +0 -0
  115. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/api/__init__.py +0 -0
  116. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/api/data.py +0 -0
  117. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/client.py +0 -0
  118. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/model.py +0 -0
  119. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/model_proxy.py +0 -0
  120. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/model/model_service.py +0 -0
  121. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__aio_sandbox_async_template.py +0 -0
  122. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__browser_sandbox_async_template.py +0 -0
  123. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/__code_interpreter_sandbox_async_template.py +0 -0
  124. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/__aio_data_async_template.py +0 -0
  125. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/__browser_data_async_template.py +0 -0
  126. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/__code_interpreter_data_async_template.py +0 -0
  127. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/__init__.py +0 -0
  128. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/aio_data.py +0 -0
  129. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/browser_data.py +0 -0
  130. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/code_interpreter_data.py +0 -0
  131. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/playwright_async.py +0 -0
  132. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/api/playwright_sync.py +0 -0
  133. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/sandbox/code_interpreter_sandbox.py +0 -0
  134. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/__init__.py +0 -0
  135. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/agui_normalizer.py +0 -0
  136. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/agui_protocol.py +0 -0
  137. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/invoker.py +0 -0
  138. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/model.py +0 -0
  139. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/openai_protocol.py +0 -0
  140. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/protocol.py +0 -0
  141. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/server/server.py +0 -0
  142. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/__client_async_template.py +0 -0
  143. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/__init__.py +0 -0
  144. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/__toolset_async_template.py +0 -0
  145. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/api/__init__.py +0 -0
  146. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/api/mcp.py +0 -0
  147. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/api/openapi.py +0 -0
  148. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/client.py +0 -0
  149. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/toolset/model.py +0 -0
  150. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/__init__.py +0 -0
  151. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/__resource_async_template.py +0 -0
  152. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/exception.py +0 -0
  153. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/helper.py +0 -0
  154. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/log.py +0 -0
  155. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/model.py +0 -0
  156. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun/utils/resource.py +0 -0
  157. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun_inner_test.egg-info/dependency_links.txt +0 -0
  158. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/agentrun_inner_test.egg-info/top_level.txt +0 -0
  159. {agentrun_inner_test-0.0.40 → agentrun_inner_test-0.0.64}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentrun-inner-test
3
- Version: 0.0.40
3
+ Version: 0.0.64
4
4
  Summary: Alibaba Cloud Agent Run SDK
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -13,8 +13,10 @@ Requires-Dist: typing-extensions>=4.15.0
13
13
  Requires-Dist: litellm>=1.79.3
14
14
  Requires-Dist: alibabacloud-devs20230714>=2.4.1
15
15
  Requires-Dist: pydash>=8.0.5
16
- Requires-Dist: alibabacloud-agentrun20250910>=4.0.3
16
+ Requires-Dist: alibabacloud-agentrun20250910>=5.2.0
17
17
  Requires-Dist: alibabacloud_tea_openapi>=0.4.2
18
+ Requires-Dist: alibabacloud_bailian20231229>=2.6.2
19
+ Requires-Dist: agentrun-mem0ai>=0.0.6
18
20
  Provides-Extra: server
19
21
  Requires-Dist: fastapi>=0.104.0; extra == "server"
20
22
  Requires-Dist: uvicorn>=0.24.0; extra == "server"
@@ -18,7 +18,7 @@ Provides simple and easy-to-use APIs for managing AI Agent runtime environments,
18
18
 
19
19
  from typing import TYPE_CHECKING
20
20
 
21
- __version__ = "0.0.40"
21
+ __version__ = "0.0.64"
22
22
 
23
23
  # Agent Runtime
24
24
  from agentrun.agent_runtime import (
@@ -55,6 +55,22 @@ from agentrun.credential import (
55
55
  CredentialUpdateInput,
56
56
  RelatedResource,
57
57
  )
58
+ # Memory Collection
59
+ from agentrun.memory_collection import (
60
+ EmbedderConfig,
61
+ EmbedderConfigConfig,
62
+ LLMConfig,
63
+ LLMConfigConfig,
64
+ MemoryCollection,
65
+ MemoryCollectionClient,
66
+ MemoryCollectionCreateInput,
67
+ MemoryCollectionListInput,
68
+ MemoryCollectionListOutput,
69
+ MemoryCollectionUpdateInput,
70
+ NetworkConfiguration,
71
+ VectorStoreConfig,
72
+ VectorStoreConfigConfig,
73
+ )
58
74
  # Model Service
59
75
  from agentrun.model import (
60
76
  BackendType,
@@ -173,6 +189,23 @@ __all__ = [
173
189
  "CredentialCreateInput",
174
190
  "CredentialUpdateInput",
175
191
  "CredentialListInput",
192
+ ######## Memory Collection ########
193
+ # base
194
+ "MemoryCollection",
195
+ "MemoryCollectionClient",
196
+ # inner model
197
+ "EmbedderConfig",
198
+ "EmbedderConfigConfig",
199
+ "LLMConfig",
200
+ "LLMConfigConfig",
201
+ "NetworkConfiguration",
202
+ "VectorStoreConfig",
203
+ "VectorStoreConfigConfig",
204
+ # api model
205
+ "MemoryCollectionCreateInput",
206
+ "MemoryCollectionUpdateInput",
207
+ "MemoryCollectionListInput",
208
+ "MemoryCollectionListOutput",
176
209
  ######## Model ########
177
210
  # base
178
211
  "ModelClient",
@@ -18,6 +18,7 @@ from agentrun.agent_runtime.model import (
18
18
  AgentRuntimeEndpointUpdateInput,
19
19
  )
20
20
  from agentrun.utils.config import Config
21
+ from agentrun.utils.model import PageableInput
21
22
  from agentrun.utils.resource import ResourceBase
22
23
 
23
24
 
@@ -160,6 +161,45 @@ class AgentRuntimeEndpoint(
160
161
  config=config,
161
162
  )
162
163
 
164
+ @classmethod
165
+ async def _list_page_async(
166
+ cls,
167
+ page_input: PageableInput,
168
+ config: Optional[Config] = None,
169
+ **kwargs,
170
+ ) -> List["AgentRuntimeEndpoint"]:
171
+ """分页列出端点 / List endpoints by page
172
+
173
+ 此方法是 ResourceBase 要求实现的抽象方法,用于支持分页查询。
174
+ This method is an abstract method required by ResourceBase to support pagination.
175
+
176
+ Args:
177
+ page_input: 分页参数 / Pagination parameters
178
+ config: 配置对象,可选 / Configuration object, optional
179
+ **kwargs: 其他参数,必须包含 agent_runtime_id / Other parameters, must include agent_runtime_id
180
+
181
+ Returns:
182
+ List[AgentRuntimeEndpoint]: 端点对象列表 / List of endpoint objects
183
+
184
+ Raises:
185
+ ValueError: 当 agent_runtime_id 未提供时 / When agent_runtime_id is not provided
186
+ HTTPError: HTTP 请求错误 / HTTP request error
187
+ """
188
+ agent_runtime_id = kwargs.get("agent_runtime_id")
189
+ if not agent_runtime_id:
190
+ raise ValueError(
191
+ "agent_runtime_id is required for listing endpoints"
192
+ )
193
+
194
+ return await cls.__get_client().list_endpoints_async(
195
+ agent_runtime_id,
196
+ AgentRuntimeEndpointListInput(
197
+ page_number=page_input.page_number,
198
+ page_size=page_input.page_size,
199
+ ),
200
+ config=config,
201
+ )
202
+
163
203
  @classmethod
164
204
  async def list_by_id_async(
165
205
  cls, agent_runtime_id: str, config: Optional[Config] = None
@@ -35,7 +35,7 @@ from alibabacloud_agentrun20250910.models import (
35
35
  )
36
36
  from alibabacloud_tea_openapi.exceptions._client import ClientException
37
37
  from alibabacloud_tea_openapi.exceptions._server import ServerException
38
- from alibabacloud_tea_util.models import RuntimeOptions
38
+ from darabonba.runtime import RuntimeOptions
39
39
  import pydash
40
40
 
41
41
  from agentrun.utils.config import Config
@@ -28,6 +28,7 @@ from agentrun.agent_runtime.model import (
28
28
  AgentRuntimeEndpointUpdateInput,
29
29
  )
30
30
  from agentrun.utils.config import Config
31
+ from agentrun.utils.model import PageableInput
31
32
  from agentrun.utils.resource import ResourceBase
32
33
 
33
34
 
@@ -286,6 +287,84 @@ class AgentRuntimeEndpoint(
286
287
  config=config,
287
288
  )
288
289
 
290
+ @classmethod
291
+ async def _list_page_async(
292
+ cls,
293
+ page_input: PageableInput,
294
+ config: Optional[Config] = None,
295
+ **kwargs,
296
+ ) -> List["AgentRuntimeEndpoint"]:
297
+ """分页列出端点 / List endpoints by page
298
+
299
+ 此方法是 ResourceBase 要求实现的抽象方法,用于支持分页查询。
300
+ This method is an abstract method required by ResourceBase to support pagination.
301
+
302
+ Args:
303
+ page_input: 分页参数 / Pagination parameters
304
+ config: 配置对象,可选 / Configuration object, optional
305
+ **kwargs: 其他参数,必须包含 agent_runtime_id / Other parameters, must include agent_runtime_id
306
+
307
+ Returns:
308
+ List[AgentRuntimeEndpoint]: 端点对象列表 / List of endpoint objects
309
+
310
+ Raises:
311
+ ValueError: 当 agent_runtime_id 未提供时 / When agent_runtime_id is not provided
312
+ HTTPError: HTTP 请求错误 / HTTP request error
313
+ """
314
+ agent_runtime_id = kwargs.get("agent_runtime_id")
315
+ if not agent_runtime_id:
316
+ raise ValueError(
317
+ "agent_runtime_id is required for listing endpoints"
318
+ )
319
+
320
+ return await cls.__get_client().list_endpoints_async(
321
+ agent_runtime_id,
322
+ AgentRuntimeEndpointListInput(
323
+ page_number=page_input.page_number,
324
+ page_size=page_input.page_size,
325
+ ),
326
+ config=config,
327
+ )
328
+
329
+ @classmethod
330
+ def _list_page(
331
+ cls,
332
+ page_input: PageableInput,
333
+ config: Optional[Config] = None,
334
+ **kwargs,
335
+ ) -> List["AgentRuntimeEndpoint"]:
336
+ """分页列出端点 / List endpoints by page
337
+
338
+ 此方法是 ResourceBase 要求实现的抽象方法,用于支持分页查询。
339
+ This method is an abstract method required by ResourceBase to support pagination.
340
+
341
+ Args:
342
+ page_input: 分页参数 / Pagination parameters
343
+ config: 配置对象,可选 / Configuration object, optional
344
+ **kwargs: 其他参数,必须包含 agent_runtime_id / Other parameters, must include agent_runtime_id
345
+
346
+ Returns:
347
+ List[AgentRuntimeEndpoint]: 端点对象列表 / List of endpoint objects
348
+
349
+ Raises:
350
+ ValueError: 当 agent_runtime_id 未提供时 / When agent_runtime_id is not provided
351
+ HTTPError: HTTP 请求错误 / HTTP request error
352
+ """
353
+ agent_runtime_id = kwargs.get("agent_runtime_id")
354
+ if not agent_runtime_id:
355
+ raise ValueError(
356
+ "agent_runtime_id is required for listing endpoints"
357
+ )
358
+
359
+ return cls.__get_client().list_endpoints(
360
+ agent_runtime_id,
361
+ AgentRuntimeEndpointListInput(
362
+ page_number=page_input.page_number,
363
+ page_size=page_input.page_size,
364
+ ),
365
+ config=config,
366
+ )
367
+
289
368
  @classmethod
290
369
  async def list_by_id_async(
291
370
  cls, agent_runtime_id: str, config: Optional[Config] = None
@@ -25,7 +25,7 @@ from alibabacloud_agentrun20250910.models import (
25
25
  )
26
26
  from alibabacloud_tea_openapi.exceptions._client import ClientException
27
27
  from alibabacloud_tea_openapi.exceptions._server import ServerException
28
- from alibabacloud_tea_util.models import RuntimeOptions
28
+ from darabonba.runtime import RuntimeOptions
29
29
  import pydash
30
30
 
31
31
  from agentrun.utils.config import Config
@@ -3,10 +3,11 @@
3
3
  提供 AgentRun 模型与沙箱工具的 AgentScope 适配入口。 / 提供 AgentRun 模型with沙箱工具的 AgentScope 适配入口。
4
4
  """
5
5
 
6
- from .builtin import model, sandbox_toolset, toolset
6
+ from .builtin import knowledgebase_toolset, model, sandbox_toolset, toolset
7
7
 
8
8
  __all__ = [
9
9
  "model",
10
10
  "toolset",
11
11
  "sandbox_toolset",
12
+ "knowledgebase_toolset",
12
13
  ]
@@ -8,6 +8,9 @@ from typing import Any, Callable, List, Optional, Union
8
8
 
9
9
  from typing_extensions import Unpack
10
10
 
11
+ from agentrun.integration.builtin import (
12
+ knowledgebase_toolset as _knowledgebase_toolset,
13
+ )
11
14
  from agentrun.integration.builtin import model as _model
12
15
  from agentrun.integration.builtin import ModelArgs
13
16
  from agentrun.integration.builtin import sandbox_toolset as _sandbox_toolset
@@ -63,3 +66,23 @@ def sandbox_toolset(
63
66
  config=config,
64
67
  sandbox_idle_timeout_seconds=sandbox_idle_timeout_seconds,
65
68
  ).to_agentscope(prefix=prefix)
69
+
70
+
71
+ def knowledgebase_toolset(
72
+ knowledge_base_names: List[str],
73
+ *,
74
+ prefix: Optional[str] = None,
75
+ modify_tool_name: Optional[Callable[[Tool], Tool]] = None,
76
+ filter_tools_by_name: Optional[Callable[[str], bool]] = None,
77
+ config: Optional[Config] = None,
78
+ ) -> List[Any]:
79
+ """将知识库检索封装为 AgentScope 工具列表。 / AgentScope Built-in Integration Functions"""
80
+
81
+ return _knowledgebase_toolset(
82
+ knowledge_base_names=knowledge_base_names,
83
+ config=config,
84
+ ).to_agentscope(
85
+ prefix=prefix,
86
+ modify_tool_name=modify_tool_name,
87
+ filter_tools_by_name=filter_tools_by_name,
88
+ )
@@ -4,6 +4,7 @@
4
4
  This module provides built-in integration functions for quickly creating models and tools.
5
5
  """
6
6
 
7
+ from .knowledgebase import knowledgebase_toolset
7
8
  from .model import model, ModelArgs
8
9
  from .sandbox import sandbox_toolset
9
10
  from .toolset import toolset
@@ -13,4 +14,5 @@ __all__ = [
13
14
  "ModelArgs",
14
15
  "toolset",
15
16
  "sandbox_toolset",
17
+ "knowledgebase_toolset",
16
18
  ]
@@ -0,0 +1,137 @@
1
+ """知识库工具集 / KnowledgeBase ToolSet
2
+
3
+ 提供知识库检索功能的工具集,支持多知识库联合检索。
4
+ Provides toolset for knowledge base retrieval, supporting multi-knowledge-base search.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any, Dict, List, Optional
10
+
11
+ from agentrun.integration.utils.tool import CommonToolSet, tool
12
+ from agentrun.knowledgebase import KnowledgeBase
13
+ from agentrun.utils.config import Config
14
+
15
+
16
+ class KnowledgeBaseToolSet(CommonToolSet):
17
+ """知识库工具集 / KnowledgeBase ToolSet
18
+
19
+ 提供知识库检索功能,支持对多个知识库进行联合检索。
20
+ Provides knowledge base retrieval capabilities, supporting joint retrieval
21
+ across multiple knowledge bases.
22
+
23
+ 使用指南 / Usage Guide:
24
+ ============================================================
25
+
26
+ ## 基本用法 / Basic Usage
27
+
28
+ 1. **创建工具集 / Create ToolSet**:
29
+ - 使用 `knowledgebase_toolset` 函数创建工具集实例
30
+ - Use `knowledgebase_toolset` function to create a toolset instance
31
+ - 指定要检索的知识库名称列表
32
+ - Specify the list of knowledge base names to search
33
+
34
+ 2. **执行检索 / Execute Search**:
35
+ - 调用 `search_document` 工具进行检索
36
+ - Call `search_document` tool to perform retrieval
37
+ - 返回所有指定知识库的检索结果
38
+ - Returns retrieval results from all specified knowledge bases
39
+
40
+ ## 示例 / Examples
41
+
42
+ ```python
43
+ from agentrun.integration.langchain import knowledgebase_toolset
44
+
45
+ # 创建工具集 / Create toolset
46
+ tools = knowledgebase_toolset(
47
+ knowledge_base_names=["kb-product-docs", "kb-faq"],
48
+ )
49
+
50
+ # 在 Agent 中使用 / Use in Agent
51
+ agent = create_react_agent(llm, tools)
52
+ ```
53
+ """
54
+
55
+ def __init__(
56
+ self,
57
+ knowledge_base_names: List[str],
58
+ config: Optional[Config] = None,
59
+ ) -> None:
60
+ """初始化知识库工具集 / Initialize KnowledgeBase ToolSet
61
+
62
+ Args:
63
+ knowledge_base_names: 知识库名称列表 / List of knowledge base names
64
+ config: 配置 / Configuration
65
+ """
66
+ super().__init__()
67
+
68
+ self.knowledge_base_names = knowledge_base_names
69
+ self.config = config
70
+
71
+ @tool(
72
+ name="search_document",
73
+ description=(
74
+ "Search and retrieve relevant documents from configured knowledge"
75
+ " bases. Use this tool when you need to find information from the"
76
+ " knowledge base to answer user questions. Returns relevant"
77
+ " document chunks with their content and metadata. The search is"
78
+ " performed across all configured knowledge bases and results are"
79
+ " grouped by knowledge base name."
80
+ ),
81
+ )
82
+ def search_document(self, query: str) -> Dict[str, Any]:
83
+ """检索文档 / Search documents
84
+
85
+ 根据查询文本从配置的知识库中检索相关文档。
86
+ Retrieves relevant documents from configured knowledge bases based on query text.
87
+
88
+ Args:
89
+ query: 查询文本 / Query text
90
+
91
+ Returns:
92
+ Dict[str, Any]: 检索结果,包含各知识库的检索结果 /
93
+ Retrieval results containing results from each knowledge base
94
+ """
95
+ return KnowledgeBase.multi_retrieve(
96
+ query=query,
97
+ knowledge_base_names=self.knowledge_base_names,
98
+ config=self.config,
99
+ )
100
+
101
+
102
+ def knowledgebase_toolset(
103
+ knowledge_base_names: List[str],
104
+ *,
105
+ config: Optional[Config] = None,
106
+ ) -> KnowledgeBaseToolSet:
107
+ """创建知识库工具集 / Create KnowledgeBase ToolSet
108
+
109
+ 将知识库检索功能封装为通用工具集,可转换为各框架支持的格式。
110
+ Wraps knowledge base retrieval functionality into a common toolset that can be
111
+ converted to formats supported by various frameworks.
112
+
113
+ Args:
114
+ knowledge_base_names: 知识库名称列表 / List of knowledge base names
115
+ config: 配置 / Configuration
116
+
117
+ Returns:
118
+ KnowledgeBaseToolSet: 知识库工具集实例 / KnowledgeBase toolset instance
119
+
120
+ Example:
121
+ >>> from agentrun.integration.builtin import knowledgebase_toolset
122
+ >>>
123
+ >>> # 创建工具集 / Create toolset
124
+ >>> kb_tools = knowledgebase_toolset(
125
+ ... knowledge_base_names=["kb-docs", "kb-faq"],
126
+ ... )
127
+ >>>
128
+ >>> # 转换为 LangChain 格式 / Convert to LangChain format
129
+ >>> langchain_tools = kb_tools.to_langchain()
130
+ >>>
131
+ >>> # 转换为 Google ADK 格式 / Convert to Google ADK format
132
+ >>> adk_tools = kb_tools.to_google_adk()
133
+ """
134
+ return KnowledgeBaseToolSet(
135
+ knowledge_base_names=knowledge_base_names,
136
+ config=config,
137
+ )
@@ -4,9 +4,10 @@
4
4
  CrewAI 与 LangChain 兼容,因此直接复用 LangChain 的转换逻辑。 / CrewAI with LangChain 兼容,因此直接复用 LangChain 的转换逻辑。
5
5
  """
6
6
 
7
- from .builtin import model, sandbox_toolset
7
+ from .builtin import knowledgebase_toolset, model, sandbox_toolset
8
8
 
9
9
  __all__ = [
10
10
  "model",
11
11
  "sandbox_toolset",
12
+ "knowledgebase_toolset",
12
13
  ]
@@ -8,6 +8,9 @@ from typing import Any, Callable, List, Optional, Union
8
8
 
9
9
  from typing_extensions import Unpack
10
10
 
11
+ from agentrun.integration.builtin import (
12
+ knowledgebase_toolset as _knowledgebase_toolset,
13
+ )
11
14
  from agentrun.integration.builtin import model as _model
12
15
  from agentrun.integration.builtin import ModelArgs
13
16
  from agentrun.integration.builtin import sandbox_toolset as _sandbox_toolset
@@ -63,3 +66,23 @@ def sandbox_toolset(
63
66
  config=config,
64
67
  sandbox_idle_timeout_seconds=sandbox_idle_timeout_seconds,
65
68
  ).to_crewai(prefix=prefix)
69
+
70
+
71
+ def knowledgebase_toolset(
72
+ knowledge_base_names: List[str],
73
+ *,
74
+ prefix: Optional[str] = None,
75
+ modify_tool_name: Optional[Callable[[Tool], Tool]] = None,
76
+ filter_tools_by_name: Optional[Callable[[str], bool]] = None,
77
+ config: Optional[Config] = None,
78
+ ) -> List[Any]:
79
+ """将知识库检索封装为 CrewAI 工具列表。 / CrewAI Built-in Integration Functions"""
80
+
81
+ return _knowledgebase_toolset(
82
+ knowledge_base_names=knowledge_base_names,
83
+ config=config,
84
+ ).to_crewai(
85
+ prefix=prefix,
86
+ modify_tool_name=modify_tool_name,
87
+ filter_tools_by_name=filter_tools_by_name,
88
+ )
@@ -17,11 +17,15 @@ class CrewAIModelAdapter(ModelAdapter):
17
17
  from crewai import LLM
18
18
 
19
19
  info = common_model.get_model_info() # 确保模型可用
20
+
21
+ # 注意:不在此处设置 stream_options,因为:
22
+ # 1. CrewAI 内部决定是否使用流式请求
23
+ # 2. 在非流式请求中传递 stream_options 不符合 OpenAI API 规范
24
+ # 3. CrewAI 会自行处理 usage 信息
20
25
  return LLM(
21
26
  api_key=info.api_key,
22
27
  model=f"{info.provider or 'openai'}/{info.model}",
23
28
  base_url=info.base_url,
24
29
  default_headers=info.headers,
25
- stream_options={"include_usage": True},
26
30
  # async_client=AsyncClient(headers=info.headers),
27
31
  )
@@ -3,10 +3,11 @@
3
3
  提供与 Google Agent Development Kit 的模型与沙箱工具集成。 / 提供with Google Agent Development Kit 的模型with沙箱工具集成。
4
4
  """
5
5
 
6
- from .builtin import model, sandbox_toolset, toolset
6
+ from .builtin import knowledgebase_toolset, model, sandbox_toolset, toolset
7
7
 
8
8
  __all__ = [
9
9
  "model",
10
10
  "toolset",
11
11
  "sandbox_toolset",
12
+ "knowledgebase_toolset",
12
13
  ]
@@ -8,6 +8,9 @@ from typing import Any, Callable, List, Optional, Union
8
8
 
9
9
  from typing_extensions import Unpack
10
10
 
11
+ from agentrun.integration.builtin import (
12
+ knowledgebase_toolset as _knowledgebase_toolset,
13
+ )
11
14
  from agentrun.integration.builtin import model as _model
12
15
  from agentrun.integration.builtin import ModelArgs
13
16
  from agentrun.integration.builtin import sandbox_toolset as _sandbox_toolset
@@ -63,3 +66,23 @@ def sandbox_toolset(
63
66
  config=config,
64
67
  sandbox_idle_timeout_seconds=sandbox_idle_timeout_seconds,
65
68
  ).to_google_adk(prefix=prefix)
69
+
70
+
71
+ def knowledgebase_toolset(
72
+ knowledge_base_names: List[str],
73
+ *,
74
+ prefix: Optional[str] = None,
75
+ modify_tool_name: Optional[Callable[[Tool], Tool]] = None,
76
+ filter_tools_by_name: Optional[Callable[[str], bool]] = None,
77
+ config: Optional[Config] = None,
78
+ ) -> List[Any]:
79
+ """将知识库检索封装为 Google ADK 工具列表。 / Google ADK Built-in Integration Functions"""
80
+
81
+ return _knowledgebase_toolset(
82
+ knowledge_base_names=knowledge_base_names,
83
+ config=config,
84
+ ).to_google_adk(
85
+ prefix=prefix,
86
+ modify_tool_name=modify_tool_name,
87
+ filter_tools_by_name=filter_tools_by_name,
88
+ )
@@ -34,10 +34,13 @@ class GoogleADKModelAdapter(ModelAdapter):
34
34
 
35
35
  info = common_model.get_model_info()
36
36
 
37
+ # 注意:不在此处设置 stream_options,因为:
38
+ # 1. Google ADK 内部决定是否使用流式请求
39
+ # 2. 在非流式请求中传递 stream_options 不符合 OpenAI API 规范
40
+ # 3. Google ADK 会自行处理 usage 信息
37
41
  return LiteLlm(
38
42
  model=f"{info.provider or 'openai'}/{info.model}",
39
43
  api_base=info.base_url,
40
44
  api_key=info.api_key,
41
45
  extra_headers=info.headers,
42
- stream_options={"include_usage": True},
43
46
  )
@@ -20,11 +20,12 @@ from agentrun.integration.langgraph.agent_converter import (
20
20
  AgentRunConverter,
21
21
  ) # 向后兼容
22
22
 
23
- from .builtin import model, sandbox_toolset, toolset
23
+ from .builtin import knowledgebase_toolset, model, sandbox_toolset, toolset
24
24
 
25
25
  __all__ = [
26
26
  "AgentRunConverter",
27
27
  "model",
28
28
  "toolset",
29
29
  "sandbox_toolset",
30
+ "knowledgebase_toolset",
30
31
  ]
@@ -8,6 +8,9 @@ from typing import Any, Callable, List, Optional, Union
8
8
 
9
9
  from typing_extensions import Unpack
10
10
 
11
+ from agentrun.integration.builtin import (
12
+ knowledgebase_toolset as _knowledgebase_toolset,
13
+ )
11
14
  from agentrun.integration.builtin import model as _model
12
15
  from agentrun.integration.builtin import ModelArgs
13
16
  from agentrun.integration.builtin import sandbox_toolset as _sandbox_toolset
@@ -69,3 +72,23 @@ def sandbox_toolset(
69
72
  modify_tool_name=modify_tool_name,
70
73
  filter_tools_by_name=filter_tools_by_name,
71
74
  )
75
+
76
+
77
+ def knowledgebase_toolset(
78
+ knowledge_base_names: List[str],
79
+ *,
80
+ prefix: Optional[str] = None,
81
+ modify_tool_name: Optional[Callable[[Tool], Tool]] = None,
82
+ filter_tools_by_name: Optional[Callable[[str], bool]] = None,
83
+ config: Optional[Config] = None,
84
+ ) -> List[Any]:
85
+ """将知识库检索封装为 LangChain ``StructuredTool`` 列表。 / LangChain Built-in Integration Functions"""
86
+
87
+ return _knowledgebase_toolset(
88
+ knowledge_base_names=knowledge_base_names,
89
+ config=config,
90
+ ).to_langchain(
91
+ prefix=prefix,
92
+ modify_tool_name=modify_tool_name,
93
+ filter_tools_by_name=filter_tools_by_name,
94
+ )
@@ -25,11 +25,12 @@
25
25
  """
26
26
 
27
27
  from .agent_converter import AgentRunConverter
28
- from .builtin import model, sandbox_toolset, toolset
28
+ from .builtin import knowledgebase_toolset, model, sandbox_toolset, toolset
29
29
 
30
30
  __all__ = [
31
31
  "AgentRunConverter",
32
32
  "model",
33
33
  "toolset",
34
34
  "sandbox_toolset",
35
+ "knowledgebase_toolset",
35
36
  ]
@@ -8,6 +8,9 @@ from typing import Any, Callable, List, Optional, Union
8
8
 
9
9
  from typing_extensions import Unpack
10
10
 
11
+ from agentrun.integration.builtin import (
12
+ knowledgebase_toolset as _knowledgebase_toolset,
13
+ )
11
14
  from agentrun.integration.builtin import model as _model
12
15
  from agentrun.integration.builtin import ModelArgs
13
16
  from agentrun.integration.builtin import sandbox_toolset as _sandbox_toolset
@@ -63,3 +66,23 @@ def sandbox_toolset(
63
66
  config=config,
64
67
  sandbox_idle_timeout_seconds=sandbox_idle_timeout_seconds,
65
68
  ).to_langgraph(prefix=prefix)
69
+
70
+
71
+ def knowledgebase_toolset(
72
+ knowledge_base_names: List[str],
73
+ *,
74
+ prefix: Optional[str] = None,
75
+ modify_tool_name: Optional[Callable[[Tool], Tool]] = None,
76
+ filter_tools_by_name: Optional[Callable[[str], bool]] = None,
77
+ config: Optional[Config] = None,
78
+ ) -> List[Any]:
79
+ """将知识库检索封装为 LangGraph ``StructuredTool`` 列表。 / LangGraph Built-in Integration Functions"""
80
+
81
+ return _knowledgebase_toolset(
82
+ knowledge_base_names=knowledge_base_names,
83
+ config=config,
84
+ ).to_langgraph(
85
+ prefix=prefix,
86
+ modify_tool_name=modify_tool_name,
87
+ filter_tools_by_name=filter_tools_by_name,
88
+ )