agentkit-sdk-python 0.1.5__tar.gz → 0.1.6__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 (184) hide show
  1. agentkit_sdk_python-0.1.6/MANIFEST.in +2 -0
  2. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/PKG-INFO +1 -1
  3. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/simple_app/simple_app_handlers.py +57 -31
  4. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/simple_app/telemetry.py +44 -14
  5. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/client/base_client.py +2 -4
  6. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/identity/auth.py +14 -0
  7. agentkit_sdk_python-0.1.6/agentkit/knowledge/knowledge.py +108 -0
  8. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/knowledge/knowledge_all_types.py +69 -71
  9. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/mcp/mcp.py +4 -68
  10. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/mcp/mcp_all_types.py +302 -504
  11. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/memory/__init__.py +0 -2
  12. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/memory/memory.py +4 -94
  13. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/memory/memory_all_types.py +114 -123
  14. agentkit_sdk_python-0.1.6/agentkit/runtime/runtime_all_types.py +518 -0
  15. agentkit_sdk_python-0.1.6/agentkit/runtime/runtime_v1.py +192 -0
  16. agentkit_sdk_python-0.1.6/agentkit/toolkit/__init__.py +35 -0
  17. agentkit_sdk_python-0.1.6/agentkit/toolkit/cli/__main__.py +23 -0
  18. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_build.py +32 -20
  19. agentkit_sdk_python-0.1.6/agentkit/toolkit/cli/cli_config.py +404 -0
  20. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_deploy.py +19 -18
  21. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_destroy.py +8 -11
  22. agentkit_sdk_python-0.1.6/agentkit/toolkit/cli/cli_init.py +289 -0
  23. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_invoke.py +117 -53
  24. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_launch.py +25 -2
  25. agentkit_sdk_python-0.1.6/agentkit/toolkit/cli/cli_status.py +148 -0
  26. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/utils.py +14 -0
  27. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/__init__.py +45 -4
  28. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/auto_prompt.py +142 -11
  29. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/config.py +228 -20
  30. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/config_handler.py +36 -12
  31. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/config_validator.py +89 -1
  32. agentkit_sdk_python-0.1.6/agentkit/toolkit/config/constants.py +38 -0
  33. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/dataclass_utils.py +29 -1
  34. agentkit_sdk_python-0.1.6/agentkit/toolkit/config/deploy_config.py +15 -0
  35. agentkit_sdk_python-0.1.6/agentkit/toolkit/config/docker_build_config.py +75 -0
  36. agentkit_sdk_python-0.1.6/agentkit/toolkit/config/global_config.py +281 -0
  37. agentkit_sdk_python-0.1.6/agentkit/toolkit/config/global_config_resolver.py +120 -0
  38. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/workflow_configs.py +12 -3
  39. agentkit_sdk_python-0.1.5/agentkit/version.py → agentkit_sdk_python-0.1.6/agentkit/toolkit/consts.py +1 -1
  40. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/__init__.py +46 -0
  41. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/build/base_builder.py +20 -0
  42. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/deploy/base_deployer.py +20 -0
  43. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/field_mapper.py +288 -0
  44. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/__init__.py +29 -0
  45. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/agent_file_info.py +55 -0
  46. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/build_result.py +62 -0
  47. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/deploy_result.py +66 -0
  48. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/init_result.py +176 -0
  49. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/invoke_result.py +84 -0
  50. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/lifecycle_result.py +49 -0
  51. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/models/status_result.py +76 -0
  52. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/__init__.py +29 -0
  53. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/agent_parser_service.py +214 -0
  54. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/base_service.py +150 -0
  55. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/build_service.py +104 -0
  56. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/deploy_service.py +97 -0
  57. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/init_service.py +762 -0
  58. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/invoke_service.py +113 -0
  59. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/lifecycle_service.py +220 -0
  60. agentkit_sdk_python-0.1.6/agentkit/toolkit/core/services/status_service.py +144 -0
  61. agentkit_sdk_python-0.1.6/agentkit/toolkit/integrations/builder/local_docker_builder.py +298 -0
  62. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/builder/ve_core_pipeline_builder.py +209 -28
  63. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/container.py +2 -2
  64. agentkit_sdk_python-0.1.6/agentkit/toolkit/integrations/dockerfile/__init__.py +20 -0
  65. agentkit_sdk_python-0.1.6/agentkit/toolkit/integrations/dockerfile/manager.py +434 -0
  66. agentkit_sdk_python-0.1.6/agentkit/toolkit/integrations/dockerfile/metadata.py +271 -0
  67. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/runner/ve_agentkit_runner.py +55 -15
  68. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/utils/project_archiver.py +4 -0
  69. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/ve_code_pipeline.py +306 -5
  70. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/ve_iam.py +2 -2
  71. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/basic.py +14 -0
  72. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/basic_stream.py +14 -0
  73. agentkit_sdk_python-0.1.6/agentkit/toolkit/resources/samples/customer_support_assistant.py +17 -0
  74. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/simple_a2a_veadk.py +14 -0
  75. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/simple_app_veadk.py +14 -0
  76. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/simple_mcp_veadk.py +14 -0
  77. agentkit_sdk_python-0.1.6/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 +55 -0
  78. {agentkit_sdk_python-0.1.5/agentkit/toolkit/resources/templates → agentkit_sdk_python-0.1.6/agentkit/toolkit/resources/templates/python}/Dockerfile.j2 +12 -1
  79. agentkit_sdk_python-0.1.6/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 +74 -0
  80. agentkit_sdk_python-0.1.6/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 +104 -0
  81. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/__init__.py +89 -0
  82. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/builder.py +80 -0
  83. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/client.py +503 -0
  84. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/config.py +585 -0
  85. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/deployer.py +71 -0
  86. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/initializer.py +130 -0
  87. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/invoker.py +89 -0
  88. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/lifecycle.py +172 -0
  89. agentkit_sdk_python-0.1.6/agentkit/toolkit/sdk/status.py +75 -0
  90. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/workflows/__init__.py +5 -5
  91. agentkit_sdk_python-0.1.6/agentkit/toolkit/workflows/base.py +160 -0
  92. agentkit_sdk_python-0.1.5/agentkit/toolkit/workflows/hybird_local_ve_workflow_v1.py → agentkit_sdk_python-0.1.6/agentkit/toolkit/workflows/hybird_local_ve_workflow.py +260 -87
  93. agentkit_sdk_python-0.1.6/agentkit/toolkit/workflows/local_workflow.py +447 -0
  94. agentkit_sdk_python-0.1.6/agentkit/toolkit/workflows/models.py +168 -0
  95. agentkit_sdk_python-0.1.6/agentkit/toolkit/workflows/progress.py +328 -0
  96. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/workflows/ve_agentkit_workflow.py +190 -62
  97. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/tools/tools.py +70 -4
  98. agentkit_sdk_python-0.1.6/agentkit/tools/tools_all_types.py +398 -0
  99. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/credential.py +14 -0
  100. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/ve_sign.py +47 -6
  101. agentkit_sdk_python-0.1.6/agentkit/version.py +15 -0
  102. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/PKG-INFO +1 -1
  103. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/SOURCES.txt +41 -3
  104. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/pyproject.toml +1 -1
  105. agentkit_sdk_python-0.1.5/MANIFEST.in +0 -9
  106. agentkit_sdk_python-0.1.5/agentkit/knowledge/knowledge.py +0 -203
  107. agentkit_sdk_python-0.1.5/agentkit/runtime/runtime_all_types.py +0 -624
  108. agentkit_sdk_python-0.1.5/agentkit/runtime/runtime_v1.py +0 -178
  109. agentkit_sdk_python-0.1.5/agentkit/toolkit/cli/__main__.py +0 -7
  110. agentkit_sdk_python-0.1.5/agentkit/toolkit/cli/cli_config.py +0 -170
  111. agentkit_sdk_python-0.1.5/agentkit/toolkit/cli/cli_init.py +0 -364
  112. agentkit_sdk_python-0.1.5/agentkit/toolkit/cli/cli_status.py +0 -53
  113. agentkit_sdk_python-0.1.5/agentkit/toolkit/config/constants.py +0 -18
  114. agentkit_sdk_python-0.1.5/agentkit/toolkit/config/deploy_config.py +0 -1
  115. agentkit_sdk_python-0.1.5/agentkit/toolkit/consts.py +0 -1
  116. agentkit_sdk_python-0.1.5/agentkit/toolkit/core/build/__init__.py +0 -13
  117. agentkit_sdk_python-0.1.5/agentkit/toolkit/core/build/base_builder.py +0 -6
  118. agentkit_sdk_python-0.1.5/agentkit/toolkit/core/deploy/__init__.py +0 -13
  119. agentkit_sdk_python-0.1.5/agentkit/toolkit/core/deploy/base_deployer.py +0 -6
  120. agentkit_sdk_python-0.1.5/agentkit/toolkit/integrations/builder/local_docker_builder.py +0 -163
  121. agentkit_sdk_python-0.1.5/agentkit/toolkit/resources/samples/customer_support_assistant.py +0 -3
  122. agentkit_sdk_python-0.1.5/agentkit/toolkit/workflows/base.py +0 -87
  123. agentkit_sdk_python-0.1.5/agentkit/toolkit/workflows/local_workflow_v1.py +0 -262
  124. agentkit_sdk_python-0.1.5/agentkit/tools/tools_all_types.py +0 -337
  125. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/LICENSE +0 -0
  126. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/README.md +0 -0
  127. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/__init__.py +0 -0
  128. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/__init__.py +0 -0
  129. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/a2a_app/__init__.py +0 -0
  130. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/a2a_app/a2a_app.py +0 -0
  131. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/a2a_app/telemetry.py +0 -0
  132. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/agent_server_app/__init__.py +0 -0
  133. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/agent_server_app/agent_server_app.py +0 -0
  134. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/base_app.py +0 -0
  135. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/mcp_app/__init__.py +0 -0
  136. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/mcp_app/mcp_app.py +0 -0
  137. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/mcp_app/telemetry.py +0 -0
  138. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/simple_app/__init__.py +0 -0
  139. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/simple_app/simple_app.py +0 -0
  140. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/apps/utils.py +0 -0
  141. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/client/__init__.py +0 -0
  142. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/identity/__init__.py +0 -0
  143. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/knowledge/__init__.py +0 -0
  144. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/mcp/__init__.py +0 -0
  145. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/runtime/__init__.py +0 -0
  146. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/runtime/runtime.py +0 -0
  147. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/runtime/types.py +0 -0
  148. {agentkit_sdk_python-0.1.5/agentkit/toolkit → agentkit_sdk_python-0.1.6/agentkit/toolkit/cli}/__init__.py +0 -0
  149. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli.py +0 -0
  150. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/cli/cli_version.py +0 -0
  151. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/build_config.py +0 -0
  152. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/common_config.py +0 -0
  153. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/config_manager.py +0 -0
  154. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/config/utils.py +0 -0
  155. {agentkit_sdk_python-0.1.5/agentkit/toolkit/cli → agentkit_sdk_python-0.1.6/agentkit/toolkit/core/build}/__init__.py +0 -0
  156. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/core/build/cloud_builder.py +0 -0
  157. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/core/build/local_builder.py +0 -0
  158. {agentkit_sdk_python-0.1.5/agentkit/toolkit/core → agentkit_sdk_python-0.1.6/agentkit/toolkit/core/deploy}/__init__.py +0 -0
  159. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/core/deploy/cloud_deployer.py +0 -0
  160. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/core/deploy/local_deployer.py +0 -0
  161. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/__init__.py +0 -0
  162. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/builder/__init__.py +0 -0
  163. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/builder/base.py +0 -0
  164. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/runner/__init__.py +0 -0
  165. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/runner/base.py +0 -0
  166. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/runner/local_docker_runner.py +0 -0
  167. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/services/__init__.py +0 -0
  168. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/services/cr_service.py +0 -0
  169. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/services/tos_service.py +0 -0
  170. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/utils/__init__.py +0 -0
  171. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/integrations/ve_cr.py +0 -0
  172. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/samples/financial_analyst.py +0 -0
  173. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 +0 -0
  174. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/tools/__init__.py +0 -0
  175. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/__init__.py +0 -0
  176. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/logging_config.py +0 -0
  177. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/misc.py +0 -0
  178. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/request.py +0 -0
  179. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit/utils/template_utils.py +0 -0
  180. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/dependency_links.txt +0 -0
  181. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/entry_points.txt +0 -0
  182. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/requires.txt +0 -0
  183. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/agentkit_sdk_python.egg-info/top_level.txt +0 -0
  184. {agentkit_sdk_python-0.1.5 → agentkit_sdk_python-0.1.6}/setup.cfg +0 -0
@@ -0,0 +1,2 @@
1
+ # Include all resource files recursively
2
+ recursive-include agentkit/toolkit/resources *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentkit-sdk-python
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Python SDK for transforming any AI agent into a production-ready application. Framework-agnostic primitives for runtime, memory, authentication, and tools with volcengine-managed infrastructure.
5
5
  Author-email: Yaozheng Fang <fangyozheng@gmail.com>, Guodong Li <cu.eric.lee@gmail.com>, Xiangrui Cheng <innsdcc@gmail.com>
6
6
  License: Apache License
@@ -26,6 +26,8 @@ from starlette.responses import JSONResponse, Response, StreamingResponse
26
26
 
27
27
  from agentkit.apps.simple_app.telemetry import telemetry
28
28
  from agentkit.apps.utils import safe_serialize_to_json_string
29
+ from opentelemetry import context as context_api
30
+ from opentelemetry import trace
29
31
 
30
32
  logger = logging.getLogger("agentkit." + __name__)
31
33
 
@@ -45,37 +47,41 @@ class InvokeHandler(BaseHandler):
45
47
  logger.error("Invoke handler function is not set")
46
48
  return Response(status_code=404)
47
49
 
48
- with telemetry.tracer.start_as_current_span(name="invocation") as span:
49
- exception = None
50
- try:
51
- payload, headers, result = await self._process_invoke(request)
52
- if inspect.isgenerator(result):
53
- logger.info("Returning streaming response (generator)")
54
- return StreamingResponse(
55
- self._sync_stream_with_error_handling(result),
56
- media_type="text/event-stream",
57
- )
58
- elif inspect.isasyncgen(result):
59
- logger.info("Returning streaming response (async generator)")
60
- return StreamingResponse(
61
- self._stream_with_error_handling(result),
62
- media_type="text/event-stream",
63
- )
64
-
65
- safe_json_string = safe_serialize_to_json_string(result)
66
- except Exception as e:
67
- logger.error("Invoke handler function failed: %s", e)
68
- exception = e
69
- raise e
70
- finally:
71
- # TODO: error with stream
72
- # handler trace span and metrics
73
- try:
74
- telemetry.trace_agent(
75
- self.func, span, payload, headers, safe_json_string, exception
76
- )
77
- except Exception as e:
78
- _ = e
50
+ span = telemetry.tracer.start_span(name="agentkit_invocation")
51
+ ctx = trace.set_span_in_context(span)
52
+ context_api.attach(ctx)
53
+
54
+ try:
55
+ payload, headers, result = await self._process_invoke(request)
56
+
57
+ # set trace attributes
58
+ telemetry.trace_agent(self.func, span, payload, headers)
59
+
60
+ if inspect.isgenerator(result):
61
+ logger.info("Returning streaming response (generator)")
62
+ return StreamingResponse(
63
+ self._sync_stream_with_error_handling(result),
64
+ media_type="text/event-stream",
65
+ )
66
+
67
+ elif inspect.isasyncgen(result):
68
+ logger.info("Returning streaming response (async generator)")
69
+ return StreamingResponse(
70
+ self._stream_with_error_handling(result),
71
+ media_type="text/event-stream",
72
+ )
73
+
74
+ logger.info("Returning non-streaming response")
75
+ safe_json_string = safe_serialize_to_json_string(result)
76
+ telemetry.trace_agent_finish(
77
+ safe_json_string, None
78
+ )
79
+ except Exception as e:
80
+ logger.error("Invoke handler function failed: %s", e)
81
+ telemetry.trace_agent_finish(
82
+ "", e
83
+ )
84
+ raise e
79
85
 
80
86
  return Response(safe_json_string, media_type="application/json")
81
87
 
@@ -133,10 +139,14 @@ class InvokeHandler(BaseHandler):
133
139
 
134
140
  def _sync_stream_with_error_handling(self, generator):
135
141
  """Wrap sync generator to handle errors and convert to SSE format."""
142
+ exception = None
143
+ last_value = ""
136
144
  try:
137
145
  for value in generator:
146
+ last_value = value
138
147
  yield self._convert_to_sse(value)
139
148
  except Exception as e:
149
+ exception = e
140
150
  logger.exception("Error in sync streaming")
141
151
  error_event = {
142
152
  "error": str(e),
@@ -144,13 +154,23 @@ class InvokeHandler(BaseHandler):
144
154
  "message": "An error occurred during streaming",
145
155
  }
146
156
  yield self._convert_to_sse(error_event)
157
+ finally:
158
+ # finish trace span and record metrics
159
+ result = safe_serialize_to_json_string(last_value)
160
+ telemetry.trace_agent_finish(
161
+ result, exception
162
+ )
147
163
 
148
164
  async def _stream_with_error_handling(self, generator):
149
165
  """Wrap async generator to handle errors and convert to SSE format."""
166
+ exception = None
167
+ last_value = ""
150
168
  try:
151
169
  async for value in generator:
170
+ last_value = value
152
171
  yield self._convert_to_sse(value)
153
172
  except Exception as e:
173
+ exception = e
154
174
  logger.exception("Error in async streaming")
155
175
  error_event = {
156
176
  "error": str(e),
@@ -158,6 +178,12 @@ class InvokeHandler(BaseHandler):
158
178
  "message": "An error occurred during streaming",
159
179
  }
160
180
  yield self._convert_to_sse(error_event)
181
+ finally:
182
+ # finish trace span and record metrics
183
+ result = safe_serialize_to_json_string(last_value)
184
+ telemetry.trace_agent_finish(
185
+ result, exception
186
+ )
161
187
 
162
188
 
163
189
  class PingHandler(BaseHandler):
@@ -15,6 +15,7 @@
15
15
 
16
16
  import logging
17
17
  import time
18
+ import traceback
18
19
  from typing import Callable
19
20
 
20
21
  from opentelemetry import trace
@@ -45,6 +46,28 @@ _GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS = [
45
46
 
46
47
  logger = logging.getLogger("agentkit." + __name__)
47
48
 
49
+
50
+ def dont_throw(func):
51
+ """
52
+ A decorator that wraps the passed in function and logs exceptions instead of throwing them.
53
+
54
+ @param func: The function to wrap
55
+ @return: The wrapper function
56
+ """
57
+
58
+ def wrapper(*args, **kwargs):
59
+ try:
60
+ return func(*args, **kwargs)
61
+ except Exception as e:
62
+ logger.error(
63
+ "Agentkit failed to trace in %s, error: %s",
64
+ func.__name__,
65
+ traceback.format_exc(),
66
+ )
67
+
68
+ return wrapper
69
+
70
+
48
71
  class Telemetry:
49
72
  def __init__(self):
50
73
  self.tracer = get_tracer("agentkit.simple_app")
@@ -56,14 +79,13 @@ class Telemetry:
56
79
  explicit_bucket_boundaries_advisory=_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS,
57
80
  )
58
81
 
82
+ @dont_throw
59
83
  def trace_agent(
60
84
  self,
61
85
  func: Callable,
62
86
  span: Span,
63
87
  payload: dict,
64
88
  headers: dict,
65
- func_result: str,
66
- exception: Exception,
67
89
  ) -> None:
68
90
  """Get current span and set required attributes."""
69
91
 
@@ -92,22 +114,30 @@ class Telemetry:
92
114
 
93
115
  span.set_attribute(key="gen_ai.input", value=safe_serialize_to_json_string(payload))
94
116
 
95
- span.set_attribute(key="gen_ai.output", value=func_result)
96
-
97
117
  span.set_attribute(key="gen_ai.span.kind", value="workflow")
98
118
  span.set_attribute(key="gen_ai.operation.name", value="invoke_agent")
99
119
  span.set_attribute(key="gen_ai.operation.type", value="agent")
100
- attributes={"gen_ai_operation_name": "invoke_agent", "gen_ai_operation_type": "agent"}
101
-
102
- if exception:
103
- self.handle_exception(span, exception)
104
- attributes["error_type"] = exception.__class__.__name__
105
-
106
- # record latency metrics
107
- if hasattr(span, "start_time") and self.latency_histogram:
108
- duration = (time.time_ns() - span.start_time) / 1e9 # type: ignore
109
- self.latency_histogram.record(duration, attributes)
110
120
 
121
+ @dont_throw
122
+ def trace_agent_finish(
123
+ self,
124
+ func_result: str,
125
+ exception: Exception,
126
+ ) -> None:
127
+ span = trace.get_current_span()
128
+
129
+ if span and span.is_recording():
130
+ span.set_attribute(key="gen_ai.output", value=func_result)
131
+ attributes={"gen_ai_operation_name": "invoke_agent", "gen_ai_operation_type": "agent"}
132
+ if exception:
133
+ self.handle_exception(span, exception)
134
+ attributes["error_type"] = exception.__class__.__name__
135
+
136
+ # record latency metrics
137
+ if hasattr(span, "start_time") and self.latency_histogram:
138
+ duration = (time.time_ns() - span.start_time) / 1e9 # type: ignore
139
+ self.latency_histogram.record(duration, attributes)
140
+ span.end()
111
141
 
112
142
  @staticmethod
113
143
  def handle_exception(span: trace.Span, exception: Exception) -> None:
@@ -113,8 +113,8 @@ class BaseAgentkitClient(Service):
113
113
  region=self.region,
114
114
  session_token=self.session_token,
115
115
  ),
116
- connection_timeout=5,
117
- socket_timeout=5,
116
+ connection_timeout=30,
117
+ socket_timeout=30,
118
118
  scheme="https",
119
119
  )
120
120
 
@@ -191,7 +191,6 @@ class BaseAgentkitClient(Service):
191
191
  Exception: If API call fails or returns an error
192
192
  """
193
193
  # Make API call
194
- print(f"request action: {api_action}, body: {json.dumps(request.model_dump(by_alias=True, exclude_none=True))}")
195
194
  try:
196
195
  res = self.json(
197
196
  api=api_action,
@@ -207,7 +206,6 @@ class BaseAgentkitClient(Service):
207
206
  # Parse response
208
207
  response_data = json.loads(res)
209
208
 
210
- print("response_data:", response_data)
211
209
  # Check for errors
212
210
  metadata = response_data.get("ResponseMetadata", {})
213
211
  if metadata.get("Error"):
@@ -1,3 +1,17 @@
1
+ # Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
1
15
  import asyncio
2
16
  import os
3
17
  from functools import wraps
@@ -0,0 +1,108 @@
1
+ # Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from typing import Dict
16
+
17
+ from agentkit.client import BaseAgentkitClient
18
+ from agentkit.utils import get_logger
19
+
20
+ # 导入自动生成的类型
21
+ from agentkit.knowledge.knowledge_all_types import (
22
+ ListKnowledgeBasesRequest,
23
+ ListKnowledgeBasesResponse,
24
+ AddKnowledgeBaseRequest,
25
+ AddKnowledgeBaseResponse,
26
+ GetKnowledgeConnectionInfoRequest,
27
+ GetKnowledgeConnectionInfoResponse,
28
+ DeleteKnowledgeBaseRequest,
29
+ DeleteKnowledgeBaseResponse,
30
+ )
31
+
32
+ logger = get_logger(__name__)
33
+
34
+
35
+ class AgentkitKnowledge(BaseAgentkitClient):
36
+ """AgentKit Knowledge Base Management Service"""
37
+
38
+ # Define all API actions for this service
39
+ API_ACTIONS: Dict[str, str] = {
40
+ "ListKnowledgeBases": "ListKnowledgeBases",
41
+ "AddKnowledgeBase": "AddKnowledgeBase",
42
+ "GetKnowledgeConnectionInfo": "GetKnowledgeConnectionInfo",
43
+ "DeleteKnowledgeBase": "DeleteKnowledgeBase",
44
+ }
45
+
46
+ def __init__(
47
+ self,
48
+ access_key: str = "",
49
+ secret_key: str = "",
50
+ region: str = "",
51
+ session_token: str = "",
52
+ ) -> None:
53
+ super().__init__(
54
+ access_key=access_key,
55
+ secret_key=secret_key,
56
+ region=region,
57
+ session_token=session_token,
58
+ service_name="knowledge",
59
+ )
60
+
61
+ def list_knowledge_bases(
62
+ self, request: ListKnowledgeBasesRequest
63
+ ) -> ListKnowledgeBasesResponse:
64
+ """List all knowledge bases from Volcengine."""
65
+ return self._invoke_api(
66
+ api_action="ListKnowledgeBases",
67
+ request=request,
68
+ response_type=ListKnowledgeBasesResponse,
69
+ )
70
+
71
+ def add_knowledge_base(
72
+ self, request: AddKnowledgeBaseRequest
73
+ ) -> AddKnowledgeBaseResponse:
74
+ """Add a new knowledge base to Volcengine."""
75
+ return self._invoke_api(
76
+ api_action="AddKnowledgeBase",
77
+ request=request,
78
+ response_type=AddKnowledgeBaseResponse,
79
+ )
80
+
81
+ def get_knowledge_connection_info(
82
+ self, request: GetKnowledgeConnectionInfoRequest
83
+ ) -> GetKnowledgeConnectionInfoResponse:
84
+ """Get connection information for a specific knowledge base."""
85
+ return self._invoke_api(
86
+ api_action="GetKnowledgeConnectionInfo",
87
+ request=request,
88
+ response_type=GetKnowledgeConnectionInfoResponse,
89
+ )
90
+
91
+ def delete_knowledge_base(
92
+ self, request: DeleteKnowledgeBaseRequest
93
+ ) -> DeleteKnowledgeBaseResponse:
94
+ """Delete a knowledge base from Volcengine."""
95
+ return self._invoke_api(
96
+ api_action="DeleteKnowledgeBase",
97
+ request=request,
98
+ response_type=DeleteKnowledgeBaseResponse,
99
+ )
100
+
101
+
102
+ if __name__ == "__main__":
103
+ # list knowledge bases
104
+ knowledge = AgentkitKnowledge()
105
+ req = ListKnowledgeBasesRequest(page_number=1, page_size=10)
106
+ res = knowledge.list_knowledge_bases(req)
107
+ print(res)
108
+
@@ -22,24 +22,9 @@ from pydantic import BaseModel, Field
22
22
 
23
23
 
24
24
  # Data Types
25
- class KnowledgeBasesForListKnowledgeBases(BaseModel):
26
- create_time: Optional[str] = Field(default=None, alias="CreateTime")
27
- description: Optional[str] = Field(default=None, alias="Description")
28
- knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId")
29
- last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime")
30
- name: Optional[str] = Field(default=None, alias="Name")
31
- provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId")
32
- provider_type: Optional[str] = Field(default=None, alias="ProviderType")
33
- status: Optional[str] = Field(default=None, alias="Status")
34
-
35
- model_config = {
36
- "populate_by_name": True,
37
- "arbitrary_types_allowed": True
38
- }
39
-
40
-
41
25
  class KnowledgeBasesForAddKnowledgeBase(BaseModel):
42
26
  knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId")
27
+ message: Optional[str] = Field(default=None, alias="Message")
43
28
  provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId")
44
29
  provider_type: Optional[str] = Field(default=None, alias="ProviderType")
45
30
  status: Optional[str] = Field(default=None, alias="Status")
@@ -57,8 +42,6 @@ class ConnectionInfosForGetKnowledgeConnectionInfo(BaseModel):
57
42
  expire_at: Optional[str] = Field(default=None, alias="ExpireAt")
58
43
  extra_config: Optional[str] = Field(default=None, alias="ExtraConfig")
59
44
  region: Optional[str] = Field(default=None, alias="Region")
60
- vpc_id: Optional[str] = Field(default=None, alias="VpcId")
61
- vpc_name: Optional[str] = Field(default=None, alias="VpcName")
62
45
 
63
46
  model_config = {
64
47
  "populate_by_name": True,
@@ -66,41 +49,15 @@ class ConnectionInfosForGetKnowledgeConnectionInfo(BaseModel):
66
49
  }
67
50
 
68
51
 
69
- # ListKnowledgeBases - Request
70
- class FiltersItem(BaseModel):
52
+ class KnowledgeBasesForListKnowledgeBases(BaseModel):
53
+ create_time: Optional[str] = Field(default=None, alias="CreateTime")
54
+ description: Optional[str] = Field(default=None, alias="Description")
55
+ knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId")
56
+ last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime")
71
57
  name: Optional[str] = Field(default=None, alias="Name")
72
- name_contains: Optional[str] = Field(default=None, alias="NameContains")
73
- values: Optional[list[str]] = Field(default=None, alias="Values")
74
-
75
- model_config = {
76
- "populate_by_name": True,
77
- "arbitrary_types_allowed": True
78
- }
79
-
80
-
81
- class ListKnowledgeBasesRequest(BaseModel):
82
- create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter")
83
- create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore")
84
- max_results: Optional[int] = Field(default=None, alias="MaxResults")
85
- next_token: Optional[str] = Field(default=None, alias="NextToken")
86
- page_number: Optional[int] = Field(default=None, alias="PageNumber")
87
- page_size: Optional[int] = Field(default=None, alias="PageSize")
88
- update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter")
89
- update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore")
90
- filters: Optional[list[FiltersItem]] = Field(default=None, alias="Filters")
91
-
92
- model_config = {
93
- "populate_by_name": True,
94
- "arbitrary_types_allowed": True
95
- }
96
-
97
-
98
- # ListKnowledgeBases - Response
99
- class ListKnowledgeBasesResponse(BaseModel):
100
- knowledge_bases: Optional[list[KnowledgeBasesForListKnowledgeBases]] = Field(default=None, alias="KnowledgeBases")
101
- page_number: Optional[int] = Field(default=None, alias="PageNumber")
102
- page_size: Optional[int] = Field(default=None, alias="PageSize")
103
- total_count: Optional[int] = Field(default=None, alias="TotalCount")
58
+ provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId")
59
+ provider_type: Optional[str] = Field(default=None, alias="ProviderType")
60
+ status: Optional[str] = Field(default=None, alias="Status")
104
61
 
105
62
  model_config = {
106
63
  "populate_by_name": True,
@@ -110,10 +67,10 @@ class ListKnowledgeBasesResponse(BaseModel):
110
67
 
111
68
  # AddKnowledgeBase - Request
112
69
  class KnowledgeBasesItem(BaseModel):
113
- name: str = Field(..., alias="Name")
114
- provider_knowledge_id: str = Field(..., alias="ProviderKnowledgeId")
115
- provider_type: str = Field(..., alias="ProviderType")
116
- description: Optional[str] = Field(default=None, alias="Description")
70
+ name: str = Field(..., alias="Name", description="待导入知识库名称。 - 参数 - N:表示知识库的序号,取值范围:1~10。 - 多个字段名之间用&分隔。 取值: - Viking知识库需填入CollectionName。")
71
+ provider_knowledge_id: str = Field(..., alias="ProviderKnowledgeId", description="待导入知识库ID。 - 参数 - N:表示知识库的序号,取值范围:1~10。 - 多个字段名之间用&分隔。 取值: - Viking知识库需使用ResourceId。")
72
+ provider_type: str = Field(..., alias="ProviderType", description="待导入知识库平台类型。 - 参数 - N:表示知识库的序号,取值范围:1~10。 - 多个字段名之间用&分隔。 取值: - VIKINGDB_KNOWLEDGE:Viking知识库。")
73
+ description: Optional[str] = Field(default=None, alias="Description", description="待导入知识库的描述。 - 参数 - N:表示知识库的序号,取值范围:1~10。 - 不填默认为空。 - 多个字段名之间用&分隔。")
117
74
 
118
75
  model_config = {
119
76
  "populate_by_name": True,
@@ -122,8 +79,8 @@ class KnowledgeBasesItem(BaseModel):
122
79
 
123
80
 
124
81
  class AddKnowledgeBaseRequest(BaseModel):
125
- client_token: Optional[str] = Field(default=None, alias="ClientToken")
126
- project_name: Optional[str] = Field(default=None, alias="ProjectName")
82
+ client_token: Optional[str] = Field(default=None, alias="ClientToken", description="保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。 取值:仅支持ASCII字符,且不能超过64个字符。")
83
+ project_name: Optional[str] = Field(default=None, alias="ProjectName", description="知识库所属项目名称,不填默认为default。")
127
84
  knowledge_bases: Optional[list[KnowledgeBasesItem]] = Field(default=None, alias="KnowledgeBases")
128
85
 
129
86
  model_config = {
@@ -134,7 +91,7 @@ class AddKnowledgeBaseRequest(BaseModel):
134
91
 
135
92
  # AddKnowledgeBase - Response
136
93
  class AddKnowledgeBaseResponse(BaseModel):
137
- knowledge_bases: Optional[list[KnowledgeBasesForAddKnowledgeBase]] = Field(default=None, alias="KnowledgeBases")
94
+ knowledge_bases: Optional[list[KnowledgeBasesForAddKnowledgeBase]] = Field(default=None, alias="KnowledgeBases", description="知识库信息。")
138
95
 
139
96
  model_config = {
140
97
  "populate_by_name": True,
@@ -144,7 +101,7 @@ class AddKnowledgeBaseResponse(BaseModel):
144
101
 
145
102
  # GetKnowledgeConnectionInfo - Request
146
103
  class GetKnowledgeConnectionInfoRequest(BaseModel):
147
- knowledge_id: str = Field(..., alias="KnowledgeId")
104
+ knowledge_id: str = Field(..., alias="KnowledgeId", description="知识库ID。")
148
105
 
149
106
  model_config = {
150
107
  "populate_by_name": True,
@@ -154,12 +111,14 @@ class GetKnowledgeConnectionInfoRequest(BaseModel):
154
111
 
155
112
  # GetKnowledgeConnectionInfo - Response
156
113
  class GetKnowledgeConnectionInfoResponse(BaseModel):
157
- connection_infos: Optional[list[ConnectionInfosForGetKnowledgeConnectionInfo]] = Field(default=None, alias="ConnectionInfos")
158
- error_message: Optional[str] = Field(default=None, alias="ErrorMessage")
159
- knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId")
160
- provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId")
161
- provider_type: Optional[str] = Field(default=None, alias="ProviderType")
162
- status: Optional[str] = Field(default=None, alias="Status")
114
+ connection_infos: Optional[list[ConnectionInfosForGetKnowledgeConnectionInfo]] = Field(default=None, alias="ConnectionInfos", description="知识库的连接信息。")
115
+ knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId", description="知识库ID。")
116
+ message: Optional[str] = Field(default=None, alias="Message", description="状态消息,包含额外的状态信息或错误描述。")
117
+ name: Optional[str] = Field(default=None, alias="Name", description="知识库名称。")
118
+ project_name: Optional[str] = Field(default=None, alias="ProjectName", description="已导入的知识库所属项目名称。")
119
+ provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId", description="已导入的知识库所属项目ID。")
120
+ provider_type: Optional[str] = Field(default=None, alias="ProviderType", description="已导入的知识库平台类型。取值: - VIKINGDB_KNOWLEDGE:Viking知识库。")
121
+ status: Optional[str] = Field(default=None, alias="Status", description="知识库状态,取值: - Importing:导入中。 - ImportFailed:导入失败。 - Ready:成功。 - Deleting:删除中。 - DeleteFailed:删除失败。 - Deleted:已删除。 - Error:错误。")
163
122
 
164
123
  model_config = {
165
124
  "populate_by_name": True,
@@ -169,7 +128,7 @@ class GetKnowledgeConnectionInfoResponse(BaseModel):
169
128
 
170
129
  # DeleteKnowledgeBase - Request
171
130
  class DeleteKnowledgeBaseRequest(BaseModel):
172
- knowledge_id: str = Field(..., alias="KnowledgeId")
131
+ knowledge_id: str = Field(..., alias="KnowledgeId", description="知识库ID。")
173
132
 
174
133
  model_config = {
175
134
  "populate_by_name": True,
@@ -179,10 +138,49 @@ class DeleteKnowledgeBaseRequest(BaseModel):
179
138
 
180
139
  # DeleteKnowledgeBase - Response
181
140
  class DeleteKnowledgeBaseResponse(BaseModel):
182
- knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId")
183
- provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId")
184
- provider_type: Optional[str] = Field(default=None, alias="ProviderType")
185
- request_id: Optional[str] = Field(default=None, alias="RequestId")
141
+ knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId", description="知识库ID。")
142
+ provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId", description="导入的知识库ID。")
143
+ provider_type: Optional[str] = Field(default=None, alias="ProviderType", description="导入的知识库平台类型。取值: - VIKINGDB_KNOWLEDGE:Viking知识库。")
144
+
145
+ model_config = {
146
+ "populate_by_name": True,
147
+ "arbitrary_types_allowed": True
148
+ }
149
+
150
+
151
+ # ListKnowledgeBases - Request
152
+ class FiltersItem(BaseModel):
153
+ name: Optional[str] = Field(default=None, alias="Name", description="精确过滤的字段名。 - 参数 - N:表示过滤条件的序号,取值范围:1~10。 - 多个字段名之间用&分隔,为“或”的关系。 - 取值: - knowledge_id:知识库ID。 - name:知识库名称。 - status:知识库状态。 - provider_type:导入的知识库平台类型。 ::: tip 当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。 :::")
154
+ name_contains: Optional[str] = Field(default=None, alias="NameContains", description="模糊过滤的字段名。 - 参数 - N:表示过滤条件的序号,取值范围:1~10。 - 多个字段名之间用&分隔,为“或”的关系。 - 取值: - knowledge_id:知识库ID。 - name:知识库名称。 - status:知识库状态。 - provider_type:导入的知识库平台类型。 ::: tip 当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。 :::")
155
+ values: Optional[list[str]] = Field(default=None, alias="Values", description="过滤字段的值。 - 参数 - N:表示过滤条件的序号,取值范围:1~10。 - 多个字段名之间用&分隔。 当过滤字段为provider_type时,取值: - VIKINGDB_KNOWLEDGE:Viking知识库。")
156
+
157
+ model_config = {
158
+ "populate_by_name": True,
159
+ "arbitrary_types_allowed": True
160
+ }
161
+
162
+
163
+ class ListKnowledgeBasesRequest(BaseModel):
164
+ create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter", description="筛选该时间点后创建的知识库。(RFC3339格式)")
165
+ create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore", description="筛选该时间点前创建的知识库。(RFC3339格式)")
166
+ max_results: Optional[int] = Field(default=None, alias="MaxResults", description="分页查询时设置的每页行数。 - 最小值:1。 - 最大值:100。 - 默认值:10。")
167
+ next_token: Optional[str] = Field(default=None, alias="NextToken", description="分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。")
168
+ update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter", description="筛选该时间点后更新的知识库。(RFC3339格式)")
169
+ update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore", description="筛选该时间点前更新的知识库。(RFC3339格式)")
170
+ filters: Optional[list[FiltersItem]] = Field(default=None, alias="Filters")
171
+
172
+ model_config = {
173
+ "populate_by_name": True,
174
+ "arbitrary_types_allowed": True
175
+ }
176
+
177
+
178
+ # ListKnowledgeBases - Response
179
+ class ListKnowledgeBasesResponse(BaseModel):
180
+ knowledge_bases: Optional[list[KnowledgeBasesForListKnowledgeBases]] = Field(default=None, alias="KnowledgeBases", description="符合要求的知识库信息。")
181
+ page_number: Optional[int] = Field(default=None, alias="PageNumber")
182
+ page_size: Optional[int] = Field(default=None, alias="PageSize")
183
+ total_count: Optional[int] = Field(default=None, alias="TotalCount", description="符合要求的知识库总个数。")
186
184
 
187
185
  model_config = {
188
186
  "populate_by_name": True,