diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b1a7c14..0000000 --- a/.gitignore +++ /dev/null @@ -1,185 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -.idea/ - -# vscode -.vscode/ -# Windsurf -.windsurf - -# python package -uv.lock - -# VitePress related files (security concern - keep Markdown docs in repo) -docs/package.json -docs/package-lock.json -docs/node_modules/ - -# local test files -test-agents/* -tos_doc_example -agentkit*.yaml -Dockerfile -Dockerfile-base -local_build.py -local_docs/ -local_test/ - -# deprecated files -*deprecated* \ No newline at end of file diff --git a/.gitleaks.toml b/.gitleaks.toml deleted file mode 100644 index ff7c413..0000000 --- a/.gitleaks.toml +++ /dev/null @@ -1,76 +0,0 @@ -[extend] -useDefault = true - -[[rules]] -id = "aklt-key-pattern" -description = "AKLT key pattern" -regex = '''AKLT\w{40,70}''' - -[[rules]] -id = "akap-key-pattern" -description = "AKAP key pattern" -regex = '''AKAP\w{40,70}''' - -[[rules]] -id = "akip-key-pattern" -description = "AKIP key pattern" -regex = '''AKI\w{40,70}''' - -[[rules]] -id = "token-transformer-id-pattern" -description = "Tokenizer/Transformer/Token ID patterns" -regex = '''(tokenizer|transformer|token_id|tokenid|attention_head).{0,20}''' - -[[rules]] -id = "aws-style-key-pattern" -description = "AWS-style key pattern" -regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}''' - -[[rules]] -id = "alibaba-ltai-pattern" -description = "Alibaba LTAI key pattern" -regex = '''(LTAI)[a-z0-9]{20}''' - -[[rules]] -id = "aktp-key-pattern" -description = "AKTP key pattern" -regex = '''AKTP\w{40,70}''' - -[[rules]] -id = "app-id-pattern" -description = "App ID patterns" -regex = '''([^*<\s|:>]{0,7})(app_id|appid)([^]()!<>;/@&,]{0,10}[(=:]\s{0,6}["']{0,1}[0-9]{6,32}["']{0,1})''' - -[[rules]] -id = "byted-org-domains" -description = "byted.org domains" -regex = '''.{0,15}\.?byted.org.{0,20}''' - -[[rules]] -id = "bytedance-net-domains" -description = "bytedance.net domains" -regex = '''.{0,15}\.?bytedance.net.{0,20}''' - -[[rules]] -id = "feishu-cn-domains" -description = "bytedance.feishu.cn domains" -regex = '''.{0,20}.bytedance\.feishu\.cn.{0,50}''' - -[[rules]] -id = "larkoffice-com-domains" -description = "bytedance.larkoffice.com domains" -regex = '''.{0,20}.bytedance\.larkoffice\.com.{0,50}''' - -[[rules]] -id = "private-ip-10-range" -description = "Private IP address pattern (10.x.x.x)" -regex = '''(10\.\d{1,3}\.\d{1,3}\.\d{1,3})''' - - -[[rules]] -id = "empty-env-key-pattern" -description = "Empty environment variables with KEY pattern" -regex = '''os\.environ\[".*?KEY"\]\s*=\s*".+"''' - -[allowlist] -paths = ["requirements.txt"] \ No newline at end of file diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 44d1a3d..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: v0.11.12 - hooks: - # Run the linter. - - id: ruff-check - types_or: [ python, pyi ] - args: [ --fix ] - # Run the formatter. - - id: ruff-format - types_or: [ python, pyi ] -- repo: https://github.com/gitleaks/gitleaks - rev: v8.24.2 - hooks: - - id: gitleaks \ No newline at end of file diff --git a/.python-version b/.python-version deleted file mode 100644 index e4fba21..0000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.12 diff --git a/404.html b/404.html new file mode 100644 index 0000000..6b8a569 --- /dev/null +++ b/404.html @@ -0,0 +1,23 @@ + + + + + + 404 | AgentKit + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 39831d7..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -# Include all resource files recursively -recursive-include agentkit/toolkit/resources * \ No newline at end of file diff --git a/README.html b/README.html new file mode 100644 index 0000000..620e276 --- /dev/null +++ b/README.html @@ -0,0 +1,36 @@ + + + + + + AgentKit 文档 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit 文档

本目录包含 AgentKit SDK 和 CLI 的完整文档。

本地开发

安装依赖

bash
npm install

启动开发服务器

bash
npm run docs:dev

访问 http://localhost:5173 查看文档站点。

构建生产版本

bash
npm run docs:build

构建结果位于 .vitepress/dist 目录。

预览生产版本

bash
npm run docs:preview

目录结构

docs/
+├── .vitepress/          # VitePress 配置
+│   └── config.js        # 站点配置文件
+├── content/             # 文档内容
+│   ├── 1.introduction/  # 入门指南
+│   ├── 2.agentkit-sdk/  # SDK 文档
+│   └── 3.agentkit-cli/  # CLI 文档
+├── public/              # 静态资源
+│   └── images/          # 图片文件
+├── index.md             # 首页
+└── package.json         # 项目配置

文档规范

  • 所有 Markdown 文件使用中文编写
  • 代码示例使用英文注释
  • 图片存放在 public/images/ 目录
  • 使用相对路径引用图片:![描述](../../public/images/xxx.png)

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index c7d8d10..0000000 --- a/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Agentkit Python SDK - -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. - -## Installation - -### Stable Release (Recommended) - -Install the latest stable version: - -```bash -pip install agentkit-sdk-python -``` - -### Development/Pre-release Version - -For testing new features or bug fixes before they're officially released: - -```bash -# Install the latest pre-release version -pip install --pre agentkit-sdk-python - -# Or install a specific development version -pip install agentkit-sdk-python==1.0.0.dev1 -``` - -**Note**: Development versions may contain bugs and are not recommended for production use. diff --git a/agentkit/__init__.py b/agentkit/__init__.py deleted file mode 100644 index dcd5ed4..0000000 --- a/agentkit/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Note: BaseAgentkitClient and ApiConfig are internal infrastructure classes. -# Users should use the high-level service clients instead: -# - from agentkit.memory import AgentkitMemory -# - from agentkit.knowledge import AgentkitKnowledge -# - from agentkit.mcp import AgentkitMCP -# - from agentkit.runtime import AgentkitRuntime -# - from agentkit.tools import AgentkitTools - -__all__ = [] diff --git a/agentkit/apps/__init__.py b/agentkit/apps/__init__.py deleted file mode 100644 index 816050d..0000000 --- a/agentkit/apps/__init__.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from agentkit.apps.a2a_app.a2a_app import AgentkitA2aApp - from agentkit.apps.agent_server_app.agent_server_app import AgentkitAgentServerApp - from agentkit.apps.mcp_app.mcp_app import AgentkitMCPApp - from agentkit.apps.simple_app.simple_app import AgentkitSimpleApp - - -def __getattr__( - name, -) -> ( - type["AgentkitA2aApp"] - | type["AgentkitMCPApp"] - | type["AgentkitSimpleApp"] - | type["AgentkitAgentServerApp"] -): - if name == "AgentkitA2aApp": - from agentkit.apps.a2a_app.a2a_app import AgentkitA2aApp - - return AgentkitA2aApp - if name == "AgentkitMCPApp": - from agentkit.apps.mcp_app.mcp_app import AgentkitMCPApp - - return AgentkitMCPApp - if name == "AgentkitSimpleApp": - from agentkit.apps.simple_app.simple_app import AgentkitSimpleApp - - return AgentkitSimpleApp - if name == "AgentkitAgentServerApp": - from agentkit.apps.agent_server_app.agent_server_app import ( - AgentkitAgentServerApp, - ) - - return AgentkitAgentServerApp - raise AttributeError(f"module 'agentkit.apps' has no attribute '{name}'") - - -__all__ = [ - "AgentkitA2aApp", - "AgentkitMCPApp", - "AgentkitSimpleApp", - "AgentkitAgentServerApp", -] diff --git a/agentkit/apps/a2a_app/__init__.py b/agentkit/apps/a2a_app/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/apps/a2a_app/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/apps/a2a_app/a2a_app.py b/agentkit/apps/a2a_app/a2a_app.py deleted file mode 100644 index 7e71193..0000000 --- a/agentkit/apps/a2a_app/a2a_app.py +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from typing import Callable, override - -import uvicorn -from a2a.server.agent_execution import AgentExecutor -from a2a.server.agent_execution.context import RequestContext -from a2a.server.apps import A2AStarletteApplication -from a2a.server.events.event_queue import EventQueue -from a2a.server.request_handlers import DefaultRequestHandler -from a2a.server.tasks import InMemoryTaskStore -from a2a.server.tasks.task_store import TaskStore -from a2a.types import AgentCard - -from agentkit.apps.base_app import BaseAgentkitApp -from agentkit.apps.a2a_app.telemetry import telemetry - -logger = logging.getLogger(__name__) - - -def _wrap_agent_executor_execute_func(execute_func: Callable) -> Callable: - async def wrapper(*args, **kwargs): - executor_instance: AgentExecutor = args[0] - context: RequestContext = args[1] - event_queue: EventQueue = args[2] - - with telemetry.tracer.start_as_current_span(name="a2a_invocation") as span: - exception = None - try: - result = await execute_func( - executor_instance, context=context, event_queue=event_queue - ) - - except Exception as e: - logger.error("Invoke agent execute function failed: %s", e) - exception = e - raise e - finally: - # handler trace span and metrics - telemetry.trace_a2a_agent( - execute_func, - span, - context, - result, - exception, - ) - - return result - - return wrapper - - -class AgentkitA2aApp(BaseAgentkitApp): - def __init__(self) -> None: - super().__init__() - - self._agent_executor: AgentExecutor | None = None - self._task_store: TaskStore | None = None - - def agent_executor(self, **kwargs) -> Callable: - """Wrap an AgentExecutor class, init it, then bind it to the app instance.""" - - def wrapper(cls: type) -> type[AgentExecutor]: - if not issubclass(cls, AgentExecutor): - raise TypeError( - f"{cls.__name__} must inherit from `a2a.server.agent_execution.AgentExecutor`" - ) - - if self._agent_executor: - raise RuntimeError("An executor is already bound to this app instance.") - - # Wrap the execute method for intercepting context and event_queue - cls.execute = _wrap_agent_executor_execute_func(cls.execute) - - # Initialize and bind the executor instance - self._agent_executor = cls(**kwargs) - - return cls - - return wrapper - - def task_store(self, **kwargs) -> Callable: - """Wrap a TaskStore class, init it, then bind it to the app instance.""" - - def wrapper(cls: type) -> type[TaskStore]: - if not issubclass(cls, TaskStore): - raise TypeError( - f"{cls.__name__} must inherit from `a2a.server.tasks.task_store.TaskStore`" - ) - - if self._task_store: - raise RuntimeError( - "A task store is already bound to this app instance." - ) - - self._task_store = cls(**kwargs) - return cls - - return wrapper - - @override - def run(self, agent_card: AgentCard, host: str, port: int = 8000): - if not self._agent_executor: - raise RuntimeError( - "At least one executor should be provided via `@agent_executor(...)`." - ) - if not self._task_store: - logger.warning( - "No task store provided. You can provide a task store via `@task_store(...)`. Using in-memory task store instead." - ) - self._task_store = InMemoryTaskStore() - - a2a_app = A2AStarletteApplication( - agent_card=agent_card, - http_handler=DefaultRequestHandler( - agent_executor=self._agent_executor, task_store=self._task_store - ), - ).build() - - uvicorn.run(a2a_app, host=host, port=port) diff --git a/agentkit/apps/a2a_app/telemetry.py b/agentkit/apps/a2a_app/telemetry.py deleted file mode 100644 index a332cba..0000000 --- a/agentkit/apps/a2a_app/telemetry.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import logging -import time -from typing import Callable - -from opentelemetry import trace -from opentelemetry.trace import get_tracer -from opentelemetry.metrics import get_meter -from opentelemetry.trace.span import Span -from a2a.server.agent_execution.context import RequestContext -from google.adk.a2a.converters.request_converter import _get_user_id - -from agentkit.apps.utils import safe_serialize_to_json_string - -_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS = [ - 0.01, - 0.02, - 0.04, - 0.08, - 0.16, - 0.32, - 0.64, - 1.28, - 2.56, - 5.12, - 10.24, - 20.48, - 40.96, - 81.92, - 163.84, -] - -logger = logging.getLogger("agentkit." + __name__) - -class Telemetry: - def __init__(self): - self.tracer = get_tracer("agentkit.a2a_app") - self.meter = get_meter("agentkit.a2a_app") - self.latency_histogram = self.meter.create_histogram( - name="agentkit_runtime_operation_latency", - description="operation latency", - unit="s", - explicit_bucket_boundaries_advisory=_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS, - ) - - - def trace_a2a_agent( - self, - func: Callable, - span: Span, - request: RequestContext, - result: any, - exception: Exception, - ) -> None: - """Get current span and set required attributes.""" - trace_id = span.get_span_context().trace_id - span_id = span.get_span_context().span_id - logger.debug(f"Set attributes for span with trace_id={trace_id}, span_id={span_id}") - - # =============================== - # Set attributes for current span - # =============================== - - span.set_attribute(key="gen_ai.system", value="agentkit") - - span.set_attribute(key="gen_ai.func_name", value=func.__name__) - - # TODO: get user_id and session_id, output from event queue - session_id = request.context_id - if session_id: - span.set_attribute(key="gen_ai.session.id", value=session_id) - user_id = _get_user_id(request) - if user_id: - span.set_attribute(key="gen_ai.user.id", value=user_id) - - span.set_attribute(key="gen_ai.input", value=safe_serialize_to_json_string(request.message.parts)) - - span.set_attribute(key="gen_ai.span.kind", value="a2a_agent") - span.set_attribute(key="gen_ai.operation.name", value="invoke_agent") - span.set_attribute(key="gen_ai.operation.type", value="a2a_agent") - attributes={"gen_ai_operation_name": "invoke_agent", "gen_ai_operation_type": "a2a_agent"} - - if exception: - self.handle_exception(span, exception) - attributes["error_type"] = exception.__class__.__name__ - - # record latency metrics - if hasattr(span, "start_time") and self.latency_histogram: - duration = (time.time_ns() - span.start_time) / 1e9 # type: ignore - self.latency_histogram.record(duration, attributes) - - @staticmethod - def handle_exception(span: trace.Span, exception: Exception) -> None: - status = trace.Status( - status_code=trace.StatusCode.ERROR, - # Follow the format in OTEL SDK for description, see: - # https://github.com/open-telemetry/opentelemetry-python/blob/2b9dcfc5d853d1c10176937a6bcaade54cda1a31/opentelemetry-api/src/opentelemetry/trace/__init__.py#L588 # noqa E501 - description=f"{type(exception).__name__}: {exception}", - ) - span.set_status(status) - span.record_exception(exception) - - -telemetry = Telemetry() - diff --git a/agentkit/apps/agent_server_app/__init__.py b/agentkit/apps/agent_server_app/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/apps/agent_server_app/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/apps/agent_server_app/agent_server_app.py b/agentkit/apps/agent_server_app/agent_server_app.py deleted file mode 100644 index e354b64..0000000 --- a/agentkit/apps/agent_server_app/agent_server_app.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import override - -import uvicorn -from google.adk.agents.base_agent import BaseAgent -from google.adk.artifacts.in_memory_artifact_service import ( - InMemoryArtifactService, -) -from google.adk.auth.credential_service.in_memory_credential_service import ( - InMemoryCredentialService, -) -from google.adk.cli.adk_web_server import AdkWebServer -from google.adk.cli.utils.base_agent_loader import BaseAgentLoader -from google.adk.evaluation.local_eval_set_results_manager import ( - LocalEvalSetResultsManager, -) -from google.adk.evaluation.local_eval_sets_manager import LocalEvalSetsManager -from google.adk.memory.in_memory_memory_service import InMemoryMemoryService -from google.adk.sessions.base_session_service import BaseSessionService -from veadk import Agent -from veadk.memory.short_term_memory import ShortTermMemory - -from agentkit.apps.base_app import BaseAgentkitApp - - -class AgentKitAgentLoader(BaseAgentLoader): - def __init__(self, agent: BaseAgent) -> None: - super().__init__() - - self.agent = agent - - @override - def load_agent(self, agent_name: str) -> BaseAgent: - return self.agent - - @override - def list_agents(self) -> list[str]: - return [self.agent.name] - - -class AgentkitAgentServerApp(BaseAgentkitApp): - def __init__( - self, agent: BaseAgent, short_term_memory: BaseSessionService | ShortTermMemory - ) -> None: - super().__init__() - - _artifact_service = InMemoryArtifactService() - _credential_service = InMemoryCredentialService() - - _eval_sets_manager = LocalEvalSetsManager(agents_dir=".") - _eval_set_results_manager = LocalEvalSetResultsManager(agents_dir=".") - - self.server = AdkWebServer( - agent_loader=AgentKitAgentLoader(agent), - session_service=short_term_memory - if isinstance(short_term_memory, BaseSessionService) - else short_term_memory.session_service, - memory_service=agent.long_term_memory - if isinstance(agent, Agent) and agent.long_term_memory - else InMemoryMemoryService(), - artifact_service=_artifact_service, - credential_service=_credential_service, - eval_sets_manager=_eval_sets_manager, - eval_set_results_manager=_eval_set_results_manager, - agents_dir=".", - ) - - self.app = self.server.get_fast_api_app() - - def run(self, host: str, port: int = 8000) -> None: - """Run the app with Uvicorn server.""" - uvicorn.run(self.app, host=host, port=port) diff --git a/agentkit/apps/base_app.py b/agentkit/apps/base_app.py deleted file mode 100644 index e2b0916..0000000 --- a/agentkit/apps/base_app.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from abc import ABC, abstractmethod - - -class BaseAgentkitApp(ABC): - @abstractmethod - def run(self, **kwargs): ... diff --git a/agentkit/apps/mcp_app/__init__.py b/agentkit/apps/mcp_app/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/apps/mcp_app/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/apps/mcp_app/mcp_app.py b/agentkit/apps/mcp_app/mcp_app.py deleted file mode 100644 index 9d9eba5..0000000 --- a/agentkit/apps/mcp_app/mcp_app.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import inspect -import logging -from functools import wraps -from typing import Any, Callable, override - -from fastmcp import FastMCP -from fastmcp.server.server import Transport - -from agentkit.apps.base_app import BaseAgentkitApp -from agentkit.apps.mcp_app.telemetry import telemetry - -logger = logging.getLogger(__name__) - - -class AgentkitMCPApp(BaseAgentkitApp): - def __init__(self) -> None: - super().__init__() - - self._mcp_server = FastMCP("agentkit.mcp_server") - - def tool(self, func: Callable) -> Callable: - if inspect.iscoroutinefunction(func): - - @wraps(func) - async def async_wrapper(*args, **kwargs) -> Any: - # with tracer.start_as_current_span("tool") as span: - with telemetry.tracer.start_as_current_span(name="tool") as span: - exception = None - try: - result = await func(*args, **kwargs) - - except Exception as e: - logger.error("Invoke tool function failed: %s", e) - exception = e - raise e - finally: - # handler trace span and metrics - telemetry.trace_tool( - func, - span, - args, - func_result=result, - operation_type="mcp_tool", - exception=exception, - ) - - return result - - self._mcp_server.tool(async_wrapper) - else: - - @wraps(func) - def sync_wrapper(*args, **kwargs) -> Any: - # with tracer.start_as_current_span("tool") as span: - with telemetry.tracer.start_as_current_span(name="tool") as span: - exception = None - try: - result = func(*args, **kwargs) - except Exception as e: - logger.error("Invoke tool function failed: %s", e) - exception = e - raise e - finally: - telemetry.trace_tool( - func, - span, - args, - func_result=result, - operation_type="mcp_tool", - exception=exception, - ) - return result - - self._mcp_server.tool(sync_wrapper) - - return func - - def agent_as_a_tool(self, func: Callable) -> Callable: - if inspect.iscoroutinefunction(func): - - @wraps(func) - async def async_wrapper(*args, **kwargs) -> Any: - with telemetry.tracer.start_as_current_span(name="tool") as span: - exception = None - try: - result = await func(*args, **kwargs) - except Exception as e: - logger.error("Invoke tool function failed: %s", e) - exception = e - raise e - finally: - telemetry.trace_tool( - func, - span, - args=args, - func_result=result, - operation_type="agent_mcp_tool", - exception=exception, - ) - return result - - self._mcp_server.tool(async_wrapper) - else: - - @wraps(func) - def sync_wrapper(*args, **kwargs) -> Any: - with telemetry.tracer.start_as_current_span(name="tool") as span: - exception = None - try: - result = func(*args, **kwargs) - except Exception as e: - logger.error("Invoke tool function failed: %s", e) - exception = e - raise e - finally: - telemetry.trace_tool( - func, - span, - args, - func_result=result, - operation_type="agent_mcp_tool", - exception=exception, - ) - return result - - self._mcp_server.tool(sync_wrapper) - - return func - - @override - def run( - self, host: str, port: int = 8000, transport: Transport = "streamable-http" - ) -> None: - self._mcp_server.run(host=host, port=port, transport=transport) diff --git a/agentkit/apps/mcp_app/telemetry.py b/agentkit/apps/mcp_app/telemetry.py deleted file mode 100644 index b3c560a..0000000 --- a/agentkit/apps/mcp_app/telemetry.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import logging -import time -from typing import Callable - -from opentelemetry import trace -from opentelemetry.trace import get_tracer -from opentelemetry.metrics import get_meter -from opentelemetry.trace.span import Span - -from agentkit.apps.utils import safe_serialize_to_json_string - -_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS = [ - 0.01, - 0.02, - 0.04, - 0.08, - 0.16, - 0.32, - 0.64, - 1.28, - 2.56, - 5.12, - 10.24, - 20.48, - 40.96, - 81.92, - 163.84, -] - -logger = logging.getLogger("agentkit." + __name__) - -class Telemetry: - def __init__(self): - self.tracer = get_tracer("agentkit.mcp_app") - self.meter = get_meter("agentkit.mcp_app") - self.latency_histogram = self.meter.create_histogram( - name="agentkit_runtime_operation_latency", - description="operation latency", - unit="s", - explicit_bucket_boundaries_advisory=_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS, - ) - - def trace_tool( - self, - func: Callable, - span: Span, - args: dict, - func_result: any, - operation_type: str, - exception: Exception, - ) -> None: - """Get current span and set required attributes.""" - - trace_id = span.get_span_context().trace_id - span_id = span.get_span_context().span_id - - logger.debug(f"Set attributes for span with trace_id={trace_id}, span_id={span_id}") - - # =============================== - # Set attributes for current span - # =============================== - - span.set_attribute(key="gen_ai.system", value="agentkit") - - span.set_attribute(key="gen_ai.func_name", value=func.__name__) - - span.set_attribute(key="gen_ai.input", value=safe_serialize_to_json_string(args)) - safe_result = safe_serialize_to_json_string(func_result) - span.set_attribute(key="gen_ai.output", value=safe_result) - - span.set_attribute(key="gen_ai.span.kind", value="tool") - span.set_attribute(key="gen_ai.operation.name", value="tool") - span.set_attribute(key="gen_ai.operation.type", value=operation_type) - attributes = {"gen_ai_operation_name": "tool", "gen_ai_operation_type": operation_type} - - if exception: - self.handle_exception(span, exception) - attributes["error_type"] = exception.__class__.__name__ - - # record latency metrics - if hasattr(span, "start_time") and self.latency_histogram: - duration = (time.time_ns() - span.start_time) / 1e9 # type: ignore - self.latency_histogram.record(duration, attributes) - - @staticmethod - def handle_exception(span: trace.Span, exception: Exception) -> None: - status = trace.Status( - status_code=trace.StatusCode.ERROR, - # Follow the format in OTEL SDK for description, see: - # https://github.com/open-telemetry/opentelemetry-python/blob/2b9dcfc5d853d1c10176937a6bcaade54cda1a31/opentelemetry-api/src/opentelemetry/trace/__init__.py#L588 # noqa E501 - description=f"{type(exception).__name__}: {exception}", - ) - span.set_status(status) - span.record_exception(exception) - - -telemetry = Telemetry() - diff --git a/agentkit/apps/simple_app/__init__.py b/agentkit/apps/simple_app/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/apps/simple_app/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/apps/simple_app/simple_app.py b/agentkit/apps/simple_app/simple_app.py deleted file mode 100644 index a0d68e9..0000000 --- a/agentkit/apps/simple_app/simple_app.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import inspect -import logging -from typing import Callable, override - -import uvicorn -from starlette.applications import Starlette -from starlette.routing import Route - -from agentkit.apps.base_app import BaseAgentkitApp -from agentkit.apps.simple_app.simple_app_handlers import ( - AsyncTaskHandler, - InvokeHandler, - PingHandler, -) - -logger = logging.getLogger("agentkit." + __name__) - - -class AgentkitSimpleApp(BaseAgentkitApp, Starlette): - def __init__(self) -> None: - self.ping_handler = PingHandler() - self.invoke_handler = InvokeHandler() - self.async_task_handler = AsyncTaskHandler() - - routes = [ - Route("/ping", self.ping_handler.handle, methods=["GET"]), - Route("/health", self.ping_handler.health_check, methods=["GET"]), - Route("/readiness", self.ping_handler.readiness, methods=["GET"]), - Route("/liveness", self.ping_handler.liveness, methods=["GET"]), - Route("/invoke", self.invoke_handler.handle, methods=["POST"]), - ] - - super().__init__(routes=routes) - - def entrypoint(self, func: Callable) -> Callable: - self.invoke_handler.func = func - return func - - def ping(self, func: Callable) -> Callable: - assert len(list(inspect.signature(func).parameters.keys())) == 0, ( - f"Health check function `{func.__name__}` should not receive any arguments." - ) - - self.ping_handler.func = func - return func - - # async def async_task(self, func: Callable) -> Callable: - # if not asyncio.iscoroutinefunction(func): - # raise ValueError("@async_task can only be applied to async functions") - - # async def wrapper(*args, **kwargs): - # task_id = self.async_task_handler.add_async_task(func.__name__) - - # try: - # logger.debug("Starting async task: %s", func.__name__) - # start_time = time.time() - # result = await func(*args, **kwargs) - # duration = time.time() - start_time - # logger.info("Async task completed: %s (%.3fs)", func.__name__, duration) - # return result - # except Exception as e: - # duration = time.time() - start_time - # logger.error( - # "Async task failed: %s (%.3fs) - %s: %s", - # func.__name__, - # duration, - # type(e).__name__, - # e, - # ) - # raise - # finally: - # self.async_task_handler.complete_async_task(task_id) - - # wrapper.__name__ = func.__name__ - # return wrapper - - @override - def run(self, host: str | None, port: int = 8000): - host = host if host else "0.0.0.0" - uvicorn.run(self, host=host, port=port) diff --git a/agentkit/apps/simple_app/simple_app_handlers.py b/agentkit/apps/simple_app/simple_app_handlers.py deleted file mode 100644 index da9bce1..0000000 --- a/agentkit/apps/simple_app/simple_app_handlers.py +++ /dev/null @@ -1,351 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import asyncio -import inspect -import logging -import threading -import time -import uuid -from abc import ABC, abstractmethod -from typing import Any, Callable, Optional, override - -from starlette.requests import Request -from starlette.responses import JSONResponse, Response, StreamingResponse - -from agentkit.apps.simple_app.telemetry import telemetry -from agentkit.apps.utils import safe_serialize_to_json_string -from opentelemetry import context as context_api -from opentelemetry import trace - -logger = logging.getLogger("agentkit." + __name__) - - -class BaseHandler(ABC): - def __init__(self, func: Callable | None = None) -> None: - self.func = func - - @abstractmethod - async def handle(self, request: Request) -> Response: ... - - -class InvokeHandler(BaseHandler): - @override - async def handle(self, request: Request) -> Response | StreamingResponse: - if not self.func: - logger.error("Invoke handler function is not set") - return Response(status_code=404) - - span = telemetry.tracer.start_span(name="agentkit_invocation") - ctx = trace.set_span_in_context(span) - context_api.attach(ctx) - - try: - payload, headers, result = await self._process_invoke(request) - - # set trace attributes - telemetry.trace_agent(self.func, span, payload, headers) - - if inspect.isgenerator(result): - logger.info("Returning streaming response (generator)") - return StreamingResponse( - self._sync_stream_with_error_handling(result), - media_type="text/event-stream", - ) - - elif inspect.isasyncgen(result): - logger.info("Returning streaming response (async generator)") - return StreamingResponse( - self._stream_with_error_handling(result), - media_type="text/event-stream", - ) - - logger.info("Returning non-streaming response") - safe_json_string = safe_serialize_to_json_string(result) - telemetry.trace_agent_finish( - safe_json_string, None - ) - except Exception as e: - logger.error("Invoke handler function failed: %s", e) - telemetry.trace_agent_finish( - "", e - ) - raise e - - return Response(safe_json_string, media_type="application/json") - - async def _process_invoke(self, request: Request) -> tuple[dict, dict, Any]: - """Process different cases of the entrypoint function. - - Handles different signatures of the entrypoint function: - - Cases: - - No input arguments `func()` -> `func()` - - One input arguments - - params[0] == request `func(request)` -> `func(request: Request)` - - params[0] != request `func(foo)` -> `func(payload: dict)` - - More than one input arguments `func(foo, bar, ...)` -> `func(payload: dict, headers: dict)` - """ - if not self.func: - logger.error("Invoke handler function is not set") - return {}, {}, {"message": "Invoke handler function is not set."} - - # parse request - payload: dict = await request.json() - headers: dict = dict(request.headers) - - # parse entrypoint function params - params = list(inspect.signature(self.func).parameters.keys()) - num_params = len(params) - - if num_params == 0: - args = () - elif num_params == 1: - if params[0].lower() == "request": - args = (request,) - else: - args = (payload,) - else: - args = (payload, headers) - - if asyncio.iscoroutinefunction(self.func): - return payload, headers, await self.func(*args) - else: - return payload, headers, self.func(*args) - - def _convert_to_sse(self, obj) -> bytes: - """Convert object to Server-Sent Events format using safe serialization. - - Args: - obj: Object to convert to SSE format - - Returns: - bytes: SSE-formatted data ready for streaming - """ - json_string = safe_serialize_to_json_string(obj) - sse_data = f"data: {json_string}\n\n" - return sse_data.encode("utf-8") - - def _sync_stream_with_error_handling(self, generator): - """Wrap sync generator to handle errors and convert to SSE format.""" - exception = None - last_value = "" - try: - for value in generator: - last_value = value - yield self._convert_to_sse(value) - except Exception as e: - exception = e - logger.exception("Error in sync streaming") - error_event = { - "error": str(e), - "error_type": type(e).__name__, - "message": "An error occurred during streaming", - } - yield self._convert_to_sse(error_event) - finally: - # finish trace span and record metrics - result = safe_serialize_to_json_string(last_value) - telemetry.trace_agent_finish( - result, exception - ) - - async def _stream_with_error_handling(self, generator): - """Wrap async generator to handle errors and convert to SSE format.""" - exception = None - last_value = "" - try: - async for value in generator: - last_value = value - yield self._convert_to_sse(value) - except Exception as e: - exception = e - logger.exception("Error in async streaming") - error_event = { - "error": str(e), - "error_type": type(e).__name__, - "message": "An error occurred during streaming", - } - yield self._convert_to_sse(error_event) - finally: - # finish trace span and record metrics - result = safe_serialize_to_json_string(last_value) - telemetry.trace_agent_finish( - result, exception - ) - - -class PingHandler(BaseHandler): - @override - async def handle(self, request: Request) -> Response: - if not self.func: - logger.error("Ping handler function is not set") - return Response(status_code=404) - - if asyncio.iscoroutinefunction(self.func): - result = await self.func() - else: - result = self.func() - - return JSONResponse(content={"status": result}, media_type="application/json") - - async def health_check(self, request: Request) -> Response: - return JSONResponse( - content={ - "status": "healthy", - "timestamp": time.time(), - "service": "agent-service", - }, - media_type="application/json", - ) - - async def readiness(self, request: Request) -> Response: - """Check if the application is ready to serve requests.""" - # if getattr(app.state, "is_ready", True): - # return "success" - return JSONResponse( - content={ - "status": "success", - "timestamp": time.time(), - "service": "agent-service", - }, - media_type="application/json", - ) - # raise HTTPException( - # status_code=500, - # detail="Application is not ready", - # ) - - async def liveness(self, request: Request) -> Response: - """Check if the application is alive and healthy.""" - # if getattr(app.state, "is_healthy", True): - return JSONResponse( - content={ - "status": "success", - "timestamp": time.time(), - "service": "agent-service", - }, - media_type="application/json", - ) - # raise HTTPException( - # status_code=500, - # detail="Application is not healthy", - # ) - - def _format_ping_status(self, result: str | dict) -> dict: - if isinstance(result, str): - return {"status": result} - elif isinstance(result, dict): - return result - else: - logger.error( - f"Health check function {self.func.__name__} must return `dict` or `str` type." - ) - return {"status": "error", "message": "Invalid response type."} - - -class AsyncTaskHandler(BaseHandler): - def __init__(self, func: Callable | None = None): - super().__init__(func=func) - - self._active_tasks = {} - self._task_counter_lock: threading.Lock = threading.Lock() - - @override - async def handle(self) -> Response: - return Response() - - def get_async_task_info(self) -> dict[str, Any]: - """Get info about running async tasks.""" - running_jobs = [] - for t in self._active_tasks.values(): - try: - running_jobs.append( - { - "name": t.get("name", "unknown"), - "duration": time.time() - t.get("start_time", time.time()), - } - ) - except Exception as e: - logger.warning("Caught exception, continuing...: %s", e) - continue - - return {"active_count": len(self._active_tasks), "running_jobs": running_jobs} - - def add_async_task(self, name: str, metadata: Optional[dict] = None) -> int: - """Register an async task for interactive health tracking. - - This method provides granular control over async task lifecycle, - allowing developers to interactively start tracking tasks for health monitoring. - Use this when you need precise control over when tasks begin and end. - - Args: - name: Human-readable task name for monitoring - metadata: Optional additional task metadata - - Returns: - Task ID for tracking and completion - - Example: - task_id = app.add_async_task("file_processing", {"file": "data.csv"}) - # ... do background work ... - app.complete_async_task(task_id) - """ - with self._task_counter_lock: - task_id = hash(str(uuid.uuid4())) # Generate truly unique hash-based ID - - # Register task start with same structure as @async_task decorator - task_info = {"name": name, "start_time": time.time()} - if metadata: - task_info["metadata"] = metadata - - self._active_tasks[task_id] = task_info - - logger.info("Async task started: %s (ID: %s)", name, task_id) - return task_id - - def complete_async_task(self, task_id: int) -> bool: - """Mark an async task as complete for interactive health tracking. - - This method provides granular control over async task lifecycle, - allowing developers to interactively complete tasks for health monitoring. - Call this when your background work finishes. - - Args: - task_id: Task ID returned from add_async_task - - Returns: - True if task was found and completed, False otherwise - - Example: - task_id = app.add_async_task("file_processing") - # ... do background work ... - completed = app.complete_async_task(task_id) - """ - with self._task_counter_lock: - task_info = self._active_tasks.pop(task_id, None) - if task_info: - task_name = task_info.get("name", "unknown") - duration = time.time() - task_info.get("start_time", time.time()) - - logger.info( - "Async task completed: %s (ID: %s, Duration: %.2fs)", - task_name, - task_id, - duration, - ) - return True - else: - logger.warning("Attempted to complete unknown task ID: %s", task_id) - return False diff --git a/agentkit/apps/simple_app/telemetry.py b/agentkit/apps/simple_app/telemetry.py deleted file mode 100644 index 8b74a00..0000000 --- a/agentkit/apps/simple_app/telemetry.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -import logging -import time -import traceback -from typing import Callable - -from opentelemetry import trace -from opentelemetry.trace import get_tracer -from opentelemetry.metrics import get_meter -from opentelemetry.trace.span import Span - -from agentkit.apps.utils import safe_serialize_to_json_string - -_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS = [ - 0.01, - 0.02, - 0.04, - 0.08, - 0.16, - 0.32, - 0.64, - 1.28, - 2.56, - 5.12, - 10.24, - 20.48, - 40.96, - 81.92, - 163.84, -] - - -logger = logging.getLogger("agentkit." + __name__) - - -def dont_throw(func): - """ - A decorator that wraps the passed in function and logs exceptions instead of throwing them. - - @param func: The function to wrap - @return: The wrapper function - """ - - def wrapper(*args, **kwargs): - try: - return func(*args, **kwargs) - except Exception: - logger.error( - "Agentkit failed to trace in %s, error: %s", - func.__name__, - traceback.format_exc(), - ) - - return wrapper - - -class Telemetry: - def __init__(self): - self.tracer = get_tracer("agentkit.simple_app") - self.meter = get_meter("agentkit.simple_app") - self.latency_histogram = self.meter.create_histogram( - name="agentkit_runtime_operation_latency", - description="operation latency", - unit="s", - explicit_bucket_boundaries_advisory=_GEN_AI_CLIENT_OPERATION_DURATION_BUCKETS, - ) - - @dont_throw - def trace_agent( - self, - func: Callable, - span: Span, - payload: dict, - headers: dict, - ) -> None: - """Get current span and set required attributes.""" - - trace_id = span.get_span_context().trace_id - span_id = span.get_span_context().span_id - - logger.debug(f"Set attributes for span with trace_id={trace_id}, span_id={span_id}") - - # =============================== - # Set attributes for current span - # =============================== - - span.set_attribute(key="gen_ai.system", value="agentkit") - - span.set_attribute(key="gen_ai.func_name", value=func.__name__) - - span.set_attribute( - key="gen_ai.request.headers", value=safe_serialize_to_json_string(headers) - ) - session_id = headers.get("session_id") - if session_id: - span.set_attribute(key="gen_ai.session.id", value=session_id) - user_id = headers.get("user_id") - if user_id: - span.set_attribute(key="gen_ai.user.id", value=user_id) - - span.set_attribute(key="gen_ai.input", value=safe_serialize_to_json_string(payload)) - - span.set_attribute(key="gen_ai.span.kind", value="workflow") - span.set_attribute(key="gen_ai.operation.name", value="invoke_agent") - span.set_attribute(key="gen_ai.operation.type", value="agent") - - @dont_throw - def trace_agent_finish( - self, - func_result: str, - exception: Exception, - ) -> None: - span = trace.get_current_span() - - if span and span.is_recording(): - span.set_attribute(key="gen_ai.output", value=func_result) - attributes={"gen_ai_operation_name": "invoke_agent", "gen_ai_operation_type": "agent"} - if exception: - self.handle_exception(span, exception) - attributes["error_type"] = exception.__class__.__name__ - - # record latency metrics - if hasattr(span, "start_time") and self.latency_histogram: - duration = (time.time_ns() - span.start_time) / 1e9 # type: ignore - self.latency_histogram.record(duration, attributes) - span.end() - - @staticmethod - def handle_exception(span: trace.Span, exception: Exception) -> None: - status = trace.Status( - status_code=trace.StatusCode.ERROR, - # Follow the format in OTEL SDK for description, see: - # https://github.com/open-telemetry/opentelemetry-python/blob/2b9dcfc5d853d1c10176937a6bcaade54cda1a31/opentelemetry-api/src/opentelemetry/trace/__init__.py#L588 # noqa E501 - description=f"{type(exception).__name__}: {exception}", - ) - span.set_status(status) - span.record_exception(exception) - - -telemetry = Telemetry() diff --git a/agentkit/apps/utils.py b/agentkit/apps/utils.py deleted file mode 100644 index 2144ba4..0000000 --- a/agentkit/apps/utils.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -import logging - -logger = logging.getLogger("agentkit." + __name__) - - -def safe_serialize_to_json_string(obj): - """Safely serialize object directly to JSON string with progressive fallback handling. - - This method eliminates double JSON encoding by returning the JSON string directly, - avoiding the test-then-encode pattern that leads to redundant json.dumps() calls. - Used by both streaming and non-streaming responses for consistent behavior. - - Returns: - str: JSON string representation of the object - """ - try: - # First attempt: direct JSON serialization with Unicode support - return json.dumps(obj, ensure_ascii=False) - except (TypeError, ValueError, UnicodeEncodeError): - try: - # Second attempt: convert to string, then JSON encode the string - return json.dumps(str(obj), ensure_ascii=False) - except Exception as e: - # Final fallback: JSON encode error object with ASCII fallback for problematic Unicode - logger.warning("Failed to serialize object: %s: %s", type(e).__name__, e) - error_obj = { - "error": "Serialization failed", - "original_type": type(obj).__name__, - } - return json.dumps(error_obj, ensure_ascii=False) diff --git a/agentkit/client/__init__.py b/agentkit/client/__init__.py deleted file mode 100644 index f838271..0000000 --- a/agentkit/client/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -AgentKit Client Module - -Provides base client infrastructure for all AgentKit and Volcengine services. -""" - -from agentkit.client.base_service_client import BaseServiceClient, ApiConfig -from agentkit.client.base_agentkit_client import BaseAgentkitClient -from agentkit.client.base_iam_client import BaseIAMClient - -__all__ = [ - 'BaseServiceClient', - 'BaseAgentkitClient', - 'BaseIAMClient', - 'ApiConfig', -] diff --git a/agentkit/client/base_agentkit_client.py b/agentkit/client/base_agentkit_client.py deleted file mode 100644 index a127c2a..0000000 --- a/agentkit/client/base_agentkit_client.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Base client for AgentKit services. -Provides common initialization and API invocation logic. -""" - -from typing import Any, Dict, Union - -from agentkit.client.base_service_client import BaseServiceClient, ApiConfig -from agentkit.utils.ve_sign import get_volc_agentkit_host_info - - -class BaseAgentkitClient(BaseServiceClient): - """ - Base client for all AgentKit services. - - This class provides: - 1. Common credential initialization - 2. Unified API invocation logic with error handling - 3. Automatic ApiInfo generation with flexible configuration - - Subclasses should override API_ACTIONS with either: - - Simple dict mapping: {"ActionName": "ActionName"} - - Detailed ApiConfig: {"ActionName": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FActionName", method="GET", path="/custom")} - """ - - # Subclasses should override this with their API action configurations - API_ACTIONS: Dict[str, Union[str, ApiConfig]] = {} - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - service_name: str = "", - ) -> None: - """ - Initialize the AgentKit client. - - Args: - access_key: Volcengine access key - secret_key: Volcengine secret key - region: Volcengine region - session_token: Optional session token - service_name: Service name for logging (e.g., 'knowledge', 'memory') - """ - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name=service_name, - credential_env_prefix='AGENTKIT', - ) - - def _get_service_config(self) -> Dict[str, str]: - """ - Get AgentKit service configuration. - - Returns: - Dictionary with host, api_version, and service - """ - host, api_version, service = get_volc_agentkit_host_info() - return { - 'host': host, - 'api_version': api_version, - 'service': service, - } - - def _get(self, api_action: str, params: Dict[str, Any] = None) -> str: - """Legacy method for GET requests.""" - try: - resp = self.get(api_action, params) - return resp - except Exception as e: - raise Exception(f"Failed to {api_action}: {str(e)}") diff --git a/agentkit/client/base_iam_client.py b/agentkit/client/base_iam_client.py deleted file mode 100644 index 55c1fc2..0000000 --- a/agentkit/client/base_iam_client.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Base client for IAM services. -Uses the same volcengine.base.Service approach as AgentKit services. -""" - -from typing import Dict, Union - -from agentkit.client.base_service_client import BaseServiceClient, ApiConfig - - -class BaseIAMClient(BaseServiceClient): - """ - Base client for IAM services. - - This class provides the same interface as BaseAgentkitClient but for IAM services: - 1. Common credential initialization - 2. Unified API invocation logic with error handling - 3. Automatic ApiInfo generation with flexible configuration - - Subclasses should override API_ACTIONS with either: - - Simple dict mapping: {"ActionName": "ActionName"} - - Detailed ApiConfig: {"ActionName": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FActionName", method="GET", path="/custom")} - """ - - # Subclasses should override this with their API action configurations - API_ACTIONS: Dict[str, Union[str, ApiConfig]] = {} - - # IAM service specific configuration - IAM_API_VERSION = "2018-01-01" - IAM_SERVICE_CODE = "iam" - IAM_HOST ="open.volcengineapi.com" - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - service_name: str = "iam", - ) -> None: - """ - Initialize the IAM client. - - Args: - access_key: Volcengine access key - secret_key: Volcengine secret key - region: Volcengine region - session_token: Optional session token - service_name: Service name for logging - """ - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name=service_name, - credential_env_prefix='IAM', - ) - - def _get_service_config(self) -> Dict[str, str]: - """ - Get IAM service configuration. - - Returns: - Dictionary with host, api_version, and service - """ - return { - 'host': self.IAM_HOST, - 'api_version': self.IAM_API_VERSION, - 'service': self.IAM_SERVICE_CODE, - } diff --git a/agentkit/client/base_service_client.py b/agentkit/client/base_service_client.py deleted file mode 100644 index a65d85c..0000000 --- a/agentkit/client/base_service_client.py +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Base service client that provides common implementation for all Volcengine services. -This is the top-level base class for all service clients. -""" - -import json -from typing import Any, Dict, Type, TypeVar, Union, Optional -from dataclasses import dataclass - -from volcengine.ApiInfo import ApiInfo -from volcengine.base.Service import Service -from volcengine.Credentials import Credentials -from volcengine.ServiceInfo import ServiceInfo - -from agentkit.utils.ve_sign import get_volc_ak_sk_region - -T = TypeVar('T') - - -@dataclass -class ApiConfig: - """Configuration for a single API endpoint.""" - action: str - method: str = "POST" - path: str = "/" - form: Optional[Dict[str, Any]] = None - header: Optional[Dict[str, Any]] = None - - def __post_init__(self): - if self.form is None: - self.form = {} - if self.header is None: - self.header = {} - - -class BaseServiceClient(Service): - """ - Base class for all Volcengine service clients. - - This class provides: - 1. Unified interface for all Volcengine services (AgentKit, IAM, etc.) - 2. Common implementation using volcengine.base.Service - 3. Shared credential management and API invocation logic - - Subclasses should: - 1. Override API_ACTIONS with their API action configurations - 2. Implement _get_service_config() to provide service-specific configuration - """ - - # Subclasses should override this with their API action configurations - API_ACTIONS: Dict[str, Union[str, ApiConfig]] = {} - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - service_name: str = "", - credential_env_prefix: str = "", - ) -> None: - """ - Initialize the service client. - - Args: - access_key: Volcengine access key - secret_key: Volcengine secret key - region: Volcengine region - session_token: Optional session token - service_name: Service name for logging - credential_env_prefix: Environment variable prefix for credentials (e.g., 'AGENTKIT', 'IAM') - """ - # Validate and get credentials - if not any([access_key, secret_key, region]): - access_key, secret_key, region = get_volc_ak_sk_region(credential_env_prefix) - else: - if not all([access_key, secret_key, region]): - raise ValueError( - f"Error creating {service_name} instance: " - "missing access key, secret key or region" - ) - - # Store credentials and service info - self.access_key = access_key - self.secret_key = secret_key - self.region = region - self.session_token = session_token - self.service_name = service_name - - # Get service-specific configuration from subclass - config = self._get_service_config() - self.host = config['host'] - self.api_version = config['api_version'] - self.service = config['service'] - - # Create ServiceInfo - self.service_info = ServiceInfo( - host=self.host, - header={'Accept': 'application/json'}, - credentials=Credentials( - ak=self.access_key, - sk=self.secret_key, - service=self.service, - region=self.region, - session_token=self.session_token, - ), - connection_timeout=30, - socket_timeout=30, - scheme="https", - ) - - # Generate ApiInfo for all actions - self.api_info = self._build_api_info() - - # Initialize parent Service class - Service.__init__(self, service_info=self.service_info, api_info=self.api_info) - - def _get_service_config(self) -> Dict[str, str]: - """ - Get service-specific configuration. - - Subclasses must override this method to provide: - - host: API endpoint host - - api_version: API version string - - service: Service name for signing - - Returns: - Dictionary with 'host', 'api_version', and 'service' keys - """ - raise NotImplementedError("Subclasses must implement _get_service_config()") - - def _build_api_info(self) -> Dict[str, ApiInfo]: - """ - Build ApiInfo dictionary from API_ACTIONS. - - Supports two formats: - 1. Simple string: {"ListItems": "ListItems"} -> POST to / with Action query param - 2. ApiConfig: {"GetItem": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetItem", method="GET", path="/items")} - - Returns: - Dictionary mapping action names to ApiInfo objects - """ - api_info = {} - for action_key, action_config in self.API_ACTIONS.items(): - # If it's a simple string, use default POST configuration - if isinstance(action_config, str): - api_info[action_key] = ApiInfo( - method="POST", - path="/", - query={"Action": action_config, "Version": self.api_version}, - form={}, - header={}, - ) - # If it's an ApiConfig, use the detailed configuration - elif isinstance(action_config, ApiConfig): - api_info[action_key] = ApiInfo( - method=action_config.method, - path=action_config.path, - query={"Action": action_config.action, "Version": self.api_version}, - form=action_config.form, - header=action_config.header, - ) - else: - raise ValueError( - f"Invalid API_ACTIONS configuration for '{action_key}': " - f"expected str or ApiConfig, got {type(action_config)}" - ) - return api_info - - def _invoke_api( - self, - api_action: str, - request: Any, - response_type: Type[T], - params: Dict[str, Any] = None, - ) -> T: - """ - Unified API invocation with error handling. - - Args: - api_action: The API action name (e.g., 'GetUser', 'ListRuntimes') - request: The request object (Pydantic model) - response_type: The response type to parse into - params: Additional query parameters - - Returns: - Typed response object - - Raises: - Exception: If API call fails or returns an error - """ - # Make API call - try: - res = self.json( - api=api_action, - params=params or {}, - body=json.dumps(request.model_dump(by_alias=True, exclude_none=True)) - ) - except Exception as e: - raise Exception(f"Failed to {api_action}: {str(e)}") - - if not res: - raise Exception(f"Empty response from {api_action} request.") - - # Parse response - response_data = json.loads(res) - - # Check for errors - metadata = response_data.get("ResponseMetadata", {}) - if metadata.get("Error"): - error_msg = metadata.get("Error", {}).get("Message", "Unknown error") - raise Exception(f"Failed to {api_action}: {error_msg}") - - # Return typed response - return response_type(**response_data.get('Result', {})) diff --git a/agentkit/identity/__init__.py b/agentkit/identity/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/identity/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/identity/auth.py b/agentkit/identity/auth.py deleted file mode 100644 index 49ee3dd..0000000 --- a/agentkit/identity/auth.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import asyncio -import os -from functools import wraps -from typing import Any, Callable - -from agentkit.utils.credential import get_credential_from_vefaas_iam -from agentkit.utils.ve_sign import ve_request - - -def requires_api_key(*, provider_name: str, into: str = "api_key"): - """Decorator that fetches an API key before calling the decorated function. - - Args: - provider_name: The credential provider name - into: Parameter name to inject the API key into - - Returns: - Decorator function - """ - - def decorator(func: Callable) -> Callable: - def _get_api_key() -> str: - access_key = os.getenv("VOLCENGINE_ACCESS_KEY") - secret_key = os.getenv("VOLCENGINE_SECRET_KEY") - session_token = "" - - if not (access_key and secret_key): - cred = get_credential_from_vefaas_iam() - access_key = cred.access_key_id - secret_key = cred.secret_access_key - session_token = cred.session_token - - response = ve_request( - request_body={ - "ProviderName": provider_name, - "IdentityToken": "identity_token", - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetResourceApiKey", - header={"X-Security-Token": session_token} if session_token else {}, - ak=access_key, - sk=secret_key, - version="2023-10-01", - service="cis_test", - host="open.volcengineapi.com", - region="cn-beijing", - ) - - try: - return response["Result"]["ApiKey"] - except Exception as _: - raise RuntimeError(f"Get api key failed: {response}") - - @wraps(func) - async def async_wrapper(*args: Any, **kwargs: Any) -> Any: - api_key = _get_api_key() - kwargs[into] = api_key - return await func(*args, **kwargs) - - @wraps(func) - def sync_wrapper(*args: Any, **kwargs: Any) -> Any: - api_key = _get_api_key() - kwargs[into] = api_key - return func(*args, **kwargs) - - if asyncio.iscoroutinefunction(func): - return async_wrapper - else: - return sync_wrapper - - return decorator diff --git a/agentkit/knowledge/__init__.py b/agentkit/knowledge/__init__.py deleted file mode 100644 index 8670f70..0000000 --- a/agentkit/knowledge/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from agentkit.knowledge.knowledge import AgentkitKnowledge -from agentkit.knowledge.knowledge_all_types import ( - ListKnowledgeBasesRequest, - ListKnowledgeBasesResponse, - AddKnowledgeBaseRequest, - AddKnowledgeBaseResponse, - GetKnowledgeConnectionInfoRequest, - GetKnowledgeConnectionInfoResponse, - DeleteKnowledgeBaseRequest, - DeleteKnowledgeBaseResponse, - KnowledgeBasesForListKnowledgeBases, - KnowledgeBasesForAddKnowledgeBase, - ConnectionInfosForGetKnowledgeConnectionInfo, - KnowledgeBasesItem, - FiltersItem, -) - -__all__ = [ - "AgentkitKnowledge", - "ListKnowledgeBasesRequest", - "ListKnowledgeBasesResponse", - "AddKnowledgeBaseRequest", - "AddKnowledgeBaseResponse", - "GetKnowledgeConnectionInfoRequest", - "GetKnowledgeConnectionInfoResponse", - "DeleteKnowledgeBaseRequest", - "DeleteKnowledgeBaseResponse", - "KnowledgeBasesForListKnowledgeBases", - "KnowledgeBasesForAddKnowledgeBase", - "ConnectionInfosForGetKnowledgeConnectionInfo", - "KnowledgeBasesItem", - "FiltersItem", -] diff --git a/agentkit/knowledge/client.py b/agentkit/knowledge/client.py deleted file mode 100644 index 3f71a73..0000000 --- a/agentkit/knowledge/client.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Dict -from agentkit.client import BaseAgentkitClient -from agentkit.knowledge.types import ( - AddKnowledgeBaseRequest, - AddKnowledgeBaseResponse, - DeleteKnowledgeBaseRequest, - DeleteKnowledgeBaseResponse, - GetKnowledgeBaseRequest, - GetKnowledgeBaseResponse, - GetKnowledgeConnectionInfoRequest, - GetKnowledgeConnectionInfoResponse, - ListKnowledgeBasesRequest, - ListKnowledgeBasesResponse, - UpdateKnowledgeBaseRequest, - UpdateKnowledgeBaseResponse, -) - - -class AgentkitKnowledgeClient(BaseAgentkitClient): - """AgentKit Knowledge Base Management Service""" - API_ACTIONS: Dict[str, str] = { - "UpdateKnowledgeBase": "UpdateKnowledgeBase", - "ListKnowledgeBases": "ListKnowledgeBases", - "AddKnowledgeBase": "AddKnowledgeBase", - "GetKnowledgeConnectionInfo": "GetKnowledgeConnectionInfo", - "GetKnowledgeBase": "GetKnowledgeBase", - "DeleteKnowledgeBase": "DeleteKnowledgeBase", - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name="knowledge", - ) - - - def update_knowledge_base(self, request: UpdateKnowledgeBaseRequest) -> UpdateKnowledgeBaseResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateKnowledgeBase", - request=request, - response_type=UpdateKnowledgeBaseResponse, - ) - - def list_knowledge_bases(self, request: ListKnowledgeBasesRequest) -> ListKnowledgeBasesResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListKnowledgeBases", - request=request, - response_type=ListKnowledgeBasesResponse, - ) - - def add_knowledge_base(self, request: AddKnowledgeBaseRequest) -> AddKnowledgeBaseResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FAddKnowledgeBase", - request=request, - response_type=AddKnowledgeBaseResponse, - ) - - def get_knowledge_connection_info(self, request: GetKnowledgeConnectionInfoRequest) -> GetKnowledgeConnectionInfoResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetKnowledgeConnectionInfo", - request=request, - response_type=GetKnowledgeConnectionInfoResponse, - ) - - def get_knowledge_base(self, request: GetKnowledgeBaseRequest) -> GetKnowledgeBaseResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetKnowledgeBase", - request=request, - response_type=GetKnowledgeBaseResponse, - ) - - def delete_knowledge_base(self, request: DeleteKnowledgeBaseRequest) -> DeleteKnowledgeBaseResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteKnowledgeBase", - request=request, - response_type=DeleteKnowledgeBaseResponse, - ) diff --git a/agentkit/knowledge/types.py b/agentkit/knowledge/types.py deleted file mode 100644 index c0be56f..0000000 --- a/agentkit/knowledge/types.py +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Optional -from pydantic import BaseModel, Field - -class KnowledgeBaseModel(BaseModel): - """AgentKit auto-generated base model""" - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -# Data Types -class AssociatedRuntimesForListKnowledgeBases(KnowledgeBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class VpcConfigurationForListKnowledgeBases(KnowledgeBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationForListKnowledgeBases(KnowledgeBaseModel): - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - vpc_configuration: Optional[VpcConfigurationForListKnowledgeBases] = Field(default=None, alias="VpcConfiguration") - - -class KnowledgeBasesForListKnowledgeBases(KnowledgeBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForListKnowledgeBases]] = Field(default=None, alias="AssociatedRuntimes") - create_time: Optional[str] = Field(default=None, alias="CreateTime") - description: Optional[str] = Field(default=None, alias="Description") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime") - name: Optional[str] = Field(default=None, alias="Name") - network_configuration: Optional[NetworkConfigurationForListKnowledgeBases] = Field(default=None, alias="NetworkConfiguration") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - region: Optional[str] = Field(default=None, alias="Region") - status: Optional[str] = Field(default=None, alias="Status") - - -class KnowledgeBasesForAddKnowledgeBase(KnowledgeBaseModel): - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - message: Optional[str] = Field(default=None, alias="Message") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - - -class ConnectionInfosForGetKnowledgeConnectionInfo(KnowledgeBaseModel): - addr_type: Optional[str] = Field(default=None, alias="AddrType") - auth_key: Optional[str] = Field(default=None, alias="AuthKey") - auth_type: Optional[str] = Field(default=None, alias="AuthType") - base_url: Optional[str] = Field(default=None, alias="BaseUrl") - expire_at: Optional[str] = Field(default=None, alias="ExpireAt") - extra_config: Optional[str] = Field(default=None, alias="ExtraConfig") - region: Optional[str] = Field(default=None, alias="Region") - status: Optional[str] = Field(default=None, alias="Status") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - vpc_name: Optional[str] = Field(default=None, alias="VpcName") - - -class AssociatedRuntimesForGetKnowledgeBase(KnowledgeBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class VpcConfigForGetKnowledgeBase(KnowledgeBaseModel): - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -# UpdateKnowledgeBase - Request -class VpcForUpdateKnowledgeBase(KnowledgeBaseModel): - vpc_id: str = Field(..., alias="VpcId") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class UpdateKnowledgeBaseRequest(KnowledgeBaseModel): - description: Optional[str] = Field(default=None, alias="Description") - knowledge_id: str = Field(..., alias="KnowledgeId") - vpc_config: Optional[VpcForUpdateKnowledgeBase] = Field(default=None, alias="VpcConfig") - - -# UpdateKnowledgeBase - Response -class UpdateKnowledgeBaseResponse(KnowledgeBaseModel): - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - - -# ListKnowledgeBases - Request -class FiltersItemForListKnowledgeBases(KnowledgeBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListKnowledgeBasesRequest(KnowledgeBaseModel): - create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter") - create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore") - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter") - update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore") - filters: Optional[list[FiltersItemForListKnowledgeBases]] = Field(default=None, alias="Filters") - - -# ListKnowledgeBases - Response -class ListKnowledgeBasesResponse(KnowledgeBaseModel): - knowledge_bases: Optional[list[KnowledgeBasesForListKnowledgeBases]] = Field(default=None, alias="KnowledgeBases") - next_token: Optional[str] = Field(default=None, alias="NextToken") - knowledge_bases: Optional[list[KnowledgeBasesForListKnowledgeBases]] = Field(default=None, alias="KnowledgeBases") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# AddKnowledgeBase - Request -class KnowledgeBasesItemForAddKnowledgeBase(KnowledgeBaseModel): - name: str = Field(..., alias="Name") - provider_knowledge_id: str = Field(..., alias="ProviderKnowledgeId") - provider_type: str = Field(..., alias="ProviderType") - description: Optional[str] = Field(default=None, alias="Description") - -class AddKnowledgeBaseRequest(KnowledgeBaseModel): - project_name: Optional[str] = Field(default=None, alias="ProjectName") - knowledge_bases: Optional[list[KnowledgeBasesItemForAddKnowledgeBase]] = Field(default=None, alias="KnowledgeBases") - - -# AddKnowledgeBase - Response -class AddKnowledgeBaseResponse(KnowledgeBaseModel): - knowledge_bases: Optional[list[KnowledgeBasesForAddKnowledgeBase]] = Field(default=None, alias="KnowledgeBases") - - -# GetKnowledgeConnectionInfo - Request -class GetKnowledgeConnectionInfoRequest(KnowledgeBaseModel): - knowledge_id: str = Field(..., alias="KnowledgeId") - - -# GetKnowledgeConnectionInfo - Response -class GetKnowledgeConnectionInfoResponse(KnowledgeBaseModel): - connection_infos: Optional[list[ConnectionInfosForGetKnowledgeConnectionInfo]] = Field(default=None, alias="ConnectionInfos") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - message: Optional[str] = Field(default=None, alias="Message") - name: Optional[str] = Field(default=None, alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - - -# GetKnowledgeBase - Request -class GetKnowledgeBaseRequest(KnowledgeBaseModel): - knowledge_id: str = Field(..., alias="KnowledgeId") - - -# GetKnowledgeBase - Response -class GetKnowledgeBaseResponse(KnowledgeBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForGetKnowledgeBase]] = Field(default=None, alias="AssociatedRuntimes") - create_time: Optional[str] = Field(default=None, alias="CreateTime") - description: Optional[str] = Field(default=None, alias="Description") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime") - name: Optional[str] = Field(default=None, alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - region: Optional[str] = Field(default=None, alias="Region") - status: Optional[str] = Field(default=None, alias="Status") - trn: Optional[str] = Field(default=None, alias="Trn") - vpc_config: Optional[VpcConfigForGetKnowledgeBase] = Field(default=None, alias="VpcConfig") - - -# DeleteKnowledgeBase - Request -class DeleteKnowledgeBaseRequest(KnowledgeBaseModel): - knowledge_id: str = Field(..., alias="KnowledgeId") - - -# DeleteKnowledgeBase - Response -class DeleteKnowledgeBaseResponse(KnowledgeBaseModel): - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - provider_knowledge_id: Optional[str] = Field(default=None, alias="ProviderKnowledgeId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - diff --git a/agentkit/mcp/__init__.py b/agentkit/mcp/__init__.py deleted file mode 100644 index 3967c16..0000000 --- a/agentkit/mcp/__init__.py +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from agentkit.mcp.mcp import AgentkitMCP -from agentkit.mcp.mcp_all_types import ( - # MCP Service - CreateMCPServiceRequest, - CreateMCPServiceResponse, - UpdateMCPServiceRequest, - UpdateMCPServiceResponse, - DeleteMCPServiceRequest, - DeleteMCPServiceResponse, - GetMCPServiceRequest, - GetMCPServiceResponse, - ListMCPServicesRequest, - ListMCPServicesResponse, - # MCP Toolset - CreateMCPToolsetRequest, - CreateMCPToolsetResponse, - UpdateMCPToolsetRequest, - UpdateMCPToolsetResponse, - DeleteMCPToolsetRequest, - DeleteMCPToolsetResponse, - GetMCPToolsetRequest, - GetMCPToolsetResponse, - ListMCPToolsetsRequest, - ListMCPToolsetsResponse, - # MCP Tools - UpdateMCPToolsRequest, - UpdateMCPToolsResponse, - GetMCPToolsRequest, - GetMCPToolsResponse, - ListMCPToolsRequest, - ListMCPToolsResponse, -) - -__all__ = [ - "AgentkitMCP", - # MCP Service - "CreateMCPServiceRequest", - "CreateMCPServiceResponse", - "UpdateMCPServiceRequest", - "UpdateMCPServiceResponse", - "DeleteMCPServiceRequest", - "DeleteMCPServiceResponse", - "GetMCPServiceRequest", - "GetMCPServiceResponse", - "ListMCPServicesRequest", - "ListMCPServicesResponse", - # MCP Toolset - "CreateMCPToolsetRequest", - "CreateMCPToolsetResponse", - "UpdateMCPToolsetRequest", - "UpdateMCPToolsetResponse", - "DeleteMCPToolsetRequest", - "DeleteMCPToolsetResponse", - "GetMCPToolsetRequest", - "GetMCPToolsetResponse", - "ListMCPToolsetsRequest", - "ListMCPToolsetsResponse", - # MCP Tools - "UpdateMCPToolsRequest", - "UpdateMCPToolsResponse", - "GetMCPToolsRequest", - "GetMCPToolsResponse", - "ListMCPToolsRequest", - "ListMCPToolsResponse", -] diff --git a/agentkit/mcp/client.py b/agentkit/mcp/client.py deleted file mode 100644 index e1798e0..0000000 --- a/agentkit/mcp/client.py +++ /dev/null @@ -1,175 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Dict -from agentkit.client import BaseAgentkitClient -from agentkit.mcp.types import ( - CreateMCPServiceRequest, - CreateMCPServiceResponse, - CreateMCPToolsetRequest, - CreateMCPToolsetResponse, - DeleteMCPServiceRequest, - DeleteMCPServiceResponse, - DeleteMCPToolsetRequest, - DeleteMCPToolsetResponse, - GetMCPServiceRequest, - GetMCPServiceResponse, - GetMCPToolsRequest, - GetMCPToolsResponse, - GetMCPToolsetRequest, - GetMCPToolsetResponse, - ListMCPServicesRequest, - ListMCPServicesResponse, - ListMCPToolsRequest, - ListMCPToolsResponse, - ListMCPToolsetsRequest, - ListMCPToolsetsResponse, - UpdateMCPServiceRequest, - UpdateMCPServiceResponse, - UpdateMCPToolsRequest, - UpdateMCPToolsResponse, - UpdateMCPToolsetRequest, - UpdateMCPToolsetResponse, -) - - -class AgentkitMCPClient(BaseAgentkitClient): - """AgentKit MCP (Model Context Protocol) Management Service""" - API_ACTIONS: Dict[str, str] = { - "UpdateMCPToolset": "UpdateMCPToolset", - "CreateMCPService": "CreateMCPService", - "ListMCPToolsets": "ListMCPToolsets", - "ListMCPTools": "ListMCPTools", - "CreateMCPToolset": "CreateMCPToolset", - "GetMCPTools": "GetMCPTools", - "DeleteMCPService": "DeleteMCPService", - "GetMCPToolset": "GetMCPToolset", - "ListMCPServices": "ListMCPServices", - "DeleteMCPToolset": "DeleteMCPToolset", - "UpdateMCPTools": "UpdateMCPTools", - "UpdateMCPService": "UpdateMCPService", - "GetMCPService": "GetMCPService", - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name="mcp", - ) - - - def update_mcp_toolset(self, request: UpdateMCPToolsetRequest) -> UpdateMCPToolsetResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateMCPToolset", - request=request, - response_type=UpdateMCPToolsetResponse, - ) - - def create_mcp_service(self, request: CreateMCPServiceRequest) -> CreateMCPServiceResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateMCPService", - request=request, - response_type=CreateMCPServiceResponse, - ) - - def list_mcp_toolsets(self, request: ListMCPToolsetsRequest) -> ListMCPToolsetsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListMCPToolsets", - request=request, - response_type=ListMCPToolsetsResponse, - ) - - def list_mcp_tools(self, request: ListMCPToolsRequest) -> ListMCPToolsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListMCPTools", - request=request, - response_type=ListMCPToolsResponse, - ) - - def create_mcp_toolset(self, request: CreateMCPToolsetRequest) -> CreateMCPToolsetResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateMCPToolset", - request=request, - response_type=CreateMCPToolsetResponse, - ) - - def get_mcp_tools(self, request: GetMCPToolsRequest) -> GetMCPToolsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetMCPTools", - request=request, - response_type=GetMCPToolsResponse, - ) - - def delete_mcp_service(self, request: DeleteMCPServiceRequest) -> DeleteMCPServiceResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteMCPService", - request=request, - response_type=DeleteMCPServiceResponse, - ) - - def get_mcp_toolset(self, request: GetMCPToolsetRequest) -> GetMCPToolsetResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetMCPToolset", - request=request, - response_type=GetMCPToolsetResponse, - ) - - def list_mcp_services(self, request: ListMCPServicesRequest) -> ListMCPServicesResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListMCPServices", - request=request, - response_type=ListMCPServicesResponse, - ) - - def delete_mcp_toolset(self, request: DeleteMCPToolsetRequest) -> DeleteMCPToolsetResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteMCPToolset", - request=request, - response_type=DeleteMCPToolsetResponse, - ) - - def update_mcp_tools(self, request: UpdateMCPToolsRequest) -> UpdateMCPToolsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateMCPTools", - request=request, - response_type=UpdateMCPToolsResponse, - ) - - def update_mcp_service(self, request: UpdateMCPServiceRequest) -> UpdateMCPServiceResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateMCPService", - request=request, - response_type=UpdateMCPServiceResponse, - ) - - def get_mcp_service(self, request: GetMCPServiceRequest) -> GetMCPServiceResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetMCPService", - request=request, - response_type=GetMCPServiceResponse, - ) diff --git a/agentkit/mcp/types.py b/agentkit/mcp/types.py deleted file mode 100644 index 7c09bae..0000000 --- a/agentkit/mcp/types.py +++ /dev/null @@ -1,738 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Optional -from pydantic import BaseModel, Field - -class MCPBaseModel(BaseModel): - """AgentKit auto-generated base model""" - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -# Data Types -class CustomJwtAuthorizerForListMCPToolsets(MCPBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class ApiKeysForListMCPToolsets(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - name: Optional[str] = Field(default=None, alias="Name") - - -class KeyAuthForListMCPToolsets(MCPBaseModel): - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_keys: Optional[list[ApiKeysForListMCPToolsets]] = Field(default=None, alias="ApiKeys") - parameter: Optional[str] = Field(default=None, alias="Parameter") - - -class AuthorizerForListMCPToolsets(MCPBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForListMCPToolsets] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForListMCPToolsets] = Field(default=None, alias="KeyAuth") - - -class AuthorizerConfigurationForListMCPToolsets(MCPBaseModel): - authorizer: Optional[AuthorizerForListMCPToolsets] = Field(default=None, alias="Authorizer") - authorizer_type: Optional[str] = Field(default=None, alias="AuthorizerType") - - -class VpcConfigurationForListMCPToolsets(MCPBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForListMCPToolsets(MCPBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForListMCPToolsets] = Field(default=None, alias="VpcConfiguration") - - -class ProtocolConfigurationForListMCPToolsets(MCPBaseModel): - protocol_convert_configuration: Optional[str] = Field(default=None, alias="ProtocolConvertConfiguration") - - -class MCPServicesForListMCPToolsets(MCPBaseModel): - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForListMCPToolsets]] = Field(default=None, alias="NetworkConfigurations") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - protocol_configuration: Optional[ProtocolConfigurationForListMCPToolsets] = Field(default=None, alias="ProtocolConfiguration") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - status: Optional[str] = Field(default=None, alias="Status") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class TagsForListMCPToolsets(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class MCPToolsetsForListMCPToolsets(MCPBaseModel): - authorizer_configuration: Optional[AuthorizerConfigurationForListMCPToolsets] = Field(default=None, alias="AuthorizerConfiguration") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - mcp_services: Optional[list[MCPServicesForListMCPToolsets]] = Field(default=None, alias="MCPServices") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForListMCPToolsets]] = Field(default=None, alias="NetworkConfigurations") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForListMCPToolsets]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class MCPServiceToolsForListMCPTools(MCPBaseModel): - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - tools: Optional[str] = Field(default=None, alias="Tools") - - -class AssociatedRuntimesForGetMCPToolset(MCPBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class CustomJwtAuthorizerForGetMCPToolset(MCPBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class ApiKeysForGetMCPToolset(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - name: Optional[str] = Field(default=None, alias="Name") - - -class KeyAuthForGetMCPToolset(MCPBaseModel): - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_keys: Optional[list[ApiKeysForGetMCPToolset]] = Field(default=None, alias="ApiKeys") - parameter: Optional[str] = Field(default=None, alias="Parameter") - - -class AuthorizerForGetMCPToolset(MCPBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForGetMCPToolset] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForGetMCPToolset] = Field(default=None, alias="KeyAuth") - - -class AuthorizerConfigurationForGetMCPToolset(MCPBaseModel): - authorizer: Optional[AuthorizerForGetMCPToolset] = Field(default=None, alias="Authorizer") - authorizer_type: Optional[str] = Field(default=None, alias="AuthorizerType") - - -class VpcConfigurationForGetMCPToolset(MCPBaseModel): - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForGetMCPToolset(MCPBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForGetMCPToolset] = Field(default=None, alias="VpcConfiguration") - - -class ProtocolConfigurationForGetMCPToolset(MCPBaseModel): - protocol_convert_configuration: Optional[str] = Field(default=None, alias="ProtocolConvertConfiguration") - - -class TagsForGetMCPToolset(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class MCPServicesForGetMCPToolset(MCPBaseModel): - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForGetMCPToolset]] = Field(default=None, alias="NetworkConfigurations") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - protocol_configuration: Optional[ProtocolConfigurationForGetMCPToolset] = Field(default=None, alias="ProtocolConfiguration") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetMCPToolset]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class MCPToolsetForGetMCPToolset(MCPBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForGetMCPToolset]] = Field(default=None, alias="AssociatedRuntimes") - authorizer_configuration: Optional[AuthorizerConfigurationForGetMCPToolset] = Field(default=None, alias="AuthorizerConfiguration") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - mcp_services: Optional[list[MCPServicesForGetMCPToolset]] = Field(default=None, alias="MCPServices") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForGetMCPToolset]] = Field(default=None, alias="NetworkConfigurations") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetMCPToolset]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class VpcConfigurationForListMCPServices(MCPBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForListMCPServices(MCPBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForListMCPServices] = Field(default=None, alias="VpcConfiguration") - - -class ProtocolConfigurationForListMCPServices(MCPBaseModel): - protocol_convert_configuration: Optional[str] = Field(default=None, alias="ProtocolConvertConfiguration") - - -class TagsForListMCPServices(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class MCPServicesForListMCPServices(MCPBaseModel): - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForListMCPServices]] = Field(default=None, alias="NetworkConfigurations") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - protocol_configuration: Optional[ProtocolConfigurationForListMCPServices] = Field(default=None, alias="ProtocolConfiguration") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForListMCPServices]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class CustomConfigurationForGetMCPService(MCPBaseModel): - domain: Optional[str] = Field(default=None, alias="Domain") - port: Optional[int] = Field(default=None, alias="Port") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - - -class EnvsForGetMCPService(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class PrivatePackageForGetMCPService(MCPBaseModel): - command: Optional[str] = Field(default=None, alias="Command") - envs: Optional[list[EnvsForGetMCPService]] = Field(default=None, alias="Envs") - image_url: Optional[str] = Field(default=None, alias="ImageUrl") - - -class PublicPackageForGetMCPService(MCPBaseModel): - mcp_type: Optional[str] = Field(default=None, alias="McpType") - package_manager_type: Optional[str] = Field(default=None, alias="PackageManagerType") - raw_config: Optional[str] = Field(default=None, alias="RawConfig") - - -class CustomMcpConfigurationForGetMCPService(MCPBaseModel): - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - private_package: Optional[PrivatePackageForGetMCPService] = Field(default=None, alias="PrivatePackage") - public_package: Optional[PublicPackageForGetMCPService] = Field(default=None, alias="PublicPackage") - - -class FunctionConfigurationForGetMCPService(MCPBaseModel): - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - - -class BackendConfigurationForGetMCPService(MCPBaseModel): - custom_configuration: Optional[CustomConfigurationForGetMCPService] = Field(default=None, alias="CustomConfiguration") - custom_mcp_configuration: Optional[CustomMcpConfigurationForGetMCPService] = Field(default=None, alias="CustomMcpConfiguration") - function_configuration: Optional[FunctionConfigurationForGetMCPService] = Field(default=None, alias="FunctionConfiguration") - - -class CustomJwtAuthorizerForGetMCPService(MCPBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class ApiKeysForGetMCPService(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - name: Optional[str] = Field(default=None, alias="Name") - - -class KeyAuthForGetMCPService(MCPBaseModel): - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_keys: Optional[list[ApiKeysForGetMCPService]] = Field(default=None, alias="ApiKeys") - parameter: Optional[str] = Field(default=None, alias="Parameter") - - -class AuthorizerForGetMCPService(MCPBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForGetMCPService] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForGetMCPService] = Field(default=None, alias="KeyAuth") - - -class InboundAuthorizerConfigurationForGetMCPService(MCPBaseModel): - authorizer: Optional[AuthorizerForGetMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: Optional[str] = Field(default=None, alias="AuthorizerType") - - -class VpcConfigurationForGetMCPService(MCPBaseModel): - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForGetMCPService(MCPBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForGetMCPService] = Field(default=None, alias="VpcConfiguration") - - -class OutboundAuthorizerConfigurationForGetMCPService(MCPBaseModel): - authorizer: Optional[AuthorizerForGetMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: Optional[str] = Field(default=None, alias="AuthorizerType") - - -class ProtocolConfigurationForGetMCPService(MCPBaseModel): - protocol_convert_configuration: Optional[str] = Field(default=None, alias="ProtocolConvertConfiguration") - - -class TagsForGetMCPService(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class MCPServiceForGetMCPService(MCPBaseModel): - backend_configuration: Optional[BackendConfigurationForGetMCPService] = Field(default=None, alias="BackendConfiguration") - backend_type: Optional[str] = Field(default=None, alias="BackendType") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - inbound_authorizer_configuration: Optional[InboundAuthorizerConfigurationForGetMCPService] = Field(default=None, alias="InboundAuthorizerConfiguration") - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForGetMCPService]] = Field(default=None, alias="NetworkConfigurations") - outbound_authorizer_configuration: Optional[OutboundAuthorizerConfigurationForGetMCPService] = Field(default=None, alias="OutboundAuthorizerConfiguration") - path: Optional[str] = Field(default=None, alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - protocol_configuration: Optional[ProtocolConfigurationForGetMCPService] = Field(default=None, alias="ProtocolConfiguration") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetMCPService]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -# UpdateMCPToolset - Request -class AuthorizerForUpdateMCPToolset(MCPBaseModel): - authorizer: Optional[AuthorizerAuthorizerForUpdateMCPToolset] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class AuthorizerAuthorizerForUpdateMCPToolset(MCPBaseModel): - key_auth: Optional[AuthorizerAuthorizerKeyAuthForUpdateMCPToolset] = Field(default=None, alias="KeyAuth") - -class AuthorizerAuthorizerKeyAuthForUpdateMCPToolset(MCPBaseModel): - api_keys: Optional[list[AuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPToolset]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class AuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPToolset(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class UpdateMCPToolsetRequest(MCPBaseModel): - client_token: Optional[str] = Field(default=None, alias="ClientToken") - mcp_service_ids: Optional[str] = Field(default=None, alias="MCPServiceIds") - mcp_toolset_id: str = Field(..., alias="MCPToolsetId") - authorizer_configuration: Optional[AuthorizerForUpdateMCPToolset] = Field(default=None, alias="AuthorizerConfiguration") - - -# UpdateMCPToolset - Response -class UpdateMCPToolsetResponse(MCPBaseModel): - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - - -# CreateMCPService - Request -class BackendForCreateMCPService(MCPBaseModel): - custom_configuration: Optional[BackendCustomForCreateMCPService] = Field(default=None, alias="CustomConfiguration") - custom_mcp_configuration: Optional[BackendCustomMcpForCreateMCPService] = Field(default=None, alias="CustomMcpConfiguration") - function_configuration: Optional[BackendFunctionForCreateMCPService] = Field(default=None, alias="FunctionConfiguration") - -class BackendCustomForCreateMCPService(MCPBaseModel): - domain: Optional[str] = Field(default=None, alias="Domain") - port: Optional[int] = Field(default=None, alias="Port") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - -class BackendCustomMcpForCreateMCPService(MCPBaseModel): - private_package: Optional[BackendCustomMcpPrivatePackageForCreateMCPService] = Field(default=None, alias="PrivatePackage") - public_package: Optional[BackendCustomMcpPublicPackageForCreateMCPService] = Field(default=None, alias="PublicPackage") - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - -class BackendCustomMcpPrivatePackageForCreateMCPService(MCPBaseModel): - envs: Optional[list[BackendCustomMcpPrivatePackageEnvsItemForCreateMCPService]] = Field(default=None, alias="Envs") - command: Optional[str] = Field(default=None, alias="Command") - image_url: Optional[str] = Field(default=None, alias="ImageUrl") - -class BackendCustomMcpPublicPackageForCreateMCPService(MCPBaseModel): - mcp_type: Optional[str] = Field(default=None, alias="McpType") - package_manager_type: Optional[str] = Field(default=None, alias="PackageManagerType") - raw_config: Optional[str] = Field(default=None, alias="RawConfig") - -class BackendFunctionForCreateMCPService(MCPBaseModel): - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - -class InboundAuthorizerForCreateMCPService(MCPBaseModel): - authorizer: Optional[InboundAuthorizerAuthorizerForCreateMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class InboundAuthorizerAuthorizerForCreateMCPService(MCPBaseModel): - custom_jwt_authorizer: Optional[InboundAuthorizerAuthorizerCustomJwtAuthorizerForCreateMCPService] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[InboundAuthorizerAuthorizerKeyAuthForCreateMCPService] = Field(default=None, alias="KeyAuth") - -class InboundAuthorizerAuthorizerCustomJwtAuthorizerForCreateMCPService(MCPBaseModel): - discovery_url: str = Field(..., alias="DiscoveryUrl") - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - -class InboundAuthorizerAuthorizerKeyAuthForCreateMCPService(MCPBaseModel): - api_keys: Optional[list[InboundAuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPService]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class NetworkForCreateMCPService(MCPBaseModel): - vpc_configuration: Optional[NetworkVpcForCreateMCPService] = Field(default=None, alias="VpcConfiguration") - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - -class NetworkVpcForCreateMCPService(MCPBaseModel): - vpc_id: str = Field(..., alias="VpcId") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class OutboundAuthorizerForCreateMCPService(MCPBaseModel): - authorizer: Optional[OutboundAuthorizerAuthorizerForCreateMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class OutboundAuthorizerAuthorizerForCreateMCPService(MCPBaseModel): - key_auth: Optional[OutboundAuthorizerAuthorizerKeyAuthForCreateMCPService] = Field(default=None, alias="KeyAuth") - -class OutboundAuthorizerAuthorizerKeyAuthForCreateMCPService(MCPBaseModel): - api_keys: Optional[list[OutboundAuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPService]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class ProtocolForCreateMCPService(MCPBaseModel): - http_api_configuration: Optional[ProtocolHttpApiForCreateMCPService] = Field(default=None, alias="HttpApiConfiguration") - -class ProtocolHttpApiForCreateMCPService(MCPBaseModel): - configuration: Optional[str] = Field(default=None, alias="Configuration") - type: Optional[str] = Field(default=None, alias="Type") - -class BackendCustomMcpPrivatePackageEnvsItemForCreateMCPService(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class InboundAuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPService(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class OutboundAuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPService(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class TagsItemForCreateMCPService(MCPBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class CreateMCPServiceRequest(MCPBaseModel): - backend_type: str = Field(..., alias="BackendType") - client_token: Optional[str] = Field(default=None, alias="ClientToken") - name: str = Field(..., alias="Name") - path: str = Field(..., alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - protocol_type: str = Field(..., alias="ProtocolType") - backend_configuration: Optional[BackendForCreateMCPService] = Field(default=None, alias="BackendConfiguration") - inbound_authorizer_configuration: Optional[InboundAuthorizerForCreateMCPService] = Field(default=None, alias="InboundAuthorizerConfiguration") - network_configuration: Optional[NetworkForCreateMCPService] = Field(default=None, alias="NetworkConfiguration") - outbound_authorizer_configuration: Optional[OutboundAuthorizerForCreateMCPService] = Field(default=None, alias="OutboundAuthorizerConfiguration") - protocol_configuration: Optional[ProtocolForCreateMCPService] = Field(default=None, alias="ProtocolConfiguration") - tags: Optional[list[TagsItemForCreateMCPService]] = Field(default=None, alias="Tags") - - -# CreateMCPService - Response -class CreateMCPServiceResponse(MCPBaseModel): - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - - -# ListMCPToolsets - Request -class FiltersItemForListMCPToolsets(MCPBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class TagFiltersItemForListMCPToolsets(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListMCPToolsetsRequest(MCPBaseModel): - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - filters: Optional[list[FiltersItemForListMCPToolsets]] = Field(default=None, alias="Filters") - tag_filters: Optional[list[TagFiltersItemForListMCPToolsets]] = Field(default=None, alias="TagFilters") - - -# ListMCPToolsets - Response -class ListMCPToolsetsResponse(MCPBaseModel): - mcp_toolsets: Optional[list[MCPToolsetsForListMCPToolsets]] = Field(default=None, alias="MCPToolsets") - next_token: Optional[str] = Field(default=None, alias="NextToken") - mcp_toolsets: Optional[list[MCPToolsetsForListMCPToolsets]] = Field(default=None, alias="MCPToolsets") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# ListMCPTools - Request -class ListMCPToolsRequest(MCPBaseModel): - mcp_toolset_ids: str = Field(..., alias="MCPToolsetIds") - - -# ListMCPTools - Response -class ListMCPToolsResponse(MCPBaseModel): - mcp_service_tools: Optional[list[MCPServiceToolsForListMCPTools]] = Field(default=None, alias="MCPServiceTools") - - -# CreateMCPToolset - Request -class AuthorizerForCreateMCPToolset(MCPBaseModel): - authorizer: Optional[AuthorizerAuthorizerForCreateMCPToolset] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class AuthorizerAuthorizerForCreateMCPToolset(MCPBaseModel): - custom_jwt_authorizer: Optional[AuthorizerAuthorizerCustomJwtAuthorizerForCreateMCPToolset] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[AuthorizerAuthorizerKeyAuthForCreateMCPToolset] = Field(default=None, alias="KeyAuth") - -class AuthorizerAuthorizerCustomJwtAuthorizerForCreateMCPToolset(MCPBaseModel): - discovery_url: str = Field(..., alias="DiscoveryUrl") - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - -class AuthorizerAuthorizerKeyAuthForCreateMCPToolset(MCPBaseModel): - api_keys: Optional[list[AuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPToolset]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class NetworkForCreateMCPToolset(MCPBaseModel): - vpc_configuration: Optional[NetworkVpcForCreateMCPToolset] = Field(default=None, alias="VpcConfiguration") - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - -class NetworkVpcForCreateMCPToolset(MCPBaseModel): - vpc_id: str = Field(..., alias="VpcId") - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class AuthorizerAuthorizerKeyAuthApiKeysItemForCreateMCPToolset(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class TagsItemForCreateMCPToolset(MCPBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class CreateMCPToolsetRequest(MCPBaseModel): - client_token: Optional[str] = Field(default=None, alias="ClientToken") - mcp_service_ids: str = Field(..., alias="MCPServiceIds") - name: str = Field(..., alias="Name") - path: str = Field(..., alias="Path") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - authorizer_configuration: Optional[AuthorizerForCreateMCPToolset] = Field(default=None, alias="AuthorizerConfiguration") - network_configuration: Optional[NetworkForCreateMCPToolset] = Field(default=None, alias="NetworkConfiguration") - tags: Optional[list[TagsItemForCreateMCPToolset]] = Field(default=None, alias="Tags") - - -# CreateMCPToolset - Response -class CreateMCPToolsetResponse(MCPBaseModel): - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - - -# GetMCPTools - Request -class GetMCPToolsRequest(MCPBaseModel): - mcp_toolset_id: str = Field(..., alias="MCPToolsetId") - - -# GetMCPTools - Response -class GetMCPToolsResponse(MCPBaseModel): - tools: Optional[str] = Field(default=None, alias="Tools") - - -# DeleteMCPService - Request -class DeleteMCPServiceRequest(MCPBaseModel): - mcp_service_id: str = Field(..., alias="MCPServiceId") - - -# DeleteMCPService - Response -class DeleteMCPServiceResponse(MCPBaseModel): - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - - -# GetMCPToolset - Request -class GetMCPToolsetRequest(MCPBaseModel): - mcp_toolset_id: str = Field(..., alias="MCPToolsetId") - - -# GetMCPToolset - Response -class GetMCPToolsetResponse(MCPBaseModel): - mcp_toolset: Optional[MCPToolsetForGetMCPToolset] = Field(default=None, alias="MCPToolset") - - -# ListMCPServices - Request -class FiltersItemForListMCPServices(MCPBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class TagFiltersItemForListMCPServices(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListMCPServicesRequest(MCPBaseModel): - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - filters: Optional[list[FiltersItemForListMCPServices]] = Field(default=None, alias="Filters") - tag_filters: Optional[list[TagFiltersItemForListMCPServices]] = Field(default=None, alias="TagFilters") - - -# ListMCPServices - Response -class ListMCPServicesResponse(MCPBaseModel): - mcp_services: Optional[list[MCPServicesForListMCPServices]] = Field(default=None, alias="MCPServices") - next_token: Optional[str] = Field(default=None, alias="NextToken") - mcp_services: Optional[list[MCPServicesForListMCPServices]] = Field(default=None, alias="MCPServices") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# DeleteMCPToolset - Request -class DeleteMCPToolsetRequest(MCPBaseModel): - mcp_toolset_id: str = Field(..., alias="MCPToolsetId") - - -# DeleteMCPToolset - Response -class DeleteMCPToolsetResponse(MCPBaseModel): - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - - -# UpdateMCPTools - Request -class UpdateMCPToolsRequest(MCPBaseModel): - mcp_service_id: str = Field(..., alias="MCPServiceId") - tools: str = Field(..., alias="Tools") - - -# UpdateMCPTools - Response -class UpdateMCPToolsResponse(MCPBaseModel): - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - - -# UpdateMCPService - Request -class BackendForUpdateMCPService(MCPBaseModel): - custom_configuration: Optional[BackendCustomForUpdateMCPService] = Field(default=None, alias="CustomConfiguration") - custom_mcp_configuration: Optional[BackendCustomMcpForUpdateMCPService] = Field(default=None, alias="CustomMcpConfiguration") - function_configuration: Optional[BackendFunctionForUpdateMCPService] = Field(default=None, alias="FunctionConfiguration") - -class BackendCustomForUpdateMCPService(MCPBaseModel): - domain: Optional[str] = Field(default=None, alias="Domain") - port: Optional[int] = Field(default=None, alias="Port") - protocol_type: Optional[str] = Field(default=None, alias="ProtocolType") - -class BackendCustomMcpForUpdateMCPService(MCPBaseModel): - private_package: Optional[BackendCustomMcpPrivatePackageForUpdateMCPService] = Field(default=None, alias="PrivatePackage") - public_package: Optional[BackendCustomMcpPublicPackageForUpdateMCPService] = Field(default=None, alias="PublicPackage") - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - -class BackendCustomMcpPrivatePackageForUpdateMCPService(MCPBaseModel): - envs: Optional[list[BackendCustomMcpPrivatePackageEnvsItemForUpdateMCPService]] = Field(default=None, alias="Envs") - command: Optional[str] = Field(default=None, alias="Command") - image_url: Optional[str] = Field(default=None, alias="ImageUrl") - -class BackendCustomMcpPublicPackageForUpdateMCPService(MCPBaseModel): - mcp_type: Optional[str] = Field(default=None, alias="McpType") - package_manager_type: Optional[str] = Field(default=None, alias="PackageManagerType") - raw_config: Optional[str] = Field(default=None, alias="RawConfig") - -class BackendFunctionForUpdateMCPService(MCPBaseModel): - function_id: Optional[str] = Field(default=None, alias="FunctionId") - function_name: Optional[str] = Field(default=None, alias="FunctionName") - -class InboundAuthorizerForUpdateMCPService(MCPBaseModel): - authorizer: Optional[InboundAuthorizerAuthorizerForUpdateMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class InboundAuthorizerAuthorizerForUpdateMCPService(MCPBaseModel): - key_auth: Optional[InboundAuthorizerAuthorizerKeyAuthForUpdateMCPService] = Field(default=None, alias="KeyAuth") - -class InboundAuthorizerAuthorizerKeyAuthForUpdateMCPService(MCPBaseModel): - api_keys: Optional[list[InboundAuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPService]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class OutboundAuthorizerForUpdateMCPService(MCPBaseModel): - authorizer: Optional[OutboundAuthorizerAuthorizerForUpdateMCPService] = Field(default=None, alias="Authorizer") - authorizer_type: str = Field(..., alias="AuthorizerType") - -class OutboundAuthorizerAuthorizerForUpdateMCPService(MCPBaseModel): - key_auth: Optional[OutboundAuthorizerAuthorizerKeyAuthForUpdateMCPService] = Field(default=None, alias="KeyAuth") - -class OutboundAuthorizerAuthorizerKeyAuthForUpdateMCPService(MCPBaseModel): - api_keys: Optional[list[OutboundAuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPService]] = Field(default=None, alias="ApiKeys") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - parameter: Optional[str] = Field(default=None, alias="Parameter") - -class BackendCustomMcpPrivatePackageEnvsItemForUpdateMCPService(MCPBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class InboundAuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPService(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class OutboundAuthorizerAuthorizerKeyAuthApiKeysItemForUpdateMCPService(MCPBaseModel): - name: str = Field(..., alias="Name") - key: Optional[str] = Field(default=None, alias="Key") - -class UpdateMCPServiceRequest(MCPBaseModel): - backend_type: Optional[str] = Field(default=None, alias="BackendType") - mcp_service_id: str = Field(..., alias="MCPServiceId") - backend_configuration: Optional[BackendForUpdateMCPService] = Field(default=None, alias="BackendConfiguration") - inbound_authorizer_configuration: Optional[InboundAuthorizerForUpdateMCPService] = Field(default=None, alias="InboundAuthorizerConfiguration") - outbound_authorizer_configuration: Optional[OutboundAuthorizerForUpdateMCPService] = Field(default=None, alias="OutboundAuthorizerConfiguration") - - -# UpdateMCPService - Response -class UpdateMCPServiceResponse(MCPBaseModel): - mcp_service_id: Optional[str] = Field(default=None, alias="MCPServiceId") - - -# GetMCPService - Request -class GetMCPServiceRequest(MCPBaseModel): - mcp_service_id: str = Field(..., alias="MCPServiceId") - - -# GetMCPService - Response -class GetMCPServiceResponse(MCPBaseModel): - mcp_service: Optional[MCPServiceForGetMCPService] = Field(default=None, alias="MCPService") - diff --git a/agentkit/memory/__init__.py b/agentkit/memory/__init__.py deleted file mode 100644 index 5f95f60..0000000 --- a/agentkit/memory/__init__.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from agentkit.memory.memory import AgentkitMemory -from agentkit.memory.memory_all_types import ( - CreateMemoryCollectionRequest, - CreateMemoryCollectionResponse, - UpdateMemoryCollectionRequest, - UpdateMemoryCollectionResponse, - DeleteMemoryCollectionRequest, - DeleteMemoryCollectionResponse, - ListMemoryCollectionsRequest, - ListMemoryCollectionsResponse, - AddMemoryCollectionRequest, - AddMemoryCollectionResponse, - GetMemoryCollectionRequest, - GetMemoryCollectionResponse, - GetMemoryConnectionInfoRequest, - GetMemoryConnectionInfoResponse, - MemoriesForListMemoryCollections, - CollectionsForAddMemoryCollection, - ConnectionInfosForGetMemoryConnectionInfo, - StrategiesForUpdateMemoryCollection, - StrategiesForGetMemoryCollection, - LongTermConfigurationForUpdateMemoryCollection, - LongTermConfigurationForGetMemoryCollection, - CollectionsItem, - FiltersItem, - StrategiesItem, -) - -__all__ = [ - "AgentkitMemory", - "CreateMemoryCollectionRequest", - "CreateMemoryCollectionResponse", - "UpdateMemoryCollectionRequest", - "UpdateMemoryCollectionResponse", - "DeleteMemoryCollectionRequest", - "DeleteMemoryCollectionResponse", - "ListMemoryCollectionsRequest", - "ListMemoryCollectionsResponse", - "AddMemoryCollectionRequest", - "AddMemoryCollectionResponse", - "GetMemoryCollectionRequest", - "GetMemoryCollectionResponse", - "GetMemoryConnectionInfoRequest", - "GetMemoryConnectionInfoResponse", - "MemoriesForListMemoryCollections", - "CollectionsForAddMemoryCollection", - "ConnectionInfosForGetMemoryConnectionInfo", - "StrategiesForUpdateMemoryCollection", - "StrategiesForGetMemoryCollection", - "LongTermConfigurationForUpdateMemoryCollection", - "LongTermConfigurationForGetMemoryCollection", - "CollectionsItem", - "FiltersItem", - "StrategiesItem", -] diff --git a/agentkit/memory/client.py b/agentkit/memory/client.py deleted file mode 100644 index 2712fae..0000000 --- a/agentkit/memory/client.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Dict -from agentkit.client import BaseAgentkitClient -from agentkit.memory.types import ( - AddMemoryCollectionRequest, - AddMemoryCollectionResponse, - CreateMemoryCollectionRequest, - CreateMemoryCollectionResponse, - DeleteMemoryCollectionRequest, - DeleteMemoryCollectionResponse, - GetMemoryCollectionRequest, - GetMemoryCollectionResponse, - GetMemoryConnectionInfoRequest, - GetMemoryConnectionInfoResponse, - ListMemoryCollectionsRequest, - ListMemoryCollectionsResponse, - UpdateMemoryCollectionRequest, - UpdateMemoryCollectionResponse, -) - - -class AgentkitMemoryClient(BaseAgentkitClient): - """AgentKit Memory Management Service""" - API_ACTIONS: Dict[str, str] = { - "UpdateMemoryCollection": "UpdateMemoryCollection", - "DeleteMemoryCollection": "DeleteMemoryCollection", - "GetMemoryConnectionInfo": "GetMemoryConnectionInfo", - "ListMemoryCollections": "ListMemoryCollections", - "AddMemoryCollection": "AddMemoryCollection", - "GetMemoryCollection": "GetMemoryCollection", - "CreateMemoryCollection": "CreateMemoryCollection", - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name="memory", - ) - - - def update_memory_collection(self, request: UpdateMemoryCollectionRequest) -> UpdateMemoryCollectionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateMemoryCollection", - request=request, - response_type=UpdateMemoryCollectionResponse, - ) - - def delete_memory_collection(self, request: DeleteMemoryCollectionRequest) -> DeleteMemoryCollectionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteMemoryCollection", - request=request, - response_type=DeleteMemoryCollectionResponse, - ) - - def get_memory_connection_info(self, request: GetMemoryConnectionInfoRequest) -> GetMemoryConnectionInfoResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetMemoryConnectionInfo", - request=request, - response_type=GetMemoryConnectionInfoResponse, - ) - - def list_memory_collections(self, request: ListMemoryCollectionsRequest) -> ListMemoryCollectionsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListMemoryCollections", - request=request, - response_type=ListMemoryCollectionsResponse, - ) - - def add_memory_collection(self, request: AddMemoryCollectionRequest) -> AddMemoryCollectionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FAddMemoryCollection", - request=request, - response_type=AddMemoryCollectionResponse, - ) - - def get_memory_collection(self, request: GetMemoryCollectionRequest) -> GetMemoryCollectionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetMemoryCollection", - request=request, - response_type=GetMemoryCollectionResponse, - ) - - def create_memory_collection(self, request: CreateMemoryCollectionRequest) -> CreateMemoryCollectionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateMemoryCollection", - request=request, - response_type=CreateMemoryCollectionResponse, - ) diff --git a/agentkit/memory/types.py b/agentkit/memory/types.py deleted file mode 100644 index a60295d..0000000 --- a/agentkit/memory/types.py +++ /dev/null @@ -1,289 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Optional -from pydantic import BaseModel, Field - -class MemoryBaseModel(BaseModel): - """AgentKit auto-generated base model""" - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -# Data Types -class StrategiesForUpdateMemoryCollection(MemoryBaseModel): - custom_extraction_instructions: Optional[str] = Field(default=None, alias="CustomExtractionInstructions") - name: Optional[str] = Field(default=None, alias="Name") - type: Optional[str] = Field(default=None, alias="Type") - - -class LongTermConfigurationForUpdateMemoryCollection(MemoryBaseModel): - strategies: Optional[list[StrategiesForUpdateMemoryCollection]] = Field(default=None, alias="Strategies") - - -class ConnectionInfosForGetMemoryConnectionInfo(MemoryBaseModel): - addr_type: Optional[str] = Field(default=None, alias="AddrType") - auth_key: Optional[str] = Field(default=None, alias="AuthKey") - auth_type: Optional[str] = Field(default=None, alias="AuthType") - base_url: Optional[str] = Field(default=None, alias="BaseUrl") - expire_at: Optional[str] = Field(default=None, alias="ExpireAt") - status: Optional[str] = Field(default=None, alias="Status") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class AssociatedRuntimesForListMemoryCollections(MemoryBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class VpcConfigurationForListMemoryCollections(MemoryBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationForListMemoryCollections(MemoryBaseModel): - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - vpc_configuration: Optional[VpcConfigurationForListMemoryCollections] = Field(default=None, alias="VpcConfiguration") - - -class TagsForListMemoryCollections(MemoryBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class MemoriesForListMemoryCollections(MemoryBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForListMemoryCollections]] = Field(default=None, alias="AssociatedRuntimes") - create_time: Optional[str] = Field(default=None, alias="CreateTime") - description: Optional[str] = Field(default=None, alias="Description") - last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime") - managed: Optional[bool] = Field(default=None, alias="Managed") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - name: Optional[str] = Field(default=None, alias="Name") - network_configuration: Optional[NetworkConfigurationForListMemoryCollections] = Field(default=None, alias="NetworkConfiguration") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - region: Optional[str] = Field(default=None, alias="Region") - status: Optional[str] = Field(default=None, alias="Status") - strategies_count: Optional[int] = Field(default=None, alias="StrategiesCount") - tags: Optional[list[TagsForListMemoryCollections]] = Field(default=None, alias="Tags") - - -class CollectionsForAddMemoryCollection(MemoryBaseModel): - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - message: Optional[str] = Field(default=None, alias="Message") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - - -class AssociatedRuntimesForGetMemoryCollection(MemoryBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class StrategiesForGetMemoryCollection(MemoryBaseModel): - custom_extraction_instructions: Optional[str] = Field(default=None, alias="CustomExtractionInstructions") - name: Optional[str] = Field(default=None, alias="Name") - type: Optional[str] = Field(default=None, alias="Type") - - -class LongTermConfigurationForGetMemoryCollection(MemoryBaseModel): - strategies: Optional[list[StrategiesForGetMemoryCollection]] = Field(default=None, alias="Strategies") - - -class TagsForGetMemoryCollection(MemoryBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class VpcConfigForGetMemoryCollection(MemoryBaseModel): - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -# UpdateMemoryCollection - Request -class LongTermForUpdateMemoryCollection(MemoryBaseModel): - strategies: Optional[list[LongTermStrategiesItemForUpdateMemoryCollection]] = Field(default=None, alias="Strategies") - -class VpcForUpdateMemoryCollection(MemoryBaseModel): - vpc_id: str = Field(..., alias="VpcId") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class LongTermStrategiesItemForUpdateMemoryCollection(MemoryBaseModel): - name: str = Field(..., alias="Name") - type: str = Field(..., alias="Type") - custom_extraction_instructions: Optional[str] = Field(default=None, alias="CustomExtractionInstructions") - -class UpdateMemoryCollectionRequest(MemoryBaseModel): - description: Optional[str] = Field(default=None, alias="Description") - memory_id: str = Field(..., alias="MemoryId") - vpc_config: Optional[VpcForUpdateMemoryCollection] = Field(default=None, alias="VpcConfig") - - -# UpdateMemoryCollection - Response -class UpdateMemoryCollectionResponse(MemoryBaseModel): - long_term_configuration: Optional[LongTermConfigurationForUpdateMemoryCollection] = Field(default=None, alias="LongTermConfiguration") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - - -# DeleteMemoryCollection - Request -class DeleteMemoryCollectionRequest(MemoryBaseModel): - memory_id: str = Field(..., alias="MemoryId") - - -# DeleteMemoryCollection - Response -class DeleteMemoryCollectionResponse(MemoryBaseModel): - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - - -# GetMemoryConnectionInfo - Request -class GetMemoryConnectionInfoRequest(MemoryBaseModel): - memory_id: str = Field(..., alias="MemoryId") - - -# GetMemoryConnectionInfo - Response -class GetMemoryConnectionInfoResponse(MemoryBaseModel): - connection_infos: Optional[list[ConnectionInfosForGetMemoryConnectionInfo]] = Field(default=None, alias="ConnectionInfos") - managed: Optional[bool] = Field(default=None, alias="Managed") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - message: Optional[str] = Field(default=None, alias="Message") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - - -# ListMemoryCollections - Request -class FiltersItemForListMemoryCollections(MemoryBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class TagFiltersItemForListMemoryCollections(MemoryBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListMemoryCollectionsRequest(MemoryBaseModel): - create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter") - create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore") - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter") - update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore") - filters: Optional[list[FiltersItemForListMemoryCollections]] = Field(default=None, alias="Filters") - tag_filters: Optional[list[TagFiltersItemForListMemoryCollections]] = Field(default=None, alias="TagFilters") - - -# ListMemoryCollections - Response -class ListMemoryCollectionsResponse(MemoryBaseModel): - memories: Optional[list[MemoriesForListMemoryCollections]] = Field(default=None, alias="Memories") - next_token: Optional[str] = Field(default=None, alias="NextToken") - memories: Optional[list[MemoriesForListMemoryCollections]] = Field(default=None, alias="Memories") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# AddMemoryCollection - Request -class CollectionsItemForAddMemoryCollection(MemoryBaseModel): - provider_collection_id: str = Field(..., alias="ProviderCollectionId") - description: Optional[str] = Field(default=None, alias="Description") - name: Optional[str] = Field(default=None, alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - -class AddMemoryCollectionRequest(MemoryBaseModel): - collections: Optional[list[CollectionsItemForAddMemoryCollection]] = Field(default=None, alias="Collections") - - -# AddMemoryCollection - Response -class AddMemoryCollectionResponse(MemoryBaseModel): - collections: Optional[list[CollectionsForAddMemoryCollection]] = Field(default=None, alias="Collections") - - -# GetMemoryCollection - Request -class GetMemoryCollectionRequest(MemoryBaseModel): - memory_id: str = Field(..., alias="MemoryId") - - -# GetMemoryCollection - Response -class GetMemoryCollectionResponse(MemoryBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForGetMemoryCollection]] = Field(default=None, alias="AssociatedRuntimes") - create_time: Optional[str] = Field(default=None, alias="CreateTime") - description: Optional[str] = Field(default=None, alias="Description") - last_update_time: Optional[str] = Field(default=None, alias="LastUpdateTime") - long_term_configuration: Optional[LongTermConfigurationForGetMemoryCollection] = Field(default=None, alias="LongTermConfiguration") - managed: Optional[bool] = Field(default=None, alias="Managed") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - name: Optional[str] = Field(default=None, alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - region: Optional[str] = Field(default=None, alias="Region") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetMemoryCollection]] = Field(default=None, alias="Tags") - trn: Optional[str] = Field(default=None, alias="Trn") - vpc_config: Optional[VpcConfigForGetMemoryCollection] = Field(default=None, alias="VpcConfig") - - -# CreateMemoryCollection - Request -class LongTermForCreateMemoryCollection(MemoryBaseModel): - strategies: Optional[list[LongTermStrategiesItemForCreateMemoryCollection]] = Field(default=None, alias="Strategies") - -class VpcForCreateMemoryCollection(MemoryBaseModel): - vpc_id: str = Field(..., alias="VpcId") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class LongTermStrategiesItemForCreateMemoryCollection(MemoryBaseModel): - name: str = Field(..., alias="Name") - type: str = Field(..., alias="Type") - custom_extraction_instructions: Optional[str] = Field(default=None, alias="CustomExtractionInstructions") - -class TagsItemForCreateMemoryCollection(MemoryBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class CreateMemoryCollectionRequest(MemoryBaseModel): - description: Optional[str] = Field(default=None, alias="Description") - name: str = Field(..., alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - tags: Optional[list[TagsItemForCreateMemoryCollection]] = Field(default=None, alias="Tags") - vpc_config: Optional[VpcForCreateMemoryCollection] = Field(default=None, alias="VpcConfig") - - -# CreateMemoryCollection - Response -class CreateMemoryCollectionResponse(MemoryBaseModel): - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - provider_collection_id: Optional[str] = Field(default=None, alias="ProviderCollectionId") - provider_type: Optional[str] = Field(default=None, alias="ProviderType") - status: Optional[str] = Field(default=None, alias="Status") - diff --git a/agentkit/runtime/__init__.py b/agentkit/runtime/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/runtime/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/runtime/client.py b/agentkit/runtime/client.py deleted file mode 100644 index 3d9ff46..0000000 --- a/agentkit/runtime/client.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Dict -from agentkit.client import BaseAgentkitClient -from agentkit.runtime.types import ( - CreateRuntimeRequest, - CreateRuntimeResponse, - DeleteRuntimeRequest, - DeleteRuntimeResponse, - GetRuntimeCozeTokenRequest, - GetRuntimeCozeTokenResponse, - GetRuntimeRequest, - GetRuntimeResponse, - GetRuntimeVersionRequest, - GetRuntimeVersionResponse, - ListRuntimeCrRegistriesRequest, - ListRuntimeCrRegistriesResponse, - ListRuntimeVersionsRequest, - ListRuntimeVersionsResponse, - ListRuntimesRequest, - ListRuntimesResponse, - ReleaseRuntimeRequest, - ReleaseRuntimeResponse, - UpdateRuntimeRequest, - UpdateRuntimeResponse, -) - - -class AgentkitRuntimeClient(BaseAgentkitClient): - """AgentKit Runtime Management Service""" - API_ACTIONS: Dict[str, str] = { - "UpdateRuntime": "UpdateRuntime", - "GetRuntimeVersion": "GetRuntimeVersion", - "ListRuntimeCrRegistries": "ListRuntimeCrRegistries", - "ListRuntimes": "ListRuntimes", - "ReleaseRuntime": "ReleaseRuntime", - "CreateRuntime": "CreateRuntime", - "GetRuntime": "GetRuntime", - "ListRuntimeVersions": "ListRuntimeVersions", - "GetRuntimeCozeToken": "GetRuntimeCozeToken", - "DeleteRuntime": "DeleteRuntime", - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name="runtime", - ) - - - def update_runtime(self, request: UpdateRuntimeRequest) -> UpdateRuntimeResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateRuntime", - request=request, - response_type=UpdateRuntimeResponse, - ) - - def get_runtime_version(self, request: GetRuntimeVersionRequest) -> GetRuntimeVersionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetRuntimeVersion", - request=request, - response_type=GetRuntimeVersionResponse, - ) - - def list_runtime_cr_registries(self, request: ListRuntimeCrRegistriesRequest) -> ListRuntimeCrRegistriesResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListRuntimeCrRegistries", - request=request, - response_type=ListRuntimeCrRegistriesResponse, - ) - - def list_runtimes(self, request: ListRuntimesRequest) -> ListRuntimesResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListRuntimes", - request=request, - response_type=ListRuntimesResponse, - ) - - def release_runtime(self, request: ReleaseRuntimeRequest) -> ReleaseRuntimeResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FReleaseRuntime", - request=request, - response_type=ReleaseRuntimeResponse, - ) - - def create_runtime(self, request: CreateRuntimeRequest) -> CreateRuntimeResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateRuntime", - request=request, - response_type=CreateRuntimeResponse, - ) - - def get_runtime(self, request: GetRuntimeRequest) -> GetRuntimeResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetRuntime", - request=request, - response_type=GetRuntimeResponse, - ) - - def list_runtime_versions(self, request: ListRuntimeVersionsRequest) -> ListRuntimeVersionsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListRuntimeVersions", - request=request, - response_type=ListRuntimeVersionsResponse, - ) - - def get_runtime_coze_token(self, request: GetRuntimeCozeTokenRequest) -> GetRuntimeCozeTokenResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetRuntimeCozeToken", - request=request, - response_type=GetRuntimeCozeTokenResponse, - ) - - def delete_runtime(self, request: DeleteRuntimeRequest) -> DeleteRuntimeResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteRuntime", - request=request, - response_type=DeleteRuntimeResponse, - ) diff --git a/agentkit/runtime/types.py b/agentkit/runtime/types.py deleted file mode 100644 index f731d2c..0000000 --- a/agentkit/runtime/types.py +++ /dev/null @@ -1,464 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Optional -from pydantic import BaseModel, Field - -class RuntimeTypeBaseModel(BaseModel): - """AgentKit auto-generated base model""" - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -# Data Types -class CustomJwtAuthorizerForGetRuntimeVersion(RuntimeTypeBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class KeyAuthForGetRuntimeVersion(RuntimeTypeBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForGetRuntimeVersion(RuntimeTypeBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForGetRuntimeVersion] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForGetRuntimeVersion] = Field(default=None, alias="KeyAuth") - - -class EnvsForGetRuntimeVersion(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class TagsForGetRuntimeVersion(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class CrRegistriesForListRuntimeCrRegistries(RuntimeTypeBaseModel): - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - description: Optional[str] = Field(default=None, alias="Description") - framework_type: Optional[str] = Field(default=None, alias="FrameworkType") - label: Optional[str] = Field(default=None, alias="Label") - language: Optional[str] = Field(default=None, alias="Language") - name: Optional[str] = Field(default=None, alias="Name") - tag: Optional[str] = Field(default=None, alias="Tag") - - -class CustomJwtAuthorizerForListRuntimes(RuntimeTypeBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class KeyAuthForListRuntimes(RuntimeTypeBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForListRuntimes(RuntimeTypeBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForListRuntimes] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForListRuntimes] = Field(default=None, alias="KeyAuth") - - -class EnvsForListRuntimes(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class VpcConfigurationForListRuntimes(RuntimeTypeBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForListRuntimes(RuntimeTypeBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForListRuntimes] = Field(default=None, alias="VpcConfiguration") - - -class TagsForListRuntimes(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class AgentKitRuntimesForListRuntimes(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: Optional[str] = Field(default=None, alias="ArtifactType") - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - authorizer_configuration: Optional[AuthorizerConfigurationForListRuntimes] = Field(default=None, alias="AuthorizerConfiguration") - command: Optional[str] = Field(default=None, alias="Command") - cpu_milli: Optional[int] = Field(default=None, alias="CpuMilli") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - current_version_number: Optional[int] = Field(default=None, alias="CurrentVersionNumber") - description: Optional[str] = Field(default=None, alias="Description") - envs: Optional[list[EnvsForListRuntimes]] = Field(default=None, alias="Envs") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - memory_mb: Optional[int] = Field(default=None, alias="MemoryMb") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForListRuntimes]] = Field(default=None, alias="NetworkConfigurations") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForListRuntimes]] = Field(default=None, alias="Tags") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -class CustomJwtAuthorizerForGetRuntime(RuntimeTypeBaseModel): - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - discovery_url: Optional[str] = Field(default=None, alias="DiscoveryUrl") - - -class KeyAuthForGetRuntime(RuntimeTypeBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForGetRuntime(RuntimeTypeBaseModel): - custom_jwt_authorizer: Optional[CustomJwtAuthorizerForGetRuntime] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[KeyAuthForGetRuntime] = Field(default=None, alias="KeyAuth") - - -class EnvsForGetRuntime(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class VpcConfigurationForGetRuntime(RuntimeTypeBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForGetRuntime(RuntimeTypeBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForGetRuntime] = Field(default=None, alias="VpcConfiguration") - - -class TagsForGetRuntime(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class KeyAuthForListRuntimeVersions(RuntimeTypeBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForListRuntimeVersions(RuntimeTypeBaseModel): - key_auth: Optional[KeyAuthForListRuntimeVersions] = Field(default=None, alias="KeyAuth") - - -class EnvsForListRuntimeVersions(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class AgentKitRuntimeVersionsForListRuntimeVersions(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: Optional[str] = Field(default=None, alias="ArtifactType") - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - authorizer_configuration: Optional[AuthorizerConfigurationForListRuntimeVersions] = Field(default=None, alias="AuthorizerConfiguration") - command: Optional[str] = Field(default=None, alias="Command") - cpu_milli: Optional[int] = Field(default=None, alias="CpuMilli") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - description: Optional[str] = Field(default=None, alias="Description") - envs: Optional[list[EnvsForListRuntimeVersions]] = Field(default=None, alias="Envs") - memory_mb: Optional[int] = Field(default=None, alias="MemoryMb") - role_name: Optional[str] = Field(default=None, alias="RoleName") - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - status: Optional[str] = Field(default=None, alias="Status") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - version_number: Optional[int] = Field(default=None, alias="VersionNumber") - - -# UpdateRuntime - Request -class AuthorizerForUpdateRuntime(RuntimeTypeBaseModel): - custom_jwt_authorizer: Optional[AuthorizerCustomJwtAuthorizerForUpdateRuntime] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[AuthorizerKeyAuthForUpdateRuntime] = Field(default=None, alias="KeyAuth") - -class AuthorizerCustomJwtAuthorizerForUpdateRuntime(RuntimeTypeBaseModel): - discovery_url: str = Field(..., alias="DiscoveryUrl") - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - -class AuthorizerKeyAuthForUpdateRuntime(RuntimeTypeBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - -class EnvsItemForUpdateRuntime(RuntimeTypeBaseModel): - key: str = Field(..., alias="Key") - value: str = Field(..., alias="Value") - -class TagsItemForUpdateRuntime(RuntimeTypeBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class UpdateRuntimeRequest(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: Optional[str] = Field(default=None, alias="ArtifactType") - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - client_token: Optional[str] = Field(default=None, alias="ClientToken") - description: Optional[str] = Field(default=None, alias="Description") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - model_agent_name: Optional[str] = Field(default=None, alias="ModelAgentName") - release_enable: Optional[bool] = Field(default=None, alias="ReleaseEnable") - runtime_id: str = Field(..., alias="RuntimeId") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - authorizer_configuration: Optional[AuthorizerForUpdateRuntime] = Field(default=None, alias="AuthorizerConfiguration") - envs: Optional[list[EnvsItemForUpdateRuntime]] = Field(default=None, alias="Envs") - tags: Optional[list[TagsItemForUpdateRuntime]] = Field(default=None, alias="Tags") - - -# UpdateRuntime - Response -class UpdateRuntimeResponse(RuntimeTypeBaseModel): - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - - -# GetRuntimeVersion - Request -class GetRuntimeVersionRequest(RuntimeTypeBaseModel): - runtime_id: str = Field(..., alias="RuntimeId") - version_number: Optional[int] = Field(default=None, alias="VersionNumber") - - -# GetRuntimeVersion - Response -class GetRuntimeVersionResponse(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: Optional[str] = Field(default=None, alias="ArtifactType") - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - authorizer_configuration: Optional[AuthorizerConfigurationForGetRuntimeVersion] = Field(default=None, alias="AuthorizerConfiguration") - command: Optional[str] = Field(default=None, alias="Command") - cpu_milli: Optional[int] = Field(default=None, alias="CpuMilli") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - description: Optional[str] = Field(default=None, alias="Description") - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - envs: Optional[list[EnvsForGetRuntimeVersion]] = Field(default=None, alias="Envs") - memory_mb: Optional[int] = Field(default=None, alias="MemoryMb") - model_agent_name: Optional[str] = Field(default=None, alias="ModelAgentName") - name: Optional[str] = Field(default=None, alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetRuntimeVersion]] = Field(default=None, alias="Tags") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - version_number: Optional[int] = Field(default=None, alias="VersionNumber") - - -# ListRuntimeCrRegistries - Request -class ListRuntimeCrRegistriesRequest(RuntimeTypeBaseModel): - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - - -# ListRuntimeCrRegistries - Response -class ListRuntimeCrRegistriesResponse(RuntimeTypeBaseModel): - cr_registries: Optional[list[CrRegistriesForListRuntimeCrRegistries]] = Field(default=None, alias="CrRegistries") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - - -# ListRuntimes - Request -class FiltersItemForListRuntimes(RuntimeTypeBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class TagFiltersItemForListRuntimes(RuntimeTypeBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListRuntimesRequest(RuntimeTypeBaseModel): - create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter") - create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore") - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - sort_by: Optional[str] = Field(default=None, alias="SortBy") - sort_order: Optional[str] = Field(default=None, alias="SortOrder") - update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter") - update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore") - filters: Optional[list[FiltersItemForListRuntimes]] = Field(default=None, alias="Filters") - tag_filters: Optional[list[TagFiltersItemForListRuntimes]] = Field(default=None, alias="TagFilters") - - -# ListRuntimes - Response -class ListRuntimesResponse(RuntimeTypeBaseModel): - agent_kit_runtimes: Optional[list[AgentKitRuntimesForListRuntimes]] = Field(default=None, alias="AgentKitRuntimes") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# ReleaseRuntime - Request -class ReleaseRuntimeRequest(RuntimeTypeBaseModel): - runtime_id: str = Field(..., alias="RuntimeId") - version_number: Optional[int] = Field(default=None, alias="VersionNumber") - - -# ReleaseRuntime - Response -class ReleaseRuntimeResponse(RuntimeTypeBaseModel): - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - - -# CreateRuntime - Request -class AuthorizerForCreateRuntime(RuntimeTypeBaseModel): - custom_jwt_authorizer: Optional[AuthorizerCustomJwtAuthorizerForCreateRuntime] = Field(default=None, alias="CustomJwtAuthorizer") - key_auth: Optional[AuthorizerKeyAuthForCreateRuntime] = Field(default=None, alias="KeyAuth") - -class AuthorizerCustomJwtAuthorizerForCreateRuntime(RuntimeTypeBaseModel): - discovery_url: str = Field(..., alias="DiscoveryUrl") - allowed_clients: Optional[list[str]] = Field(default=None, alias="AllowedClients") - -class AuthorizerKeyAuthForCreateRuntime(RuntimeTypeBaseModel): - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - -class NetworkForCreateRuntime(RuntimeTypeBaseModel): - vpc_configuration: Optional[NetworkVpcForCreateRuntime] = Field(default=None, alias="VpcConfiguration") - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - -class NetworkVpcForCreateRuntime(RuntimeTypeBaseModel): - vpc_id: str = Field(..., alias="VpcId") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class EnvsItemForCreateRuntime(RuntimeTypeBaseModel): - key: str = Field(..., alias="Key") - value: str = Field(..., alias="Value") - -class TagsItemForCreateRuntime(RuntimeTypeBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class CreateRuntimeRequest(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: str = Field(..., alias="ArtifactType") - artifact_url: str = Field(..., alias="ArtifactUrl") - client_token: Optional[str] = Field(default=None, alias="ClientToken") - description: Optional[str] = Field(default=None, alias="Description") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - model_agent_name: Optional[str] = Field(default=None, alias="ModelAgentName") - name: str = Field(..., alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: str = Field(..., alias="RoleName") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - authorizer_configuration: Optional[AuthorizerForCreateRuntime] = Field(default=None, alias="AuthorizerConfiguration") - envs: Optional[list[EnvsItemForCreateRuntime]] = Field(default=None, alias="Envs") - network_configuration: Optional[NetworkForCreateRuntime] = Field(default=None, alias="NetworkConfiguration") - tags: Optional[list[TagsItemForCreateRuntime]] = Field(default=None, alias="Tags") - - -# CreateRuntime - Response -class CreateRuntimeResponse(RuntimeTypeBaseModel): - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - - -# GetRuntime - Request -class GetRuntimeRequest(RuntimeTypeBaseModel): - runtime_id: str = Field(..., alias="RuntimeId") - - -# GetRuntime - Response -class GetRuntimeResponse(RuntimeTypeBaseModel): - apmplus_enable: Optional[bool] = Field(default=None, alias="ApmplusEnable") - artifact_type: Optional[str] = Field(default=None, alias="ArtifactType") - artifact_url: Optional[str] = Field(default=None, alias="ArtifactUrl") - authorizer_configuration: Optional[AuthorizerConfigurationForGetRuntime] = Field(default=None, alias="AuthorizerConfiguration") - command: Optional[str] = Field(default=None, alias="Command") - cpu_milli: Optional[int] = Field(default=None, alias="CpuMilli") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - current_version_number: Optional[int] = Field(default=None, alias="CurrentVersionNumber") - description: Optional[str] = Field(default=None, alias="Description") - envs: Optional[list[EnvsForGetRuntime]] = Field(default=None, alias="Envs") - failed_log_file_url: Optional[str] = Field(default=None, alias="FailedLogFileUrl") - knowledge_id: Optional[str] = Field(default=None, alias="KnowledgeId") - mcp_toolset_id: Optional[str] = Field(default=None, alias="MCPToolsetId") - memory_id: Optional[str] = Field(default=None, alias="MemoryId") - memory_mb: Optional[int] = Field(default=None, alias="MemoryMb") - model_agent_name: Optional[str] = Field(default=None, alias="ModelAgentName") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForGetRuntime]] = Field(default=None, alias="NetworkConfigurations") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - status: Optional[str] = Field(default=None, alias="Status") - status_message: Optional[str] = Field(default=None, alias="StatusMessage") - tags: Optional[list[TagsForGetRuntime]] = Field(default=None, alias="Tags") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -# ListRuntimeVersions - Request -class ListRuntimeVersionsRequest(RuntimeTypeBaseModel): - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - runtime_id: str = Field(..., alias="RuntimeId") - - -# ListRuntimeVersions - Response -class ListRuntimeVersionsResponse(RuntimeTypeBaseModel): - agent_kit_runtime_versions: Optional[list[AgentKitRuntimeVersionsForListRuntimeVersions]] = Field(default=None, alias="AgentKitRuntimeVersions") - next_token: Optional[str] = Field(default=None, alias="NextToken") - agent_kit_runtime_versions: Optional[list[AgentKitRuntimeVersionsForListRuntimeVersions]] = Field(default=None, alias="AgentKitRuntimeVersions") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# GetRuntimeCozeToken - Request -class GetRuntimeCozeTokenRequest(RuntimeTypeBaseModel): - runtime_id: str = Field(..., alias="RuntimeId") - - -# GetRuntimeCozeToken - Response -class GetRuntimeCozeTokenResponse(RuntimeTypeBaseModel): - jwt_token: Optional[str] = Field(default=None, alias="JwtToken") - - -# DeleteRuntime - Request -class DeleteRuntimeRequest(RuntimeTypeBaseModel): - client_token: Optional[str] = Field(default=None, alias="ClientToken") - runtime_id: str = Field(..., alias="RuntimeId") - - -# DeleteRuntime - Response -class DeleteRuntimeResponse(RuntimeTypeBaseModel): - runtime_id: Optional[str] = Field(default=None, alias="RuntimeId") - diff --git a/agentkit/toolkit/__init__.py b/agentkit/toolkit/__init__.py deleted file mode 100644 index f9d226a..0000000 --- a/agentkit/toolkit/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -AgentKit Toolkit - Build, deploy, and manage AI agents. - -This package provides both CLI and SDK interfaces for agent development: - -CLI Usage: - $ agentkit build - $ agentkit deploy - $ agentkit invoke "Hello, agent!" - -SDK Usage: - >>> from agentkit.toolkit import sdk - >>> result = sdk.build(config_file="agentkit.yaml") - >>> result = sdk.deploy() - >>> result = sdk.invoke(payload={"prompt": "Hello!"}) -""" - -# Export SDK module for programmatic access -from . import sdk - -# Export ExecutionContext for advanced usage -from .context import ExecutionContext - -__all__ = ["sdk", "ExecutionContext"] diff --git a/agentkit/toolkit/builders/__init__.py b/agentkit/toolkit/builders/__init__.py deleted file mode 100644 index e255b32..0000000 --- a/agentkit/toolkit/builders/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Builders - All builder implementations. - -Local build: LocalDockerBuilder -Cloud build: VeCPCRBuilder (Volcano Engine) -""" - -def __getattr__(name): - if name == "Builder": - from .base import Builder - return Builder - elif name == "LocalDockerBuilder": - from .local_docker import LocalDockerBuilder - return LocalDockerBuilder - elif name == "LocalDockerBuilderConfig": - from .local_docker import LocalDockerBuilderConfig - return LocalDockerBuilderConfig - elif name == "VeCPCRBuilder": - from .ve_pipeline import VeCPCRBuilder - return VeCPCRBuilder - elif name == "VeCPCRBuilderConfig": - from .ve_pipeline import VeCPCRBuilderConfig - return VeCPCRBuilderConfig - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - -__all__ = [ - "Builder", - "LocalDockerBuilder", - "LocalDockerBuilderConfig", - "VeCPCRBuilder", - "VeCPCRBuilderConfig", -] diff --git a/agentkit/toolkit/builders/base.py b/agentkit/toolkit/builders/base.py deleted file mode 100644 index 2ec123f..0000000 --- a/agentkit/toolkit/builders/base.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from abc import ABC, abstractmethod -from typing import Dict, Any, Optional -import logging -from pathlib import Path - -from agentkit.toolkit.models import BuildResult -from agentkit.toolkit.reporter import Reporter, SilentReporter - -logger = logging.getLogger(__name__) - - -class Builder(ABC): - """ - Abstract base class for builders. - - Responsibilities: - - Accept project directory and reporter - - Provide build interface - - Manage working directory - - Design principles: - - project_dir is a constructor parameter (execution environment), not a configuration parameter - - workdir is immutable during the instance lifecycle - """ - - def __init__(self, project_dir: Optional[Path] = None, reporter: Optional[Reporter] = None): - """ - Initialize Builder. - - Args: - project_dir: Project root directory (where config files are located). - If None, uses current working directory. - reporter: Progress reporter for UI feedback. - If None, uses SilentReporter. - - Design notes: - - project_dir is execution environment information, not configuration - - workdir is immutable during the instance lifecycle - - Multiple build() calls use the same workdir - """ - self.logger = logging.getLogger(f"{__name__}.{self.__class__.__name__}") - self.reporter = reporter or SilentReporter() - - self.workdir = self._resolve_workdir(project_dir) - - self.logger.debug(f"Builder initialized, workdir: {self.workdir}") - - def _resolve_workdir(self, project_dir: Optional[Path]) -> Path: - """ - Resolve the working directory. - - Args: - project_dir: Project directory provided by user. - - Returns: - Path: Resolved working directory (absolute path). - - Warning: - If project_dir is None, falls back to current working directory (Path.cwd()). - This may not be the expected project directory. It's recommended to always - explicitly pass project_dir. - """ - if project_dir: - resolved = Path(project_dir).resolve() - if not resolved.exists(): - self.logger.warning( - f"Project directory does not exist: {resolved}, falling back to current directory: {Path.cwd()}" - ) - return Path.cwd() - return resolved - else: - cwd = Path.cwd() - self.logger.warning( - f"project_dir not provided, using current working directory: {cwd}\n" - f"This may not be the correct project directory! If build fails, check Dockerfile and source file locations." - ) - return cwd - - @abstractmethod - def build(self, config: Dict[str, Any]) -> BuildResult: - """Execute build process. - - Args: - config: Build configuration. - - Returns: - BuildResult: Unified build result object. - """ - pass - - @abstractmethod - def check_artifact_exists(self, config: Dict[str, Any]) -> bool: - pass - - @abstractmethod - def remove_artifact(self, config: Dict[str, Any]) -> bool: - pass \ No newline at end of file diff --git a/agentkit/toolkit/builders/local_docker.py b/agentkit/toolkit/builders/local_docker.py deleted file mode 100644 index ae7f41d..0000000 --- a/agentkit/toolkit/builders/local_docker.py +++ /dev/null @@ -1,359 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Docker builder implementation -Provides local Docker environment build functionality -""" - -import logging -import os -from pathlib import Path -from typing import Dict, Any, Optional -from dataclasses import dataclass, field -from datetime import datetime -from agentkit.toolkit.config import CommonConfig -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin -from agentkit.toolkit.models import BuildResult, ImageInfo -from agentkit.toolkit.reporter import Reporter -from agentkit.toolkit.errors import ErrorCode -from .base import Builder - -from agentkit.toolkit.config import DockerBuildConfig -import shutil - -logger = logging.getLogger(__name__) - - -@dataclass -class LocalDockerBuilderConfig(AutoSerializableMixin): - """Docker builder configuration""" - common_config: Optional[CommonConfig] = field(default=None, metadata={"system": True, "description": "Common configuration"}) - image_name: str = field(default="", metadata={"description": "Image name"}) - image_tag: str = field(default="latest", metadata={"description": "Image tag"}) - dockerfile_path: str = field(default=".", metadata={"description": "Dockerfile directory path"}) - dockerfile_name: str = field(default="Dockerfile", metadata={"description": "Dockerfile filename"}) - template_dir: Optional[str] = field(default=None, metadata={"description": "Dockerfile template directory"}) - template_name: str = field(default="Dockerfile.j2", metadata={"description": "Dockerfile template filename"}) - docker_build_config: Optional[DockerBuildConfig] = field( - default=None, - metadata={"system": True, "description": "Docker build customization (base_image, build_script, etc.)"} - ) - - -class LocalDockerBuilder(Builder): - """Docker builder implementation""" - - def __init__(self, project_dir: Optional[Path] = None, reporter: Optional[Reporter] = None): - """Initialize LocalDockerBuilder. - - Args: - project_dir: Project root directory. - reporter: Progress reporter for build progress. Defaults to SilentReporter (no output). - """ - super().__init__(project_dir, reporter) - try: - from agentkit.toolkit.docker.container import DockerManager - except ImportError: - raise ImportError("Missing Docker dependencies, please install agentkit[docker] extras") - self.docker_manager = DockerManager() - self.dockerfile_renderer = None - - - def build(self, config: LocalDockerBuilderConfig) -> BuildResult: - """Build Docker image. - - Args: - config: Build configuration object (strongly typed). - - Returns: - BuildResult: Unified build result object. - """ - docker_config = config - common_config = docker_config.common_config - - docker_build_config = docker_config.docker_build_config - force_regenerate = ( - docker_build_config.regenerate_dockerfile - if docker_build_config else False - ) - - if common_config is None: - error_msg = "Missing common configuration" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING, - build_logs=[error_msg] - ) - - docker_available, docker_message = self.docker_manager.is_docker_available() - if not docker_available: - logger.error("Docker availability check failed") - error_lines = docker_message.split('\n') - return BuildResult( - success=False, - error=docker_message, - error_code=ErrorCode.DOCKER_NOT_AVAILABLE, - build_logs=error_lines - ) - - try: - if common_config.language == "Python": - template_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "resources", "templates", "python")) - elif common_config.language == "Golang": - template_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "resources", "templates", "golang")) - else: - error_msg = f"Unsupported language: {common_config.language}" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID, - build_logs=[error_msg] - ) - - try: - from agentkit.toolkit.docker.container import DockerfileRenderer, DockerManager - except ImportError: - error_msg = "Missing Docker dependencies" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.DEPENDENCY_MISSING, - build_logs=[error_msg] - ) - - try: - renderer = DockerfileRenderer(template_dir) - except Exception: - error_msg = "Missing Dockerfile renderer" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.BUILD_FAILED, - build_logs=[error_msg] - ) - - context = { - "language_version": common_config.language_version, - } - - if docker_build_config: - if docker_build_config.base_image: - if common_config.language == "Golang" and isinstance(docker_build_config.base_image, dict): - context["base_image_builder"] = docker_build_config.base_image.get("builder") - context["base_image_runtime"] = docker_build_config.base_image.get("runtime") - else: - context["base_image"] = docker_build_config.base_image - - if docker_build_config.build_script: - build_script_path = self.workdir / docker_build_config.build_script - if build_script_path.exists(): - context["build_script"] = docker_build_config.build_script - else: - logger.warning(f"Build script not found: {docker_build_config.build_script}") - - if common_config.language == "Python": - context["agent_module_path"] = os.path.splitext(common_config.entry_point)[0] - if common_config.dependencies_file: - dependencies_file_path = self.workdir / common_config.dependencies_file - if not dependencies_file_path.exists(): - dependencies_file_path.write_text("") - context["dependencies_file"] = common_config.dependencies_file - - if common_config.language == "Golang": - entry_path = (self.workdir / common_config.entry_point).resolve() - if not entry_path.exists(): - candidate = self.workdir / common_config.entry_point - candidate = candidate if candidate.exists() else self.workdir - found = None - for p in [candidate] + list(candidate.parents): - if (Path(p) / "go.mod").exists(): - found = Path(p) - break - if found: - entry_path = found.resolve() - else: - error_msg = f"Project path not found: {common_config.entry_point}" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID, - build_logs=[error_msg] - ) - - src_dest = self.workdir / "src" - src_dest.mkdir(parents=True, exist_ok=True) - - if entry_path.is_file() and entry_path.suffix == ".sh": - project_root = entry_path.parent - entry_relative_path = str((Path("src") / project_root.name / entry_path.name).as_posix()) - elif entry_path.is_dir(): - project_root = entry_path - entry_relative_path = str((Path("src") / project_root.name).as_posix()) - else: - error_msg = "Unsupported Go entry: single-file compilation is not supported. Provide project directory or build.sh" - logger.error(error_msg) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID, - build_logs=[error_msg] - ) - - binary_name = (common_config.agent_name or project_root.name) - - try: - proj_res = project_root.resolve() - src_res = src_dest.resolve() - except Exception: - proj_res = project_root - src_res = src_dest - - target_subdir = src_dest / project_root.name - target_subdir.mkdir(parents=True, exist_ok=True) - for child in project_root.iterdir(): - try: - if child.resolve() == src_res: - continue - except Exception: - if child == src_dest: - continue - dest = target_subdir / child.name - if child.is_dir(): - shutil.copytree(child, dest, dirs_exist_ok=True, symlinks=True) - else: - dest.parent.mkdir(parents=True, exist_ok=True) - shutil.copy2(child, dest) - - context.update({ - "entry_relative_path": entry_relative_path, - "binary_name": binary_name, - "agent_module_path": f"/usr/local/bin/{binary_name}" - }) - - from agentkit.toolkit.docker.dockerfile import DockerfileManager - - config_hash_dict = { - 'language': common_config.language, - 'language_version': common_config.language_version, - 'entry_point': common_config.entry_point, - 'dependencies_file': common_config.dependencies_file, - } - if docker_build_config: - config_hash_dict['docker_build'] = { - 'base_image': docker_build_config.base_image, - 'build_script': docker_build_config.build_script, - } - - def generate_dockerfile_content() -> str: - """Generate Dockerfile content.""" - from io import StringIO - output = StringIO() - - # 使用 renderer 渲染到字符串 - template = renderer.env.get_template(docker_config.template_name) - rendered = template.render(**context) - return rendered - - dockerfile_manager = DockerfileManager(self.workdir, self.logger) - generated, dockerfile_path = dockerfile_manager.prepare_dockerfile( - config_hash_dict=config_hash_dict, - content_generator=generate_dockerfile_content, - force_regenerate=force_regenerate - ) - - dockerignore_path = self.workdir / ".dockerignore" - if not dockerignore_path.exists(): - renderer.create_dockerignore(str(dockerignore_path)) - image_name = f"{docker_config.image_name or 'agentkit-app'}" - image_tag = f"{docker_config.image_tag or 'latest'}" - - self.reporter.info(f"Building Docker image: {image_name}:{image_tag}") - - build_kwargs = { - 'dockerfile_path': str(self.workdir), - 'image_name': image_name, - 'image_tag': image_tag, - 'build_args': {} - } - - if docker_build_config and docker_build_config.platform: - if docker_build_config.platform.lower() != "auto": - build_kwargs['platform'] = docker_build_config.platform - self.reporter.info(f"Target platform: {docker_build_config.platform}") - else: - self.reporter.info("Target platform: auto-detect") - - self.reporter.info("Executing Docker build...") - success, build_logs, image_id = self.docker_manager.build_image(**build_kwargs) - - if success: - self.reporter.success(f"Image built successfully: {image_name}:{image_tag}") - return BuildResult( - success=True, - image=ImageInfo( - repository=image_name, - tag=image_tag, - digest=image_id # Docker image ID 作为 digest - ), - build_timestamp=datetime.now(), - build_logs=build_logs - ) - else: - error_msg = "Docker build failed" - if build_logs: - error_msg = "\n".join(build_logs[-10:]) - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.BUILD_FAILED, - build_logs=build_logs, - build_timestamp=datetime.now() - ) - - except Exception as e: - error_msg = f"Build error: {str(e)}" - logger.exception("Build failed with exception") - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.BUILD_FAILED, - build_logs=[str(e)], - build_timestamp=datetime.now() - ) - - def check_artifact_exists(self, config: Dict[str, Any]) -> bool: - """Check if build artifact exists""" - try: - exists, image_info, actual_image_id = self.docker_manager.check_image_exists( - config['full_image_name'], None - ) - return exists - except Exception as e: - self.logger.error(f"Error checking image existence: {str(e)}") - return False - - def remove_artifact(self, config: Dict[str, Any]) -> bool: - """Remove Docker image""" - try: - return self.docker_manager.remove_image(config['full_image_name'], force=True) - except Exception as e: - self.logger.error(f"Error removing image: {str(e)}") - return False \ No newline at end of file diff --git a/agentkit/toolkit/builders/ve_pipeline.py b/agentkit/toolkit/builders/ve_pipeline.py deleted file mode 100644 index 33ec2f1..0000000 --- a/agentkit/toolkit/builders/ve_pipeline.py +++ /dev/null @@ -1,1132 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import logging -import tempfile -import uuid -from pathlib import Path -from typing import Dict, Any, Optional -from dataclasses import dataclass, field -from datetime import datetime - -from agentkit.toolkit.config import CommonConfig, AUTO_CREATE_VE, DEFAULT_WORKSPACE_NAME, DockerBuildConfig, DEFAULT_IMAGE_TAG -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin -from agentkit.toolkit.models import BuildResult, ImageInfo -from agentkit.toolkit.reporter import Reporter -from agentkit.toolkit.errors import ErrorCode -from agentkit.utils.misc import generate_random_id -from agentkit.toolkit.volcengine.services import CRServiceConfig -from .base import Builder - -logger = logging.getLogger(__name__) - -@dataclass -class VeCPCRBuilderConfig(AutoSerializableMixin): - """Volcano Engine Code Pipeline + Container Registry builder configuration. - - Manages cloud-based build orchestration across three services: - - TOS (Object Storage): Source code archive storage - - CR (Container Registry): Docker image repository - - Code Pipeline: Build execution environment - - Supports template rendering for dynamic resource naming and auto-creation - of missing resources when configured with AUTO_CREATE_VE. - """ - - common_config: Optional[CommonConfig] = field(default=None, metadata={"system": True, "description": "Common configuration"}) - - tos_bucket: str = field(default=AUTO_CREATE_VE, metadata={"description": "TOS bucket name", "render_template": True}) - tos_region: str = field(default="cn-beijing", metadata={"description": "TOS region"}) - tos_prefix: str = field(default="agentkit-builds", metadata={"description": "TOS path prefix"}) - - cr_instance_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "CR instance name", "render_template": True}) - cr_namespace_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "CR namespace", "render_template": True}) - cr_repo_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "CR repository name"}) - cr_region: str = field(default="cn-beijing", metadata={"description": "CR region"}) - - cp_workspace_name: str = field(default=DEFAULT_WORKSPACE_NAME, metadata={"description": "Code Pipeline workspace name"}) - cp_pipeline_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Code Pipeline name"}) - cp_pipeline_id: str = field(default="", metadata={"description": "Code Pipeline ID"}) - - image_tag: str = field(default=DEFAULT_IMAGE_TAG, metadata={"description": "Image tag"}) - dockerfile_template: str = field(default="Dockerfile.j2", metadata={"description": "Dockerfile template"}) - build_timeout: int = field(default=3600, metadata={"description": "Build timeout in seconds"}) - - image_url: str = field(default=None, metadata={"system": True}) - build_timestamp: str = field(default=None, metadata={"system": True}) - tos_object_key: str = field(default=None, metadata={"system": True}) - - docker_build_config: Optional[DockerBuildConfig] = field( - default=None, - metadata={"system": True, "description": "Docker build customization (base_image, build_script, etc.)"} - ) - - def __post_init__(self): - """Auto-render template fields after object creation. - - Processes fields marked with render_template=True metadata to resolve - template variables like {{agent_name}} using environment context. - """ - self._render_template_fields() - - -class VeCPCRBuilder(Builder): - """Volcano Engine Code Pipeline + Container Registry cloud builder. - - Orchestrates cloud-based Docker image builds using Volcano Engine services: - 1. Packages source code and uploads to TOS - 2. Ensures CR resources (instance, namespace, repository) exist - 3. Creates/reuses Code Pipeline for build execution - 4. Monitors build progress and returns image URL - - Supports both Python and Golang projects with multi-stage builds. - """ - - def __init__(self, project_dir: Optional[Path] = None, reporter: Optional[Reporter] = None): - """Initialize VeCPCRBuilder. - - Args: - project_dir: Project root directory for source code packaging. - reporter: Progress reporter for build status. Defaults to SilentReporter. - """ - super().__init__(project_dir, reporter) - # Service instances are lazily initialized when needed - self._tos_service = None - self._cr_service = None - self._pipeline_service = None - - - - def build(self, config: VeCPCRBuilderConfig) -> BuildResult: - """Execute cloud build process. - - Orchestrates the complete build workflow: - 1. Validates configuration and renders Dockerfile - 2. Creates project archive and uploads to TOS - 3. Ensures CR resources exist with public access - 4. Creates/reuses Code Pipeline for build execution - 5. Monitors build progress and returns image metadata - - Args: - config: Strongly-typed build configuration with auto-creation support. - - Returns: - BuildResult: Contains image info, metadata, and build status. - - Raises: - Exception: For configuration validation, resource creation, or build failures. - """ - builder_config = config - resources = {} # Track created resources for cleanup on failure - - docker_build_config = builder_config.docker_build_config - - try: - if not self._validate_config(builder_config): - return BuildResult( - success=False, - error="Configuration validation failed", - error_code=ErrorCode.CONFIG_INVALID - ) - - self.reporter.info("Starting cloud build process...") - - self.reporter.info("1/6 Rendering Dockerfile...") - resources['dockerfile_path'] = self._render_dockerfile(builder_config, docker_build_config) - - self.reporter.info("2/6 Creating project archive...") - resources['archive_path'] = self._create_project_archive(builder_config) - - self.reporter.info("3/6 Uploading to TOS...") - resources['tos_url'] = self._upload_to_tos(resources['archive_path'], builder_config) - resources['tos_object_key'] = builder_config.tos_object_key - resources['tos_bucket'] = builder_config.tos_bucket - self.reporter.info(f"Uploaded to TOS: {resources['tos_url']}, bucket: {resources['tos_bucket']}") - - self.reporter.info("4/6 Preparing CR resources...") - resources['cr_config'] = self._prepare_cr_resources(builder_config) - - self.reporter.info("5/6 Preparing Code Pipeline resources...") - resources['pipeline_id'] = self._prepare_pipeline_resources( - builder_config, resources['tos_url'], resources['cr_config'] - ) - # Capture pipeline metadata from resource preparation - if hasattr(self, '_build_resources'): - if 'pipeline_name' in self._build_resources: - resources['pipeline_name'] = self._build_resources['pipeline_name'] - if 'pipeline_id' in self._build_resources: - resources['pipeline_id'] = self._build_resources['pipeline_id'] - - self.reporter.info("6/6 Executing build...") - resources['image_url'] = self._execute_build(resources['pipeline_id'], builder_config) - self.reporter.success(f"Build completed: {resources['image_url']}") - - # Update config with build results for persistence - builder_config.image_url = resources['image_url'] - builder_config.cp_pipeline_id = resources['pipeline_id'] - builder_config.build_timestamp = datetime.now().isoformat() - builder_config.tos_object_key = resources['tos_object_key'] - - # Parse image URL to extract repository and tag components - image_url = resources['image_url'] - if ':' in image_url: - repository, tag = image_url.rsplit(':', 1) - else: - repository = image_url - tag = builder_config.image_tag - - image_info = ImageInfo( - repository=repository, - tag=tag, - digest=None - ) - - return BuildResult( - success=True, - image=image_info, - build_timestamp=datetime.fromisoformat(builder_config.build_timestamp), - build_logs=[], - metadata={ - "cr_image_url": resources['image_url'], - "cp_pipeline_id": resources['pipeline_id'], - "cp_pipeline_name": resources.get('pipeline_name'), - "cr_instance_name": builder_config.cr_instance_name, - "cr_namespace_name": builder_config.cr_namespace_name, - "cr_repo_name": builder_config.cr_repo_name, - "tos_object_url": resources['tos_url'], - "tos_object_key": builder_config.tos_object_key, - "tos_bucket": builder_config.tos_bucket, - "resources": resources - } - ) - - except Exception as e: - logger.error(f"Build failed: {str(e)}") - logger.exception("Cloud build failed with exception") - - # Preserve partial build state for debugging and cleanup - if resources: - builder_config.build_timestamp = datetime.now().isoformat() - if 'tos_object_key' in resources: - builder_config.tos_object_key = resources['tos_object_key'] - if 'pipeline_id' in resources: - builder_config.cp_pipeline_id = resources['pipeline_id'] - - error_msg = f"Build failed: {str(e)}" - - return BuildResult( - success=False, - error=error_msg, - error_code=ErrorCode.BUILD_FAILED, - build_timestamp=datetime.now(), - metadata={ - "resources": resources, - "tos_object_key": builder_config.tos_object_key if resources else None, - "cp_pipeline_id": resources.get('pipeline_id') if resources else None - } - ) - - def check_artifact_exists(self, config: VeCPCRBuilderConfig) -> bool: - """Check if the built image exists in Container Registry. - - Args: - config: Build configuration with image URL to verify. - - Returns: - True if image exists and is accessible, False otherwise. - - Note: - Currently simplified to check config.image_url presence. - TODO: Implement actual CR API verification. - """ - try: - builder_config = config - if not builder_config.image_url: - return False - - # Use CR service to verify image existence - try: - from agentkit.toolkit.volcengine.services import CRService, CRServiceConfig - - cr_config = CRServiceConfig( - instance_name=builder_config.cr_instance_name, - namespace_name=builder_config.cr_namespace_name, - repo_name=builder_config.cr_repo_name, - region=builder_config.cr_region, - image_full_url=builder_config.image_url - ) - - cr_service = CRService(reporter=self.reporter) - - self.reporter.info(f"Checking image existence: {builder_config.image_url}") - - # TODO: Implement actual CR API image verification - # Currently simplified - assumes image exists if URL is configured - return True - - except Exception as e: - logger.warning(f"Image existence check failed: {str(e)}") - return False - - except Exception: - return False - - def remove_artifact(self, config: VeCPCRBuilderConfig) -> bool: - """Remove build artifacts from cloud resources. - - Cleans up: - - TOS source archive (if tos_object_key exists) - - CR image (TODO: not implemented - images may be shared) - - Pipeline resources (TODO: not implemented - may affect other builds) - - Args: - config: Build configuration with artifact locations. - - Returns: - True if cleanup completed without critical errors. - - Note: - Partial cleanup failures are logged as warnings but don't fail the operation. - """ - try: - builder_config = config - - # Clean up TOS source archive - if builder_config.tos_object_key: - try: - from agentkit.toolkit.volcengine.services.tos_service import TOSService, TOSServiceConfig - - tos_config = TOSServiceConfig( - bucket=builder_config.tos_bucket, - region=builder_config.tos_region, - prefix=builder_config.tos_prefix - ) - - tos_service = TOSService(tos_config) - tos_service.delete_file(builder_config.tos_object_key) - logger.info(f"Deleted TOS archive: {builder_config.tos_object_key}") - - except Exception as e: - logger.warning(f"Failed to delete TOS archive: {str(e)}") - - # CR image cleanup (not implemented - images may be shared) - if builder_config.image_url: - try: - self.reporter.warning(f"Note: CR image deletion not implemented, image preserved: {builder_config.image_url}") - # TODO: Implement CR image deletion via API - # Consider: Images may be used by running services - # Requires careful lifecycle management - - except Exception as e: - logger.warning(f"CR image cleanup failed: {str(e)}") - - # Pipeline resource cleanup (not implemented) - if builder_config.cp_pipeline_id: - try: - self.reporter.warning(f"Note: Pipeline cleanup not implemented, Pipeline ID: {builder_config.cp_pipeline_id}") - # TODO: Implement pipeline resource cleanup - # Consider: Pipeline may be reused for future builds - # Could clean up build history/logs instead of pipeline itself - - except Exception as e: - logger.warning(f"Pipeline cleanup failed: {str(e)}") - - return True - - except Exception as e: - logger.error(f"Artifact cleanup failed: {str(e)}") - return False - - def _validate_config(self, config: VeCPCRBuilderConfig) -> bool: - """Validate build configuration. - - Checks required fields that cannot be auto-created or have no sensible defaults. - """ - if not config.tos_bucket: - self.reporter.error("Error: TOS bucket not configured") - return False - if not config.cr_region: - self.reporter.error("Error: CR region not configured") - return False - if not config.tos_region: - self.reporter.error("Error: TOS region not configured") - return False - return True - - def _render_dockerfile(self, config: VeCPCRBuilderConfig, docker_build_config: Optional[DockerBuildConfig] = None) -> str: - """Render Dockerfile with language-specific templates. - - Supports Python and Golang projects with customizable base images and build scripts. - For Golang, handles both script-based builds (.sh files) and directory-based builds - with multi-stage Docker support. - - Returns: - Path to the generated Dockerfile in the working directory. - """ - try: - from agentkit.toolkit.docker.container import DockerfileRenderer - import shutil - - common_config = config.common_config - language = getattr(common_config, "language", "Python") - context = { - "language_version": common_config.language_version, - } - - # Inject Docker build configuration parameters - if docker_build_config: - # Handle base image configuration - if docker_build_config.base_image: - if language == "Golang" and isinstance(docker_build_config.base_image, dict): - # Golang multi-stage build: separate builder and runtime images - context["base_image_builder"] = docker_build_config.base_image.get("builder") - context["base_image_runtime"] = docker_build_config.base_image.get("runtime") - else: - # Python or single-stage Golang build - context["base_image"] = docker_build_config.base_image - - # Handle custom build script - if docker_build_config.build_script: - build_script_path = self.workdir / docker_build_config.build_script - if build_script_path.exists(): - context["build_script"] = docker_build_config.build_script - else: - logger.warning(f"Build script not found: {docker_build_config.build_script}") - - # Select language-specific template directory - if language == "Python": - template_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), "..", "resources", "templates", "python" - )) - context["agent_module_path"] = os.path.splitext(common_config.entry_point)[0] - if common_config.dependencies_file: - dependencies_file_path = self.workdir / common_config.dependencies_file - if not dependencies_file_path.exists(): - # Create empty dependencies file if missing - dependencies_file_path.write_text("") - context["dependencies_file"] = common_config.dependencies_file - - elif language == "Golang": - template_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), "..", "resources", "templates", "golang" - )) - entry_on_disk = (self.workdir / common_config.entry_point).resolve() - if not entry_on_disk.exists(): - raise Exception(f"Project path not found: {common_config.entry_point}") - - src_dest = self.workdir / "src" - src_dest.mkdir(parents=True, exist_ok=True) - - # Script-based build: copy entire project and place script in src// - if entry_on_disk.is_file() and entry_on_disk.suffix == ".sh": - project_root = entry_on_disk.parent - target_subdir = src_dest / project_root.name - proj_res = project_root.resolve() - src_res = src_dest.resolve() - - # Check if src directory is inside project to avoid infinite recursion - try: - src_inside_proj = src_res.relative_to(proj_res) == src_res.relative_to(proj_res) - except Exception: - src_inside_proj = False - - target_subdir.mkdir(parents=True, exist_ok=True) - for child in project_root.iterdir(): - try: - if child.resolve() == src_res: - continue - except Exception: - if child == src_dest: - continue - dest = target_subdir / child.name - if child.is_dir(): - shutil.copytree(child, dest, dirs_exist_ok=True, symlinks=True) - else: - dest.parent.mkdir(parents=True, exist_ok=True) - shutil.copy2(child, dest) - - entry_relative_path = str((Path("src") / project_root.name / entry_on_disk.name).as_posix()) - binary_name = (common_config.agent_name or project_root.name) - else: - # Directory-based build: copy project directory to src/ - project_root = entry_on_disk if entry_on_disk.is_dir() else entry_on_disk.parent - target_subdir = src_dest / project_root.name - proj_res = project_root.resolve() - src_res = src_dest.resolve() - - target_subdir.mkdir(parents=True, exist_ok=True) - for child in project_root.iterdir(): - try: - if child.resolve() == src_res: - continue - except Exception: - if child == src_dest: - continue - dest = target_subdir / child.name - if child.is_dir(): - shutil.copytree(child, dest, dirs_exist_ok=True, symlinks=True) - else: - dest.parent.mkdir(parents=True, exist_ok=True) - shutil.copy2(child, dest) - - entry_relative_path = str((Path("src") / project_root.name).as_posix()) - binary_name = (common_config.agent_name or project_root.name) - - context.update({ - "entry_relative_path": entry_relative_path, - "binary_name": binary_name, - "agent_module_path": f"/usr/local/bin/{binary_name}" - }) - else: - raise Exception(f"Unsupported language: {language}") - - # Use DockerfileManager for intelligent Dockerfile generation - from agentkit.toolkit.docker.dockerfile import DockerfileManager - - # Prepare config hash for change detection (avoids unnecessary regeneration) - config_hash_dict = { - 'language': common_config.language, - 'language_version': common_config.language_version, - 'entry_point': common_config.entry_point, - 'dependencies_file': common_config.dependencies_file, - } - if docker_build_config: - config_hash_dict['docker_build'] = { - 'base_image': docker_build_config.base_image, - 'build_script': docker_build_config.build_script, - } - - renderer = DockerfileRenderer(template_dir) - - # Content generator function (captures context via closure) - def generate_dockerfile_content() -> str: - """Generate Dockerfile content without metadata header.""" - template = renderer.env.get_template(config.dockerfile_template) - rendered = template.render(**context) - return rendered - - # Check if forced regeneration is requested - force_regenerate = False - if docker_build_config: - force_regenerate = docker_build_config.regenerate_dockerfile - - dockerfile_manager = DockerfileManager(self.workdir, logger) - generated, dockerfile_path = dockerfile_manager.prepare_dockerfile( - config_hash_dict=config_hash_dict, - content_generator=generate_dockerfile_content, - force_regenerate=force_regenerate - ) - - # Ensure .dockerignore exists for optimal build context - dockerignore_path = self.workdir / ".dockerignore" - if not dockerignore_path.exists(): - renderer.create_dockerignore(str(dockerignore_path)) - - return dockerfile_path - - except ImportError: - raise Exception("Missing Docker-related dependencies") - - def _create_project_archive(self, config: VeCPCRBuilderConfig) -> str: - """Create project archive for TOS upload. - - Generates a uniquely named archive containing the entire project directory. - Uses timestamp and random ID to ensure uniqueness across builds. - - Returns: - Path to the created archive file. - """ - try: - from agentkit.toolkit.volcengine.utils.project_archiver import create_project_archive - common_config = config.common_config - # Generate unique archive name with timestamp and random ID - agent_name = common_config.agent_name or "agentkit-app" - timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") - archive_name = f"{agent_name}_{timestamp}_{uuid.uuid4().hex[:8]}" - - temp_dir = tempfile.mkdtemp() - source_base_path = self.workdir - - # Create archive using project archiver utility - archive_path = create_project_archive( - source_dir=str(source_base_path), - output_dir=temp_dir, - archive_name=archive_name - ) - - logger.info(f"Project archive created: {archive_path}") - self.reporter.success(f"Project archive created: {archive_path}") - return archive_path - - except Exception as e: - raise Exception(f"Failed to create project archive: {str(e)}") - - def _upload_to_tos(self, archive_path: str, config: VeCPCRBuilderConfig) -> str: - """Upload project archive to TOS (Object Storage). - - Handles bucket auto-creation, template variable validation, and upload verification. - Supports both user-specified and auto-generated bucket names. - - Args: - archive_path: Local path to the project archive. - config: Build configuration with TOS settings. - - Returns: - TOS URL of the uploaded archive. - - Raises: - ValueError: For unrendered template variables in bucket name. - Exception: For bucket creation or upload failures. - """ - try: - from agentkit.toolkit.volcengine.services.tos_service import TOSService, TOSServiceConfig - - # Handle bucket configuration with auto-creation support - bucket_name = config.tos_bucket - auto_created_bucket = False - - # Case 1: Auto-generate bucket name if not configured or set to AUTO_CREATE_VE - if not bucket_name or bucket_name == AUTO_CREATE_VE: - bucket_name = TOSService.generate_bucket_name() - self.reporter.info("TOS bucket name not configured, auto-generating...") - self.reporter.info(f"Auto-generated TOS bucket name: {bucket_name}") - auto_created_bucket = True - else: - # Validate bucket name for unrendered template variables - if '{{' in bucket_name and '}}' in bucket_name: - error_msg = f"TOS bucket name contains unrendered template variables: {bucket_name}. Please check configuration or environment variables." - self.reporter.error(error_msg) - raise ValueError(error_msg) - if config.tos_prefix == "" or config.tos_prefix == AUTO_CREATE_VE: - config.tos_prefix = "agentkit-builds" - - tos_config = TOSServiceConfig( - bucket=bucket_name, - region=config.tos_region, - prefix=config.tos_prefix - ) - - tos_service = TOSService(tos_config) - - # Check if bucket exists and create if necessary - self.reporter.info(f"Checking TOS bucket existence: {bucket_name}") - if not tos_service.bucket_exists(): - # Case 2: Bucket doesn't exist, create it - self.reporter.warning(f"TOS bucket does not exist, creating: {bucket_name}") - - if not tos_service.create_bucket(): - error_msg = f"Failed to create TOS bucket: {bucket_name}" - self.reporter.error(error_msg) - logger.error(error_msg) - raise Exception(error_msg) - - self.reporter.success(f"TOS bucket created successfully: {bucket_name}") - - # Verify bucket creation with retry logic (eventual consistency) - self.reporter.info(f"Verifying TOS bucket creation: {bucket_name}") - import time - start_time = time.time() - timeout = 30 # 30 second timeout - check_interval = 2 # Check every 2 seconds - - while time.time() - start_time < timeout: - if tos_service.bucket_exists(): - self.reporter.success(f"TOS bucket verification successful: {bucket_name}") - break - else: - self.reporter.info(f"Waiting for TOS bucket to be ready... ({time.time() - start_time:.1f}s)") - time.sleep(check_interval) - else: - # Timeout occurred - error_msg = f"TOS bucket creation verification timeout ({timeout}s): {bucket_name}" - self.reporter.error(error_msg) - logger.error(error_msg) - raise Exception(error_msg) - - # Notify user if their configured bucket didn't exist and was auto-created - if config.tos_bucket and config.tos_bucket != AUTO_CREATE_VE: - self.reporter.info(f"Note: Your configured bucket '{config.tos_bucket}' did not exist, auto-created new bucket '{bucket_name}'") - else: - self.reporter.success(f"TOS bucket exists: {bucket_name}") - - # Update config with auto-generated bucket name if applicable - if auto_created_bucket: - config.tos_bucket = bucket_name - - # Generate object key for the archive - archive_name = os.path.basename(archive_path) - object_key = f"{config.tos_prefix}/{archive_name}" - - # Upload file to TOS - tos_url = tos_service.upload_file(archive_path, object_key) - - # Save object key to config for later reference - config.tos_object_key = object_key - - logger.info(f"File uploaded to TOS: {tos_url}") - return tos_url - - except Exception as e: - raise Exception(f"Failed to upload to TOS: {str(e)}") - - def _prepare_cr_resources(self, config: VeCPCRBuilderConfig) -> CRServiceConfig: - """Prepare Container Registry resources. - - Ensures CR instance, namespace, and repository exist with public access. - Auto-creates missing resources when configured with AUTO_CREATE_VE. - - Returns: - CRServiceConfig with validated resource information. - - Raises: - Exception: For CR resource creation or configuration failures. - """ - try: - cr_config = CRServiceConfig( - instance_name=config.cr_instance_name, - namespace_name=config.cr_namespace_name, - repo_name=config.cr_repo_name, - region=config.cr_region - ) - - # Config update callback to sync CR resource names back to builder config - def config_updater(service: str, cr_config_dict: Dict[str, Any]) -> None: - """Callback to update builder config with auto-created CR resource names.""" - if "instance_name" in cr_config_dict: - config.cr_instance_name = cr_config_dict["instance_name"] - if "namespace_name" in cr_config_dict: - config.cr_namespace_name = cr_config_dict["namespace_name"] - if "repo_name" in cr_config_dict: - config.cr_repo_name = cr_config_dict["repo_name"] - if "image_full_url" in cr_config_dict: - config.image_url = cr_config_dict["image_full_url"] - - from agentkit.toolkit.volcengine.services import CRService, DefaultCRConfigCallback - cr_service = CRService( - config_callback=DefaultCRConfigCallback(config_updater=config_updater), - reporter=self.reporter - ) - - common_config = config.common_config - - # Ensure CR resources exist (instance, namespace, repository) - self.reporter.info("Ensuring CR resources exist...") - cr_result = cr_service.ensure_cr_resources(cr_config, common_config) - - if not cr_result.success: - error_msg = f"CR resource preparation failed: {cr_result.error}" - self.reporter.error(error_msg) - raise Exception(error_msg) - - # Ensure public endpoint access for image pulls - self.reporter.info("Ensuring CR public endpoint access...") - public_result = cr_service.ensure_public_endpoint(cr_config) - - if not public_result.success: - error_msg = f"Public endpoint configuration failed: {public_result.error}" - self.reporter.error(error_msg) - raise Exception(error_msg) - - self.reporter.success("CR resource preparation completed") - self.reporter.info(f" Instance: {cr_result.instance_name}") - self.reporter.info(f" Namespace: {cr_result.namespace_name}") - self.reporter.info(f" Repository: {cr_result.repo_name}") - - return cr_config - - except Exception as e: - raise Exception(f"Failed to prepare CR resources: {str(e)}") - - def _prepare_pipeline_resources(self, config: VeCPCRBuilderConfig, tos_url: str, cr_config: CRServiceConfig) -> str: - """Prepare Code Pipeline resources. - - Creates or reuses Code Pipeline for build execution. Supports pipeline lookup - by both ID and name, with intelligent fallback to creation when not found. - - Args: - config: Build configuration with pipeline settings. - tos_url: TOS URL of the source archive. - cr_config: CR configuration for image repository. - - Returns: - Pipeline ID for build execution. - - Raises: - Exception: For pipeline creation or configuration failures. - """ - try: - from agentkit.toolkit.volcengine.code_pipeline import VeCodePipeline - - # Get authentication credentials for Code Pipeline - from agentkit.utils.ve_sign import get_volc_ak_sk_region - ak, sk, region = get_volc_ak_sk_region('CP') - if region != 'cn-beijing': - self.reporter.error("Error: Code Pipeline only supported in cn-beijing region") - return False - - cp_client = VeCodePipeline( - access_key=ak, - secret_key=sk, - region=region - ) - - # Get or create agentkit-cli-workspace - workspace_name = "agentkit-cli-workspace" - if not cp_client.workspace_exists_by_name(workspace_name): - logger.info(f"Workspace '{workspace_name}' does not exist, creating...") - self.reporter.warning(f"Workspace '{workspace_name}' does not exist, creating...") - workspace_id = cp_client.create_workspace( - name=workspace_name, - visibility="Account", - description="AgentKit CLI dedicated workspace" - ) - logger.info(f"Workspace created successfully: {workspace_id}") - self.reporter.success(f"Workspace created successfully: {workspace_name}") - else: - # Workspace exists, get its ID - result = cp_client.get_workspaces_by_name(workspace_name, page_size=1) - if result.get("Items") and len(result["Items"]) > 0: - workspace_id = result["Items"][0]["Id"] - logger.info(f"Using existing workspace: {workspace_name} (ID: {workspace_id})") - self.reporter.success(f"Using workspace: {workspace_name}") - else: - raise Exception(f"Unable to get workspace '{workspace_name}' ID") - - logger.info(f"Using workspace: {workspace_name} (ID: {workspace_id})") - - common_config = config.common_config - agent_name = common_config.agent_name or "agentkit-app" - - # Check if pipeline already exists - try multiple lookup strategies - # Case 1: If Pipeline ID is configured, use ID for exact lookup - - # tmp: temp fix for pipeline id issue, cp_pipeline_id should be empty string for fix cp name - config.cp_pipeline_id = "" - if config.cp_pipeline_id and config.cp_pipeline_id != AUTO_CREATE_VE: - try: - # Get pipeline details by ID - result = cp_client.list_pipelines( - workspace_id=workspace_id, - pipeline_ids=[config.cp_pipeline_id] - ) - - if result.get("Items") and len(result["Items"]) > 0: - pipeline_info = result["Items"][0] - found_pipeline_name = pipeline_info.get("Name", "") - - # If name is also configured, validate name-ID consistency - if config.cp_pipeline_name and config.cp_pipeline_name != AUTO_CREATE_VE: - if found_pipeline_name != config.cp_pipeline_name: - error_msg = f"Pipeline name '{config.cp_pipeline_name}' does not match ID '{config.cp_pipeline_id}' corresponding name '{found_pipeline_name}'. Please verify configuration. If you haven't modified Code Pipeline, remove the current Pipeline ID from yaml config." - logger.error(error_msg) - self.reporter.error(error_msg) - raise Exception(error_msg) - - # Validation passed, reuse found pipeline - logger.info(f"Reusing pipeline by ID: {found_pipeline_name} (ID: {config.cp_pipeline_id})") - self.reporter.success(f"Reusing pipeline by ID: {found_pipeline_name}") - - # Update config with pipeline name - config.cp_pipeline_name = found_pipeline_name - - # Save pipeline client for later use - self._cp_client = cp_client - self._workspace_id = workspace_id - - # Record resource information - if not hasattr(self, '_build_resources'): - self._build_resources = {} - self._build_resources['pipeline_name'] = found_pipeline_name - self._build_resources['pipeline_id'] = config.cp_pipeline_id - - return config.cp_pipeline_id - else: - logger.warning(f"Configured Pipeline ID '{config.cp_pipeline_id}' does not exist, will create new pipeline") - self.reporter.warning("Configured Pipeline ID does not exist, will create new pipeline") - - except Exception as e: - if "does not match" in str(e): - raise # Name-ID mismatch, propagate exception - logger.warning(f"Pipeline lookup by ID failed: {str(e)}, will create new pipeline") - - # Case 2: If only pipeline name is configured (not AUTO_CREATE_VE), lookup by name - elif config.cp_pipeline_name and config.cp_pipeline_name != AUTO_CREATE_VE: - try: - existing_pipelines = cp_client.list_pipelines( - workspace_id=workspace_id, - name_filter=config.cp_pipeline_name - ) - - if existing_pipelines.get("Items") and len(existing_pipelines["Items"]) > 0: - # Found existing pipeline - pipeline_info = existing_pipelines["Items"][0] - pipeline_id = pipeline_info["Id"] - found_name = pipeline_info.get("Name", "") - - logger.info(f"Reusing pipeline by name: {found_name} (ID: {pipeline_id})") - self.reporter.success(f"Reusing pipeline by name: {found_name}") - - # Update config with pipeline ID - config.cp_pipeline_id = pipeline_id - - # Save pipeline client for later use - self._cp_client = cp_client - self._workspace_id = workspace_id - - # Record resource information - if not hasattr(self, '_build_resources'): - self._build_resources = {} - self._build_resources['pipeline_name'] = found_name - self._build_resources['pipeline_id'] = pipeline_id - - return pipeline_id - else: - logger.warning(f"Configured pipeline name '{config.cp_pipeline_name}' does not exist, will create new pipeline") - self.reporter.warning("Configured pipeline name does not exist, will create new pipeline") - except Exception as e: - logger.warning(f"Pipeline lookup by name failed: {str(e)}, will create new pipeline") - - # If no config or lookup failed, create new pipeline - pipeline_name = config.cp_pipeline_name if config.cp_pipeline_name and config.cp_pipeline_name != AUTO_CREATE_VE else f"agentkit-cli-{agent_name}-{generate_random_id(4)}" - self.reporter.info(f"Creating new pipeline: {pipeline_name}") - - # Load pipeline template - import jinja2 - - # Navigate from current file to project root for template path - current_file_dir = os.path.dirname(os.path.abspath(__file__)) - # Navigate up: agentkit/toolkit/builders -> agentkit/toolkit -> agentkit -> project_root - project_root = os.path.dirname(os.path.dirname(os.path.dirname(current_file_dir))) - template_path = os.path.join(project_root, "agentkit", "toolkit", "resources", "templates", "code-pipeline-tos-cr-step.j2") - - # Validate template file exists - if not os.path.exists(template_path): - error_msg = f"Pipeline template file not found: {template_path}" - logger.error(error_msg) - raise FileNotFoundError(error_msg) - - with open(template_path, 'r', encoding='utf-8') as f: - template_content = f.read() - - # Render template with Jinja2 - template = jinja2.Template(template_content) - spec_template = template.render( - bucket_name=config.tos_bucket, - bucket_region=config.tos_region or 'cn-beijing' - ) - - # Create pipeline - logger.info(f"Creating pipeline: {pipeline_name}") - pipeline_id = cp_client._create_pipeline( - workspace_id=workspace_id, - pipeline_name=pipeline_name, - spec=spec_template, - parameters= [ - {"Key": "DOCKERFILE_PATH", "Value": "/workspace/agentkit-app/Dockerfile", "Dynamic": True, "Env": True}, - {"Key": "DOWNLOAD_PATH", "Value": "/workspace", "Dynamic": True, "Env": True}, - {"Key": "PROJECT_ROOT_DIR", "Value": "/workspace/agentkit-app", "Dynamic": True, "Env": True}, - {"Key": "TOS_BUCKET_NAME", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "TOS_PROJECT_FILE_NAME", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "TOS_PROJECT_FILE_PATH", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "TOS_REGION", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_NAMESPACE", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_INSTANCE", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_DOMAIN", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_OCI", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_TAG", "Value": "", "Dynamic": True, "Env": True}, - {"Key": "CR_REGION", "Value": "", "Dynamic": True, "Env": True}, - ], - ) - - logger.info(f"Pipeline created successfully: {pipeline_id}") - self.reporter.success(f"Pipeline created successfully: {pipeline_name} (ID: {pipeline_id})") - - # Update config with pipeline information - config.cp_pipeline_name = pipeline_name - config.cp_pipeline_id = pipeline_id - - # Save pipeline client for later use - self._cp_client = cp_client - self._workspace_id = workspace_id - - # Add pipeline info to build results for upper-level workflow - if not hasattr(self, '_build_resources'): - self._build_resources = {} - self._build_resources['pipeline_name'] = pipeline_name - self._build_resources['pipeline_id'] = pipeline_id - - return pipeline_id - - except Exception as e: - raise Exception(f"Failed to prepare pipeline resources: {str(e)}") - - def _execute_build(self, pipeline_id: str, config: VeCPCRBuilderConfig) -> str: - """Execute build using Code Pipeline. - - Triggers pipeline execution with build parameters and monitors progress - until completion. Downloads and displays logs on failure. - - Args: - pipeline_id: Code Pipeline ID for build execution. - config: Build configuration with CR and TOS settings. - - Returns: - Full image URL in Container Registry. - - Raises: - Exception: For pipeline execution or build failures. - """ - try: - # Get saved Code Pipeline client and workspace ID - if not hasattr(self, '_cp_client') or not hasattr(self, '_workspace_id'): - raise Exception("Pipeline client not initialized, please call _prepare_pipeline_resources first") - - cp_client = self._cp_client - workspace_id = self._workspace_id - - common_config = config.common_config - agent_name = common_config.agent_name or "agentkit-app" - - # Helper function for log download and display on build failure - def download_and_show_logs(run_id: str): - """Download and display build logs helper function.""" - try: - self.reporter.info("Downloading build logs...") - log_file = cp_client.download_and_merge_pipeline_logs( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - pipeline_run_id=run_id, - output_file=f"pipeline_failed_{run_id}.log" - ) - - # Read log content - with open(log_file, 'r', encoding='utf-8') as f: - lines = f.readlines() - - # Display logs through reporter - self.reporter.show_logs( - title="Build failure logs (first 100 lines)", - lines=lines, - max_lines=100 - ) - - self.reporter.info(f"Complete logs saved to: {log_file}") - - except Exception as log_err: - self.reporter.warning(f"Log download failed: {log_err}") - - # Prepare build parameters for pipeline execution - build_parameters = [ - {"Key": "TOS_BUCKET_NAME", "Value": config.tos_bucket}, - {"Key": "TOS_PROJECT_FILE_NAME", "Value": os.path.basename(config.tos_object_key)}, - {"Key": "TOS_PROJECT_FILE_PATH", "Value": config.tos_object_key}, - {"Key": "TOS_REGION", "Value": config.tos_region}, - {"Key": "PROJECT_ROOT_DIR", "Value": f"/workspace/{agent_name}"}, - {"Key": "DOWNLOAD_PATH", "Value": "/workspace"}, - {"Key": "DOCKERFILE_PATH", "Value": f"/workspace/{agent_name}/Dockerfile"}, - {"Key": "CR_INSTANCE", "Value": config.cr_instance_name}, - {"Key": "CR_DOMAIN", "Value": f"{config.cr_instance_name}-{config.cr_region}.cr.volces.com"}, - {"Key": "CR_NAMESPACE", "Value": config.cr_namespace_name}, - {"Key": "CR_OCI", "Value": config.cr_repo_name}, - {"Key": "CR_TAG", "Value": config.image_tag}, - {"Key": "CR_REGION", "Value": config.cr_region}, - ] - - # Execute pipeline - run_id = cp_client.run_pipeline( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - description=f"Build Agent: {agent_name}", - parameters=build_parameters - ) - - self.reporter.success(f"Pipeline triggered successfully, run ID: {run_id}") - self.reporter.info("Waiting for build completion...") - - # Wait for build completion using reporter's long task interface - max_wait_time = 600 # 10 minutes - check_interval = 3 # Check every 3 seconds - import time - start_time = time.time() - - with self.reporter.long_task("Waiting for build completion...", total=max_wait_time) as task: - last_status = None - - while True: - try: - # Get pipeline run status - status = cp_client.get_pipeline_run_status( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - run_id=run_id - ) - - # Update progress description - if status != last_status: - task.update(description=f"Build status: {status}") - last_status = status - - # Check if completed - if status == "Succeeded": - task.update(completed=max_wait_time) # 100% - break - elif status in ["Failed", "Cancelled", "Timeout"]: - task.update(description=f"Build failed: {status}") - error_msg = f"Pipeline execution failed, status: {status}" - self.reporter.error(error_msg) - download_and_show_logs(run_id) - raise Exception(error_msg) - elif status in ["InProgress", "Enqueued", "Dequeued", "Initializing"]: - # Continue waiting, update progress - elapsed_time = time.time() - start_time - if elapsed_time >= max_wait_time: - task.update(description="Wait timeout") - error_msg = f"Wait timeout ({max_wait_time}s), current status: {status}" - self.reporter.error(error_msg) - download_and_show_logs(run_id) - raise Exception(error_msg) - - # Update progress (time-based) - task.update(completed=min(elapsed_time, max_wait_time)) - time.sleep(check_interval) - else: - # Unknown status - elapsed_time = time.time() - start_time - if elapsed_time >= max_wait_time: - task.update(description="Wait timeout") - error_msg = f"Wait timeout ({max_wait_time}s), final status: {status}" - self.reporter.error(error_msg) - download_and_show_logs(run_id) - raise Exception(error_msg) - - # Update progress - task.update(completed=min(elapsed_time, max_wait_time)) - time.sleep(check_interval) - - except Exception: - # Exception will auto-propagate, task context will auto-cleanup - raise - - # Build completed successfully - self.reporter.success("Pipeline execution completed!") - - # Construct image URL: [instance-name]-[region].cr.volces.com - image_url = f"{config.cr_instance_name}-{config.cr_region}.cr.volces.com/{config.cr_namespace_name}/{config.cr_repo_name}:{config.image_tag}" - config.image_url = image_url - - return image_url - - except Exception as e: - raise Exception(f"Build execution failed: {str(e)}") \ No newline at end of file diff --git a/agentkit/toolkit/cli/__init__.py b/agentkit/toolkit/cli/__init__.py deleted file mode 100644 index 7f46320..0000000 --- a/agentkit/toolkit/cli/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/agentkit/toolkit/cli/__main__.py b/agentkit/toolkit/cli/__main__.py deleted file mode 100644 index bde8a5c..0000000 --- a/agentkit/toolkit/cli/__main__.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI entry point.""" - -from .cli import app - -if __name__ == "__main__": - app() \ No newline at end of file diff --git a/agentkit/toolkit/cli/cli.py b/agentkit/toolkit/cli/cli.py deleted file mode 100644 index 91ee7a2..0000000 --- a/agentkit/toolkit/cli/cli.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Main entry point for AgentKit Starter Toolkit.""" - -import typer -from rich.panel import Panel -from rich.console import Console -from agentkit.utils.logging_config import setup_cli_logging - -setup_cli_logging() - -# Import command modules -from agentkit.toolkit.cli.cli_init import init_command, show_logo -from agentkit.toolkit.cli.cli_invoke import invoke_command -from agentkit.toolkit.cli.cli_config import config_command -from agentkit.toolkit.cli.cli_version import version_command, get_package_version -from agentkit.toolkit.cli.cli_build import build_command -from agentkit.toolkit.cli.cli_deploy import deploy_command -from agentkit.toolkit.cli.cli_launch import launch_command -from agentkit.toolkit.cli.cli_status import status_command -from agentkit.toolkit.cli.cli_destroy import destroy_command - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -app = typer.Typer( - name="agentkit", - help="AgentKit CLI - Deploy AI agents with ease", - add_completion=False, -) - -console = Console() - - -# get_package_version is now imported from cli_version - - -def version_callback(value: bool): - """Callback for --version flag.""" - if value: - pkg_version = get_package_version() - console.print(Panel( - f"[bold cyan]AgentKit SDK[/bold cyan]\n[green]Version: {pkg_version}[/green]", - title="📦 Version Info", - border_style="cyan" - )) - raise typer.Exit() - - -@app.callback(invoke_without_command=True) -def main( - ctx: typer.Context, - version_flag: bool = typer.Option( - False, - "--version", - "-v", - help="Show version information", - callback=version_callback, - is_eager=True - ) -): - """AgentKit CLI - Deploy AI agents with ease.""" - # If no subcommand is provided, show logo - if ctx.invoked_subcommand is None: - show_logo() - pkg_version = get_package_version() - console.print(f"Version: {pkg_version}\n") - console.print("Run [bold]agentkit --help[/bold] to see available commands.\n") - - -# Register commands -app.command(name="init")(init_command) -app.command(name="invoke")(invoke_command) -app.command(name="config")(config_command) -app.command(name="version")(version_command) -app.command(name="build")(build_command) -app.command(name="deploy")(deploy_command) -app.command(name="launch")(launch_command) -app.command(name="status")(status_command) -app.command(name="destroy")(destroy_command) - - - - -if __name__ == "__main__": - app() \ No newline at end of file diff --git a/agentkit/toolkit/cli/cli_build.py b/agentkit/toolkit/cli/cli_build.py deleted file mode 100644 index b373742..0000000 --- a/agentkit/toolkit/cli/cli_build.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Build command implementation.""" - -import typer -from pathlib import Path -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -console = Console() - - -def build_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), - platform: str = typer.Option(None, "--platform", help="Target platform for Docker build (e.g., linux/amd64, linux/arm64)"), - regenerate_dockerfile: bool = typer.Option( - False, - "--regenerate-dockerfile", - help="Force regenerate Dockerfile even if it exists" - ), -): - """Build Docker image for the Agent.""" - from agentkit.toolkit.executors import BuildExecutor, BuildOptions - from agentkit.toolkit.cli.console_reporter import ConsoleReporter - from agentkit.toolkit.context import ExecutionContext - - console.print(f"[cyan]Building image with {config_file}[/cyan]") - - # Construct runtime options - options = BuildOptions( - platform=platform, - regenerate_dockerfile=regenerate_dockerfile - ) - - # Set execution context - CLI uses ConsoleReporter (with colored output and progress) - reporter = ConsoleReporter() - ExecutionContext.set_reporter(reporter) - - executor = BuildExecutor(reporter=reporter) - result = executor.execute(config_file=str(config_file), options=options) - - # Format output - if result.success: - console.print("[green]✅ Build completed successfully![/green]") - - # Support multiple field names (compatible with different Result versions) - image_name = getattr(result, 'image_name', None) or getattr(result, 'image_url', None) - if image_name: - console.print(f"[green]📦 Image: {image_name}[/green]") - - image_id = getattr(result, 'image_id', None) - if image_id: - console.print(f"[dim]Image ID: {image_id}[/dim]") - - image_tag = getattr(result, 'image_tag', None) - if image_tag: - console.print(f"[dim]Tag: {image_tag}[/dim]") - else: - console.print(f"[red]❌ Build failed: {result.error}[/red]") - if result.build_logs: - for log in result.build_logs: - if log.strip(): - console.print(f"[red]{log}[/red]") - raise typer.Exit(1) diff --git a/agentkit/toolkit/cli/cli_config.py b/agentkit/toolkit/cli/cli_config.py deleted file mode 100644 index 0347fab..0000000 --- a/agentkit/toolkit/cli/cli_config.py +++ /dev/null @@ -1,441 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Config command implementation.""" - -from typing import Optional, List -import typer -from rich.console import Console - -from agentkit.toolkit.config import get_config -from agentkit.toolkit.config.config_handler import ( - ConfigParamHandler, - NonInteractiveConfigHandler -) - -# Note: Avoid importing heavy packages at the top of the file to prevent command slowdown - -console = Console() - - -def config_command( - config_file: Optional[str] = typer.Option(None, "--config", "-c", help="Path to config file"), - - # Mode control - interactive: bool = typer.Option(False, "--interactive", "-i", help="Force interactive mode"), - dry_run: bool = typer.Option(False, "--dry-run", help="Preview config changes without saving"), - show: bool = typer.Option(False, "--show", "-s", help="Display current configuration"), - - # Global config support - global_config: bool = typer.Option(False, "--global", "-g", help="Operate on global config (~/.agentkit/config.yaml)"), - set_field: Optional[str] = typer.Option(None, "--set", help="Set field (format: key=value, e.g., cr.instance_name=my-cr)"), - init_global: bool = typer.Option(False, "--init", help="Initialize global config file (create template)"), - - # CommonConfig parameters - agent_name: Optional[str] = typer.Option(None, "--agent_name", help="Agent application name"), - entry_point: Optional[str] = typer.Option(None, "--entry_point", help="Entry point file (e.g., agent.py)"), - description: Optional[str] = typer.Option(None, "--description", help="Application description"), - language: Optional[str] = typer.Option(None, "--language", help="Programming language: Python/Golang"), - language_version: Optional[str] = typer.Option(None, "--language_version", help="Language version (e.g., Python: 3.10-3.13, Go: 1.x)"), - python_version: Optional[str] = typer.Option(None, "--python_version", help="[Deprecated] Python version, use --language_version instead"), - dependencies_file: Optional[str] = typer.Option(None, "--dependencies_file", help="Dependencies file (e.g., requirements.txt)"), - launch_type: Optional[str] = typer.Option(None, "--launch_type", help="Deployment mode: local/hybrid/cloud"), - - # Application-level environment variables (CommonConfig) - runtime_envs: Optional[List[str]] = typer.Option(None, "--runtime_envs", "-e", help="App-level env vars KEY=VALUE, shared across all deployment modes (can be used multiple times)"), - - # Strategy-level environment variables - strategy_runtime_envs: Optional[List[str]] = typer.Option(None, "--strategy-runtime-envs", help="Strategy-level env vars KEY=VALUE, used only for current deployment mode (can be used multiple times)"), - - # Hybrid/Cloud Strategy parameters - region: Optional[str] = typer.Option(None, "--region", help="Region (e.g., cn-beijing)"), - tos_bucket: Optional[str] = typer.Option(None, "--tos_bucket", help="TOS bucket name"), - image_tag: Optional[str] = typer.Option(None, "--image_tag", help="Image tag (e.g., 0.0.1)"), - cr_instance_name: Optional[str] = typer.Option(None, "--cr_instance_name", "--ve_cr_instance_name", help="CR instance name"), - cr_namespace_name: Optional[str] = typer.Option(None, "--cr_namespace_name", "--ve_cr_namespace_name", help="CR namespace"), - cr_repo_name: Optional[str] = typer.Option(None, "--cr_repo_name", "--ve_cr_repo_name", help="CR repository name"), - - # Runtime configuration parameters - runtime_name: Optional[str] = typer.Option(None, "--runtime_name", "--ve_runtime_name", help="Runtime instance name"), - runtime_role_name: Optional[str] = typer.Option(None, "--runtime_role_name", "--ve_runtime_role_name", help="Runtime authorization role name"), - runtime_apikey_name: Optional[str] = typer.Option(None, "--runtime_apikey_name", "--ve_runtime_apikey_name", help="Runtime API key secret name"), -): - """Configure AgentKit (supports interactive and non-interactive modes). - - Examples: - - \b - # Interactive configuration (default) - agentkit config - - \b - # Non-interactive configuration (full example) - agentkit config \\ - --agent_name myAgent \\ - --entry_point agent.py \\ - --language Python \\ - --language_version 3.12 \\ - --launch_type cloud \\ - --region cn-beijing \\ - --tos_bucket agentkit \\ - --image_tag 0.0.1 \\ - --runtime_name my-runtime \\ - --runtime_role_name my-role \\ - --runtime_apikey_name my-apikey \\ - --runtime_envs API_KEY=xxxxx \\ - --runtime_envs MODEL_ENDPOINT=https://api.example.com - - \b - # Configure Golang application - agentkit config \\ - --agent_name myGoAgent \\ - --entry_point main.go \\ - --language Golang \\ - --language_version 1.23 - - \b - # App-level vs Strategy-level environment variables - # --runtime_envs/-e: App-level (shared across all deployment modes) - # --strategy-runtime-envs: Strategy-level (used only for current deployment mode) - agentkit config \\ - -e API_KEY=shared_key \\ - --strategy-runtime-envs DEBUG=true - - \b - # Configure runtime parameters for cloud/hybrid deployment - agentkit config \\ - --runtime_name my-custom-runtime \\ - --runtime_role_name my-custom-role \\ - --runtime_apikey_name my-custom-apikey - - \b - # Incremental update (modify specific config only) - agentkit config --language_version 3.13 - - \b - # Preview config changes - agentkit config --entry_point agent.py --dry-run - - \b - # Display current configuration - agentkit config --show - """ - - try: - # Handle global config operations - if global_config: - _handle_global_config(show, set_field, init_global) - return - - # Handle --show option - if show: - handler = NonInteractiveConfigHandler(config_path=config_file) - handler.show_current_config() - return - - # Collect CLI parameters - cli_params = ConfigParamHandler.collect_cli_params( - agent_name=agent_name, - entry_point=entry_point, - description=description, - language=language, - language_version=language_version, - python_version=python_version, # Backward compatibility - dependencies_file=dependencies_file, - launch_type=launch_type, - runtime_envs=runtime_envs, - strategy_runtime_envs=strategy_runtime_envs, - region=region, - tos_bucket=tos_bucket, - image_tag=image_tag, - cr_instance_name=cr_instance_name, - cr_namespace_name=cr_namespace_name, - cr_repo_name=cr_repo_name, - runtime_name=runtime_name, - runtime_role_name=runtime_role_name, - runtime_apikey_name=runtime_apikey_name, - ) - - has_cli_params = ConfigParamHandler.has_cli_params(cli_params) - - # Determine which mode to use: interactive or non-interactive - if interactive or (not has_cli_params and not interactive): - # Interactive mode (preserves original behavior) - _interactive_config(config_file) - else: - # Non-interactive mode - handler = NonInteractiveConfigHandler(config_path=config_file) - success = handler.update_config( - common_params=cli_params['common'], - strategy_params=cli_params['strategy'], - dry_run=dry_run - ) - - if not success: - raise typer.Exit(code=1) - - except KeyboardInterrupt: - console.print("\n\n[yellow]⚠️ Configuration cancelled[/yellow]") - raise typer.Exit(code=130) # Standard exit code for Ctrl+C - - -def _interactive_config(config_file: Optional[str] = None): - """Interactive configuration mode.""" - config = get_config(config_path=config_file) - - # Use CLI-layer interactive config creation function - from agentkit.toolkit.cli.interactive_config import create_common_config_interactively - common_config = create_common_config_interactively(config.get_common_config().to_dict()) - config.update_common_config(common_config) - - strategy_name = common_config.launch_type - - # Use CLI-layer interactive config generation - from agentkit.toolkit.cli.interactive_config import generate_config_from_dataclass - from agentkit.toolkit.config.strategy_configs import ( - LocalDockerConfig, - VeAgentkitConfig, - HybridVeAgentkitConfig - ) - - # Map strategy_name to config class - strategy_config_classes = { - "local": LocalDockerConfig, - "cloud": VeAgentkitConfig, - "hybrid": HybridVeAgentkitConfig, - } - - # Get current strategy config data - current_strategy_config_dict = config.get_strategy_config(strategy_name) - - # Get corresponding config class - config_class = strategy_config_classes.get(strategy_name) - if not config_class: - console.print(f"[red]❌ Unknown launch type: {strategy_name}[/red]") - raise typer.Exit(1) - - # Generate new strategy config - strategy_config = generate_config_from_dataclass( - config_class, - current_strategy_config_dict - ) - config.update_strategy_config(strategy_name, strategy_config) - - -def _handle_global_config(show: bool, set_field: Optional[str], init_global: bool): - """Handle global config operations: show, set, or initialize.""" - from agentkit.toolkit.config import ( - global_config_exists - ) - - if init_global: - # Initialize global config file - _init_global_config() - elif show: - # Display global config - _show_global_config() - elif set_field: - # Set config field - _set_global_field(set_field) - else: - # Display usage hints - if not global_config_exists(): - console.print("[yellow]⚠️ Global config file does not exist[/yellow]") - console.print("\nQuick create:") - console.print(" agentkit config --global --init") - console.print("\nOr create manually:") - console.print(" mkdir -p ~/.agentkit") - console.print(" vim ~/.agentkit/config.yaml") - else: - console.print("[cyan]💡 Global config file exists[/cyan]") - console.print("\n[bold]Usage:[/bold]") - console.print(" • View config: [yellow]agentkit config --global --show[/yellow]") - console.print(" • Set field: [yellow]agentkit config --global --set =[/yellow]") - console.print(" • Edit file: [yellow]vim ~/.agentkit/config.yaml[/yellow]") - - console.print("\n[bold]Supported fields:[/bold]") - console.print(" [dim]Volcengine:[/dim]") - console.print(" • [green]volcengine.access_key[/green] - Access Key") - console.print(" • [green]volcengine.secret_key[/green] - Secret Key") - console.print(" • [green]volcengine.region[/green] - Region") - console.print(" [dim]CR:[/dim]") - console.print(" • [green]cr.instance_name[/green] - CR instance name") - console.print(" • [green]cr.namespace_name[/green] - CR namespace") - console.print(" [dim]TOS:[/dim]") - console.print(" • [green]tos.bucket[/green] - Bucket name") - console.print(" • [green]tos.prefix[/green] - Object prefix") - console.print(" • [green]tos.region[/green] - Region") - - -def _init_global_config(): - """Initialize global config file with template.""" - from agentkit.toolkit.config import GlobalConfig, save_global_config, global_config_exists - from pathlib import Path - - config_path = Path.home() / ".agentkit" / "config.yaml" - - # Check if file already exists - if global_config_exists(): - console.print(f"[yellow]⚠️ Global config file already exists: {config_path}[/yellow]") - console.print("\nTo recreate, first delete the existing file:") - console.print(" rm ~/.agentkit/config.yaml") - console.print("\nOr edit the existing file directly:") - console.print(" vim ~/.agentkit/config.yaml") - return - - # Create default config - config = GlobalConfig() - # Set default values - config.volcengine.region = "cn-beijing" - config.tos.prefix = "agentkit-builds" - config.tos.region = "cn-beijing" - - # Save config file - try: - save_global_config(config) - console.print(f"[green]✅ Global config file created: {config_path}[/green]") - console.print("\n[bold cyan]📝 Config template generated with the following items:[/bold cyan]\n") - - console.print("[bold]🔐 Volcengine Credentials[/bold]") - console.print(" access_key: '' # Volcengine Access Key") - console.print(" secret_key: '' # Volcengine Secret Key") - console.print(" region: cn-beijing # Default region") - - console.print("\n[bold]📦 CR Configuration[/bold]") - console.print(" instance_name: '' # CR instance name") - console.print(" namespace_name: '' # CR namespace") - - console.print("\n[bold]🗂️ TOS Configuration[/bold]") - console.print(" bucket: '' # TOS bucket name") - console.print(" prefix: agentkit-builds") - console.print(" region: cn-beijing") - - console.print("\n[dim]💡 Tips:[/dim]") - console.print(f" • Edit config: vim {config_path}") - console.print(" • View config: agentkit config --global --show") - - except Exception as e: - console.print(f"[red]❌ Failed to create config file: {e}[/red]") - raise typer.Exit(code=1) - - -def _show_global_config(): - """Display global configuration.""" - from agentkit.toolkit.config import get_global_config, global_config_exists - - if not global_config_exists(): - console.print("[yellow]⚠️ Global config file does not exist: ~/.agentkit/config.yaml[/yellow]") - console.print("\nQuick create:") - console.print(" agentkit config --global --init") - return - - config = get_global_config() - - console.print("\n[bold cyan]📋 Global Configuration[/bold cyan] [dim](~/.agentkit/config.yaml)[/dim]\n") - - # Display Volcengine credentials - console.print("[bold]🔐 Volcengine Credentials[/bold]") - if config.volcengine.access_key: - masked_ak = config.volcengine.access_key[:5] + "***" if len(config.volcengine.access_key) > 5 else "***" - console.print(f" Access Key: [yellow]{masked_ak}[/yellow] (set)") - else: - console.print(" Access Key: [dim](not set)[/dim]") - - if config.volcengine.secret_key: - console.print(" Secret Key: [yellow]***[/yellow] (set)") - else: - console.print(" Secret Key: [dim](not set)[/dim]") - - console.print(f" Region: [yellow]{config.volcengine.region}[/yellow]") - - # Display CR configuration - console.print("\n[bold]📦 CR Configuration[/bold]") - console.print(f" Instance: [yellow]{config.cr.instance_name or '[dim](not set)[/dim]'}[/yellow]") - console.print(f" Namespace: [yellow]{config.cr.namespace_name or '[dim](not set)[/dim]'}[/yellow]") - - # Display TOS configuration - console.print("\n[bold]🗂️ TOS Configuration[/bold]") - console.print(f" Bucket: [yellow]{config.tos.bucket or '[dim](not set)[/dim]'}[/yellow]") - console.print(f" Prefix: [yellow]{config.tos.prefix}[/yellow]") - console.print(f" Region: [yellow]{config.tos.region}[/yellow]") - - console.print() - - -def _set_global_field(field_value: str): - """Set global config field value.""" - from agentkit.toolkit.config import get_global_config, save_global_config - - # Parse key=value format - if '=' not in field_value: - console.print("[red]❌ Invalid format, should be: key=value[/red]") - console.print("\nExamples:") - console.print(" agentkit config --global --set cr.instance_name=my-cr") - console.print(" agentkit config --global --set tos.bucket=my-bucket") - raise typer.Exit(code=1) - - key, value = field_value.split('=', 1) - parts = key.split('.') - - if len(parts) != 2: - console.print(f"[red]❌ Invalid field format: {key}[/red]") - console.print("\nSupported fields:") - console.print(" • volcengine.access_key") - console.print(" • volcengine.secret_key") - console.print(" • volcengine.region") - console.print(" • cr.instance_name") - console.print(" • cr.namespace_name") - console.print(" • tos.bucket") - console.print(" • tos.prefix") - console.print(" • tos.region") - raise typer.Exit(code=1) - - section, field = parts - - # Load config - config = get_global_config() - - # Set field value - try: - if section == 'volcengine': - if not hasattr(config.volcengine, field): - raise AttributeError(f"volcengine has no field: {field}") - setattr(config.volcengine, field, value) - elif section == 'cr': - if not hasattr(config.cr, field): - raise AttributeError(f"cr has no field: {field}") - setattr(config.cr, field, value) - elif section == 'tos': - if not hasattr(config.tos, field): - raise AttributeError(f"tos has no field: {field}") - setattr(config.tos, field, value) - else: - console.print(f"[red]❌ Unknown config section: {section}[/red]") - console.print("\nSupported sections: volcengine, cr, tos") - raise typer.Exit(code=1) - - # Save config - save_global_config(config) - - # Display success message - if value: - console.print(f"[green]✅ Set:[/green] {key} = [yellow]{value}[/yellow]") - else: - console.print(f"[green]✅ Cleared:[/green] {key}") - - console.print("\n[dim]Config saved to: ~/.agentkit/config.yaml[/dim]") - - except AttributeError as e: - console.print(f"[red]❌ {e}[/red]") - raise typer.Exit(code=1) diff --git a/agentkit/toolkit/cli/cli_deploy.py b/agentkit/toolkit/cli/cli_deploy.py deleted file mode 100644 index 1305768..0000000 --- a/agentkit/toolkit/cli/cli_deploy.py +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Deploy command implementation.""" - -from pathlib import Path -import typer -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -console = Console() - - -def deploy_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), -): - """Deploy the Agent to target environment.""" - from agentkit.toolkit.executors import DeployExecutor - from agentkit.toolkit.cli.console_reporter import ConsoleReporter - from agentkit.toolkit.context import ExecutionContext - - console.print(f"[green]Deploying with {config_file}[/green]") - - # Set execution context - CLI uses ConsoleReporter (with colored output and progress) - reporter = ConsoleReporter() - ExecutionContext.set_reporter(reporter) - - executor = DeployExecutor(reporter=reporter) - result = executor.execute(config_file=str(config_file)) - - # Format output - if result.success: - console.print("[green]✅ Deployment successful[/green]") - if result.endpoint_url: - console.print(f"[green]Endpoint: {result.endpoint_url}[/green]") - if result.container_id: - console.print(f"[green]Container ID: {result.container_id}[/green]") - if result.service_id: - console.print(f"[green]Service ID: {result.service_id}[/green]") - else: - console.print(f"[red]❌ Deployment failed: {result.error}[/red]") - # deploy_logs may not exist, use getattr for safe access - deploy_logs = getattr(result, 'deploy_logs', None) or result.metadata.get('deploy_logs', []) - if deploy_logs: - for log in deploy_logs: - if log.strip(): - console.print(f"[red]{log}[/red]") - raise typer.Exit(1) diff --git a/agentkit/toolkit/cli/cli_destroy.py b/agentkit/toolkit/cli/cli_destroy.py deleted file mode 100644 index 834b320..0000000 --- a/agentkit/toolkit/cli/cli_destroy.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Destroy command implementation.""" - -from pathlib import Path -import typer -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -console = Console() - - -def destroy_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), - force: bool = typer.Option(False, help="Force destroy without confirmation"), -): - """Destroy running Agent runtime.""" - from agentkit.toolkit import sdk - - console.print("[red]Destroying current runtime...[/red]") - if not force: - typer.confirm("Are you sure you want to destroy?", abort=True) - - try: - # Call SDK - result = sdk.destroy(config_file=str(config_file), force=force) - - if result.success: - console.print("[green]✅ Destruction completed successfully![/green]") - else: - console.print(f"[red]❌ Destruction failed: {result.error}[/red]") - raise typer.Exit(1) - - except Exception as e: - console.print(f"[red]Destruction failed: {e}[/red]") - raise typer.Exit(1) diff --git a/agentkit/toolkit/cli/cli_init.py b/agentkit/toolkit/cli/cli_init.py deleted file mode 100644 index 490bb7a..0000000 --- a/agentkit/toolkit/cli/cli_init.py +++ /dev/null @@ -1,330 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Init command for project initialization.""" - -from pathlib import Path -from typing import Optional - -import typer -from rich.console import Console -from rich.table import Table -from rich.text import Text - -from agentkit.toolkit.executors import InitExecutor -from agentkit.toolkit.cli.console_reporter import ConsoleReporter - -# Note: Avoid importing heavy modules at the top to keep CLI startup fast. - -try: - from pyfiglet import Figlet - HAS_PYFIGLET = True -except ImportError: - HAS_PYFIGLET = False - -console = Console() - -def show_logo(): - """Display AgentKit logo""" - console.print() - - if HAS_PYFIGLET: - # Try different fonts in order of preference - fonts_to_try = ['slant', 'speed', 'banner3', 'big', 'standard'] - figlet = None - - for font in fonts_to_try: - try: - figlet = Figlet(font=font) - break - except: - continue - - if figlet is None: - figlet = Figlet() # Use default font - - logo_text = figlet.renderText('AgentKit') - - # Apply gradient color effect - more vibrant colors - lines = logo_text.split('\n') - colors = ["bright_magenta", "magenta", "bright_blue", "cyan", "bright_cyan"] - - for i, line in enumerate(lines): - if line.strip(): # Skip empty lines - # Create a gradient effect - color_idx = int((i / max(len(lines) - 1, 1)) * (len(colors) - 1)) - color = colors[color_idx] - console.print(Text(line, style=f"bold {color}")) - else: - # Fallback: beautiful box logo if pyfiglet is not installed - console.print(Text(" ╔══════════════════════════════════════╗", style="bold bright_cyan")) - console.print(Text(" ║ ║", style="bold bright_cyan")) - console.print(Text(" ║ ", style="bold bright_cyan") + - Text("🚀 A G E N T K I T 🤖", style="bold bright_magenta") + - Text(" ║", style="bold bright_cyan")) - console.print(Text(" ║ ║", style="bold bright_cyan")) - console.print(Text(" ╚══════════════════════════════════════╝", style="bold bright_cyan")) - - # Add tagline with emoji - console.print(Text(" ✨ Build AI Agents with Ease ✨", style="bold yellow")) - console.print() - -# Get templates from Executor layer -def _get_templates(): - """Get templates from InitExecutor.""" - executor = InitExecutor(reporter=ConsoleReporter()) - return executor.get_available_templates() - - -def display_templates(): - """Display available templates.""" - templates = _get_templates() - - table = Table(title="Available Templates", show_header=True, header_style="bold magenta") - table.add_column("ID", style="cyan", width=6) - table.add_column("Key", style="bright_cyan", width=20) - table.add_column("Name", style="green", width=25) - table.add_column("Type", style="yellow", width=15) - table.add_column("Language", style="blue", width=15) - table.add_column("Description", style="white") - - for idx, (key, template) in enumerate(templates.items(), 1): - table.add_row( - str(idx), - key, - template["name"], - template["type"], - template["language"], - template["description"] - ) - - console.print(table) - - -def select_template(template_key: Optional[str] = None) -> str: - """Select a template via CLI option or interactive prompt.""" - templates = _get_templates() - - if template_key: - # From CLI option - # 1) direct key match - if template_key in templates: - return template_key - # 2) numeric ID (same as interactive list) - if template_key.isdigit(): - idx = int(template_key) - 1 - keys = list(templates.keys()) - if 0 <= idx < len(keys): - return keys[idx] - # 3) case-insensitive match by Name field - lowered = template_key.lower() - for k, t in templates.items(): - if t.get("name", "").lower() == lowered: - return k - # Error message: show available keys and ID hint - console.print(f"[red]Error: Unknown template '{template_key}'[/red]") - all_keys = list(templates.keys()) - console.print(f"[yellow]Available keys: {', '.join(all_keys)}[/yellow]") - console.print(f"[yellow]Or use ID 1-{len(all_keys)} as shown in the list, or the template Name.[/yellow]") - raise typer.Exit(1) - - # Interactive selection - display_templates() - console.print(f"\n[bold cyan]Please select a template by entering ID/Key/Name (ID range: 1-{len(templates)}):[/bold cyan]") - - while True: - try: - choice = input("Template (ID/Key/Name): ").strip() - # ID - if choice.isdigit(): - choice_idx = int(choice) - 1 - if 0 <= choice_idx < len(templates): - selected_key = list(templates.keys())[choice_idx] - console.print(f"[green]Selected: {templates[selected_key]['name']}[/green]") - return selected_key - console.print(f"[red]Invalid ID. Please enter a number between 1 and {len(templates)}[/red]") - continue - # Key - if choice in templates: - console.print(f"[green]Selected: {templates[choice]['name']}[/green]") - return choice - # Name (case-insensitive) - lowered = choice.lower() - for k, t in templates.items(): - if t.get("name", "").lower() == lowered: - console.print(f"[green]Selected: {t['name']}[/green]") - return k - console.print("[red]Invalid input. Please enter a valid ID, Key, or Name.[/red]") - except ValueError: - console.print("[red]Invalid input. Please enter a number[/red]") - except typer.Abort: - console.print("[yellow]Cancelled[/yellow]") - raise typer.Exit(0) - - -def init_command( - project_name: Optional[str] = typer.Argument(None, help="Project name"), - template: Optional[str] = typer.Option(None, "--template", "-t", help="Project template (accepts ID/Key/Name). Keys: basic, basic_stream"), - directory: Optional[str] = typer.Option(".", help="Target directory"), - agent_name: Optional[str] = typer.Option(None, "--agent-name", help="Agent name (default: 'Agent')"), - description: Optional[str] = typer.Option(None, "--description", help="Agent description (uses a common default description if not provided), this will be helpful in A2A scenario."), - system_prompt: Optional[str] = typer.Option(None, "--system-prompt", help="Agent system prompt (uses a common default system prompt if not provided)"), - model_name: Optional[str] = typer.Option(None, "--model-name", help="Model name in volcengine ARK platform (default: 'doubao-seed-1-6-250615')"), - tools: Optional[str] = typer.Option(None, "--tools", help="Comma-separated list of tools to include (e.g., web_search,run_code)"), - # New parameters for wrapping existing Agent files - from_agent: Optional[str] = typer.Option(None, "--from-agent", "-f", help="Path to existing Python file containing veadk Agent definition"), - agent_var: Optional[str] = typer.Option(None, "--agent-var", help="Variable name of the Agent object in the file (default: auto-detect)"), - wrapper_type: Optional[str] = typer.Option("basic", "--wrapper-type", help="Type of wrapper to generate: basic or stream (default: basic)"), - list_templates: bool = typer.Option(False, "--list-templates", help="List available templates (ID, Key, Name) and exit"), -): - """ - Initialize a new Agent project with templates or wrap an existing Agent. - - This command provides two modes: - 1. Template mode: Create a new project from built-in templates - 2. Wrapper mode: Wrap an existing Agent definition file for deployment - - It delegates business logic to InitService while handling all UI interactions. - """ - # ===== UI Layer: Display logo ===== - show_logo() - - # Optional: list templates and exit - if list_templates: - display_templates() - raise typer.Exit(0) - - # ===== Mode Detection: Template or Wrapper mode ===== - executor = InitExecutor(reporter=ConsoleReporter()) - - if from_agent: - # ===== WRAPPER MODE: Wrap existing Agent file ===== - console.print("[bold cyan]🔄 Wrapping existing Agent file[/bold cyan]\n") - - # Generate project name from Agent file if not provided - if not project_name: - # Extract filename without extension and add agentkit- prefix - agent_file_stem = Path(from_agent).stem - final_project_name = f"agentkit-{agent_file_stem}" - else: - final_project_name = project_name - - # Display wrapping info - console.print(f"[bold green]Project name: {final_project_name}[/bold green]") - console.print(f"[bold blue]Agent file: {from_agent}[/bold blue]") - console.print(f"[bold blue]Wrapper type: {wrapper_type}[/bold blue]") - if agent_var: - console.print(f"[bold blue]Agent variable: {agent_var}[/bold blue]") - console.print() - - # Call wrapper executor - result = executor.init_from_agent_file( - project_name=final_project_name, - agent_file_path=from_agent, - agent_var_name=agent_var, - wrapper_type=wrapper_type, - directory=directory - ) - else: - # ===== TEMPLATE MODE: Create from template ===== - - # ===== UI Layer: Interactive template selection ===== - template_key = select_template(template) - - # Get template info for UI display - templates = _get_templates() - template_info = templates[template_key] - - # ===== UI Layer: Display creation info ===== - final_project_name = project_name or "simple_agent" - console.print(f"[bold green]Creating project: {final_project_name}[/bold green]") - console.print(f"[bold blue]Using template: {template_info['name']}[/bold blue]") - console.print() - - # ===== Business Logic: Call Executor layer ===== - result = executor.init_project( - project_name=final_project_name, - template=template_key, - directory=directory, - agent_name=agent_name, - description=description, - system_prompt=system_prompt, - model_name=model_name, - tools=tools - ) - - # ===== UI Layer: Display results ===== - if result.success: - # Success output - console.print("[bold blue]✨ Project initialized successfully![/bold blue]") - console.print(f"[blue]Template: {result.metadata.get('template_name', 'N/A')}[/blue]") - console.print(f"[blue]Entry point: {result.metadata.get('entry_point', 'N/A')}[/blue]") - console.print(f"[blue]Language: {result.metadata.get('language', 'N/A')} {result.metadata.get('language_version', '')}[/blue]") - - # Display wrapper-specific info - if from_agent and 'agent_file' in result.metadata: - console.print(f"[blue]Agent file: {result.metadata.get('agent_file', 'N/A')}[/blue]") - console.print(f"[blue]Agent variable: {result.metadata.get('agent_var', 'N/A')}[/blue]") - - # Display created files - if result.created_files: - console.print("\n[bold cyan]Created files:[/bold cyan]") - for file in result.created_files: - console.print(f" [green]✓[/green] {file}") - - # Display global config info if exists - from agentkit.toolkit.config import global_config_exists, get_global_config - if global_config_exists(): - try: - global_cfg = get_global_config() - has_config = False - - # Check if any relevant config is set - config_items = [] - if global_cfg.cr.instance_name: - config_items.append(f"CR Instance: [yellow]{global_cfg.cr.instance_name}[/yellow]") - has_config = True - if global_cfg.cr.namespace_name: - config_items.append(f"CR Namespace: [yellow]{global_cfg.cr.namespace_name}[/yellow]") - has_config = True - if global_cfg.tos.bucket: - config_items.append(f"TOS Bucket: [yellow]{global_cfg.tos.bucket}[/yellow]") - has_config = True - if global_cfg.tos.prefix: - config_items.append(f"TOS Prefix: [yellow]{global_cfg.tos.prefix}[/yellow]") - has_config = True - if global_cfg.tos.region: - config_items.append(f"TOS Region: [yellow]{global_cfg.tos.region}[/yellow]") - has_config = True - - if has_config: - console.print("\n[cyan]ℹ️ Detected global configuration. The following fields will use global defaults:[/cyan]") - for item in config_items: - console.print(f" • {item}") - console.print("[dim] To override, provide explicit values in agentkit.yaml[/dim]") - except Exception: - pass # Silently ignore if global config loading fails - - # Next steps guidance - console.print("\n[bold cyan]Next steps:[/bold cyan]") - console.print(" 1. Review and modify the generated files") - console.print(" 2. Use [bold]agentkit config[/bold] to configure your agent") - console.print(" 3. Use [bold]agentkit launch[/bold] to build and deploy") - console.print() - else: - # Error output - console.print(f"[red]✗ Failed to create project: {result.error}[/red]") - if result.error_code: - console.print(f"[yellow]Error code: {result.error_code}[/yellow]") - raise typer.Exit(1) \ No newline at end of file diff --git a/agentkit/toolkit/cli/cli_invoke.py b/agentkit/toolkit/cli/cli_invoke.py deleted file mode 100644 index 4c0386d..0000000 --- a/agentkit/toolkit/cli/cli_invoke.py +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Invoke command implementation.""" - -from pathlib import Path -from typing import Optional, Any -import json -import typer -from rich.console import Console -import random -from agentkit.toolkit.config import get_config -import logging - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast -logger = logging.getLogger(__name__) -console = Console() - -def build_standard_payload(message: Optional[str], payload: Optional[str]) -> dict: - if message: - return {"prompt": message} - else: - try: - parsed = json.loads(payload) if isinstance(payload, str) else payload - console.print(f"[blue]Using custom payload: {parsed}[/blue]") - return parsed - except json.JSONDecodeError as e: - console.print(f"[red]Error: Invalid JSON payload: {e}[/red]") - raise typer.Exit(1) - -def build_a2a_payload(message: Optional[str], payload: Optional[str], headers: dict) -> dict: - parsed = None - if payload: - try: - parsed = json.loads(payload) if isinstance(payload, str) else payload - except json.JSONDecodeError: - parsed = None - - if isinstance(parsed, dict) and parsed.get("jsonrpc"): - console.print("[blue]Using provided JSON-RPC payload for A2A[/blue]") - return parsed - - if message: - text = message - elif parsed is not None: - text = json.dumps(parsed, ensure_ascii=False) - else: - text = payload if payload else "" - - a2a = { - "jsonrpc": "2.0", - "method": "message/stream", - "params": { - "message": { - "role": "user", - "parts": [ - {"kind": "text", "text": text} - ] - }, - "metadata": headers - }, - "id": random.randint(1, 999999) - } - return a2a - -def invoke_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), - message: str = typer.Argument(None, help="Simple message to send to agent"), - payload: str = typer.Option( - None, "--payload", "-p", help="JSON payload to send (advanced option)" - ), - headers: str = typer.Option( - None, "--headers", "-h", help="JSON headers for request (advanced option)" - ), - apikey: str = typer.Option( - None, "--apikey", "-ak", help="API key for authentication" - ), -) -> Any: - """Send a test request to deployed Agent. - - Examples: - # Simple message - agentkit invoke "What is the weather today?" - - # Custom payload - agentkit invoke --payload '{"prompt": "What is the weather in Hangzhou?"}' - - # With custom headers - agentkit invoke --payload '{"prompt": "What is the weather in Hangzhou?"}' --headers '{"user_id": "test123"}' - """ - from agentkit.toolkit.executors import InvokeExecutor - from agentkit.toolkit.cli.console_reporter import ConsoleReporter - - console.print("[cyan]Invoking agent...[/cyan]") - - # Validate parameters: message and payload cannot be provided simultaneously - if message and payload: - console.print("[red]Error: Cannot specify both message and payload. Use either message or --payload.[/red]") - raise typer.Exit(1) - - # Validate parameters: must provide either message or payload - if not message and not payload: - console.print("[red]Error: Must provide either a message or --payload option.[/red]") - raise typer.Exit(1) - - config = get_config(config_path=config_file) - common_config = config.get_common_config() - - final_payload = build_standard_payload(message, payload) - agent_type = getattr(common_config, "agent_type", "") or getattr(common_config, "template_type", "") - is_a2a = isinstance(agent_type, str) and "a2a" in agent_type.lower() - - # If it's an A2A Agent, reconstruct payload using A2A constructor - if is_a2a: - console.print("[cyan]Detected A2A agent type - constructing A2A JSON-RPC envelope[/cyan]") - final_payload = build_a2a_payload(message, payload, final_headers) - - # Process headers - final_headers = {"user_id": "agentkit_user", "session_id": "agentkit_sample_session"} - if headers: - try: - final_headers = json.loads(headers) if isinstance(headers, str) else headers - console.print(f"[blue]Using custom headers: {final_headers}[/blue]") - except json.JSONDecodeError as e: - console.print(f"[red]Error: Invalid JSON headers: {e}[/red]") - raise typer.Exit(1) - else: - console.print(f"[blue]Using default headers: {final_headers}[/blue]") - - # Set execution context - CLI uses ConsoleReporter (with colored output and progress) - from agentkit.toolkit.context import ExecutionContext - reporter = ConsoleReporter() - ExecutionContext.set_reporter(reporter) - - executor = InvokeExecutor(reporter=reporter) - result = executor.execute( - payload=final_payload, - config_file=str(config_file), - headers=final_headers, - stream=None # Automatically determined by Runner - ) - - if not result.success: - console.print(f"[red]❌ Invocation failed: {result.error}[/red]") - raise typer.Exit(1) - - console.print("[green]✅ Invocation successful[/green]") - - # Get response - response = result.response - - # Handle streaming response (generator) - if result.is_streaming: - console.print("[cyan]📡 Streaming response detected...[/cyan]\n") - result_list = [] - complete_text = [] - - for event in result.stream(): - result_list.append(event) - - # If it's a string starting with "data: ", try to parse (fallback handling) - if isinstance(event, str): - if event.strip().startswith("data: "): - try: - json_str = event.strip()[6:].strip() # Remove "data: " prefix - event = json.loads(json_str) - except json.JSONDecodeError: - # Parsing failed, skip this event - continue - else: - # Not SSE format string, skip - continue - - # Handle A2A JSON-RPC - if isinstance(event, dict) and event.get("jsonrpc") and "result" in event: - event = event["result"] - - if isinstance(event, dict): - parts = [] - if isinstance(event.get("parts"), list): - parts = event.get("parts", []) - elif isinstance(event.get("message"), dict): - parts = event["message"].get("parts", []) - elif isinstance(event.get("content"), dict): - parts = event["content"].get("parts", []) - if not event.get("partial", True): - logger.info("Partial event: %s", event) # Log partial events - continue - - if parts: - for p in parts: - text = None - if isinstance(p, dict) and "text" in p: - text = p["text"] - elif isinstance(p, str): - text = p - if text: - complete_text.append(text) - # Incremental print (keep no newline) - console.print(text, end="", style="green") - - # Display error information in event (if any) - if "error" in event: - console.print(f"\n[red]Error: {event['error']}[/red]") - - # Handle status updates (e.g., final flag or completed status) - if event.get("final") is True: - console.print("\n[cyan]Stream marked final[/cyan]") - break - - status = event.get("status") - if isinstance(status, dict) and status.get("state") == "completed": - console.print("\n[cyan]Status indicates completed[/cyan]") - break - - # Display complete response (commented out for now) - # if complete_text: - # console.print("\n\n[cyan]━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━[/cyan]") - # console.print(f"[cyan]📝 Complete response:[/cyan] {''.join(complete_text)}") - console.print("") # Line break - - return str(result_list) - - # Handle non-streaming response - console.print("[cyan]📝 Response:[/cyan]") - if isinstance(response, dict): - console.print(json.dumps(response, indent=2, ensure_ascii=False)) - else: - console.print(response) - - return str(response) \ No newline at end of file diff --git a/agentkit/toolkit/cli/cli_launch.py b/agentkit/toolkit/cli/cli_launch.py deleted file mode 100644 index 7509c00..0000000 --- a/agentkit/toolkit/cli/cli_launch.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Launch command implementation.""" - -from pathlib import Path -import typer -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -console = Console() - - -def launch_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), - platform: str = typer.Option("auto", help="Build platform"), -): - """Build and deploy in one command.""" - from agentkit.toolkit.executors import LifecycleExecutor - from agentkit.toolkit.cli.console_reporter import ConsoleReporter - from agentkit.toolkit.context import ExecutionContext - - console.print("[green]Launching agent...[/green]") - - # Set execution context - CLI uses ConsoleReporter (with colored output and progress) - reporter = ConsoleReporter() - ExecutionContext.set_reporter(reporter) - - executor = LifecycleExecutor(reporter=reporter) - result = executor.launch(config_file=str(config_file), platform=platform) - - # Format output - if result.success: - console.print("[green]✅ Launch completed successfully![/green]") - - # Show build and deploy details - if result.build_result: - build_res = result.build_result - if hasattr(build_res, 'image_name') and build_res.image_name: - console.print(f"[cyan]Built image: {build_res.image_name}[/cyan]") - - if result.deploy_result: - deploy_res = result.deploy_result - if deploy_res.endpoint_url: - console.print(f"[cyan]Endpoint: {deploy_res.endpoint_url}[/cyan]") - if deploy_res.container_id: - console.print(f"[cyan]Container: {deploy_res.container_id}[/cyan]") - else: - console.print(f"[red]❌ Launch failed: {result.error}[/red]") - raise typer.Exit(1) diff --git a/agentkit/toolkit/cli/cli_status.py b/agentkit/toolkit/cli/cli_status.py deleted file mode 100644 index 73f9c29..0000000 --- a/agentkit/toolkit/cli/cli_status.py +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Status command implementation.""" - -import typer -from pathlib import Path -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -console = Console() - - -def status_command( - config_file: Path = typer.Option("agentkit.yaml", help="Configuration file"), - verbose: bool = typer.Option(False, "--verbose", "-v", help="Show detailed information"), -): - """Show current status of the agent runtime.""" - from agentkit.toolkit.executors import StatusExecutor - from agentkit.toolkit.cli.console_reporter import ConsoleReporter - from rich.table import Table - from rich.panel import Panel - - try: - # Set execution context - CLI uses ConsoleReporter (with colored output and progress) - from agentkit.toolkit.context import ExecutionContext - reporter = ConsoleReporter() - ExecutionContext.set_reporter(reporter) - - executor = StatusExecutor(reporter=reporter) - result = executor.execute(config_file=str(config_file)) - - if not result.success: - console.print(f"[red]❌ Status query failed: {result.error}[/red]") - raise typer.Exit(1) - - # Status display (compatible with enum and string) - status_str = result.status.value if hasattr(result.status, 'value') else str(result.status) - - status_color = { - 'running': 'green', - 'stopped': 'yellow', - 'not_deployed': 'dim', - 'unknown': 'dim' - }.get(status_str, 'white') - - status_icon = { - 'running': '✅', - 'stopped': '⏸️', - 'not_deployed': '⚫', - 'unknown': '❓' - }.get(status_str, '●') - - console.print(f"\n[bold {status_color}]{status_icon} Service Status: {status_str.upper()}[/bold {status_color}]\n") - - # Basic information table - table = Table(show_header=False, box=None, padding=(0, 2)) - table.add_column("Key", style="cyan") - table.add_column("Value", style="white") - - # Display different information based on deployment mode - if result.container_id: # Local mode - details = result.metadata or {} - container_info = details.get('container', {}) - image_info = details.get('image', {}) - - if result.endpoint_url: - table.add_row("🌐 Endpoint", result.endpoint_url) - if result.container_id: - table.add_row("📦 Container ID", result.container_id[:12]) - if container_info.get('name'): - table.add_row("📛 Container Name", container_info['name']) - if result.uptime_seconds: - # Format uptime to human-readable format - uptime = result.uptime_seconds - hours = uptime // 3600 - minutes = (uptime % 3600) // 60 - seconds = uptime % 60 - uptime_str = f"{hours}h {minutes}m {seconds}s" if hours > 0 else f"{minutes}m {seconds}s" - table.add_row("⏱️ Uptime", uptime_str) - - # Port mappings - ports = container_info.get('ports', {}) - if ports: - port_mappings = [] - for container_port, host_bindings in ports.items(): - if host_bindings: - for binding in host_bindings: - host_ip = binding.get('HostIp', '0.0.0.0') - host_port = binding.get('HostPort', '') - if host_ip == '0.0.0.0': - port_mappings.append(f"{host_port}->{container_port}") - else: - port_mappings.append(f"{host_ip}:{host_port}->{container_port}") - if port_mappings: - table.add_row("🔌 Ports", ", ".join(port_mappings)) - - # Image information - if image_info.get('name'): - table.add_row("💿 Image", image_info['name']) - if image_info.get('id'): - table.add_row("🏷️ Image ID", image_info['id']) - if image_info.get('size'): - size_mb = image_info['size'] / (1024 * 1024) - table.add_row("📊 Size", f"{size_mb:.1f} MB") - - elif result.service_id: # Cloud mode - if result.endpoint_url: - table.add_row("🌐 Endpoint", result.endpoint_url) - if result.service_id: - table.add_row("☁️ Service ID", result.service_id) - if result.uptime_seconds: - # Format uptime to human-readable format - uptime = result.uptime_seconds - hours = uptime // 3600 - minutes = (uptime % 3600) // 60 - seconds = uptime % 60 - uptime_str = f"{hours}h {minutes}m {seconds}s" if hours > 0 else f"{minutes}m {seconds}s" - table.add_row("⏱️ Uptime", uptime_str) - - # Extract other information from metadata - details = result.metadata or {} - if details.get('runtime_name'): - table.add_row("📛 Runtime Name", details['runtime_name']) - if details.get('image_url'): - table.add_row("💿 Image", details['image_url']) - - # Display data plane health check status - ping_status = details.get('ping_status') - if ping_status is not None: - if ping_status is True: - health_status = "[green]✔️ Healthy[/green]" - elif ping_status is False: - health_status = "[red]❌ Unhealthy[/red]" - else: - health_status = "[dim]❓ Unknown[/dim]" - table.add_row("💚 Health Check", health_status) - - console.print(table) - - # Verbose mode displays detailed information - if verbose and result.metadata: - console.print("\n[dim]ℹ️ Detailed Information:[/dim]") - import json - console.print(Panel( - json.dumps(result.metadata, indent=2, ensure_ascii=False), - title="Metadata", - border_style="dim" - )) - - console.print() # Empty line - - except KeyboardInterrupt: - console.print("\n[yellow]⚠️ Interrupted by user (Ctrl+C)[/yellow]\n") - - except typer.Exit: - # Re-raise typer.Exit, do not catch it - raise - except Exception as e: - console.print(f"[red]❌ Status query failed: {e}[/red]") - raise typer.Exit(1) diff --git a/agentkit/toolkit/cli/cli_version.py b/agentkit/toolkit/cli/cli_version.py deleted file mode 100644 index a216f5d..0000000 --- a/agentkit/toolkit/cli/cli_version.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit CLI - Version command implementation.""" - -from pathlib import Path -from importlib.metadata import version as get_version, PackageNotFoundError -import sys -from rich.panel import Panel -from rich.console import Console - -# Note: Avoid importing heavy packages at the top to keep CLI startup fast - -# Python 3.11+ has tomllib, older versions need tomli -if sys.version_info >= (3, 11): - import tomllib -else: - try: - import tomli as tomllib - except ImportError: - tomllib = None - -console = Console() - - -def get_package_version() -> str: - """Get package version from installed package or pyproject.toml.""" - # Try to get version from installed package - try: - return get_version("agentkit-sdk-python") - except PackageNotFoundError: - pass - - # Fallback: read from pyproject.toml using toml parser - if tomllib is not None: - try: - # Find pyproject.toml in the package directory - current_file = Path(__file__) - # Go up from agentkit/toolkit/cli/cli.py to workspace root - pyproject_path = current_file.parent.parent.parent.parent / "pyproject.toml" - - if pyproject_path.exists(): - with open(pyproject_path, "rb") as f: - data = tomllib.load(f) - return data.get("project", {}).get("version", "unknown") - except Exception: - pass - - # Last resort: parse pyproject.toml manually for version line - try: - current_file = Path(__file__) - pyproject_path = current_file.parent.parent.parent.parent / "pyproject.toml" - - if pyproject_path.exists(): - with open(pyproject_path, "r") as f: - for line in f: - if line.strip().startswith("version"): - # Parse line like: version = "0.0.7.34" - parts = line.split("=") - if len(parts) == 2: - version_str = parts[1].strip().strip('"').strip("'") - return version_str - except Exception: - pass - - return "unknown" - - -def version_command(): - """Show AgentKit version information.""" - pkg_version = get_package_version() - console.print(Panel( - f"[bold cyan]AgentKit SDK[/bold cyan]\n[green]Version: {pkg_version}[/green]", - title="📦 Version Info", - border_style="cyan" - )) diff --git a/agentkit/toolkit/cli/console_reporter.py b/agentkit/toolkit/cli/console_reporter.py deleted file mode 100644 index 7531936..0000000 --- a/agentkit/toolkit/cli/console_reporter.py +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -CLI Reporter Implementation - -Console output implementation based on Rich library, providing: -- Colored output -- Progress bar -- User interaction -""" - -from typing import Optional, List -from contextlib import contextmanager -from rich.console import Console -from rich.progress import Progress, SpinnerColumn, BarColumn, TextColumn, TaskProgressColumn, TimeElapsedColumn - -from agentkit.toolkit.reporter import Reporter, TaskHandle - - -class ConsoleReporter(Reporter): - """ - Console reporter for CLI usage. - - Provides beautiful console output using Rich library: - - info: Cyan text - - success: Green text + ✅ - - warning: Yellow text + ⚠️ - - error: Red text + ❌ - - progress: Auto-managed progress bar - - confirm: Interactive confirmation - - Usage example: - reporter = ConsoleReporter() - reporter.info("Starting build...") - reporter.progress("Building", 50, 100) - reporter.success("Build successful!") - - if reporter.confirm("Continue?"): - # User chose yes - """ - - def __init__(self): - """Initialize console reporter.""" - self.console = Console() - self._progress: Optional[Progress] = None - self._task_id: Optional[int] = None - - def info(self, message: str, **kwargs): - """Output cyan info message.""" - self.console.print(f"[cyan]{message}[/cyan]") - - def success(self, message: str, **kwargs): - """Output green success message (with ✅).""" - self.console.print(f"[green]✅ {message}[/green]") - - def warning(self, message: str, **kwargs): - """Output yellow warning message (with ⚠️).""" - self.console.print(f"[yellow]⚠️ {message}[/yellow]") - - def error(self, message: str, **kwargs): - """Output red error message (with ❌).""" - self.console.print(f"[red]❌ {message}[/red]") - - def progress(self, message: str, current: int, total: int = 100, **kwargs): - """ - Report progress (auto-managed Rich Progress bar). - - How it works: - 1. Create progress bar on first call - 2. Update progress on subsequent calls - 3. Auto-stop and cleanup when reaching 100% - - This way Builder/Runner doesn't need to manually manage progress bar lifecycle. - """ - # First call: create progress bar - if self._progress is None and current < total: - self._progress = Progress( - SpinnerColumn(), - TextColumn("[progress.description]{task.description}"), - BarColumn(), - TaskProgressColumn(), - console=self.console - ) - self._progress.start() - self._task_id = self._progress.add_task(message, total=total) - - # Update progress - if self._progress and self._task_id is not None: - self._progress.update( - self._task_id, - completed=current, - description=message - ) - - # Reach 100%: stop and cleanup - if current >= total and self._progress: - self._progress.stop() - self._progress = None - self._task_id = None - - def confirm(self, message: str, default: bool = False, **kwargs) -> bool: - """ - Request user confirmation (interactive). - - Args: - message: Confirmation message - default: Default value (when user presses Enter) - - Returns: - User's choice - - Example: - Confirm cleanup? (Y/n): # default=True - Confirm cleanup? (y/N): # default=False - """ - # Display message - self.console.print(f"\n[yellow]{message}[/yellow]") - - # Prompt - default_str = "Y/n" if default else "y/N" - user_input = input(f"Confirm? ({default_str}): ").strip().lower() - - # Parse input - if not user_input: - return default - - return user_input in ['y', 'yes'] - - @contextmanager - def long_task(self, description: str, total: float = 100): - """ - Context manager for long-running tasks. - - Display progress bar using Rich Progress. - - Example: - with reporter.long_task("Waiting for build to complete", total=600) as task: - for i in range(600): - task.update(description=f"In progress {i}/600", completed=i) - time.sleep(1) - """ - progress = Progress( - SpinnerColumn(), - TextColumn("[progress.description]{task.description}"), - BarColumn(), - TaskProgressColumn(), - TimeElapsedColumn(), - console=self.console - ) - - with progress: - task_id = progress.add_task(description, total=total) - yield _RichTaskHandle(progress, task_id) - - def show_logs(self, title: str, lines: List[str], max_lines: int = 100): - """ - Display log content. - - Format and output logs with line numbers and borders. - """ - self.console.print("\n" + "=" * 80) - self.console.print(f"[bold red]{title}[/bold red]") - self.console.print("=" * 80) - - for i, line in enumerate(lines[:max_lines], 1): - self.console.print(f"{i:3d}: {line.rstrip()}") - - if len(lines) > max_lines: - self.console.print(f"\n[yellow]... ({len(lines) - max_lines} more lines)[/yellow]") - - self.console.print("=" * 80 + "\n") - - def __del__(self): - """Ensure progress bar is stopped on destruction.""" - if self._progress: - try: - self._progress.stop() - except: - pass - - -class _RichTaskHandle(TaskHandle): - """Task handle for Rich progress bar.""" - - def __init__(self, progress: Progress, task_id): - self._progress = progress - self._task_id = task_id - - def update(self, description: Optional[str] = None, completed: Optional[float] = None): - """Update task progress.""" - kwargs = {} - if description is not None: - kwargs['description'] = description - if completed is not None: - kwargs['completed'] = completed - self._progress.update(self._task_id, **kwargs) - - -__all__ = ["ConsoleReporter"] diff --git a/agentkit/toolkit/cli/interactive_config.py b/agentkit/toolkit/cli/interactive_config.py deleted file mode 100644 index b675374..0000000 --- a/agentkit/toolkit/cli/interactive_config.py +++ /dev/null @@ -1,922 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import readline -from typing import Any, Dict, Optional, List, Union, get_type_hints, get_origin, get_args -from dataclasses import fields, is_dataclass, MISSING -from rich.console import Console -from rich.prompt import Confirm -from rich.panel import Panel -from rich.text import Text -from rich.table import Table -from rich.align import Align -from rich import box - -console = Console() - -# Modern icons and style configuration -ICONS = { - "agent": "🤖", - "app": "📱", - "file": "📄", - "deploy": "🚀", - "language": "✏️", - "language_version": "🐍", - "dependencies_file": "📦", - "package": "📦", - "port": "🔌", - "config": "⚙️", - "success": "✅", - "error": "❌", - "warning": "⚠️", - "info": "ℹ️", - "input": "🔤", - "select": "🔘", - "description": "✨", - "list": "📝", - "dict": "📋", - "number": "🔢", - "boolean": "🔲", - "string": "🔤", - "rocket": "🚀", -} - -# Color configuration -COLORS = { - "primary": "#2196F3", # Tech blue - "success": "#4CAF50", # Vibrant green - "warning": "#FF9800", # Orange - "error": "#F44336", # Red - "border": "#37474F", # Border gray - "muted": "#78909C", # Soft gray - "label": "#64B5F6", # Light blue - "description": "#90A4AE" # Description gray -} - -# Style configuration -STYLES = { - "title": "bold #2196F3", - "subtitle": "bold #64B5F6", - "success": "bold #4CAF50", - "warning": "bold #FF9800", - "error": "bold #F44336", - "label": "bold #64B5F6", - "value": "#4CAF50", - "description": "#78909C", - "muted": "#78909C" -} - -class AutoPromptGenerator: - def __init__(self): - self.type_handlers = { - str: self._handle_string, - int: self._handle_int, - float: self._handle_float, - bool: self._handle_bool, - list: self._handle_list, - List: self._handle_list, - dict: self._handle_dict, - Dict: self._handle_dict, - } - - def _safe_input(self, prompt_text, default: str = "") -> str: - """Safe input method that protects prompt text from being deleted by Backspace. - - Args: - prompt_text: Prompt text (Rich Text object or string) - default: Default value - - Returns: - User input string - """ - # Convert Rich Text to string with ANSI escape codes - # Use Console's internal method to render styles as ANSI codes - from io import StringIO - string_io = StringIO() - # Use global console's is_terminal property to determine if terminal features should be enabled - # This allows automatic adaptation to the actual terminal environment, avoiding garbled output - temp_console = Console(file=string_io, force_terminal=console.is_terminal, width=200) - temp_console.print(prompt_text, end="") - rendered_prompt = string_io.getvalue() - - # If there's a default value, try to use readline's pre_input_hook to prefill - # Add compatibility handling as some systems (e.g., macOS libedit) may not support these features - if default: - def prefill(): - try: - readline.insert_text(default) - readline.redisplay() - except (AttributeError, OSError): - # Some readline implementations (e.g., libedit) may not support insert_text or redisplay - # In this case, we'll display the default value in the prompt as a fallback - pass - try: - readline.set_pre_input_hook(prefill) - except (AttributeError, OSError): - # If set_pre_input_hook is unavailable, display default value in prompt - if console.is_terminal: - rendered_prompt += f" \033[2m[Default: {default}]\033[0m" - else: - rendered_prompt += f" [Default: {default}]" - - try: - # Use input()'s prompt parameter; Python automatically protects this prompt from Backspace deletion - # The prompt contains ANSI escape codes, so Rich styles are displayed - user_input = input(rendered_prompt) - - # If user didn't input anything and there's a default value, return the default - if not user_input and default: - return default - - return user_input - finally: - # Clean up hook; use try-except to prevent errors on unsupported systems - try: - readline.set_pre_input_hook() - except (AttributeError, OSError): - pass - - def generate_config(self, dataclass_type: type, existing_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: - if not is_dataclass(dataclass_type): - raise ValueError(f"{dataclass_type} must be a dataclass") - - config = {} - existing_config = existing_config or {} - - # Get dataclass metadata - # Try to get from class attributes; if not found, create instance to get field values - config_metadata = {} - if hasattr(dataclass_type, '_config_metadata'): - # If it's a class attribute - config_metadata = getattr(dataclass_type, '_config_metadata', {}) - else: - # If it's a field, need to create instance to get default value - try: - # Get field's default value factory or default value - for field in fields(dataclass_type): - if field.name == '_config_metadata': - if field.default_factory is not None and field.default_factory != MISSING: - config_metadata = field.default_factory() - elif field.default != MISSING: - config_metadata = field.default - break - except Exception: - pass - - config_name = config_metadata.get('name', dataclass_type.__name__) - - # Get custom messages - welcome_message = config_metadata.get('welcome_message') - next_step_hint = config_metadata.get('next_step_hint') - completion_message = config_metadata.get('completion_message') - next_action_hint = config_metadata.get('next_action_hint') - - # Display modern welcome panel - self._show_welcome_panel(config_name, welcome_message, next_step_hint) - - # Get field list and display progress - visible_fields = [f for f in fields(dataclass_type) - if not f.metadata.get("hidden", False) and not f.metadata.get("system", False) and f.name != "_config_metadata"] - total_fields = len(visible_fields) - - for idx, field in enumerate(visible_fields, 1): - field_name = field.name - field_type = get_type_hints(dataclass_type).get(field_name, str) - existing_value = existing_config.get(field_name) - default_value = existing_value if existing_value is not None else field.default - description = field.metadata.get("description") or field.name.replace("_", " ").title() - - # Pass progress info and current config to field handler - value = self._prompt_for_field(field_name, field_type, description, default_value, field.metadata, idx, total_fields, config) - - if value is not None: - config[field_name] = value - - # Display completion panel - self._show_completion_panel(config, completion_message, next_action_hint) - - # Handle hidden and system fields - for field in fields(dataclass_type): - field_name = field.name - if field.metadata.get("hidden", False) or field.metadata.get("system", False): - if field_name in existing_config: - config[field_name] = existing_config[field_name] - - # Filter out MISSING values - filtered_config = {} - for key, value in config.items(): - if not isinstance(value, type(MISSING)): - filtered_config[key] = value - - return filtered_config - - def _prompt_for_field(self, name: str, field_type: type, description: str, default: Any, metadata: Dict[str, Any] = None, current: int = 1, total: int = 1, current_config: Dict[str, Any] = None) -> Any: - """Field input coordinator - handles advanced validation logic. - - Args: - name: Field name - field_type: Field type - description: Field description - default: Default value - metadata: Field metadata - current: Current progress - total: Total fields - current_config: Currently configured fields (for conditional validation) - - Returns: - User input value - """ - metadata = metadata or {} - current_config = current_config or {} - - if get_origin(field_type) is not None: - if get_origin(field_type) is Union: - args = get_args(field_type) - if len(args) == 2 and type(None) in args: - field_type = args[0] - - if get_origin(field_type) is list or field_type is List: - return self._handle_list(description, default, metadata, current, total) - - if get_origin(field_type) is dict or field_type is Dict: - return self._handle_dict(description, default, metadata, current, total) - - if default is MISSING or isinstance(default, type(MISSING)): - default = None - - choices = metadata.get("choices") - if choices: - return self._handle_choice_selection(description, default, choices, metadata, current, total) - - # Enhance description with conditional hints - enhanced_description = self._enhance_description_with_hints( - description, metadata, current_config - ) - - # Conditional validation loop - validation = metadata.get('validation', {}) - while True: - # Call specific input handler (basic validation) - handler = self.type_handlers.get(field_type) - if handler: - value = handler(enhanced_description, default, metadata, current, total) - else: - value = self._handle_string(enhanced_description, default, metadata, current, total) - - # If conditional validation type, perform conditional validation - if validation.get('type') == 'conditional' and value: - errors = self._validate_conditional_value( - name, value, validation, current_config - ) - - if errors: - # Display errors and continue loop for re-input - for error in errors: - console.print(f"{ICONS['error']} {error}") - continue # Re-input - - # Validation passed, return value - return value - - def _enhance_description_with_hints(self, description: str, metadata: dict, current_config: dict) -> str: - """Enhance description with hints based on conditional validation rules. - - Args: - description: Original description - metadata: Field metadata - current_config: Currently configured fields - - Returns: - Enhanced description (with hint information) - """ - validation = metadata.get('validation', {}) - - # Not conditional validation, return original description directly - if validation.get('type') != 'conditional': - return description - - depends_on = validation.get('depends_on') - rules = validation.get('rules', {}) - - if not depends_on or not rules: - return description - - # Get current value of dependent field - depend_value = current_config.get(depends_on) - - # If dependent field has value and has corresponding rule - if depend_value and depend_value in rules: - rule = rules[depend_value] - - # Add hints based on rule type - if 'choices' in rule: - # choices rule: display available options - hint = f" [Options: {', '.join(rule['choices'])}]" - return f"{description}{hint}" - - elif 'pattern' in rule and 'hint' in rule: - # pattern rule: display format hint - hint = rule['hint'] - return f"{description} {hint}" - - return description - - def _validate_conditional_value(self, field_name: str, value: Any, validation: dict, current_config: dict) -> List[str]: - """Validate conditional field value. - - Args: - field_name: Field name - value: Input value - validation: Validation rules (metadata['validation']) - current_config: Currently configured fields - - Returns: - List of errors; empty list means validation passed - """ - errors = [] - - depends_on = validation.get('depends_on') - rules = validation.get('rules', {}) - - if not depends_on or not rules: - return errors - - # Get value of dependent field - depend_value = current_config.get(depends_on) - - # If dependent field has value and has corresponding rule - if depend_value and depend_value in rules: - rule = rules[depend_value] - - # choices validation - if 'choices' in rule and value not in rule['choices']: - msg = rule.get('message', f"Must be one of: {', '.join(rule['choices'])}") - errors.append(msg) - - # pattern validation - if 'pattern' in rule: - import re - if not re.match(rule['pattern'], value): - msg = rule.get('message', 'Format is incorrect') - errors.append(msg) - - return errors - - def _handle_choice_selection(self, description: str, default: Any, choices: List[Any], field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> str: - # Handle different types of choice data - if isinstance(choices, list) and len(choices) > 0 and isinstance(choices[0], dict): - # Handle dictionary format choice items - if not default or (default and default not in [choice['value'] for choice in choices]): - default = choices[0]['value'] if choices else None - else: - # Handle simple list format choice items - if not default or (default and default not in choices): - default = choices[0] if choices else None - - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['select'] - - # Create choice panel title with integrated progress information - console.print(f"\n[{current}/{total}] {icon} {description}") - - # Process choice data - choice_descriptions = {} - if isinstance(choices, dict): - choice_descriptions = choices - choices = list(choices.keys()) - elif isinstance(choices, list) and len(choices) > 0 and isinstance(choices[0], dict): - choice_descriptions = {item["value"]: item.get("description", "") for item in choices} - choices = [item["value"] for item in choices] - - # Create modern choice menu - table = Table(show_header=False, box=box.ROUNDED, padding=(0, 1)) - - for i, choice in enumerate(choices, 1): - desc = choice_descriptions.get(choice, "") - - # Mark default option - is_default = choice == default - default_marker = " (current)" if is_default else "" - - # Format choice item - choice_text = Text() - choice_text.append(f"{i}. ") - choice_text.append(f"{choice}") - if desc: - choice_text.append(f" - {desc}") - choice_text.append(default_marker) - - table.add_row(choice_text) - - # Display choice table - console.print(table) - console.print() - - while True: - # Create input prompt - prompt_str = "Please select (enter number or name): " - - # Use input()'s prompt parameter - try: - user_input = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - console.print(f"\n{ICONS['warning']} Selection cancelled, using default value") - return str(default) if default else str(choices[0]) if choices else "" - - if user_input.isdigit(): - choice_num = int(user_input) - if 1 <= choice_num <= len(choices): - selected = choices[choice_num - 1] - # Display selection confirmation - console.print(f"\n[{COLORS['success']}]»[/] Selected: {selected}\n") - return selected - else: - console.print(f"{ICONS['error']} Please enter a number between 1-{len(choices)}") - continue - - if user_input in choices: - # Display selection confirmation - console.print(f"\n[{COLORS['success']}]»[/] Selected: {user_input}\n") - return user_input - elif user_input == "": - console.print(f"\n[{COLORS['success']}]»[/] Using default: {default}\n") - return default - else: - valid_choices = ", ".join(choices) - console.print(f"{ICONS['error']} Invalid choice, please select: {valid_choices}") - - def _handle_string(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> str: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['input'] - - # Get validation rules - validation_rules = field_metadata.get('validation', {}) if field_metadata else {} - - while True: - # Build complete prompt information - if default: - prompt_str = f"\n[{current}/{total}] {icon} {description} (current: {default}{'' if not ('{' in default and '}' in default) else ', content in curly braces is a dynamic placeholder, no need to fill manually'}): " - else: - prompt_str = f"\n[{current}/{total}] {icon} {description}: " - - # Use input()'s prompt parameter; Python protects this prompt from Backspace deletion - try: - result = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - result = "" - - # If no input and there's a default value, use the default - if not result and default: - result = str(default) - - # Apply validation rules - if validation_rules: - # Check required - if validation_rules.get('required') and (not result or result.strip() == ''): - console.print(f"{ICONS['error']} This field cannot be empty") - continue - - # Check regex pattern - pattern = validation_rules.get('pattern') - if pattern and result: - import re - if not re.match(pattern, result): - error_msg = validation_rules.get('message', 'Input format does not meet requirements') - console.print(f"{ICONS['error']} {error_msg}") - continue - - console.print(f"[{COLORS['success']}]»[/] {result}\n") - return result - - def _handle_int(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> int: - while True: - try: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['input'] - - # Build complete prompt information - if default is not None: - prompt_str = f"\n[{current}/{total}] {icon} {description} (current: {default}) (number): " - else: - prompt_str = f"\n[{current}/{total}] {icon} {description} (number): " - - # Use input()'s prompt parameter - try: - value = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - value = "" - - # If no input and there's a default value, use the default - if not value and default is not None: - value = str(default) - elif not value: - value = "0" - - result = int(value) - console.print(f"[{COLORS['success']}]»[/] {result}\n") - return result - except ValueError: - console.print(f"{ICONS['error']} Please enter a valid integer") - except KeyboardInterrupt: - raise - - def _handle_float(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> float: - while True: - try: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['input'] - - # Build complete prompt information - if default is not None: - prompt_str = f"\n[{current}/{total}] {icon} {description} (current: {default}) (number): " - else: - prompt_str = f"\n[{current}/{total}] {icon} {description} (number): " - - # Use input()'s prompt parameter - try: - value = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - value = "" - - # If no input and there's a default value, use the default - if not value and default is not None: - value = str(default) - elif not value: - value = "0.0" - - result = float(value) - console.print(f"[{COLORS['success']}]»[/] {result}\n") - return result - except ValueError: - console.print(f"{ICONS['error']} Please enter a valid number") - except KeyboardInterrupt: - raise - - def _handle_bool(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> bool: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['select'] - - # Display progress information - console.print(f"\n[{current}/{total}] {icon} {description}") - - result = Confirm.ask("", default=bool(default)) - result_text = "Yes" if result else "No" - console.print(f"[{COLORS['success']}]»[/] Selected: {result_text}\n") - return result - - def _handle_list(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> List[str]: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['list'] - - # Display progress information - console.print(f"\n[{current}/{total}] {icon} {description}") - console.print("Enter each item and press Enter; enter an empty line to finish\n") - - items = [] - counter = 1 - - while True: - # Create list item input prompt - prompt_str = f" [{current}/{total}] [{counter}] Item: " - - try: - item = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - item = "" - if not item.strip(): - break - items.append(item.strip()) - console.print(f" [{COLORS['success']}]»[/] Added: {item.strip()}") - counter += 1 - - if items: - console.print(f"\n{ICONS['list']} Added {len(items)} items\n") - else: - console.print(f"\n{ICONS['info']} No items added\n") - - return items if items else (default if default is not None else []) - - def _handle_dict(self, description: str, default: Any, field_metadata: Dict[str, Any] = None, current: int = 1, total: int = 1) -> Dict[str, str]: - # Get field icon (supports metadata specification) - icon = self._get_field_icon(description, field_metadata) if field_metadata else ICONS['dict'] - - # Display progress information - console.print(f"\n[{current}/{total}] {icon} {description}") - - # Add environment variable hints (if description contains 'env') - if "env" in description.lower(): - console.print("Common environment variables:") - console.print(" - MODEL_AGENT_API_KEY=your_api_key") - console.print(" - DEBUG=true") - console.print(" - LOG_LEVEL=info") - - console.print("Input format: KEY=VALUE") - console.print("Commands: 'del KEY' to delete, 'list' to view, 'clear' to clear all, empty line to finish\n") - - result_dict = {} - if isinstance(default, dict): - result_dict.update(default) - - while True: - # Create dictionary input prompt - prompt_str = f"\n[{current}/{total}] {icon} Variable: " - - try: - user_input = input(prompt_str) - except KeyboardInterrupt: - raise - except EOFError: - user_input = "" - - if not user_input.strip(): - break - - if user_input == "list": - if result_dict: - console.print("\nCurrent variables:") - for key, value in result_dict.items(): - console.print(f" {key}={value}") - else: - console.print("No variables set") - continue - - if user_input == "clear": - result_dict.clear() - console.print("All variables cleared") - continue - - if user_input.startswith("del "): - key_to_delete = user_input[4:].strip() - if key_to_delete in result_dict: - del result_dict[key_to_delete] - console.print(f"Deleted: {key_to_delete}") - else: - console.print(f"Variable not found: {key_to_delete}") - continue - - if "=" not in user_input: - console.print("Invalid format, please use KEY=VALUE") - continue - - key, value = user_input.split("=", 1) - key = key.strip() - value = value.strip() - - # Strip surrounding quotes (both single and double quotes) - if len(value) >= 2: - if (value[0] == '"' and value[-1] == '"') or (value[0] == "'" and value[-1] == "'"): - value = value[1:-1] - - if not key: - console.print("Key name cannot be empty") - continue - - if not key.replace("_", "").isalnum(): - console.print("Key name can only contain letters, numbers, and underscores") - continue - - old_value = result_dict.get(key) - result_dict[key] = value - - if old_value is not None: - console.print(f"Updated: {key}={value} (previous: {old_value})") - else: - console.print(f"Added: {key}={value}") - - if result_dict: - console.print(f"\n{ICONS['dict']} Configured {len(result_dict)} variables\n") - else: - console.print(f"\n{ICONS['info']} No variables configured\n") - - return result_dict if result_dict else (default if default is not None else {}) - - def _show_welcome_panel(self, config_name: str, welcome_message: Optional[str] = None, - next_step_hint: Optional[str] = None): - """Display welcome panel.""" - # Create title text with ASCII-safe decorators - # Note: Avoid emojis in Panel titles as they cause alignment issues in some terminals - # (e.g., iTerm2) due to inconsistent emoji width calculation between Rich and terminal - title_text = Text() - title_text.append(" ◆ ", style=f"bold {COLORS['primary']}") - title_text.append(config_name, style=STYLES["title"]) - title_text.append(" ◆ ", style=f"bold {COLORS['primary']}") - - # Create content with visual hierarchy - # Note: Avoid emojis in Panel content as they cause alignment issues in some terminals - content = Text() - - # Use custom welcome message or default message - if welcome_message: - content.append("► ", style=f"bold {COLORS['success']}") - content.append(f"{welcome_message}\n", style="bold white") - else: - content.append("► ", style=f"bold {COLORS['success']}") - content.append("Welcome to AgentKit Configuration Wizard\n", style="bold white") - content.append("\n This wizard will help you configure your Agent application.\n", style=COLORS["description"]) - content.append(" Follow the prompts or press Enter to use default values.\n", style=COLORS["description"]) - - # Add next step hint - if next_step_hint: - content.append(f"\n {next_step_hint}\n", style=f"italic {COLORS['label']}") - - content.append("\n• ", style=f"dim {COLORS['warning']}") - content.append("Press Ctrl+C at any time to exit configuration.", style="dim") - - # Create panel with enhanced styling - panel = Panel( - content, - title=title_text, - border_style=COLORS["primary"], - box=box.ROUNDED, - padding=(1, 2), - expand=False - ) - - console.print(panel) - console.print() - - def _show_progress(self, current: int, total: int, field_name: str, description: str): - """Display progress indicator.""" - # Get field icon (supports metadata specification) - icon = self._get_field_icon(field_name) - - # Create progress bar - progress_width = 30 - filled_width = int((current / total) * progress_width) - progress_bar = f"[{'█' * filled_width}{'░' * (progress_width - filled_width)}]" - - # Create progress information - progress_text = Text() - progress_text.append(f"{icon} ", style=STYLES["label"]) - progress_text.append(f"{description}", style="bold white") - progress_text.append(f" [{current}/{total}]\n", style=STYLES["description"]) - progress_text.append(f" {progress_bar} {current/total*100:.0f}%", style=COLORS["label"]) - - console.print(progress_text) - console.print() - - def _show_progress_clean(self, current: int, total: int, field_name: str, description: str): - """Display clean progress indicator (no repeated progress bar).""" - # Get field icon (supports metadata specification) - icon = self._get_field_icon(field_name) - - # Only show progress bar on first field or when field changes - if current == 1 or current != getattr(self, '_last_progress', 0): - # Create progress bar - progress_width = 30 - filled_width = int((current / total) * progress_width) - progress_bar = f"[{'█' * filled_width}{'░' * (progress_width - filled_width)}]" - - # Create progress information - progress_text = Text() - progress_text.append(f"{icon} ", style=STYLES["label"]) - progress_text.append(f"{description}", style="bold white") - progress_text.append(f" [{current}/{total}]\n", style=STYLES["description"]) - progress_text.append(f" {progress_bar} {current/total*100:.0f}%", style=COLORS["label"]) - - console.print(progress_text) - console.print() - - # Record current progress - self._last_progress = current - - def _get_field_icon(self, field_name: str, field_metadata: Dict[str, Any] = None) -> str: - """Get corresponding icon based on field metadata or field name.""" - # Prioritize icon specified in metadata - if field_metadata and "icon" in field_metadata: - return field_metadata["icon"] - - # Fall back to hardcoded mapping (maintain backward compatibility) - icon_map = { - "agent_name": ICONS["agent"], - "entry_point": ICONS["file"], - "launch_type": ICONS["deploy"], - "description": ICONS["description"], - "language": ICONS["language"], - "language_version": ICONS["language_version"], - "dependencies_file": ICONS["package"], - "entry_port": ICONS["port"], - } - return icon_map.get(field_name, ICONS["config"]) - - def _show_completion_panel(self, config: Dict[str, Any], completion_message: Optional[str] = None, - next_action_hint: Optional[str] = None): - """Display configuration completion panel.""" - # Create title text with ASCII-safe decorators (consistent with welcome panel) - # Note: Avoid emojis in Panel titles as they cause alignment issues in some terminals - title_text = Text() - title_text.append(" ◆ ", style=f"bold {COLORS['success']}") - title_text.append("Configuration Complete", style=STYLES["success"]) - title_text.append(" ◆ ", style=f"bold {COLORS['success']}") - - # Create content with visual hierarchy (consistent with welcome panel style) - content = Text() - - # Success message - if completion_message: - content.append("► ", style=f"bold {COLORS['success']}") - content.append(f"{completion_message}\n", style="bold white") - else: - content.append("► ", style=f"bold {COLORS['success']}") - content.append("Configuration saved successfully!\n", style="bold white") - - # Configuration summary (compact format, no redundant header) - content.append("\n") - for key, value in config.items(): - if not key.startswith('_'): # Skip internal fields - formatted_key = self._format_field_name(key) - if isinstance(value, type(MISSING)) or value is None: - formatted_value = "Not set" - else: - # Truncate long values for display - formatted_value = str(value) - if len(formatted_value) > 50: - formatted_value = formatted_value[:47] + "..." - content.append(f" • {formatted_key}: ", style=COLORS["label"]) - content.append(f"{formatted_value}\n", style=STYLES["value"]) - - # Next steps hint - content.append("\n• ", style=f"dim {COLORS['primary']}") - if next_action_hint: - content.append(next_action_hint, style="dim") - else: - content.append("Run 'agentkit build' to build your application.", style="dim") - - # Create panel with consistent styling - completion_panel = Panel( - content, - title=title_text, - border_style=COLORS["success"], - box=box.ROUNDED, - padding=(1, 2), - expand=False - ) - - console.print("\n") - console.print(completion_panel) - console.print() - - def _format_field_name(self, field_name: str) -> str: - """Format field name for display.""" - name_map = { - "agent_name": "Application Name", - "entry_point": "Entry Point", - "launch_type": "Launch Type", - "description": "Description", - "language": "Language", - "language_version": "Language Version", - "dependencies_file": "Dependencies File", - "entry_port": "Port", - "ve_cr_instance_name": "CR Instance Name", - "ve_cr_namespace_name": "CR Namespace", - "ve_cr_repo_name": "CR Repository", - } - return name_map.get(field_name, field_name.replace("_", " ").title()) - -auto_prompt = AutoPromptGenerator() - -def generate_config_from_dataclass(dataclass_type: type, existing_config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: - return auto_prompt.generate_config(dataclass_type, existing_config) - - -def create_common_config_interactively(existing_config: Optional[Dict[str, Any]] = None): - """Interactively create CommonConfig (CLI layer specific). - - This function is responsible for creating CommonConfig objects through interactive prompts. - It belongs to the CLI layer and should not exist in the core config layer. - - Args: - existing_config: Existing configuration dictionary for prefilling - - Returns: - CommonConfig: Created configuration object - - Example: - >>> config = create_common_config_interactively({"agent_name": "my-agent"}) - """ - from agentkit.toolkit.config import CommonConfig - - existing = CommonConfig.from_dict(existing_config or {}) - config_dict = auto_prompt.generate_config(CommonConfig, existing.to_dict()) - return CommonConfig.from_dict(config_dict) \ No newline at end of file diff --git a/agentkit/toolkit/cli/utils.py b/agentkit/toolkit/cli/utils.py deleted file mode 100644 index 91b880a..0000000 --- a/agentkit/toolkit/cli/utils.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import Literal, get_args, get_origin - -from InquirerPy import resolver -from pydantic import BaseModel - - -def prompt_base_model(model: type[BaseModel]) -> dict: - """Generate interactive prompts for a Pydantic BaseModel. - - Args: - model: A Pydantic BaseModel class - - Returns: - Dictionary of user responses mapped to field names - """ - prompts = [] - - for field_name, model_field in model.model_fields.items(): - if get_origin(model_field.annotation) == Literal: - prompts.append( - { - "type": "list", - "name": field_name, - "default": model_field.default if model_field.default else "", - "message": model_field.description - if model_field.description - else field_name, - "choices": list(get_args(model_field.annotation)), - } - ) - elif model_field.annotation is bool: - prompts.append( - { - "type": "confirm", - "name": field_name, - "default": model_field.default if model_field.default else False, - "message": model_field.description - if model_field.description - else field_name, - } - ) - else: - prompts.append( - { - "type": "input", - "name": field_name, - "default": str(model_field.default) if model_field.default else "", - "message": model_field.description - if model_field.description - else field_name, - } - ) - - responses = resolver.prompt(prompts) - return responses diff --git a/agentkit/toolkit/config/__init__.py b/agentkit/toolkit/config/__init__.py deleted file mode 100644 index b9489b0..0000000 --- a/agentkit/toolkit/config/__init__.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from .config import ( - AgentkitConfigManager, - CommonConfig, - get_config, -) - -from .strategy_configs import ( - LocalDockerConfig, - HybridVeAgentkitConfig, - VeAgentkitConfig, -) - -from .docker_build_config import ( - DockerBuildConfig, -) - -from .global_config import ( - GlobalConfig, - GlobalConfigManager, - get_global_config, - get_global_config_manager, - save_global_config, - global_config_exists, - VolcengineCredentials, - CRGlobalConfig, - TOSGlobalConfig, -) - -from .utils import is_valid_config, is_invalid_config, merge_runtime_envs -from .constants import * - -__all__ = [ - # 项目配置相关 - "AgentkitConfigManager", - "CommonConfig", - "ConfigUpdateResult", - "get_config", - "create_config_update_result", - - # 全局配置相关 - "GlobalConfig", - "GlobalConfigManager", - "get_global_config", - "get_global_config_manager", - "save_global_config", - "global_config_exists", - "VolcengineCredentials", - "CRGlobalConfig", - "TOSGlobalConfig", - - # 常量 - "AUTO_CREATE_VE", - "DEFAULT_WORKSPACE_NAME", - "DEFAULT_CR_NAMESPACE", - "DEFAULT_IMAGE_TAG", - "GLOBAL_CONFIG_DIR", - "GLOBAL_CONFIG_FILE", - "GLOBAL_CONFIG_FILE_PERMISSIONS", - - # 工具函数 - "is_valid_config", - "is_invalid_config", - "merge_runtime_envs", - - # Strongly 配置类 - "LocalDockerConfig", - "HybridVeAgentkitConfig", - "VeAgentkitConfig", - - # Docker构建配置 - "DockerBuildConfig", -] \ No newline at end of file diff --git a/agentkit/toolkit/config/config.py b/agentkit/toolkit/config/config.py deleted file mode 100644 index 62f20ba..0000000 --- a/agentkit/toolkit/config/config.py +++ /dev/null @@ -1,463 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit Configuration Manager""" - -from pathlib import Path -from typing import Dict, Any, Optional, Union -import os -import yaml -from .dataclass_utils import AutoSerializableMixin -from dataclasses import dataclass, field -from .docker_build_config import DockerBuildConfig - -STRATEGY_NAME_IN_YAML = "launch_types" - -@dataclass -class CommonConfig(AutoSerializableMixin): - """Common configuration - automatic prompt generation support""" - agent_name: str = field( - default="", - metadata={ - "description": "Agent application name", - "icon": "🤖", - "validation": { - "required": True, - "pattern": r"^[a-zA-Z0-9_-]+$", - "message": "Only letters, numbers, underscore(_) and hyphen(-) are allowed" - } - } - ) - entry_point: str = field( - default="", - metadata={ - "description": "Agent application entry file (path allowed), e.g. simple_agent.py", - "icon": "📝", - "validation": { - "required": True, - # allow relative paths with directories and either .py or .go endings - "pattern": r"^[\w\-/\.]+?\.(py)$", - "message": "Must be a Python (.py), containing only letters, numbers, underscore(_), hyphen(-), dot(.) and '/' for directories" - } - } - ) - description: str = field(default="", metadata={"description": "Application description", "icon": "📄"}) - language: str = field(default="Python", metadata={ - "description": "Agent application Language, defaults to Python", - "icon": "✏️", - "choices": [ - {"value": "Python", "description": "Python"}, - # {"value": "Golang", "description": "Go (Golang)"} - ] - }) - language_version: str = field( - default="", - metadata={ - "description": "Agent application Language version", - "icon": "🐍", - "validation": { - "type": "conditional", - "depends_on": "language", - "rules": { - "Python": { - "choices": ["3.10", "3.11", "3.12", "3.13"], - "message": "Python version must be 3.10, 3.11, 3.12, or 3.13" - }, - # "Golang": { - # "pattern": r"^1\.\d+$", - # "message": "Go 版本格式应为 '1.x' (如 1.21, 1.23)", - # "hint": "[格式: 1.x]" - # } - } - } - } - ) - agent_type: str = field(default="Basic App", metadata={"description" : "Agent application Type", "icon": "📩", "hidden": True}) - dependencies_file: str = field(default="requirements.txt", metadata={"description": "Agent application Dependencies file", "icon": "📦"}) - runtime_envs: Dict[str, str] = field( - default_factory=dict, - metadata={ - "description": "Application-level runtime environment variables (shared across all deployment modes)", - "icon": "🔐", - "hidden": False - } - ) - launch_type: str = field( - default="local", - metadata={ - "description": "Deployment and runtime mode, defaults to local (local build and deploy), optional hybrid (local build, cloud deploy)", - "icon": "🚀", - "choices": [ - {"value": "local", "description": "Local build and deploy"}, - {"value": "hybrid", "description": "Local build, cloud deploy"}, - {"value": "cloud", "description": "Cloud build and deploy base on Volcano Engine Agentkit Platform"} - ] - } - ) - - _config_metadata = { - 'name': 'Basic Configuration', - 'welcome_message': 'Welcome to AgentKit Configuration Wizard', - 'next_step_hint': 'This wizard will help you configure your Agent application. Follow the prompts or press Enter to use default values.', - 'completion_message': 'Great! Common configuration completed!', - 'next_action_hint': 'Now configuring the selected deployment mode.' - } - - @staticmethod - def _recommended_for_language(language: str) -> Dict[str, str]: - """Return recommended language_version and dependencies_file for supported languages.""" - mapping = { - "python": {"language_version": "3.12", "dependencies_file": "requirements.txt"}, - "golang": {"language_version": "1.23", "dependencies_file": "go.mod"}, - } - return mapping.get((language or "python").lower(), mapping["python"]) - - def __post_init__(self): - """Ensure language-specific defaults for language_version and dependencies_file.""" - rec = self._recommended_for_language(self.language) - lv = (self.language_version or "").strip() - df = (self.dependencies_file or "").strip() - lang = (self.language or "python").lower() - - if not lv: - self.language_version = rec["language_version"] - else: - if lang == "golang" and (lv.startswith("3.") or lv == "3.12"): - self.language_version = rec["language_version"] - if lang == "python" and lv.startswith("1."): - self.language_version = rec["language_version"] - - if not df: - self.dependencies_file = rec["dependencies_file"] - else: - if lang == "golang" and df == "requirements.txt": - self.dependencies_file = rec["dependencies_file"] - if lang == "python" and df == "go.mod": - self.dependencies_file = rec["dependencies_file"] - - def set_language(self, language: str): - """Change language and apply recommended defaults.""" - self.language = language - rec = self._recommended_for_language(language) - lv = (self.language_version or "").strip() - df = (self.dependencies_file or "").strip() - - if not lv or lv in ("3.12", "1.23") or lv.startswith("3.") and language.lower() == "go": - self.language_version = rec["language_version"] - if not df or df in ("requirements.txt", "go.mod"): - self.dependencies_file = rec["dependencies_file"] - - -class AgentkitConfigManager: - """Agentkit configuration manager - fully dynamic, no predefined strategy structure""" - - def __init__(self, config_path: Optional[Union[str, Path]] = None): - if config_path is None or config_path == "": - config_path = Path.cwd() / "agentkit.yaml" - self.config_path = Path(config_path) - - self.project_dir = self._resolve_project_dir() - - self._data: Dict[str, Any] = {} - self._load_config() - - def _resolve_project_dir(self) -> Path: - """Resolve project directory (configuration file location).""" - if self.config_path.is_file(): - return self.config_path.parent - elif self.config_path.exists(): - return self.config_path - else: - return self.config_path.parent if self.config_path.parent.exists() else Path.cwd() - - def get_project_dir(self) -> Path: - """Get project root directory.""" - return self.project_dir - - @classmethod - def from_dict( - cls, - config_dict: Dict[str, Any], - base_config_path: Optional[Union[str, Path]] = None - ) -> 'AgentkitConfigManager': - """Create config manager from dictionary. - - This method supports creating a configuration manager directly from a - dictionary, optionally merging with an existing configuration file. - - Args: - config_dict: Configuration dictionary. Should contain 'common' and - optionally 'launch_types' keys matching the YAML structure. - base_config_path: Optional path to existing config file to use as base. - If provided and exists, config_dict will be deep-merged - into the base configuration. - - Returns: - AgentkitConfigManager instance with the specified configuration. - Note: This instance is NOT saved to disk automatically. - - Example: - >>> # Create from pure dict - >>> config = AgentkitConfigManager.from_dict({ - ... "common": { - ... "agent_name": "my_agent", - ... "launch_type": "hybrid" - ... } - ... }) - >>> - >>> # Create by merging with existing config - >>> config = AgentkitConfigManager.from_dict( - ... config_dict={"common": {"launch_type": "hybrid"}}, - ... base_config_path="agentkit.yaml" - ... ) - """ - instance = cls.__new__(cls) - instance.config_path = Path(base_config_path) if base_config_path else Path("agentkit.yaml") - instance.project_dir = instance._resolve_project_dir() - - if base_config_path and Path(base_config_path).exists(): - with open(base_config_path, 'r', encoding='utf-8') as f: - base_data = yaml.safe_load(f) or {} - instance._data = instance._deep_merge(base_data, config_dict) - else: - if "common" not in config_dict: - config_dict = { - "common": CommonConfig().to_dict(), - STRATEGY_NAME_IN_YAML: config_dict.get(STRATEGY_NAME_IN_YAML, {}) - } - instance._data = config_dict - - if STRATEGY_NAME_IN_YAML not in instance._data: - instance._data[STRATEGY_NAME_IN_YAML] = {} - - return instance - - def _load_config(self): - """Load configuration file""" - if self.config_path.exists(): - with open(self.config_path, 'r', encoding='utf-8') as f: - self._data = yaml.safe_load(f) or {} - else: - self._data = self._get_default_config() - self._save_config() - - def _get_default_config(self) -> Dict[str, Any]: - """Get default configuration.""" - return { - "common": CommonConfig().to_dict(), - STRATEGY_NAME_IN_YAML: {}, - "docker_build": {} - } - - def _save_config(self): - """Save configuration file""" - os.makedirs(self.config_path.parent, exist_ok=True) - with open(self.config_path, 'w', encoding='utf-8') as f: - yaml.dump(self._data, f, default_flow_style=False, sort_keys=False) - - def get_common_config(self) -> CommonConfig: - """Get common configuration""" - return CommonConfig.from_dict(self._data.get("common", {})) - - def update_common_config(self, config: CommonConfig): - """Update common configuration""" - self._data["common"] = config.to_dict() - self._save_config() - - def get_docker_build_config(self) -> DockerBuildConfig: - """Get Docker build configuration""" - return DockerBuildConfig.from_dict(self._data.get("docker_build", {})) - - def update_docker_build_config(self, config: DockerBuildConfig): - """Update Docker build configuration""" - self._data["docker_build"] = config.to_dict() - self._save_config() - - def set_docker_build_runtime_param(self, key: str, value: Any): - """Set runtime parameter for docker_build (not persisted to file) - - Args: - key: Parameter name - value: Parameter value - """ - if "docker_build" not in self._data: - self._data["docker_build"] = {} - self._data["docker_build"][key] = value - - def get_strategy_config(self, strategy_name: str) -> Dict[str, Any]: - """Get specified strategy configuration.""" - return self._data.get(STRATEGY_NAME_IN_YAML, {}).get(strategy_name, {}) - - def update_strategy_config(self, strategy_name: str, config: Dict[str, Any], filter_empty: bool = True): - """Update strategy configuration using deep merge strategy. - - Args: - strategy_name: Strategy name - config: Configuration dict - filter_empty: Whether to filter empty values (default True) - """ - if STRATEGY_NAME_IN_YAML not in self._data: - self._data[STRATEGY_NAME_IN_YAML] = {} - - if filter_empty: - config = self._filter_config_values(config) - - existing_config = self._data[STRATEGY_NAME_IN_YAML].get(strategy_name, {}) - merged_config = self._deep_merge(existing_config, config) - merged_config = self._reorder_by_dataclass_fields(strategy_name, merged_config) - - self._data[STRATEGY_NAME_IN_YAML][strategy_name] = merged_config - self._save_config() - - def _filter_config_values(self, config: Dict[str, Any]) -> Dict[str, Any]: - """Filter empty and meaningless values from configuration.""" - filtered = {} - - for key, value in config.items(): - if value == '' or value is None: - continue - - if isinstance(value, dict): - filtered_nested = self._filter_config_values(value) - if filtered_nested: - filtered[key] = filtered_nested - else: - filtered[key] = value - - return filtered - - def _deep_merge(self, base: Dict[str, Any], update: Dict[str, Any]) -> Dict[str, Any]: - """Deep merge two dictionaries.""" - result = base.copy() - - for key, value in update.items(): - if key in result and isinstance(result[key], dict) and isinstance(value, dict): - result[key] = self._deep_merge(result[key], value) - else: - result[key] = value - - return result - - def _reorder_by_dataclass_fields(self, strategy_name: str, config: Dict[str, Any]) -> Dict[str, Any]: - """Reorder configuration dict by dataclass field order.""" - from dataclasses import fields - - config_class = None - if strategy_name == "local": - from agentkit.toolkit.config import LocalDockerConfig - config_class = LocalDockerConfig - elif strategy_name == "cloud": - from agentkit.toolkit.config import VeAgentkitConfig - config_class = VeAgentkitConfig - elif strategy_name == "hybrid": - from agentkit.toolkit.config import HybridVeAgentkitConfig - config_class = HybridVeAgentkitConfig - else: - return config - - field_names = [f.name for f in fields(config_class)] - ordered_config = {} - - for field_name in field_names: - if field_name in config: - ordered_config[field_name] = config[field_name] - - for key, value in config.items(): - if key not in ordered_config: - ordered_config[key] = value - - return ordered_config - - def list_strategies(self) -> list[str]: - """List all configured strategy names""" - return list(self._data.get(STRATEGY_NAME_IN_YAML, {}).keys()) - - def strategy_exists(self, strategy_name: str) -> bool: - """Check if strategy exists""" - return strategy_name in self._data.get(STRATEGY_NAME_IN_YAML, {}) - - def get_config_path(self) -> Path: - """Get configuration file path""" - return self.config_path - - def reload(self): - """Reload configuration""" - self._load_config() - - def reset_to_default(self): - """Reset to default configuration""" - self._data = self._get_default_config() - self._save_config() - - def get_raw_data(self) -> Dict[str, Any]: - """Get raw configuration data.""" - return self._data.copy() - - def set_raw_value(self, key_path: str, value: Any): - """Directly set value at any path.""" - keys = key_path.split('.') - current = self._data - - for key in keys[:-1]: - if key not in current: - current[key] = {} - current = current[key] - - current[keys[-1]] = value - self._save_config() - - def get_raw_value(self, key_path: str, default: Any = None) -> Any: - """Get value at any path.""" - keys = key_path.split('.') - current = self._data - - try: - for key in keys: - current = current[key] - return current - except (KeyError, TypeError): - return default - -_config_instances: Dict[str, AgentkitConfigManager] = {} - - -def get_config(config_path: Optional[str] = None, force_reload: bool = False) -> AgentkitConfigManager: - """Get configuration instance with singleton pattern. - - Args: - config_path: Path to configuration file. If None, uses "agentkit.yaml". - force_reload: If True, reload configuration from disk even if cached. - - Returns: - AgentkitConfigManager instance. - """ - if not config_path: - config_path = "agentkit.yaml" - - from pathlib import Path - cache_key = str(Path(config_path).resolve()) if config_path else "default" - - if not force_reload and cache_key in _config_instances: - return _config_instances[cache_key] - - instance = AgentkitConfigManager(config_path) - _config_instances[cache_key] = instance - - return instance - - -def clear_config_cache(): - """Clear the config instance cache.""" - global _config_instances - _config_instances.clear() diff --git a/agentkit/toolkit/config/config_handler.py b/agentkit/toolkit/config/config_handler.py deleted file mode 100644 index 10c00b0..0000000 --- a/agentkit/toolkit/config/config_handler.py +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Non-interactive configuration handler.""" - -from typing import Dict, List, Any, Optional -from rich.console import Console -from rich.table import Table -from rich import box - -from agentkit.toolkit.config.config import get_config -from agentkit.toolkit.config.config_validator import ConfigValidator - -console = Console() - - -class ConfigParamHandler: - """Configuration parameter handler.""" - - @staticmethod - def parse_runtime_envs(env_list: Optional[List[str]]) -> Dict[str, str]: - """Parse environment variables in KEY=VALUE format. - - Args: - env_list: List of environment variables, e.g. ["KEY1=VALUE1", "KEY2=VALUE2"] - - Returns: - Parsed dictionary - """ - if not env_list: - return {} - - result = {} - for env in env_list: - if '=' not in env: - console.print(f"[yellow]Warning: Ignoring invalid environment variable format '{env}' (should be KEY=VALUE)[/yellow]") - continue - - key, value = env.split('=', 1) - key = key.strip() - value = value.strip() - - if not key: - console.print(f"[yellow]Warning: Ignoring environment variable with empty key '{env}'[/yellow]") - continue - - result[key] = value - - return result - - @staticmethod - def collect_cli_params( - agent_name: Optional[str], - entry_point: Optional[str], - description: Optional[str], - language: Optional[str], - language_version: Optional[str], - python_version: Optional[str], - dependencies_file: Optional[str], - launch_type: Optional[str], - runtime_envs: Optional[List[str]], - strategy_runtime_envs: Optional[List[str]], - region: Optional[str], - tos_bucket: Optional[str], - image_tag: Optional[str], - cr_instance_name: Optional[str], - cr_namespace_name: Optional[str], - cr_repo_name: Optional[str], - runtime_name: Optional[str], - runtime_role_name: Optional[str], - runtime_apikey_name: Optional[str], - ) -> Dict[str, Any]: - """Collect all CLI parameters. - - Args: - language: Programming language (Python/Golang) - language_version: Language version - python_version: [Deprecated] Python version (backward compatibility) - - Returns: - Dict with 'common' (CommonConfig params) and 'strategy' (strategy-specific params) - """ - common_params = {} - strategy_params = {} - - if agent_name is not None: - common_params['agent_name'] = agent_name - if entry_point is not None: - common_params['entry_point'] = entry_point - if description is not None: - common_params['description'] = description - - if language is not None: - common_params['language'] = language - - if language_version is not None: - common_params['language_version'] = language_version - elif python_version is not None: - console.print("[yellow]Warning: --python_version is deprecated, use --language_version[/yellow]") - common_params['language_version'] = python_version - if language is None: - common_params['language'] = 'Python' - - if dependencies_file is not None: - common_params['dependencies_file'] = dependencies_file - if launch_type is not None: - common_params['launch_type'] = launch_type - - if runtime_envs is not None: - common_params['runtime_envs'] = ConfigParamHandler.parse_runtime_envs(runtime_envs) - - if strategy_runtime_envs is not None: - strategy_params['runtime_envs'] = ConfigParamHandler.parse_runtime_envs(strategy_runtime_envs) - if region is not None: - strategy_params['region'] = region - if tos_bucket is not None: - strategy_params['tos_bucket'] = tos_bucket - if image_tag is not None: - strategy_params['image_tag'] = image_tag - if cr_instance_name is not None: - strategy_params['cr_instance_name'] = cr_instance_name - if cr_namespace_name is not None: - strategy_params['cr_namespace_name'] = cr_namespace_name - if cr_repo_name is not None: - strategy_params['cr_repo_name'] = cr_repo_name - if runtime_name is not None: - strategy_params['runtime_name'] = runtime_name - if runtime_role_name is not None: - strategy_params['runtime_role_name'] = runtime_role_name - if runtime_apikey_name is not None: - strategy_params['runtime_apikey_name'] = runtime_apikey_name - - return { - 'common': common_params, - 'strategy': strategy_params - } - - @staticmethod - def has_cli_params(params: Dict[str, Any]) -> bool: - """Check if CLI parameters exist.""" - return bool(params['common']) or bool(params['strategy']) - - -class NonInteractiveConfigHandler: - """Non-interactive configuration handler.""" - - def __init__(self, config_path: Optional[str] = None): - self.config_manager = get_config(config_path=config_path) - self.validator = ConfigValidator() - - def update_config( - self, - common_params: Dict[str, Any], - strategy_params: Dict[str, Any], - dry_run: bool = False - ) -> bool: - """Update configuration. - - Args: - common_params: CommonConfig parameters - strategy_params: Strategy-specific parameters - dry_run: Preview mode without saving - - Returns: - Success status - """ - common_config = self.config_manager.get_common_config() - old_config_dict = common_config.to_dict() - - for key, value in common_params.items(): - if hasattr(common_config, key): - if key == 'runtime_envs' and isinstance(value, dict): - existing_envs = getattr(common_config, key, {}) - if isinstance(existing_envs, dict): - existing_envs.update(value) - setattr(common_config, key, existing_envs) - else: - setattr(common_config, key, value) - else: - setattr(common_config, key, value) - else: - console.print(f"[yellow]Warning: Unknown configuration item '{key}'[/yellow]") - - errors = self.validator.validate_common_config(common_config) - if errors: - console.print("[red]Configuration validation failed:[/red]") - for error in errors: - console.print(f" [red]✗[/red] {error}") - return False - - new_config_dict = common_config.to_dict() - self._show_config_changes(old_config_dict, new_config_dict, "Common Configuration") - - new_strategy_config = None - if strategy_params: - strategy_name = common_config.launch_type - old_strategy_config = self.config_manager.get_strategy_config(strategy_name) - new_strategy_config = old_strategy_config.copy() - - for key, value in strategy_params.items(): - if key == 'runtime_envs' and isinstance(value, dict): - existing_envs = new_strategy_config.get('runtime_envs', {}) - if isinstance(existing_envs, dict): - existing_envs.update(value) - new_strategy_config['runtime_envs'] = existing_envs - else: - new_strategy_config['runtime_envs'] = value - else: - new_strategy_config[key] = value - - self._show_config_changes(old_strategy_config, new_strategy_config, f"{strategy_name} Mode Configuration") - - if dry_run: - console.print("\n[yellow]Preview mode: Configuration not saved[/yellow]") - return True - - self.config_manager.update_common_config(common_config) - - if new_strategy_config is not None: - self.config_manager.update_strategy_config(strategy_name, new_strategy_config) - - console.print("\n[green]✅ Configuration updated successfully![/green]") - console.print(f"Configuration file: {self.config_manager.get_config_path()}") - - return True - - def _show_config_changes(self, old_config: Dict[str, Any], new_config: Dict[str, Any], title: str): - """Display configuration changes. - - Args: - old_config: Old configuration - new_config: New configuration - title: Title - """ - changes = [] - all_keys = set(old_config.keys()) | set(new_config.keys()) - - for key in all_keys: - if key.startswith('_'): - continue - - old_value = old_config.get(key) - new_value = new_config.get(key) - - if old_value != new_value: - changes.append((key, old_value, new_value)) - - if not changes: - return - - console.print(f"\n[bold cyan]{title} - Changes:[/bold cyan]") - table = Table(show_header=True, header_style="bold magenta", box=box.ROUNDED) - table.add_column("Config Item", style="cyan", width=25) - table.add_column("Old Value", style="yellow", width=30) - table.add_column("New Value", style="green", width=30) - - for key, old_value, new_value in changes: - old_str = self._format_value(old_value) - new_str = self._format_value(new_value) - - if old_value is None or old_value == '': - old_str = "[dim](not set)[/dim]" - if new_value is None or new_value == '': - new_str = "[dim](not set)[/dim]" - - table.add_row(key, old_str, new_str) - - console.print(table) - - def _format_value(self, value: Any) -> str: - """Format value for display.""" - if value is None: - return "" - if isinstance(value, dict): - if not value: - return "{}" - items = list(value.items())[:3] - result = ", ".join(f"{k}={v}" for k, v in items) - if len(value) > 3: - result += f" ... (total {len(value)} items)" - return result - if isinstance(value, list): - if not value: - return "[]" - result = ", ".join(str(v) for v in value[:3]) - if len(value) > 3: - result += f" ... (total {len(value)} items)" - return result - return str(value) - - def show_current_config(self): - """Display current configuration.""" - common_config = self.config_manager.get_common_config() - - console.print("\n[bold cyan]Current Configuration:[/bold cyan]") - - table = Table(show_header=True, header_style="bold magenta", box=box.ROUNDED) - table.add_column("Config Item", style="cyan", width=25) - table.add_column("Value", style="green", width=50) - - config_dict = common_config.to_dict() - for key, value in config_dict.items(): - if not key.startswith('_'): - table.add_row(key, self._format_value(value)) - - console.print(table) - - strategy_name = common_config.launch_type - if strategy_name: - strategy_config = self.config_manager.get_strategy_config(strategy_name) - if strategy_config: - console.print(f"\n[bold cyan]{strategy_name} Mode Configuration:[/bold cyan]") - - config_table = Table(show_header=True, header_style="bold magenta", box=box.ROUNDED) - config_table.add_column("Config Item", style="cyan", width=25) - config_table.add_column("Value", style="green", width=50) - - for key, value in strategy_config.items(): - if not key.startswith('_'): - config_table.add_row(key, self._format_value(value)) - - console.print(config_table) diff --git a/agentkit/toolkit/config/config_validator.py b/agentkit/toolkit/config/config_validator.py deleted file mode 100644 index 2622fd9..0000000 --- a/agentkit/toolkit/config/config_validator.py +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Configuration validation utilities.""" - -import re -from typing import List, Any -from dataclasses import fields - -from agentkit.toolkit.config.config import CommonConfig - - -class ConfigValidator: - """Configuration validator.""" - - @staticmethod - def validate_common_config(config: CommonConfig) -> List[str]: - """Validate common configuration. - - Args: - config: CommonConfig instance - - Returns: - List of error messages, empty if validation passes - """ - errors = [] - - for field in fields(CommonConfig): - if field.name.startswith('_'): - continue - - validation = field.metadata.get('validation', {}) - - if validation.get('type') == 'conditional': - continue - - value = getattr(config, field.name) - - if validation.get('required') and (not value or (isinstance(value, str) and not value.strip())): - desc = field.metadata.get('description', field.name) - errors.append(f"{desc} is required") - continue - - pattern = validation.get('pattern') - if pattern and value and isinstance(value, str): - if not re.match(pattern, value): - desc = field.metadata.get('description', field.name) - msg = validation.get('message', 'Invalid format') - errors.append(f"{desc}: {msg}") - - choices = field.metadata.get('choices') - if choices and value: - valid_values = [] - if isinstance(choices, list): - if choices and isinstance(choices[0], dict): - valid_values = [c['value'] for c in choices] - else: - valid_values = choices - - if valid_values and value not in valid_values: - desc = field.metadata.get('description', field.name) - errors.append(f"{desc} must be one of: {', '.join(map(str, valid_values))}") - - conditional_errors = ConfigValidator._validate_conditional_fields(config) - errors.extend(conditional_errors) - - return errors - - @staticmethod - def _validate_conditional_fields(config: CommonConfig) -> List[str]: - """Execute conditional validation (cross-field dependencies). - - Args: - config: CommonConfig instance - - Returns: - List of error messages - """ - errors = [] - - for field in fields(CommonConfig): - if field.name.startswith('_'): - continue - - validation = field.metadata.get('validation', {}) - - if validation.get('type') != 'conditional': - continue - - depends_on = validation.get('depends_on') - rules = validation.get('rules', {}) - - if not depends_on or not rules: - continue - - depend_value = getattr(config, depends_on, None) - current_value = getattr(config, field.name, None) - - if not current_value or (isinstance(current_value, str) and not current_value.strip()): - continue - - if depend_value in rules: - rule = rules[depend_value] - field_errors = ConfigValidator._apply_conditional_rule( - field.name, - current_value, - rule, - field.metadata - ) - errors.extend(field_errors) - - return errors - - @staticmethod - def _apply_conditional_rule(field_name: str, value: Any, rule: dict, metadata: dict) -> List[str]: - """Apply single conditional rule. - - Args: - field_name: Field name - value: Field value - rule: Conditional rule from validation.rules - metadata: Field metadata - - Returns: - List of error messages - """ - errors = [] - desc = metadata.get('description', field_name) - - if 'choices' in rule: - if value not in rule['choices']: - msg = rule.get('message', f"Must be one of: {', '.join(rule['choices'])}") - errors.append(f"{desc}: {msg}") - - if 'pattern' in rule: - if not re.match(rule['pattern'], value): - msg = rule.get('message', 'Invalid format') - errors.append(f"{desc}: {msg}") - - return errors - - @staticmethod - def validate_field_value(field_name: str, value: Any, field_metadata: dict) -> List[str]: - """Validate a single field value. - - Args: - field_name: Field name - value: Field value - field_metadata: Field metadata - - Returns: - List of error messages - """ - errors = [] - validation = field_metadata.get('validation', {}) - - if validation.get('required') and (not value or (isinstance(value, str) and not value.strip())): - desc = field_metadata.get('description', field_name) - errors.append(f"{desc} is required") - return errors - - pattern = validation.get('pattern') - if pattern and value and isinstance(value, str): - if not re.match(pattern, value): - desc = field_metadata.get('description', field_name) - msg = validation.get('message', 'Invalid format') - errors.append(f"{desc}: {msg}") - - choices = field_metadata.get('choices') - if choices and value: - valid_values = [] - if isinstance(choices, list): - if choices and isinstance(choices[0], dict): - valid_values = [c['value'] for c in choices] - else: - valid_values = choices - - if valid_values and value not in valid_values: - desc = field_metadata.get('description', field_name) - errors.append(f"{desc} must be one of: {', '.join(map(str, valid_values))}") - - return errors diff --git a/agentkit/toolkit/config/constants.py b/agentkit/toolkit/config/constants.py deleted file mode 100644 index af95da2..0000000 --- a/agentkit/toolkit/config/constants.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -VeAgentkit constants definition module. - -This module defines common constants used throughout the VeAgentkit project, -ensuring consistency across all modules. -""" - -from pathlib import Path - -# Auto-creation resource identifier -AUTO_CREATE_VE = "Auto" -DEFAULT_WORKSPACE_NAME = "agentkit-cli-workspace" -DEFAULT_CR_NAMESPACE = "agentkit" - -# Default image tag placeholder for timestamped builds -DEFAULT_IMAGE_TAG = "{{timestamp}}" - -# Global configuration constants -GLOBAL_CONFIG_DIR = Path.home() / ".agentkit" -GLOBAL_CONFIG_FILE = GLOBAL_CONFIG_DIR / "config.yaml" -GLOBAL_CONFIG_FILE_PERMISSIONS = 0o600 # Owner read/write only \ No newline at end of file diff --git a/agentkit/toolkit/config/dataclass_utils.py b/agentkit/toolkit/config/dataclass_utils.py deleted file mode 100644 index eccc64e..0000000 --- a/agentkit/toolkit/config/dataclass_utils.py +++ /dev/null @@ -1,340 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from dataclasses import asdict, fields -import logging -from typing import Any, Dict, Type, TypeVar - -logger = logging.getLogger(__name__) - -T = TypeVar('T') - -class DataclassSerializer: - - @staticmethod - def to_dict(obj: Any) -> Dict[str, Any]: - return asdict(obj) - - @staticmethod - def from_dict(cls: Type[T], data: Dict[str, Any]) -> T: - from dataclasses import MISSING - - if not hasattr(cls, '__dataclass_fields__'): - raise ValueError(f"{cls} must be a dataclass") - - # Temporary map to track field value sources - _sources: Dict[str, str] = {} - - field_info = {} - for field in fields(cls): - field_info[field.name] = field - - kwargs = {} - for field_name, field in field_info.items(): - # Prefer direct field in data - if field_name in data: - kwargs[field_name] = data[field_name] - _sources[field_name] = 'local' - logger.debug("[DataclassSerializer] source=local field=%s value=%r", field_name, kwargs[field_name]) - else: - # Try aliases (backward compatibility) - found_in_alias = False - aliases = field.metadata.get('aliases', []) - for alias in aliases: - if alias in data: - kwargs[field_name] = data[alias] - found_in_alias = True - _sources[field_name] = 'local' - logger.debug("[DataclassSerializer] source=alias(%s) -> local field=%s value=%r", alias, field_name, kwargs[field_name]) - break - - # Fallback to default values when not provided in data or aliases - if not found_in_alias: - if field.default_factory is not MISSING: - kwargs[field_name] = field.default_factory() - _sources[field_name] = 'default' - logger.debug("[DataclassSerializer] source=default_factory field=%s value=%r", field_name, kwargs[field_name]) - elif field.default is not MISSING: - kwargs[field_name] = field.default - _sources[field_name] = 'default' - logger.debug("[DataclassSerializer] source=default field=%s value=%r", field_name, kwargs[field_name]) - else: - kwargs[field_name] = None - # No source - logger.debug("[DataclassSerializer] source=none field=%s value=None", field_name) - - # Create instance (no class-level render skipping is used anymore) - instance = cls(**kwargs) - - # Attach sources to the instance for later writeback decisions - try: - if not hasattr(instance, '_value_sources'): - instance._value_sources = {} - instance._value_sources.update(_sources) - except Exception: - pass - - return instance - -class AutoSerializableMixin: - """Mixin for configuration dataclasses. - - Responsibilities: - - Convert to/from dict - - Apply global defaults (only when local value is invalid) - - Fill remaining invalid values with default_template/default value - - Render template fields and validate unresolved placeholders - - Produce persistable dict based on value sources - """ - - def to_dict(self) -> Dict[str, Any]: - return DataclassSerializer.to_dict(self) - - @classmethod - def from_dict(cls: Type[T], data: Dict[str, Any], skip_render: bool = False) -> T: - """Create a config instance from a dict. - - Steps: - 1) Construct instance without rendering - 2) Apply global defaults for invalid fields (empty/Auto), keeping user values - 3) Fill remaining invalid fields via default_template or dataclass defaults - 4) Render fields marked with render_template (unless skip_render=True) - """ - # Construct first, so global defaults can be applied before any rendering - logger = logging.getLogger(f"{__name__}.{cls.__name__}") - logger.debug("from_dict: start, skip_render=%s for %s", skip_render, cls.__name__) - data = dict(data) - - # 2) Create instance without rendering - try: - instance = DataclassSerializer.from_dict(cls, data) - logger.debug("from_dict: instance created without rendering for %s", cls.__name__) - except Exception as e: - logger.debug("from_dict: failed to create instance for %s: %s", cls.__name__, e) - raise - - # Apply global defaults using original project data (pre-render) - try: - from .global_config import apply_global_config_defaults - before = instance.to_dict() - logger.debug("from_dict: before globals for %s -> %r", cls.__name__, before) - instance = apply_global_config_defaults(instance, data) - after = instance.to_dict() - if before != after: - # Compute diff of updated fields - diff = {k: (before.get(k), after.get(k)) for k in after.keys() if before.get(k) != after.get(k)} - logger.debug("from_dict: applied global defaults for %s; changes=%r", cls.__name__, diff) - else: - logger.debug("from_dict: applied global defaults for %s; no changes", cls.__name__) - except ImportError: - # Global config module unavailable - logger.debug("from_dict: global_config not available; skipped applying globals for %s", cls.__name__) - except Exception: - # Global defaults application should not break overall flow - logger.debug("from_dict: apply_global_config_defaults raised; ignored for %s", cls.__name__) - - # Render template fields after globals/defaults. Skipped if skip_render is True. - if not skip_render: - try: - # Ensure instance-level skip flag is cleared - if hasattr(instance, '_skip_render'): - setattr(instance, '_skip_render', False) - logger.debug("from_dict: start rendering template fields for %s", cls.__name__) - instance._render_template_fields() - logger.debug("from_dict: rendered template fields for %s", cls.__name__) - except Exception: - logger.debug("from_dict: rendering failed for %s; re-raising", cls.__name__) - raise - - return instance - - def _render_template_fields(self): - """Render fields whose metadata has render_template=True. - - - Saves original template strings in _template_originals - - Supports default_template for Auto/empty values - - Validates that no placeholders remain after rendering - - Honors instance-level _skip_render - """ - - # Only meaningful for dataclasses - if not hasattr(self, '__dataclass_fields__'): - logger.debug("_render_template_fields: not a dataclass, skipping") - return - - # Skip when explicitly requested on the instance (e.g., status-only flows) - inst_skip = getattr(self, '_skip_render', False) - if inst_skip: - logger.debug("_render_template_fields: skip rendering for %s, skip_render=%s", self.__class__.__name__, inst_skip) - return - - try: - from agentkit.utils.template_utils import render_template - from agentkit.toolkit.config.utils import is_invalid_config - cfg_name = self.__class__.__name__ - - # Initialize original template map - if not hasattr(self, '_template_originals'): - self._template_originals = {} - - for field_info in fields(self): - # Process only fields marked for template rendering - logger.debug("[%s] [template] checking field: name=%s, render_template=%s", cfg_name, field_info.name, field_info.metadata.get("render_template")) - if field_info.metadata.get("render_template"): - field_value = getattr(self, field_info.name) - logger.debug( - "[%s] [template] start field render check: name=%s, value=%r, has_placeholders=%s", - cfg_name, - field_info.name, - field_value, - (isinstance(field_value, str) and ('{{' in field_value and '}}' in field_value)) - ) - - # Handle invalid values (None/""/Auto) via default_template when available - if is_invalid_config(field_value): - default_template = field_info.metadata.get("default_template") - if default_template: - logger.debug( - "[%s] [template] field %s is Auto/empty -> using default_template=%r", - cfg_name, - field_info.name, - default_template, - ) - field_value = default_template - # Save original template string - self._template_originals[field_info.name] = default_template - # Mark value source - try: - if not hasattr(self, '_value_sources'): - self._value_sources = {} - self._value_sources[field_info.name] = 'default_template' - except Exception: - pass - # Set template value first so there is a visible value even if rendering fails - setattr(self, field_info.name, default_template) - else: - # No default_template; skip - logger.debug("[%s] [template] field %s is Auto/empty and has no default_template -> skip", cfg_name, field_info.name) - continue - - # Render non-empty value - if field_value: - # Save original template string only if placeholders are present - if '{{' in str(field_value) and '}}' in str(field_value): - if field_info.name not in self._template_originals: - self._template_originals[field_info.name] = field_value - logger.debug("[%s] [template] save original template for %s: %r", cfg_name, field_info.name, field_value) - - try: - rendered = render_template(field_value) - logger.debug( - "[%s] [template] rendered field %s: %r -> %r", - cfg_name, - field_info.name, - field_value, - rendered, - ) - # Fail if unresolved placeholders remain - if '{{' in str(rendered) and '}}' in str(rendered): - error_msg = ( - f"Config field '{field_info.name}' template variables were not fully rendered: " - f"'{field_value}' -> '{rendered}'" - ) - logger.error(f"[{cfg_name}] {error_msg}") - raise ValueError(error_msg) - - if rendered != field_value: - logger.debug("[%s] [template] apply rendered value for %s", cfg_name, field_info.name) - setattr(self, field_info.name, rendered) - # Extra logging for image_tag - if field_info.name == "image_tag": - logger.info("[%s] [template] image_tag final value: %r", cfg_name, getattr(self, field_info.name)) - except Exception as e: - # Do not silently fallback on render failures; surface details - error_type = type(e).__name__ - error_detail = str(e) - - # Build detailed error message - error_msg = f"Config field '{field_info.name}' template rendering failed: {field_value}\n" - error_msg += f"Error type: {error_type}\n" - error_msg += f"Error detail: {error_detail}" - - if '{{account_id}}' in str(field_value): - error_msg += ( - "\n\nHint: failed to obtain account_id; please check Volcengine AK/SK " - "configuration and IAM permissions." - ) - - logger.error(f"[{cfg_name}] {error_msg}") - # Log full stack for debugging - logger.debug( - f"[{cfg_name}] Full stack trace of config rendering failure:", - exc_info=True, - ) - raise ValueError(error_msg) from e - else: - logger.debug("[%s] [template] field %s is not marked for rendering, value: %r", cfg_name, field_info.name, getattr(self, field_info.name)) - except ImportError: - # If template utils are not available, no-op - logger.error("Template utils not available; skipping template rendering", exc_info=True) - - def to_persist_dict(self) -> Dict[str, Any]: - """Produce a persistable dict following value-source rules. - - - global: write empty string (keep local unset) - - default_template: write saved original template - - default: write current value - - local: write original template if present, otherwise current value - - system fields are ignored here (left as runtime values) - """ - result = self.to_dict() - - sources = getattr(self, '_value_sources', {}) or {} - originals = getattr(self, '_template_originals', {}) or {} - - # Iterate fields and decide persisted value based on source rules - for field_info in fields(self): - name = field_info.name - source = sources.get(name) - current_value = getattr(self, name) - original_tpl = originals.get(name) - - if source == 'global': - # Global source: write empty string so project config remains "unset" - result[name] = "" - logger.debug("[persist] field=%s source=global -> write='' (keep local unset)", name) - elif source == 'default_template': - # Write back the template instead of rendered value - chosen = original_tpl if original_tpl is not None else current_value - result[name] = chosen - logger.debug("[persist] field=%s source=default_template original=%r current=%r -> write=%r", name, original_tpl, current_value, chosen) - elif source == 'default': - # Default source: persist current value - result[name] = current_value - logger.debug("[persist] field=%s source=default -> write=%r", name, current_value) - elif source == 'local': - # Local source: if it was a template input, prefer original template - if original_tpl is not None: - result[name] = original_tpl - logger.debug("[persist] field=%s source=local original_tpl exists -> write original=%r", name, original_tpl) - else: - result[name] = current_value - logger.debug("[persist] field=%s source=local no original_tpl -> write current=%r", name, current_value) - else: - # Unknown source: keep current value - result[name] = current_value - logger.debug("[persist] field=%s source=unknown -> write current=%r", name, current_value) - - return result diff --git a/agentkit/toolkit/config/docker_build_config.py b/agentkit/toolkit/config/docker_build_config.py deleted file mode 100644 index 9900059..0000000 --- a/agentkit/toolkit/config/docker_build_config.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from dataclasses import dataclass, field -from typing import Optional, Union, Dict -from .dataclass_utils import AutoSerializableMixin - - -@dataclass -class DockerBuildConfig(AutoSerializableMixin): - """Docker build configuration. - - Customizes the Docker image build process with support for: - - Custom base images (base_image) - - Custom build scripts (build_script) - - Platform-specific builds (platform) - - Dockerfile regeneration (regenerate_dockerfile) - - Examples: - Python project with custom image: - >>> docker_build: - >>> base_image: "python:3.11-slim" - >>> build_script: "scripts/setup.sh" - - Go project with multi-stage build: - >>> docker_build: - >>> base_image: - >>> builder: "golang:1.23-alpine" - >>> runtime: "alpine:latest" - >>> build_script: "scripts/install_certs.sh" - """ - - base_image: Optional[Union[str, Dict[str, str]]] = field( - default=None, - metadata={ - "description": "Custom base image for Docker build", - "detail": ( - "For Python projects, use a string like 'python:3.12-alpine'. " - "For Go projects, use a dict with 'builder' and 'runtime' keys, " - "e.g., {'builder': 'golang:1.23-alpine', 'runtime': 'alpine:latest'}" - ) - } - ) - - build_script: Optional[str] = field( - default=None, - metadata={ - "description": "Path to custom build script (relative to project root)", - "detail": ( - "Script executed during Docker build for installing system dependencies, " - "compiling C extensions, or setting up environment. " - "Path relative to project root, e.g., 'scripts/setup.sh' or 'docker/install_deps.sh'" - ) - } - ) - - regenerate_dockerfile: bool = field( - default=False, - metadata={ - "description": "Force regenerate Dockerfile even if it exists", - "detail": ( - "When True, regenerates Dockerfile regardless of existing file. " - "Typically set via CLI parameter --regenerate-dockerfile." - ) - } - ) - - platform: Optional[str] = field( - default=None, - metadata={ - "description": "Target CPU architecture platform", - "detail": ( - "Specifies the target CPU architecture for Docker image, " - "e.g., 'linux/amd64' or 'linux/arm64'. " - "Used for cross-platform builds. Typically set via CLI parameter --platform." - ) - } - ) diff --git a/agentkit/toolkit/config/global_config.py b/agentkit/toolkit/config/global_config.py deleted file mode 100644 index 7dfba6e..0000000 --- a/agentkit/toolkit/config/global_config.py +++ /dev/null @@ -1,376 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Global configuration module. - -Defines and manages the shared config file (~/.agentkit/config.yaml). -Used to store cross-project settings such as Volcengine credentials and CR/TOS defaults. - -Priority: -- Environment variables > project config > global config > class defaults -""" - -from dataclasses import dataclass, field -from pathlib import Path -from typing import Optional -import yaml -import logging - -from .utils import is_valid_config - -logger = logging.getLogger(__name__) - - -@dataclass -class VolcengineCredentials: - """Volcengine credentials configuration. - - Stores Volcengine API credentials as a fallback to environment variables. - Has lower priority than environment variables. - """ - access_key: str = "" - secret_key: str = "" - region: str = "cn-beijing" - - def to_dict(self): - return { - "access_key": self.access_key, - "secret_key": self.secret_key, - "region": self.region, - } - - @classmethod - def from_dict(cls, data: dict): - return cls( - access_key=data.get("access_key", ""), - secret_key=data.get("secret_key", ""), - region=data.get("region", "cn-beijing"), - ) - - -@dataclass -class CRGlobalConfig: - """Container Registry (CR) global configuration. - - Used when project config `cr_instance_name` or `cr_namespace_name` is empty or "Auto". - """ - instance_name: str = "" - namespace_name: str = "" - - def to_dict(self): - return { - "instance_name": self.instance_name, - "namespace_name": self.namespace_name, - } - - @classmethod - def from_dict(cls, data: dict): - return cls( - instance_name=data.get("instance_name", ""), - namespace_name=data.get("namespace_name", ""), - ) - - -@dataclass -class TOSGlobalConfig: - """TOS (object storage) global configuration. - - Used when project config `tos_bucket`, `tos_prefix` or `tos_region` is empty or "Auto". - """ - bucket: str = "" - prefix: str = "" - region: str = "" - - def to_dict(self): - return { - "bucket": self.bucket, - "prefix": self.prefix, - "region": self.region, - } - - @classmethod - def from_dict(cls, data: dict): - return cls( - bucket=data.get("bucket", ""), - prefix=data.get("prefix", ""), - region=data.get("region", ""), - ) - - -@dataclass -class GlobalConfig: - """Top-level global configuration. - - Stored in ``~/.agentkit/config.yaml`` and shared across projects. - """ - volcengine: VolcengineCredentials = field(default_factory=VolcengineCredentials) - cr: CRGlobalConfig = field(default_factory=CRGlobalConfig) - tos: TOSGlobalConfig = field(default_factory=TOSGlobalConfig) - - def to_dict(self): - return { - "volcengine": self.volcengine.to_dict(), - "cr": self.cr.to_dict(), - "tos": self.tos.to_dict(), - } - - @classmethod - def from_dict(cls, data: dict): - return cls( - volcengine=VolcengineCredentials.from_dict(data.get("volcengine", {})), - cr=CRGlobalConfig.from_dict(data.get("cr", {})), - tos=TOSGlobalConfig.from_dict(data.get("tos", {})), - ) - - -class GlobalConfigManager: - """Global configuration manager. - - Responsible for loading, saving and managing the global config file. - Default path: ``~/.agentkit/config.yaml``. - """ - - DEFAULT_PATH = Path.home() / ".agentkit" / "config.yaml" - - def __init__(self, config_path: Optional[Path] = None): - """Initialize global configuration manager. - - Args: - config_path: Optional config file path, defaults to ``~/.agentkit/config.yaml``. - """ - self.config_path = config_path or self.DEFAULT_PATH - self._config: Optional[GlobalConfig] = None - - def load(self) -> GlobalConfig: - """Load global configuration. - - If the config file does not exist or loading fails, returns an empty - :class:`GlobalConfig` instance without raising. - - Returns: - GlobalConfig instance - """ - if not self.config_path.exists(): - logger.debug(f"Global config file does not exist: {self.config_path}") - return GlobalConfig() - - try: - with open(self.config_path, 'r', encoding='utf-8') as f: - data = yaml.safe_load(f) or {} - logger.debug(f"Loaded global config from: {self.config_path}") - return GlobalConfig.from_dict(data) - except Exception as e: - logger.debug(f"Failed to load global config, using empty config: {e}", exc_info=True) - return GlobalConfig() - - def save(self, config: GlobalConfig): - """Save global configuration to disk. - - Args: - config: Configuration object to persist - """ - # Ensure parent directory exists - self.config_path.parent.mkdir(parents=True, exist_ok=True) - - # Write YAML config - with open(self.config_path, 'w', encoding='utf-8') as f: - yaml.dump( - config.to_dict(), - f, - default_flow_style=False, - allow_unicode=True, - sort_keys=False - ) - - # Restrict file permission to owner read/write only - try: - self.config_path.chmod(0o600) - except Exception as e: - logger.warning(f"Failed to set config file permission: {e}") - - logger.info(f"Global config saved: {self.config_path}") - - def get_config(self, force_reload: bool = False) -> GlobalConfig: - """Get cached global configuration. - - Args: - force_reload: Whether to force reload from disk. - - Returns: - GlobalConfig instance - """ - if self._config is None or force_reload: - self._config = self.load() - return self._config - - def exists(self) -> bool: - """Check whether the global config file exists. - - Returns: - True if the config file exists. - """ - return self.config_path.exists() - - -# Singleton instance -_global_config_manager: Optional[GlobalConfigManager] = None - - -def get_global_config_manager() -> GlobalConfigManager: - """Get the singleton :class:`GlobalConfigManager` instance.""" - global _global_config_manager - if _global_config_manager is None: - _global_config_manager = GlobalConfigManager() - return _global_config_manager - - -def get_global_config(force_reload: bool = False) -> GlobalConfig: - """Get global configuration via the singleton manager. - - This is the primary API for reading global configuration. - - Args: - force_reload: Whether to force reload from disk. - - Returns: - GlobalConfig instance - - Example: - >>> global_config = get_global_config() - >>> print(global_config.volcengine.access_key) - >>> print(global_config.cr.instance_name) - """ - return get_global_config_manager().get_config(force_reload=force_reload) - - -def save_global_config(config: GlobalConfig): - """Persist global configuration via the singleton manager. - - Args: - config: Configuration object to save. - - Example: - >>> global_config = get_global_config() - >>> global_config.cr.instance_name = "my-cr-instance" - >>> save_global_config(global_config) - """ - get_global_config_manager().save(config) - - -def global_config_exists() -> bool: - """Convenience wrapper to check whether global config file exists. - - Returns: - True if the config file exists. - """ - return get_global_config_manager().exists() - - -def apply_global_config_defaults( - config_obj, - project_data: dict, -): - """Apply global configuration defaults when project config is empty/"Auto". - - This function is called after ``from_dict()`` has constructed the config - object. It fills project-level fields from global config only when the - project config did not provide a valid value. - - Priority: - 1. Explicit project config (valid value) - highest, never overridden - 2. Global config (valid value) - used to fill missing project values - 3. Dataclass default - lowest, used when neither project nor global set - - Args: - config_obj: Config object instance (already created via ``from_dict``) - project_data: Original project config dict used to build the object - - Returns: - The same config object with possible fields filled from global config. - - Example: - >>> # project config has empty cr_instance_name - >>> config = HybridVeAgentkitConfig.from_dict({"cr_instance_name": ""}) - >>> # apply_global_config_defaults will fill from global config if set - >>> # config.cr_instance_name = "my-team-cr-instance" (from global config) - """ - # Lazy imports to avoid circular dependencies - try: - from .strategy_configs import HybridVeAgentkitConfig, VeAgentkitConfig - except ImportError as e: - logger.debug(f"Failed to import strategy config classes, skip applying global config defaults: {e}") - return config_obj - - # Only handle strategy config classes - if not isinstance(config_obj, (HybridVeAgentkitConfig, VeAgentkitConfig)): - return config_obj - - try: - # Load global config - global_config = get_global_config() - - # Map project field -> (global config section, attribute) - field_mappings = { - 'cr_instance_name': ('cr', 'instance_name'), - 'cr_namespace_name': ('cr', 'namespace_name'), - } - - # For VeAgentkitConfig, also apply TOS-related settings - if isinstance(config_obj, VeAgentkitConfig): - field_mappings.update({ - 'tos_bucket': ('tos', 'bucket'), - 'tos_prefix': ('tos', 'prefix'), - 'tos_region': ('tos', 'region'), - }) - - # Apply global config values - for field_name, (section, attr) in field_mappings.items(): - # Skip if the target field does not exist on the config object - if not hasattr(config_obj, field_name): - continue - - # Use original project_data value to decide if user explicitly set it. - # Note: from_dict may have already replaced empty/"Auto" with - # template defaults, so we rely on raw project_data instead. - original_project_value = project_data.get(field_name) if isinstance(project_data, dict) else None - if is_valid_config(original_project_value): - logger.debug(f"Keep explicit project value for field {field_name}: {original_project_value}") - continue # user explicitly provided value; do not override - - # Read value from global config - section_obj = getattr(global_config, section, None) - if section_obj is None: - continue - - global_value = getattr(section_obj, attr, None) - - # If global config provides a valid value, apply it - if global_value and is_valid_config(global_value): - logger.info(f"Apply global config: {field_name} = {global_value} (source: ~/.agentkit/config.yaml)") - setattr(config_obj, field_name, global_value) - # Mark source as 'global' so persistence can keep local field empty - try: - if not hasattr(config_obj, '_value_sources'): - config_obj._value_sources = {} - config_obj._value_sources[field_name] = 'global' - except Exception: - pass - else: - logger.debug(f"Global config does not provide a valid value for field: {field_name}") - - except Exception as e: - # Errors while applying global config should not break the main flow - logger.debug(f"Error while applying global config defaults (ignored): {e}", exc_info=True) - - return config_obj diff --git a/agentkit/toolkit/config/strategy_configs.py b/agentkit/toolkit/config/strategy_configs.py deleted file mode 100644 index a40f534..0000000 --- a/agentkit/toolkit/config/strategy_configs.py +++ /dev/null @@ -1,153 +0,0 @@ -from dataclasses import dataclass, field -from typing import Dict, List -from .dataclass_utils import AutoSerializableMixin -from .constants import AUTO_CREATE_VE, DEFAULT_CR_NAMESPACE, DEFAULT_IMAGE_TAG, DEFAULT_WORKSPACE_NAME - - -@dataclass -class LocalDockerConfig(AutoSerializableMixin): - """Local Docker strategy configuration for running agents in Docker containers.""" - # User-configurable fields - image_tag: str = field(default="latest", metadata={"description": "Docker image tag", "icon": "🏷️"}) - invoke_port: int = field(default=8000, metadata={"description": "Port for agent application invocation", "icon": "🌐"}) - - # System internal fields (not visible to users during configuration) - container_name: str = field(default="", metadata={"system": True, "description": "Container name, auto-generated from agent name if empty"}) - ports: List[str] = field(default_factory=lambda: ["8000:8000"], metadata={"system": True, "description": "Port mappings in host:container format"}) - volumes: List[str] = field(default_factory=list, metadata={"system": True, "description": "Volume mappings in host:container format"}) - restart_policy: str = field(default="unless-stopped", metadata={"system": True, "description": "Container restart policy"}) - memory_limit: str = field(default="1g", metadata={"system": True, "description": "Container memory limit"}) - cpu_limit: str = field(default="1", metadata={"system": True, "description": "Container CPU limit"}) - container_id: str = field(default="", metadata={"system": True, "description": "Container ID after deployment"}) - image_id: str = field(default="", metadata={"system": True, "description": "Docker image ID"}) - build_timestamp: str = field(default="", metadata={"system": True, "description": "Timestamp of image build"}) - deploy_timestamp: str = field(default="", metadata={"system": True, "description": "Timestamp of container deployment"}) - full_image_name: str = field(default="", metadata={"system": True, "description": "Full Docker image name with registry"}) - runtime_envs: Dict[str, str] = field( - default_factory=dict, - metadata={ - "system": True, - "description": "Runtime environment variables (format: KEY=VALUE, one per line, use 'del KEY' to remove, 'list' to view)", - "examples": "MODEL_AGENT_API_KEY=your_key_here, DEBUG=true", - "icon": "🔧" - } - ) - _config_metadata = { - 'name': 'Local Docker Configuration', - 'welcome_message': 'Welcome to AgentKit Local Docker Mode Configuration Wizard', - 'next_step_hint': 'This wizard will help you configure your agent for local Docker deployment. Please provide the required information or press Enter to use default values.', - 'completion_message': 'Great! Local Docker configuration is complete!', - 'next_action_hint': 'You can now use "agentkit launch" to start your application.' - } - - -@dataclass -class HybridVeAgentkitConfig(AutoSerializableMixin): - """Hybrid deployment strategy configuration combining local Docker and Volcano Engine services.""" - # User-configurable fields - image_tag: str = field(default=DEFAULT_IMAGE_TAG, metadata={"system": True, "description": "Docker image tag", "icon": "🏷️", "render_template": True}) - - # System internal fields (not visible to users during configuration) - image_id: str = field(default="", metadata={"system": True, "description": "Docker image ID"}) - build_timestamp: str = field(default="", metadata={"system": True, "description": "Timestamp of image build"}) - full_image_name: str = field(default="", metadata={"system": True, "description": "Full Docker image name with registry"}) - - region: str = field(default="cn-beijing", metadata={"description": "Volcano Engine service region", "icon": "🌏", "aliases": ["ve_region"]}) - - # Container Registry (CR) configuration - cr_instance_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Container Registry instance name", "icon": "📦", "render_template": True, "default_template": "agentkit-cli-{{account_id}}", "aliases": ["ve_cr_instance_name"]}) - cr_namespace_name: str = field(default=DEFAULT_CR_NAMESPACE, metadata={"description": "Container Registry namespace", "icon": "📁", "render_template": True, "aliases": ["ve_cr_namespace_name"]}) - cr_repo_name: str = field(default="", metadata={"description": "Container Registry repository name", "icon": "📋", "aliases": ["ve_cr_repo_name"]}) - cr_image_full_url: str = field(default="", metadata={"system": True, "description": "Full Container Registry image URL", "aliases": ["ve_cr_image_full_url"]}) - - # Runtime configuration - runtime_id: str = field(default="", metadata={"system": True, "description": "Runtime instance ID", "aliases": ["ve_runtime_id"]}) - runtime_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "AgentKit Runtime instance name", "icon": "⚙️", "aliases": ["ve_runtime_name"]}) - runtime_role_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime authorization role name", "icon": "🔐", "aliases": ["ve_runtime_role_name"]}) - runtime_apikey_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime API key secret name", "aliases": ["ve_runtime_apikey_name"]}) - runtime_apikey: str = field(default="", metadata={"system": True, "description": "Runtime API key", "aliases": ["ve_runtime_apikey"]}) - runtime_endpoint: str = field(default="", metadata={"system": True, "description": "Runtime application access endpoint", "aliases": ["ve_runtime_endpoint"]}) - runtime_envs: Dict[str, str] = field( - default_factory=dict, - metadata={ - "system": True, - "description": "Runtime environment variables (format: KEY=VALUE, one per line, use 'del KEY' to remove, 'list' to view)", - "examples": "MODEL_AGENT_API_KEY=your_key_here, DEBUG=true", - "icon": "🔧" - } - ) - _config_metadata = { - 'name': 'Hybrid Deployment Configuration', - 'welcome_message': 'Welcome to AgentKit Hybrid Deployment Mode Configuration Wizard', - 'next_step_hint': 'This wizard will help you configure your agent for hybrid deployment combining local Docker and Volcano Engine services. Please provide the required information or press Enter to use default values.', - 'completion_message': 'Great! Hybrid deployment configuration is complete!', - 'next_action_hint': 'You can now use "agentkit launch" to deploy your application.' - } - - - -@dataclass -class VeAgentkitConfig(AutoSerializableMixin): - """Cloud build and deployment strategy configuration for Volcano Engine.""" - region: str = field( - default="cn-beijing", - metadata={ - "description": "Volcano Engine service region", - "icon": "🌏", - "choices": [ - {"value": "cn-beijing", "description": "Beijing (North China 2)"} - ] - } - ) - - # Tencent Object Storage (TOS) configuration for build artifacts - tos_bucket: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "TOS bucket name for storing build artifacts", "icon": "🗂️", "render_template": True, "default_template": "agentkit-cli-{{account_id}}"}) - tos_prefix: str = field(default="agentkit-builds", metadata={"system": True, "description": "TOS object prefix for build artifacts"}) - tos_region: str = field(default="cn-beijing", metadata={"system": True, "description": "TOS service region"}) - tos_object_key: str = field(default="", metadata={"system": True, "description": "TOS object key for uploaded build artifact"}) - tos_object_url: str = field(default="", metadata={"system": True, "description": "TOS object URL for build artifact"}) - - # Container Registry (CR) configuration for Docker images - image_tag: str = field(default=DEFAULT_IMAGE_TAG, metadata={"system": True, "description": "Docker image tag", "icon": "🏷️", "render_template": True}) - cr_instance_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Container Registry instance name", "icon": "📦", "render_template": True, "default_template": "agentkit-cli-{{account_id}}", "aliases": ["ve_cr_instance_name"]}) - cr_namespace_name: str = field(default=DEFAULT_CR_NAMESPACE, metadata={"description": "Container Registry namespace", "icon": "📁", "render_template": True, "aliases": ["ve_cr_namespace_name"]}) - cr_repo_name: str = field(default="", metadata={"description": "Container Registry repository name (defaults to AgentKit project name)", "icon": "📋", "aliases": ["ve_cr_repo_name"]}) - cr_region: str = field(default="cn-beijing", metadata={"system": True, "description": "Container Registry service region", "aliases": ["ve_cr_region"]}) - cr_image_full_url: str = field(default="", metadata={"system": True, "description": "Full Container Registry image URL", "aliases": ["ve_cr_image_full_url"]}) - build_timeout: int = field(default=3600, metadata={"system": True, "description": "Build timeout in seconds"}) - - # Code Pipeline configuration for CI/CD - cp_workspace_name: str = field(default=DEFAULT_WORKSPACE_NAME, metadata={"system": True, "description": "Code Pipeline workspace name"}) - cp_pipeline_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Code Pipeline pipeline name"}) - cp_pipeline_id: str = field(default="", metadata={"system": True, "description": "Code Pipeline pipeline ID"}) - - # Runtime configuration for deployed application - runtime_id: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime instance ID", "aliases": ["ve_runtime_id"]}) - runtime_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime instance name", "aliases": ["ve_runtime_name"]}) - runtime_role_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime authorization role name", "aliases": ["ve_runtime_role_name"]}) - runtime_apikey_name: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime API key secret name", "aliases": ["ve_runtime_apikey_name"]}) - runtime_apikey: str = field(default=AUTO_CREATE_VE, metadata={"system": True, "description": "Runtime API key for authentication", "aliases": ["ve_runtime_apikey"]}) - runtime_endpoint: str = field(default="", metadata={"system": True, "description": "Runtime application access endpoint (auto-populated after deployment)", "aliases": ["ve_runtime_endpoint"]}) - runtime_envs: Dict[str, str] = field( - default_factory=dict, - metadata={ - "system": True, - "description": "Runtime environment variables (format: KEY=VALUE, one per line, use 'del KEY' to remove, 'list' to view)", - "examples": "MODEL_AGENT_API_KEY=your_key_here, DEBUG=true", - "icon": "🔧" - } - ) - - # Deployment metadata - build_timestamp: str = field(default="", metadata={"system": True, "description": "Timestamp of image build"}) - deploy_timestamp: str = field(default="", metadata={"system": True, "description": "Timestamp of deployment"}) - - _config_metadata = { - 'name': 'Cloud Build and Deployment Configuration', - 'welcome_message': 'Welcome to AgentKit Cloud Build and Deployment Mode Configuration Wizard', - 'next_step_hint': 'This wizard will help you configure your agent for cloud build and deployment on Volcano Engine. Please provide the required information or press Enter to use default values.', - 'completion_message': 'Great! Cloud build and deployment configuration is complete!', - 'next_action_hint': 'You can now use "agentkit launch" to build and deploy your application to the cloud.' - } - - diff --git a/agentkit/toolkit/config/utils.py b/agentkit/toolkit/config/utils.py deleted file mode 100644 index 640a1ba..0000000 --- a/agentkit/toolkit/config/utils.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Configuration utility functions.""" - -from typing import Dict, Any - -from .constants import AUTO_CREATE_VE - - -def is_invalid_config(s: str) -> bool: - return s == None or s == "" or s == AUTO_CREATE_VE - - -def is_valid_config(s: str) -> bool: - return not is_invalid_config(s) - - -def merge_runtime_envs(common_config: Any, strategy_config: Dict[str, Any]) -> Dict[str, str]: - """Merge application-level and strategy-level environment variables. - - Strategy-level variables override application-level ones with the same name. - - Args: - common_config: CommonConfig instance - strategy_config: Strategy configuration dict - - Returns: - Merged environment variables dict - """ - merged_envs = {} - - app_level_envs = getattr(common_config, 'runtime_envs', {}) - if isinstance(app_level_envs, dict): - merged_envs.update(app_level_envs) - - strategy_level_envs = strategy_config.get('runtime_envs', {}) - if isinstance(strategy_level_envs, dict): - merged_envs.update(strategy_level_envs) - - return merged_envs \ No newline at end of file diff --git a/agentkit/toolkit/context.py b/agentkit/toolkit/context.py deleted file mode 100644 index f684b89..0000000 --- a/agentkit/toolkit/context.py +++ /dev/null @@ -1,234 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Execution context - provides thread-safe global state access. - -Implemented using contextvars to support multi-threaded and async environments. -Primary purpose is to simplify Reporter passing throughout the call stack, -avoiding explicit parameter passing at every layer. - -Design rationale: -- Avoids "reporter" parameter threading through dozens of function signatures -- Maintains clean separation between business logic and reporting concerns -- Enables flexible reporter implementations (console, silent, custom) without code changes - -Usage example: - # Set reporter at CLI entry point - ExecutionContext.set_reporter(ConsoleReporter()) - - # Use directly in low-level code without parameter passing - ExecutionContext.info("Processing...") - ExecutionContext.success("Done!") - - # Or retrieve reporter instance for custom handling - reporter = ExecutionContext.get_reporter() - reporter.info("Processing...") -""" - -from contextvars import ContextVar -from typing import Optional, Dict, Any - -from .reporter import Reporter, SilentReporter - - -class ExecutionContext: - """ - Execution context manager providing thread/coroutine-safe state management. - - Primary responsibilities: - 1. Global Reporter access - eliminates parameter threading through call stack - 2. Extensible context data storage - supports arbitrary execution state - - Key features: - - Thread-safe: Uses contextvars.ContextVar for proper isolation - - Async-safe: Works correctly with asyncio and other async frameworks - - Graceful defaults: Returns SilentReporter when none is set - - Convenience methods: Provides info/success/error/warning shortcuts - - Design principle: Each execution context (thread/coroutine) has its own - isolated state, preventing cross-contamination in concurrent scenarios. - """ - - # ContextVar ensures each thread/coroutine has isolated reporter state - _reporter: ContextVar[Optional[Reporter]] = ContextVar('reporter', default=None) - - # Extensible context data storage for arbitrary execution state - _data: ContextVar[Dict[str, Any]] = ContextVar('context_data', default=None) - - @classmethod - def set_reporter(cls, reporter: Reporter) -> None: - """ - Set the Reporter for the current execution context. - - Args: - reporter: Reporter instance to use for all output in this context - - Example: - ExecutionContext.set_reporter(ConsoleReporter()) - """ - cls._reporter.set(reporter) - - @classmethod - def get_reporter(cls) -> Reporter: - """ - Get the Reporter for the current execution context. - - Returns: - Reporter instance. If none is set, returns SilentReporter to prevent - AttributeError in code that doesn't explicitly set a reporter. - - Example: - reporter = ExecutionContext.get_reporter() - reporter.info("Processing...") - """ - reporter = cls._reporter.get() - return reporter if reporter is not None else SilentReporter() - - @classmethod - def has_reporter(cls) -> bool: - """ - Check if a Reporter has been explicitly set for this context. - - Returns: - True if a Reporter is set, False if using default SilentReporter. - """ - return cls._reporter.get() is not None - - @classmethod - def info(cls, message: str, **kwargs) -> None: - """ - Output an informational message using the current Reporter. - - Args: - message: Message content - **kwargs: Additional parameters passed to reporter - - Example: - ExecutionContext.info("Building image...") - """ - cls.get_reporter().info(message, **kwargs) - - @classmethod - def success(cls, message: str, **kwargs) -> None: - """ - Output a success message using the current Reporter. - - Args: - message: Message content - **kwargs: Additional parameters passed to reporter - - Example: - ExecutionContext.success("Build completed!") - """ - cls.get_reporter().success(message, **kwargs) - - @classmethod - def error(cls, message: str, **kwargs) -> None: - """ - Output an error message using the current Reporter. - - Args: - message: Message content - **kwargs: Additional parameters passed to reporter - - Example: - ExecutionContext.error("Build failed!") - """ - cls.get_reporter().error(message, **kwargs) - - @classmethod - def warning(cls, message: str, **kwargs) -> None: - """ - Output a warning message using the current Reporter. - - Args: - message: Message content - **kwargs: Additional parameters passed to reporter - - Example: - ExecutionContext.warning("Deprecated feature used") - """ - cls.get_reporter().warning(message, **kwargs) - - @classmethod - def set_data(cls, key: str, value: Any) -> None: - """ - Set context data for the current execution context. - - Lazily initializes the data dictionary on first use to avoid unnecessary - allocations when only Reporter functionality is needed. - - Args: - key: Data key - value: Data value - - Example: - ExecutionContext.set_data("build_id", "12345") - """ - data = cls._data.get() - if data is None: - # Lazy initialization: only create dict when data is actually stored - data = {} - cls._data.set(data) - data[key] = value - - @classmethod - def get_data(cls, key: str, default: Any = None) -> Any: - """ - Get context data from the current execution context. - - Args: - key: Data key - default: Default value if key is not found - - Returns: - The value associated with the key, or default if not found. - - Example: - build_id = ExecutionContext.get_data("build_id") - """ - data = cls._data.get() - if data is None: - return default - return data.get(key, default) - - @classmethod - def clear_data(cls) -> None: - """ - Clear all context data for the current execution context. - - Example: - ExecutionContext.clear_data() - """ - cls._data.set(None) - - @classmethod - def reset(cls) -> None: - """ - Reset the entire execution context. - - Primarily used in test teardown to ensure clean state between test cases. - Important: Each test should have isolated context to prevent state leakage. - - Example: - def tearDown(self): - ExecutionContext.reset() - """ - cls._reporter.set(None) - cls._data.set(None) - - -# Convenience alias for shorter usage: context.info() instead of ExecutionContext.info() -context = ExecutionContext diff --git a/agentkit/toolkit/docker/__init__.py b/agentkit/toolkit/docker/__init__.py deleted file mode 100644 index ca39025..0000000 --- a/agentkit/toolkit/docker/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Docker - 本地Docker工具集 - -容器管理、镜像管理、Dockerfile生成等本地开发工具 -""" - -# 使用延迟导入,避免在没有安装 docker 依赖时导入失败 -def __getattr__(name): - if name == "DockerManager": - from .container import DockerManager - return DockerManager - elif name == "DockerfileRenderer": - from .container import DockerfileRenderer - return DockerfileRenderer - elif name == "DockerfileManager": - from .dockerfile import DockerfileManager - return DockerfileManager - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - -__all__ = [ - "DockerManager", - "DockerfileRenderer", - "DockerfileManager", -] diff --git a/agentkit/toolkit/docker/container.py b/agentkit/toolkit/docker/container.py deleted file mode 100644 index 85e0c87..0000000 --- a/agentkit/toolkit/docker/container.py +++ /dev/null @@ -1,840 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -from typing import Dict, Any, Optional, List, Tuple -from jinja2 import Environment, FileSystemLoader, TemplateNotFound -import logging -import docker -from docker.errors import DockerException, ImageNotFound - -logger = logging.getLogger(__name__) - -class DockerfileRenderer: - """Dockerfile template renderer for generating Dockerfiles from Jinja2 templates.""" - - def __init__(self, template_dir: Optional[str] = None): - """ - Initialize Dockerfile renderer. - - Args: - template_dir: Directory containing Dockerfile.j2 template, defaults to current directory - """ - self.template_dir = template_dir or os.getcwd() - self.env = Environment( - loader=FileSystemLoader(self.template_dir), - trim_blocks=True, - lstrip_blocks=True - ) - - def render_dockerfile( - self, - context: Dict[str, Any], - template_name: str = "Dockerfile.j2", - output_path: Optional[str] = None, - create_dockerignore: bool = True, - dockerignore_entries: Optional[List[str]] = None - ) -> str: - """ - Render Dockerfile from Jinja2 template. - - Args: - context: Template rendering parameters - template_name: Template filename, defaults to Dockerfile.j2 - output_path: Output Dockerfile path, defaults to Dockerfile in current directory - create_dockerignore: Whether to create .dockerignore file, defaults to True - dockerignore_entries: Additional entries to add to .dockerignore, defaults to None - - Returns: - Rendered Dockerfile content - - Raises: - TemplateNotFound: When template file doesn't exist - IOError: When file write fails - """ - try: - template = self.env.get_template(template_name) - rendered_content = template.render(**context) - - if output_path is None: - output_path = os.path.join(os.path.dirname(self.template_dir), "Dockerfile") - - output_dir = os.path.dirname(output_path) - if output_dir and not os.path.exists(output_dir): - os.makedirs(output_dir, exist_ok=True) - - with open(output_path, 'w', encoding='utf-8') as f: - f.write(rendered_content) - - logger.info(f"Successfully rendered Dockerfile to: {output_path}") - - # Create .dockerignore file if requested - if create_dockerignore: - dockerignore_path = os.path.join(output_dir or os.path.dirname(output_path), ".dockerignore") - self.create_dockerignore(dockerignore_path, dockerignore_entries) - - return rendered_content - - except TemplateNotFound: - logger.error(f"Template file {template_name} not found in {self.template_dir}") - raise - except Exception as e: - logger.error(f"Error rendering Dockerfile: {str(e)}") - raise - - def create_dockerignore(self, dockerignore_path: str, additional_entries: Optional[List[str]] = None) -> None: - """ - Create .dockerignore file with default and additional entries. - - Args: - dockerignore_path: Path to .dockerignore file - additional_entries: Additional entries to add to .dockerignore - - Raises: - IOError: When file write fails - """ - try: - # Check if .dockerignore already exists - if os.path.exists(dockerignore_path): - logger.info(f".dockerignore already exists at: {dockerignore_path}, skipping creation") - return - - # Default entries to exclude - default_entries = [ - "# AgentKit configuration", - "agentkit.yaml", - "agentkit*.yaml", - "", - "# Python cache", - "__pycache__/", - "*.py[cod]", - "*$py.class", - "", - "# Virtual environments", - ".venv/", - "venv/", - "ENV/", - "env/", - "", - "# IDE", - ".vscode/", - ".idea/", - ".windsurf/", - "", - "# Git", - ".git/", - ".gitignore", - "", - "# Docker", - "Dockerfile*", - ".dockerignore", - ] - - # Combine default and additional entries - all_entries = default_entries.copy() - if additional_entries: - all_entries.append("") - all_entries.append("# Additional entries") - all_entries.extend(additional_entries) - - # Write .dockerignore file - with open(dockerignore_path, 'w', encoding='utf-8') as f: - f.write("\n".join(all_entries)) - f.write("\n") # End with newline - - logger.info(f"Successfully created .dockerignore at: {dockerignore_path}") - - except Exception as e: - logger.error(f"Error creating .dockerignore: {str(e)}") - raise - -class DockerManager: - """Docker image builder and container manager.""" - - def __init__(self): - """Initialize Docker manager.""" - self.client = None - self._docker_available = False - self._docker_error = None - - try: - self.client = docker.from_env() - self._docker_available = True - logger.info("Successfully connected to Docker daemon") - except DockerException as e: - self._docker_error = str(e) - logger.warning(f"Docker daemon not available: {str(e)}") - except Exception as e: - self._docker_error = str(e) - logger.warning(f"Unexpected error connecting to Docker: {str(e)}") - - def is_docker_available(self) -> Tuple[bool, str]: - """ - Check if Docker is available and working properly. - - Returns: - Tuple[bool, str]: (is_available, message) - - is_available: Whether Docker is available and working - - message: Friendly message describing the status or error - - Examples: - >>> docker_manager = DockerManager() - >>> available, message = docker_manager.is_docker_available() - >>> if not available: - ... print(f"Docker is not available: {message}") - """ - # Check if Docker client was initialized successfully - if self.client is None or not self._docker_available: - import platform - system = platform.system() - - # Provide platform-specific help messages - if system == "Darwin": # macOS - help_msg = ( - "Please ensure:\n" - "1. Docker Desktop is installed (download from https://www.docker.com/products/docker-desktop)\n" - "2. Docker Desktop is running (check menu bar for Docker icon)\n" - "3. Docker daemon has finished starting (may take a minute after launching Docker Desktop)" - ) - elif system == "Linux": - help_msg = ( - "Please ensure:\n" - "1. Docker is installed on your system\n" - "2. Docker daemon is running (try 'sudo systemctl start docker' or 'sudo service docker start')\n" - "3. You have permission to access Docker (try adding your user to the 'docker' group: 'sudo usermod -aG docker $USER')\n" - "4. Docker socket is accessible (usually at /var/run/docker.sock)" - ) - else: # Windows or other - help_msg = ( - "Please ensure:\n" - "1. Docker Desktop is installed and running\n" - "2. Docker daemon has finished starting" - ) - - error_msg = f"Docker is not available: {self._docker_error}\n\n{help_msg}" - return False, error_msg - - try: - # Try to ping the Docker daemon to verify it's still working - self.client.ping() - - # Get Docker version information to verify functionality - version_info = self.client.version() - docker_version = version_info.get('Version', 'Unknown') - api_version = version_info.get('ApiVersion', 'Unknown') - - success_msg = f"Docker is available (Version: {docker_version}, API: {api_version})" - logger.info(success_msg) - return True, success_msg - - except DockerException as e: - error_msg = ( - f"Docker daemon stopped responding: {str(e)}\n" - "Please check if Docker is still running." - ) - logger.error(error_msg) - return False, error_msg - - except Exception as e: - error_msg = f"Unexpected error checking Docker availability: {str(e)}" - logger.error(error_msg) - return False, error_msg - - def build_image( - self, - dockerfile_path: str, - image_name: str, - image_tag: str = "latest", - build_args: Optional[Dict[str, str]] = None, - no_cache: bool = False, - platform: Optional[str] = None - ) -> Tuple[bool, str, Optional[str]]: - """ - Build Docker image. - - Args: - dockerfile_path: Path to Dockerfile directory - image_name: Image name - image_tag: Image tag, defaults to latest - build_args: Build arguments - no_cache: Whether to disable cache - platform: Target platform - - Returns: - (build_success, build_logs, image_id) - """ - # Check if Docker is available before attempting to build - if not self._docker_available or self.client is None: - is_available, error_msg = self.is_docker_available() - if not is_available: - logger.error(f"Cannot build image: {error_msg}") - return False, error_msg, None - - try: - full_image_name = f"{image_name}:{image_tag}" - build_logs = [] - - logger.info(f"Starting image build: {full_image_name}") - - build_kwargs = { - 'path': dockerfile_path, - 'tag': full_image_name, - 'nocache': no_cache, - 'decode': True, - 'rm': True, - 'forcerm': True, - } - - if build_args: - build_kwargs['buildargs'] = build_args - - if platform: - build_kwargs['platform'] = platform - - build_output = self.client.api.build(**build_kwargs) - - for chunk in build_output: - if 'stream' in chunk: - log_line = chunk['stream'].strip() - if log_line: - build_logs.append(log_line) - logger.debug(log_line) - elif 'errorDetail' in chunk: - error_msg = chunk['errorDetail'].get('message', 'Unknown build error') - build_logs.append(f"ERROR: {error_msg}") - logger.error(error_msg) - return False, "\n".join(build_logs), None - - try: - image = self.client.images.get(full_image_name) - image_id = image.id - logger.info(f"Image build successful: {full_image_name} (ID: {image_id})") - return True, "\n".join(build_logs), image_id - except Exception as e: - logger.warning(f"Build successful but couldn't get image ID: {str(e)}") - return True, "\n".join(build_logs), None - - except Exception as e: - error_msg = f"Image build failed: {str(e)}" - logger.error(error_msg) - return False, error_msg, None - - def list_images(self, name_filter: Optional[str] = None) -> List[Dict[str, Any]]: - """ - List local images. - - Args: - name_filter: Image name filter - - Returns: - List of image information - """ - try: - images = self.client.images.list(name=name_filter) - image_list = [] - - for image in images: - image_info = { - 'id': image.id, - 'tags': image.tags or [], - 'created': image.attrs.get('Created', ''), - 'size': image.attrs.get('Size', 0), - 'virtual_size': image.attrs.get('VirtualSize', image.attrs.get('Size', 0)) - } - image_list.append(image_info) - - return image_list - - except Exception as e: - logger.error(f"Failed to get image list: {str(e)}") - return [] - - def remove_image(self, image_name: str, force: bool = False) -> bool: - """ - Remove image. - - Args: - image_name: Image name - force: Whether to force removal - - Returns: - Whether removal was successful - """ - try: - self.client.images.remove(image_name, force=force) - logger.info(f"Successfully removed image: {image_name}") - return True - except Exception as e: - if "No such image" in str(e): - return True - logger.error(f"Failed to remove image: {str(e)}") - return False - - def list_containers( - self, - all_containers: bool = True, - name_filter: Optional[str] = None, - status_filter: Optional[str] = None - ) -> List[Dict[str, Any]]: - """ - List containers. - - Args: - all_containers: Whether to show all containers including stopped ones - name_filter: Container name filter - status_filter: Status filter (running, exited, paused, etc.) - - Returns: - List of container information - """ - try: - containers = self.client.containers.list(all=all_containers) - container_list = [] - - for container in containers: - try: - if name_filter and name_filter not in container.name: - continue - if status_filter and container.status != status_filter: - continue - - network_settings = container.attrs.get('NetworkSettings', {}) - ports = network_settings.get('Ports', {}) - - state = container.attrs.get('State', {}) - - container_info = { - 'id': container.id[:12], - 'name': container.name, - 'status': container.status, - 'image': container.image.tags[0] if container.image.tags else container.image.id, - 'created': container.attrs.get('Created', ''), - 'ports': ports, - 'state': { - 'running': state.get('Running', False), - 'started_at': state.get('StartedAt', ''), - 'finished_at': state.get('FinishedAt', '') - } - } - container_list.append(container_info) - except Exception as e: - logger.warning(f"Error processing container info: {str(e)}") - continue - - return container_list - - except Exception as e: - logger.error(f"Failed to get container list: {str(e)}") - return [] - - def create_container( - self, - image_name: str, - container_name: Optional[str] = None, - ports: Optional[Dict[str, str]] = None, - volumes: Optional[Dict[str, Dict[str, str]]] = None, - environment: Optional[Dict[str, str]] = None, - command: Optional[str] = None, - detach: bool = True, - restart_policy: Optional[Dict[str, str]] = None, - mem_limit: Optional[str] = None, - cpu_quota: Optional[int] = None, - **kwargs - ) -> Tuple[bool, str]: - """ - Create and start container. - - Args: - image_name: Image name - container_name: Container name - ports: Port mapping {'host_port': 'container_port'} - volumes: Volume mapping {'host_path': {'bind': 'container_path', 'mode': 'rw/ro'}} - environment: Environment variables - command: Startup command - detach: Whether to run in background - restart_policy: Restart policy {'Name': 'always/no/unless-stopped', 'MaximumRetryCount': 0} - mem_limit: Memory limit (e.g., '1g', '512m') - cpu_quota: CPU quota (microseconds, 100000 = 1 CPU core) - **kwargs: Other Docker container parameters - - Returns: - (success, container_id or error_message) - """ - # Check if Docker is available before attempting to create container - if not self._docker_available or self.client is None: - is_available, error_msg = self.is_docker_available() - if not is_available: - logger.error(f"Cannot create container: {error_msg}") - return False, error_msg - - try: - try: - self.client.images.get(image_name) - except ImageNotFound: - logger.info(f"Image {image_name} not found, attempting to pull...") - self.client.images.pull(image_name) - - container_kwargs = { - 'image': image_name, - 'detach': detach, - 'remove': False - } - - if container_name: - container_kwargs['name'] = container_name - - if ports: - container_kwargs['ports'] = {k : v for k, v in ports.items()} - - if volumes: - container_kwargs['volumes'] = volumes - - if environment: - container_kwargs['environment'] = environment - - if command: - container_kwargs['command'] = command - - if restart_policy: - container_kwargs['restart_policy'] = restart_policy - - if mem_limit or cpu_quota: - container_kwargs['mem_limit'] = mem_limit - if cpu_quota: - container_kwargs['cpu_quota'] = cpu_quota - - container = self.client.containers.run(**container_kwargs) - - logger.info(f"Container created successfully: {container.name} ({container.id[:12]})") - return True, container.id - - except Exception as e: - error_msg = f"Container creation failed: {str(e)}" - logger.error(error_msg) - return False, error_msg - - def start_container(self, container_id_or_name: str) -> bool: - """ - Start container. - - Args: - container_id_or_name: Container ID or name - - Returns: - Whether start was successful - """ - try: - container = self.client.containers.get(container_id_or_name) - container.start() - logger.info(f"Container started successfully: {container.name} ({container.id[:12]})") - return True - except Exception as e: - logger.error(f"Failed to start container: {str(e)}") - return False - - def stop_container(self, container_id_or_name: str, timeout: int = 10) -> bool: - """ - Stop container. - - Args: - container_id_or_name: Container ID or name - timeout: Timeout in seconds - - Returns: - Whether stop was successful - """ - try: - container = self.client.containers.get(container_id_or_name) - container.stop(timeout=timeout) - logger.info(f"Container stopped successfully: {container.name} ({container.id[:12]})") - return True - except Exception as e: - logger.error(f"Failed to stop container: {str(e)}") - return False - - def remove_container(self, container_id_or_name: str, force: bool = False) -> bool: - """ - Remove container. - - Args: - container_id_or_name: Container ID or name - force: Whether to force removal - - Returns: - Whether removal was successful - """ - try: - container = self.client.containers.get(container_id_or_name) - container.remove(force=force) - logger.info(f"Container removed successfully: {container_id_or_name}") - return True - except Exception as e: - logger.error(f"Failed to remove container: {str(e)}") - return False - - def get_container(self, container_id_or_name: str) -> Dict[str, Any]: - """ - Get detailed information for a single container. - - Args: - container_id_or_name: Container ID or name - - Returns: - Container details dictionary with status, config, network info - """ - try: - container = self.client.containers.get(container_id_or_name) - - container_info = { - 'id': container.id[:12], - 'name': container.name, - 'status': container.status, - 'image': container.image.tags[0] if container.image.tags else container.image.id, - 'created': container.attrs.get('Created', ''), - 'started_at': container.attrs.get('State', {}).get('StartedAt', ''), - 'finished_at': container.attrs.get('State', {}).get('FinishedAt', ''), - 'restart_count': container.attrs.get('RestartCount', 0), - 'command': container.attrs.get('Config', {}).get('Cmd', []), - 'environment': container.attrs.get('Config', {}).get('Env', []), - 'working_dir': container.attrs.get('Config', {}).get('WorkingDir', ''), - 'labels': container.attrs.get('Config', {}).get('Labels', {}), - } - - network_settings = container.attrs.get('NetworkSettings', {}) - container_info['network'] = { - 'ip_address': network_settings.get('IPAddress', ''), - 'gateway': network_settings.get('Gateway', ''), - 'mac_address': network_settings.get('MacAddress', ''), - 'ports': network_settings.get('Ports', {}), - 'networks': list(network_settings.get('Networks', {}).keys()) - } - - mounts = container.attrs.get('Mounts', []) - container_info['mounts'] = [ - { - 'type': mount.get('Type', ''), - 'source': mount.get('Source', ''), - 'destination': mount.get('Destination', ''), - 'mode': mount.get('Mode', ''), - 'read_only': mount.get('RW', True) is False - } - for mount in mounts - ] - - host_config = container.attrs.get('HostConfig', {}) - container_info['resources'] = { - 'memory_limit': host_config.get('Memory', 0), - 'cpu_limit': host_config.get('CpuQuota', 0), - 'cpu_shares': host_config.get('CpuShares', 0), - 'restart_policy': host_config.get('RestartPolicy', {}) - } - - return container_info - - except Exception as e: - if "No such container" in str(e): - return {} - logger.error(f"Failed to get container info: {str(e)}") - return {} - - def login_to_registry(self, registry_url: str, username: str, password: str, **kwargs) -> Tuple[bool, str]: - """ - Login to remote Docker registry. - - Args: - registry_url: Registry URL (e.g: registry.hub.docker.com, registry.cn-hangzhou.aliyuncs.com) - username: Username - password: Password or access token - **kwargs: Other authentication parameters like email - - Returns: - (Login success, result message) - """ - try: - logger.info(f"Logging in to Docker registry: {registry_url}") - - login_config = { - 'username': username, - 'password': password, - 'registry': registry_url, - 'reauth': True # Force re-authentication - } - - if 'email' in kwargs: - login_config['email'] = kwargs['email'] - - result = self.client.login(**login_config) - - if result.get('Status') == 'Login Succeeded': - logger.info(f"Successfully logged in to registry: {registry_url}") - return True, f"Successfully logged in to registry: {registry_url}" - else: - status = result.get('Status', 'Unknown status') - logger.warning(f"Login result: {status}") - return True, f"Login result: {status}" - - except Exception as e: - error_msg = f"Failed to login to registry: {str(e)}" - logger.error(error_msg) - return False, error_msg - - def push_image( - self, - local_image: str, - registry_url: str, - namespace: str = None, - remote_image_name: str = None, - remote_tag: str = None - ) -> Tuple[bool, str]: - """ - Push image to remote registry. - - Args: - local_image: Local image name (format: name:tag) or image ID - registry_url: Registry URL - namespace: Namespace/organization name (optional) - remote_image_name: Remote image name (optional, defaults to local image name) - remote_tag: Remote image tag (optional, defaults to local tag) - - Returns: - (Push success, result message) - """ - try: - is_image_id = len(local_image) >= 12 and not (':' in local_image and len(local_image.split(':')) == 2) - - if is_image_id: - image_id = local_image - logger.info(f"Using image ID for push: {image_id}") - - try: - image = self.client.images.get(image_id) - except ImageNotFound: - error_msg = f"Local image ID does not exist: {image_id}" - logger.error(error_msg) - return False, error_msg - - image_tags = image.tags - if image_tags: - first_tag = image_tags[0] - local_name = first_tag.split(':')[0] if ':' in first_tag else first_tag - else: - local_name = image_id[:12] - - local_tag = "latest" - - else: - if ':' in local_image: - local_name, local_tag = local_image.rsplit(':', 1) - else: - local_name = local_image - local_tag = "latest" - - try: - image = self.client.images.get(f"{local_name}:{local_tag}") - except ImageNotFound: - error_msg = f"Local image does not exist: {local_name}:{local_tag}" - logger.error(error_msg) - return False, error_msg - - remote_name = remote_image_name or local_name - remote_tag_value = remote_tag or local_tag - - if namespace: - full_remote_image = f"{registry_url}/{namespace}/{remote_name}:{remote_tag_value}" - else: - full_remote_image = f"{registry_url}/{remote_name}:{remote_tag_value}" - - logger.info(f"Preparing to push image: {local_image} -> {full_remote_image}") - - image.tag(full_remote_image) - logger.info(f"Tagged image: {full_remote_image}") - - push_logs = [] - for line in self.client.images.push(full_remote_image, stream=True, decode=True): - if 'error' in line: - error_msg = line.get('error', 'Unknown push error') - push_logs.append(f"ERROR: {error_msg}") - logger.error(error_msg) - return False, "\n".join(push_logs) - elif 'status' in line: - status = line.get('status', '') - progress = line.get('progress', '') - if progress: - log_line = f"{status}: {progress}" - else: - log_line = status - push_logs.append(log_line) - logger.debug(log_line) - - logger.info(f"Image pushed successfully: {full_remote_image}") - return True, full_remote_image - - except Exception as e: - error_msg = f"Failed to push image: {str(e)}" - logger.error(error_msg) - return False, error_msg - - def check_image_exists(self, image_name: str, image_id: str = None) -> Tuple[bool, Optional[Dict[str, Any]], str]: - """ - Unified check if image exists. - - This function provides unified image existence check logic, supporting both image ID and image name checks. - When image ID check fails, it automatically falls back to image name check. - - Args: - image_name: Image name (format: name:tag) - image_id: Optional image ID, will be used first if provided - - Returns: - Tuple[bool, Optional[Dict[str, Any]], str]: - - Whether image exists - - Image info dictionary (if exists) - - Actual image ID found (if exists) - """ - try: - if image_id: - try: - image = self.client.images.get(image_id) - tags = image.tags - actual_image_id = image.id.replace('sha256:', '') - - return True, { - 'id': actual_image_id, - 'tags': tags, - 'created': image.attrs.get('Created', ''), - 'size': image.attrs.get('Size', 0) - }, actual_image_id - - except ImageNotFound: - logger.info(f"Image not found by ID: {image_id[:12]}, trying by name") - - images = self.list_images() - for img in images: - tags = img.get('tags', []) - - if image_name in tags: - actual_image_id = img.get('id', '').replace('sha256:', '') - return True, img, actual_image_id - - if ':' not in image_name: - repo_name = image_name - if any(tag.startswith(repo_name + ':') for tag in tags): - actual_image_id = img.get('id', '').replace('sha256:', '') - return True, img, actual_image_id - - return False, None, "" - - except Exception as e: - logger.error(f"Error checking image existence: {str(e)}") - return False, None, "" diff --git a/agentkit/toolkit/docker/dockerfile/__init__.py b/agentkit/toolkit/docker/dockerfile/__init__.py deleted file mode 100644 index 9b4e5d4..0000000 --- a/agentkit/toolkit/docker/dockerfile/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Dockerfile 智能管理模块""" - -from .manager import DockerfileManager -from .metadata import DockerfileMetadata, DockerfileDecision - -__all__ = ['DockerfileManager', 'DockerfileMetadata', 'DockerfileDecision'] diff --git a/agentkit/toolkit/docker/dockerfile/manager.py b/agentkit/toolkit/docker/dockerfile/manager.py deleted file mode 100644 index 749a5eb..0000000 --- a/agentkit/toolkit/docker/dockerfile/manager.py +++ /dev/null @@ -1,426 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Dockerfile 智能管理器""" - -import logging -import shutil -from pathlib import Path -from datetime import datetime -from typing import Optional, Tuple, Callable, Dict, Any - -from .metadata import DockerfileDecision, MetadataExtractor, ContentComparator -from agentkit.toolkit.context import ExecutionContext - -logger = logging.getLogger(__name__) - - -class DockerfileManager: - """ - Dockerfile 智能管理器 - - 负责决策是否需要重新生成 Dockerfile,并管理生成过程。 - 支持 LocalDockerBuilder 和 VeCPCRBuilder。 - """ - - def __init__(self, workdir: Path, custom_logger: Optional[logging.Logger] = None): - """ - 初始化管理器 - - Args: - workdir: 工作目录 - custom_logger: 自定义日志器 - - Note: - 输出信息通过 ExecutionContext 的 Reporter 进行, - CLI 会自动设置 ConsoleReporter,SDK 会设置 SilentReporter - """ - self.workdir = workdir - self.dockerfile_path = workdir / "Dockerfile" - self.logger = custom_logger or logger - - def prepare_dockerfile( - self, - config_hash_dict: Dict[str, Any], - content_generator: Callable[[], str], - force_regenerate: bool = False - ) -> Tuple[bool, str]: - """ - 准备 Dockerfile(决策 + 生成) - - Args: - config_hash_dict: 用于计算配置哈希的字典 - content_generator: 内容生成函数(返回不含元数据头的 Dockerfile 内容) - force_regenerate: 强制重新生成 - - Returns: - (是否生成了新文件, Dockerfile路径) - """ - # 1. 决策是否需要生成 - decision, reason = self._should_regenerate( - config_hash_dict, - content_generator, - force_regenerate - ) - - should_gen = decision in ( - DockerfileDecision.GENERATE_NEW, - DockerfileDecision.GENERATE_CONFIG_CHANGED - ) - - # 2. 如果需要生成 - if should_gen: - self.logger.info(f"生成 Dockerfile: {reason}") - - # 用户友好的提示信息 - self._print_user_message( - "📝 Generating Dockerfile...", - f"Reason: {reason}", - style="cyan" - ) - - # 创建备份(如果存在) - if self.dockerfile_path.exists(): - backup_path = self._create_backup() - if backup_path: - self.logger.info(f"已备份到: {backup_path}") - # 显示相对于工作目录的路径 - relative_path = backup_path.relative_to(self.workdir) - self._print_user_message( - f"💾 Backup created: {relative_path}", - style="yellow" - ) - - # 生成内容 - try: - dockerfile_content = content_generator() - except Exception as e: - self.logger.error(f"生成 Dockerfile 内容失败: {e}", exc_info=True) - raise - - # 添加元数据头 - full_content = self._add_metadata_header( - dockerfile_content, - config_hash_dict - ) - - # 写入文件 - try: - self.dockerfile_path.write_text(full_content, encoding='utf-8') - self.logger.info(f"Dockerfile 已生成: {self.dockerfile_path}") - - # 成功提示 - if decision == DockerfileDecision.GENERATE_CONFIG_CHANGED: - # 配置变化导致的更新 - self._print_user_message( - "Dockerfile updated", - "Note: Dockerfile auto-updates when config changes. Remove header to fully customize.", - style="green" - ) - else: - # 首次生成 - self._print_user_message( - "Dockerfile generated", - "Note: Dockerfile auto-updates when config changes. Remove header to fully customize.", - style="green" - ) - - except Exception as e: - self.logger.error(f"写入 Dockerfile 失败: {e}", exc_info=True) - raise - - return True, str(self.dockerfile_path) - - # 3. 使用现有文件 - else: - self.logger.info(f"使用现有 Dockerfile: {reason}") - - # 用户友好的提示信息(基于枚举决策) - if decision == DockerfileDecision.KEEP_CONFIG_CONFLICT: - # 配置变化 + 用户修改 → 显著警告 - self._print_user_message( - "⚠️ Using existing Dockerfile (potential risk)", - "Detected: Config updated + Dockerfile modified by user", - "Using your custom version, but it may be incompatible with new config!", - "Suggested actions:", - " 1. Check if Dockerfile needs updates for new config", - " 2. Or use --regenerate-dockerfile to regenerate", - style="yellow" - ) - elif decision == DockerfileDecision.KEEP_USER_MODIFIED: - self._print_user_message( - "🔒 Using existing Dockerfile", - "Detected user customization, keeping current version", - "Tip: Use --regenerate-dockerfile to regenerate if needed", - style="blue" - ) - elif decision == DockerfileDecision.KEEP_USER_CUSTOM: - self._print_user_message( - "📄 Using existing Dockerfile", - "Custom Dockerfile detected (no tool header), keeping as-is", - style="blue" - ) - elif decision == DockerfileDecision.KEEP_UP_TO_DATE: - self._print_user_message( - "✓ Using existing Dockerfile", - "Current file is up-to-date", - style="dim" - ) - else: - # 包括 KEEP_ERROR - self._print_user_message( - "📄 Using existing Dockerfile", - f"{reason}", - style="blue" - ) - - return False, str(self.dockerfile_path) - - def _should_regenerate( - self, - config_hash_dict: Dict[str, Any], - content_generator: Callable[[], str], - force: bool - ) -> Tuple[DockerfileDecision, str]: - """ - 决策是否需要重新生成 Dockerfile - - Args: - config_hash_dict: 配置哈希字典 - content_generator: 内容生成函数 - force: 强制重新生成 - - Returns: - (决策枚举, 原因描述) - """ - # 1. 强制重新生成 - if force: - return DockerfileDecision.GENERATE_CONFIG_CHANGED, "Force regenerate" - - # 2. 文件不存在 - if not self.dockerfile_path.exists(): - return DockerfileDecision.GENERATE_NEW, "Dockerfile does not exist" - - # 3. 读取现有文件 - content = self._read_safely() - if content is None: - return DockerfileDecision.GENERATE_NEW, "Cannot read existing file, regenerating" - - # 4. 提取元数据 - metadata = MetadataExtractor.extract(content) - - # 5. 不是工具管理的文件(用户文件) - if not metadata.is_managed: - return DockerfileDecision.KEEP_USER_CUSTOM, "Custom Dockerfile detected" - - # 6. 计算当前配置哈希 - current_hash = MetadataExtractor.calculate_config_hash(config_hash_dict) - - # 7. 检查内容是否被用户修改(通过 content_hash) - current_content_hash = MetadataExtractor.calculate_content_hash(content) - - # 如果没有记录的 content_hash(旧版本文件),使用内容比较 - if not metadata.content_hash: - self.logger.debug("旧版本文件无 content_hash,使用内容比较...") - try: - expected_content = content_generator() - expected_full = self._add_metadata_header(expected_content, config_hash_dict) - is_modified = ContentComparator.is_modified(content, expected_full) - except Exception as e: - self.logger.warning(f"内容比较失败: {e}") - is_modified = False # 保守策略 - else: - # 通过 content_hash 比较 - is_modified = (current_content_hash != metadata.content_hash) - if is_modified: - self.logger.info(f"内容已修改: {metadata.content_hash} -> {current_content_hash}") - - # 8. 根据配置变化和内容修改情况决策 - config_changed = (metadata.config_hash != current_hash) - - if not config_changed and not is_modified: - # 配置未变 + 内容未改 → 已是最新 - return DockerfileDecision.KEEP_UP_TO_DATE, "Dockerfile is up-to-date" - - elif not config_changed and is_modified: - # 配置未变 + 内容已改 → 保留用户版本 - self.logger.info("Dockerfile 内容已被用户修改") - return DockerfileDecision.KEEP_USER_MODIFIED, "Dockerfile modified by user" - - elif config_changed and not is_modified: - # 配置已变 + 内容未改 → 更新 - self.logger.info("配置已变化,Dockerfile 未被用户修改,将更新") - return DockerfileDecision.GENERATE_CONFIG_CHANGED, "Config updated, regenerating Dockerfile" - - else: - # 配置已变 + 内容已改 → 保留用户版本但警告 - self.logger.warning("配置已变化,且 Dockerfile 已被用户修改,保留用户版本") - return DockerfileDecision.KEEP_CONFIG_CONFLICT, "Config changed + Dockerfile modified (potential conflict)" - - def _add_metadata_header( - self, - content: str, - config_hash_dict: Dict[str, Any], - override_hash: Optional[str] = None - ) -> str: - """ - 添加元数据头部 - - Args: - content: Dockerfile 主体内容 - config_hash_dict: 配置哈希字典 - override_hash: 覆盖计算的哈希(用于对比) - - Returns: - 带元数据头的完整内容 - """ - try: - # 尝试导入版本号 - try: - from agentkit.version import VERSION - version = VERSION - except: - version = "unknown" - - # 计算或使用指定的配置哈希 - if override_hash: - config_hash = override_hash - else: - config_hash = MetadataExtractor.calculate_config_hash(config_hash_dict) - - timestamp = datetime.now().isoformat() - - # 计算内容哈希 - content_hash = MetadataExtractor.calculate_content_hash(content) - - header = f"""# ============================================================================ -# AUTO-GENERATED by AgentKit v{version} -# ============================================================================ -# Source: agentkit.yaml -# Checksum: sha256:{config_hash} -# ContentHash: sha256:{content_hash} -# Generated: {timestamp} -# -# This file is automatically generated and managed by AgentKit: -# - It will be auto-updated when agentkit.yaml config changes (old version backed up) -# - To fully customize, remove this header comment -# - After removing the header, AgentKit will no longer manage this file -# -# Force regenerate command: -# agentkit build --regenerate-dockerfile -# -# ============================================================================ - -""" - return header + content - - except Exception as e: - self.logger.error(f"添加元数据头失败: {e}", exc_info=True) - # 降级:返回原内容 - return content - - def _read_safely(self) -> Optional[str]: - """ - 安全读取 Dockerfile - - Returns: - 文件内容,失败返回 None - """ - if not self.dockerfile_path.exists(): - return None - - # 检查文件大小 - try: - file_size = self.dockerfile_path.stat().st_size - - # 空文件 - if file_size == 0: - self.logger.warning("Dockerfile 为空文件") - return None - - # 文件过大(不太可能是 Dockerfile) - if file_size > 1024 * 1024: # 1MB - self.logger.warning("Dockerfile 文件过大,可能不是标准文件") - return None - - except Exception as e: - self.logger.error(f"检查文件大小失败: {e}") - return None - - # 尝试多种编码读取 - encodings = ['utf-8', 'utf-8-sig', 'latin-1'] - for encoding in encodings: - try: - content = self.dockerfile_path.read_text(encoding=encoding) - return content - except UnicodeDecodeError: - continue - except Exception as e: - self.logger.error(f"读取 Dockerfile 失败 ({encoding}): {e}") - return None - - self.logger.error("无法解码 Dockerfile(尝试了多种编码)") - return None - - def _create_backup(self) -> Optional[Path]: - """ - 创建备份(保存在隐藏文件夹中) - - Returns: - 备份文件路径,失败返回 None - """ - if not self.dockerfile_path.exists(): - return None - - # 创建隐藏的备份目录 - backup_dir = self.workdir / ".agentkit" / "dockerfile_backups" - try: - backup_dir.mkdir(parents=True, exist_ok=True) - except Exception as e: - self.logger.warning(f"创建备份目录失败: {e},将继续生成") - return None - - timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") - backup_path = backup_dir / f"Dockerfile.backup.{timestamp}" - - try: - shutil.copy2(self.dockerfile_path, backup_path) - self.logger.info(f"备份创建成功: {backup_path}") - return backup_path - except Exception as e: - self.logger.warning(f"创建备份失败: {e},将继续生成") - return None - - def _print_user_message(self, *lines: str, style: str = "default") -> None: - """ - 通过 ExecutionContext 输出用户友好的提示信息 - - Args: - *lines: 多行消息 - style: 样式(cyan, green, yellow, blue, dim, default) - """ - # 合并多行消息 - message = "\n".join(lines) - - # 根据样式选择合适的 reporter 方法 - if style == "cyan": - ExecutionContext.info(message) - elif style == "green": - ExecutionContext.success(message) - elif style == "yellow": - ExecutionContext.warning(message) - elif style in ("blue", "dim", "default"): - ExecutionContext.info(message) - else: - ExecutionContext.info(message) diff --git a/agentkit/toolkit/docker/dockerfile/metadata.py b/agentkit/toolkit/docker/dockerfile/metadata.py deleted file mode 100644 index 8b0378b..0000000 --- a/agentkit/toolkit/docker/dockerfile/metadata.py +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Dockerfile 元数据处理""" - -import re -import hashlib -import json -import logging -from dataclasses import dataclass -from datetime import datetime -from typing import Optional -from enum import Enum - -logger = logging.getLogger(__name__) - - -class DockerfileDecision(Enum): - """Dockerfile 决策类型""" - GENERATE_NEW = "generate_new" # 生成新文件 - GENERATE_CONFIG_CHANGED = "generate_config_changed" # 配置变化,重新生成 - KEEP_UP_TO_DATE = "keep_up_to_date" # 保留(已是最新) - KEEP_USER_MODIFIED = "keep_user_modified" # 保留(用户修改) - KEEP_USER_CUSTOM = "keep_user_custom" # 保留(自定义文件) - KEEP_CONFIG_CONFLICT = "keep_config_conflict" # 保留(配置冲突+用户修改) - KEEP_ERROR = "keep_error" # 保留(检查出错) - - -@dataclass -class DockerfileMetadata: - """Dockerfile 元数据""" - is_managed: bool # 是否由工具管理 - config_hash: Optional[str] # 配置哈希 - content_hash: Optional[str] # 内容哈希(用于检测用户修改) - agentkit_version: Optional[str] # AgentKit 版本 - generated_at: Optional[datetime] # 生成时间 - - -class MetadataExtractor: - """元数据提取器""" - - HEADER_LINES = 20 # 只在前20行查找元数据 - HEADER_MARKER = "AUTO-GENERATED by AgentKit" - CHECKSUM_PATTERN = r"# Checksum:\s*sha256:(\w+)" - CONTENT_HASH_PATTERN = r"# ContentHash:\s*sha256:(\w+)" - VERSION_PATTERN = r"AUTO-GENERATED by AgentKit v([\d.]+)" - TIMESTAMP_PATTERN = r"# Generated:\s*(.+)" - - @staticmethod - def extract(content: str) -> DockerfileMetadata: - """ - 从 Dockerfile 内容提取元数据 - - Args: - content: Dockerfile 内容 - - Returns: - DockerfileMetadata 对象 - """ - lines = content.split('\n')[:MetadataExtractor.HEADER_LINES] - - is_managed = False - version = None - config_hash = None - content_hash = None - generated_at = None - - for line in lines: - # 检查是否是工具生成的 - if MetadataExtractor.HEADER_MARKER in line: - is_managed = True - # 提取版本 - match = re.search(MetadataExtractor.VERSION_PATTERN, line) - if match: - version = match.group(1) - - # 提取配置哈希 - if '# Checksum:' in line: - match = re.search(MetadataExtractor.CHECKSUM_PATTERN, line) - if match: - config_hash = match.group(1) - - # 提取内容哈希 - if '# ContentHash:' in line: - match = re.search(MetadataExtractor.CONTENT_HASH_PATTERN, line) - if match: - content_hash = match.group(1) - - # 提取生成时间 - if '# Generated:' in line: - match = re.search(MetadataExtractor.TIMESTAMP_PATTERN, line) - if match: - try: - generated_at = datetime.fromisoformat(match.group(1).strip()) - except Exception: - pass - - # 如果找到实际的 Dockerfile 指令(非注释行),停止解析 - stripped = line.strip() - if stripped and not stripped.startswith('#'): - break - - return DockerfileMetadata( - is_managed=is_managed, - config_hash=config_hash, - content_hash=content_hash, - agentkit_version=version, - generated_at=generated_at - ) - - @staticmethod - def remove_metadata_header(content: str) -> str: - """ - 移除元数据头部,返回纯 Dockerfile 内容 - - Args: - content: 完整的 Dockerfile 内容 - - Returns: - 移除头部后的内容 - """ - lines = content.split('\n') - - # 找到第一个非注释、非空行 - start_idx = 0 - for i, line in enumerate(lines): - stripped = line.strip() - if stripped and not stripped.startswith('#'): - start_idx = i - break - - return '\n'.join(lines[start_idx:]) - - @staticmethod - def calculate_config_hash(config_dict: dict) -> str: - """ - 计算配置哈希 - - Args: - config_dict: 配置字典(包含影响 Dockerfile 的关键字段) - - Returns: - SHA256 哈希值(前16位) - """ - try: - # 序列化为 JSON,确保顺序一致 - content = json.dumps(config_dict, sort_keys=True, ensure_ascii=False) - - # 计算 SHA256 - hash_value = hashlib.sha256(content.encode('utf-8')).hexdigest() - - # 返回前16位(足够唯一) - return hash_value[:16] - except Exception as e: - logger.error(f"计算配置哈希失败: {e}", exc_info=True) - return "unknown" - - @staticmethod - def calculate_content_hash(content: str) -> str: - """ - 计算 Dockerfile 内容哈希(移除元数据头后) - - Args: - content: Dockerfile 内容(可能包含元数据头) - - Returns: - SHA256 哈希值(前16位) - """ - try: - # 移除元数据头 - body = MetadataExtractor.remove_metadata_header(content) - - # 标准化内容 - normalized = ContentComparator.normalize_content(body) - - # 计算 SHA256 - hash_value = hashlib.sha256(normalized.encode('utf-8')).hexdigest() - - # 返回前16位 - return hash_value[:16] - except Exception as e: - logger.error(f"计算内容哈希失败: {e}", exc_info=True) - return "unknown" - - -class ContentComparator: - """内容比较器""" - - @staticmethod - def is_modified(current_content: str, expected_content: str) -> bool: - """ - 判断内容是否被用户修改 - - 策略: - 1. 移除两者的元数据头 - 2. 标准化空白字符 - 3. 逐行比较 - - Args: - current_content: 当前文件内容 - expected_content: 期望的内容(基于旧配置重新生成) - - Returns: - 是否被修改 - """ - # 移除元数据头 - current_body = MetadataExtractor.remove_metadata_header(current_content) - expected_body = MetadataExtractor.remove_metadata_header(expected_content) - - # 标准化内容 - current_normalized = ContentComparator.normalize_content(current_body) - expected_normalized = ContentComparator.normalize_content(expected_body) - - # 直接比较 - return current_normalized != expected_normalized - - @staticmethod - def normalize_content(content: str) -> str: - """ - 标准化 Dockerfile 内容 - - 处理: - 1. 移除行尾空白 - 2. 统一多个连续空行为一个 - 3. 标准化注释格式 - - Args: - content: 原始内容 - - Returns: - 标准化后的内容 - """ - lines = content.splitlines() - normalized_lines = [] - - prev_empty = False - for line in lines: - # 移除行尾空白 - line = line.rstrip() - - # 空行处理(多个连续空行变一个) - if not line: - if not prev_empty: - normalized_lines.append('') - prev_empty = True - continue - - prev_empty = False - - # 标准化注释(保留注释内容,但标准化空格) - if line.startswith('#'): - comment_content = line[1:].strip() - if comment_content: - normalized_lines.append(f"# {comment_content}") - else: - normalized_lines.append('#') - else: - normalized_lines.append(line) - - return '\n'.join(normalized_lines) diff --git a/agentkit/toolkit/errors.py b/agentkit/toolkit/errors.py deleted file mode 100644 index 2eb1996..0000000 --- a/agentkit/toolkit/errors.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Unified error definitions and exception types. - -This module provides standardized error codes and exception classes for AgentKit operations. -Error codes are machine-readable identifiers used in Result objects for programmatic error -handling, monitoring, and internationalization. -""" - -from enum import Enum - - -class ErrorCode(str, Enum): - """ - Standardized error codes for programmatic error handling. - - These codes are used in Result objects' error_code field to enable: - - Programmatic error handling and recovery logic - - Error monitoring and analytics - - Internationalization (mapping codes to localized messages) - - Each code is self-contained and should be used consistently across - all error scenarios to ensure reliable error classification. - """ - - # Configuration errors - CONFIG_INVALID = "CONFIG_INVALID" - CONFIG_MISSING = "CONFIG_MISSING" - CONFIG_FILE_NOT_FOUND = "CONFIG_FILE_NOT_FOUND" - - # Network errors - NETWORK_TIMEOUT = "NETWORK_TIMEOUT" - NETWORK_CONNECTION = "NETWORK_CONNECTION" - - # Authentication and permission errors - PERMISSION_DENIED = "PERMISSION_DENIED" - AUTH_FAILED = "AUTH_FAILED" - - # Build errors - BUILD_FAILED = "BUILD_FAILED" - IMAGE_PUSH_FAILED = "IMAGE_PUSH_FAILED" - DOCKERFILE_NOT_FOUND = "DOCKERFILE_NOT_FOUND" - - # Deployment errors - DEPLOY_FAILED = "DEPLOY_FAILED" - CONTAINER_START_FAILED = "CONTAINER_START_FAILED" - RUNTIME_CREATE_FAILED = "RUNTIME_CREATE_FAILED" - RUNTIME_NOT_READY = "RUNTIME_NOT_READY" - - # Invocation errors - INVOKE_FAILED = "INVOKE_FAILED" - INVOKE_TIMEOUT = "INVOKE_TIMEOUT" - SERVICE_NOT_RUNNING = "SERVICE_NOT_RUNNING" - - # Resource errors - RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND" - RESOURCE_CONFLICT = "RESOURCE_CONFLICT" - RESOURCE_QUOTA_EXCEEDED = "RESOURCE_QUOTA_EXCEEDED" - - # Dependency errors - DEPENDENCY_MISSING = "DEPENDENCY_MISSING" - DOCKER_NOT_AVAILABLE = "DOCKER_NOT_AVAILABLE" - - # Catch-all for unclassified errors - UNKNOWN_ERROR = "UNKNOWN_ERROR" - - -class AgentKitError(Exception): - """ - Base exception class for all AgentKit errors. - - All AgentKit exceptions should inherit from this class to ensure - consistent error handling and classification across the toolkit. - """ - - def __init__(self, message: str, error_code: ErrorCode = ErrorCode.UNKNOWN_ERROR): - """ - Initialize an AgentKit error. - - Args: - message: Human-readable error message - error_code: Machine-readable error code for programmatic handling - """ - self.message = message - self.error_code = error_code - super().__init__(message) - - -class ConfigError(AgentKitError): - """Raised when configuration is invalid or missing required fields.""" - - def __init__(self, message: str): - super().__init__(message, ErrorCode.CONFIG_INVALID) - - -class DependencyError(AgentKitError): - """Raised when a required dependency is missing or unavailable.""" - - def __init__(self, message: str): - super().__init__(message, ErrorCode.DEPENDENCY_MISSING) - - -class BuildError(AgentKitError): - """Raised when the build process fails.""" - - def __init__(self, message: str): - super().__init__(message, ErrorCode.BUILD_FAILED) - - -class DeployError(AgentKitError): - """Raised when the deployment process fails.""" - - def __init__(self, message: str): - super().__init__(message, ErrorCode.DEPLOY_FAILED) - - -class InvokeError(AgentKitError): - """Raised when agent invocation fails.""" - - def __init__(self, message: str): - super().__init__(message, ErrorCode.INVOKE_FAILED) - - -__all__ = [ - "ErrorCode", - "AgentKitError", - "ConfigError", - "DependencyError", - "BuildError", - "DeployError", - "InvokeError", -] diff --git a/agentkit/toolkit/executors/__init__.py b/agentkit/toolkit/executors/__init__.py deleted file mode 100644 index 83e6bc1..0000000 --- a/agentkit/toolkit/executors/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Executor 层 - 统一的配置管理和错误处理 - -Executor 层职责: -- 配置加载和验证 -- Strategy 选择和实例化 -- Reporter 注入 -- 统一错误处理 -- 日志记录 - -不做: -- 结果转换(Strategy 直接返回标准 Result) -- 进度报告(由 Strategy → Builder/Runner 处理) -""" - -from .base_executor import BaseExecutor -from .build_executor import BuildExecutor, BuildOptions -from .deploy_executor import DeployExecutor -from .invoke_executor import InvokeExecutor -from .status_executor import StatusExecutor -from .lifecycle_executor import LifecycleExecutor -from .init_executor import InitExecutor - -__all__ = [ - 'BaseExecutor', - 'BuildExecutor', - 'BuildOptions', # 导出 BuildOptions 供 CLI 使用 - 'DeployExecutor', - 'InvokeExecutor', - 'StatusExecutor', - 'LifecycleExecutor', - 'InitExecutor' -] diff --git a/agentkit/toolkit/executors/base_executor.py b/agentkit/toolkit/executors/base_executor.py deleted file mode 100644 index 841d40a..0000000 --- a/agentkit/toolkit/executors/base_executor.py +++ /dev/null @@ -1,349 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Base Executor - Unified configuration loading, error handling, and strategy selection. - -Responsibilities: -1. Configuration loading and validation -2. Strategy selection and instantiation -3. Reporter injection for progress reporting -4. Unified error handling and logging -5. Configuration persistence for deployment metadata - -Design Principle: -- Strategies are immutable: they do not modify input configuration -- Strategies return ConfigUpdates suggestions; Executor applies and persists them -- This separation ensures clean layering and testability - -NOT Responsible For: -- Result transformation (Strategies return standard Result objects directly) -- Progress reporting (handled by Strategy → Builder/Runner chain) -""" - -import logging -from typing import Optional, Dict, Any -from pathlib import Path -from agentkit.toolkit.reporter import Reporter, SilentReporter - - -class BaseExecutor: - """ - Base class for all executors providing unified configuration and error handling. - - All Executor subclasses inherit: - - Configuration loading from file or dict with priority handling - - Configuration validation for required fields - - Strategy selection based on launch_type - - Reporter injection for progress tracking - - Unified error handling and classification - - Configuration persistence for deployment metadata - """ - - def __init__(self, reporter: Reporter = None): - """ - Initialize the executor with optional reporter for progress tracking. - - Args: - reporter: Reporter instance for progress reporting. If None, uses SilentReporter. - This reporter is passed through to Strategy → Builder/Runner chain. - """ - self.reporter = reporter or SilentReporter() - self.logger = logging.getLogger(f"{__name__}.{self.__class__.__name__}") - - def _load_config(self, config_dict: Optional[Dict[str, Any]], config_file: Optional[str]): - """ - Load configuration with priority: config_dict > config_file > default. - - Priority Logic: - 1. If config_dict is provided: - - If config_file also provided: merge mode (config_file as base, config_dict overrides) - - Otherwise: pure dict mode - 2. If only config_file provided: load from file - 3. Otherwise: load default configuration - - Args: - config_dict: Configuration dictionary to apply (highest priority) - config_file: Path to configuration file (medium priority) - - Returns: - Configuration object (AgentkitConfigManager) - - Raises: - FileNotFoundError: Configuration file does not exist - ValueError: Configuration is invalid - """ - from agentkit.toolkit.config import get_config, AgentkitConfigManager - - if config_dict: - if config_file: - config_path = Path(config_file) - if not config_path.exists(): - raise FileNotFoundError(f"Configuration file not found: {config_file}") - self.logger.debug(f"Creating config from dict with base file: {config_file}") - return AgentkitConfigManager.from_dict( - config_dict=config_dict, - base_config_path=config_path - ) - else: - self.logger.debug("Creating config from dict (no base file)") - return AgentkitConfigManager.from_dict(config_dict=config_dict) - - if config_file: - config_path = Path(config_file) - if not config_path.exists(): - raise FileNotFoundError(f"Configuration file not found: {config_file}") - return get_config(config_path=config_path) - else: - return get_config() - - def _validate_config(self, config) -> None: - """ - Validate that configuration has all required fields. - - Args: - config: Configuration object - - Raises: - ValueError: Configuration is missing required fields - """ - common_config = config.get_common_config() - - if not common_config.agent_name: - raise ValueError("Configuration missing required field: agent_name") - - if not common_config.entry_point: - raise ValueError("Configuration missing required field: entry_point") - - if not common_config.launch_type: - raise ValueError("Configuration missing required field: launch_type") - - self.logger.debug(f"Configuration validated: agent={common_config.agent_name}, " - f"launch_type={common_config.launch_type}") - - def _get_strategy(self, launch_type: str, config_manager=None): - """ - Get strategy instance for the specified launch type. - - Args: - launch_type: Launch type (local/cloud/hybrid) - config_manager: Configuration manager instance (optional) - - Returns: - Strategy instance with reporter already injected - - Raises: - ValueError: Unknown launch_type - """ - from agentkit.toolkit.strategies import LocalStrategy, CloudStrategy, HybridStrategy - - strategy_map = { - 'local': LocalStrategy, - 'cloud': CloudStrategy, - 'hybrid': HybridStrategy, - } - - strategy_class = strategy_map.get(launch_type) - if not strategy_class: - available = ", ".join(strategy_map.keys()) - raise ValueError( - f"Unknown launch_type '{launch_type}'. " - f"Available strategies: {available}" - ) - - # Inject reporter and config_manager into strategy - # Reporter is passed through to Builder/Runner for progress tracking - return strategy_class( - config_manager=config_manager, - reporter=self.reporter - ) - - def _classify_error(self, error: Exception) -> str: - """ - Classify exception type into error code for Result object. - - Args: - error: Exception instance - - Returns: - Error code string (e.g., FILE_NOT_FOUND, INVALID_CONFIG) - """ - if isinstance(error, FileNotFoundError): - return "FILE_NOT_FOUND" - elif isinstance(error, ValueError): - return "INVALID_CONFIG" - elif isinstance(error, PermissionError): - return "PERMISSION_DENIED" - elif isinstance(error, TimeoutError): - return "TIMEOUT" - elif isinstance(error, ImportError): - return "DEPENDENCY_MISSING" - else: - return "UNKNOWN_ERROR" - - def _handle_exception(self, operation: str, error: Exception) -> Dict[str, Any]: - """ - Unified exception handling for all operations. - - Logs the full exception with traceback and returns a structured error dict - for Result object construction. Error messages are user-friendly. - - Args: - operation: Operation name (e.g., 'build', 'deploy', 'destroy') - error: Exception instance - - Returns: - Dictionary with success=False, error message, and error code - """ - self.logger.error(f"{operation} error: {error}", exc_info=True) - - # Provide user-friendly error messages - error_message = str(error) - if isinstance(error, FileNotFoundError): - error_message = f"File not found: {error}" - elif isinstance(error, ValueError): - error_message = f"Invalid configuration: {error}" - elif isinstance(error, PermissionError): - error_message = f"Permission denied: {error}" - elif isinstance(error, TimeoutError): - error_message = f"Operation timeout: {error}" - elif isinstance(error, ImportError): - error_message = f"Missing dependency: {error}" - - return { - "success": False, - "error": error_message, - "error_code": self._classify_error(error) - } - - def _get_strategy_config_object(self, config, launch_type: str, skip_render: bool = False): - """ - Get strongly-typed strategy configuration object for the launch type. - - Args: - config: Configuration manager (AgentkitConfigManager) - launch_type: Strategy type (local/cloud/hybrid) - skip_render: Skip template rendering for read-only operations (improves performance). - Use for status checks and other operations that don't modify config. - - Returns: - Typed configuration object: LocalDockerConfig | VeAgentkitConfig | HybridVeAgentkitConfig - """ - strategy_config_dict = config.get_strategy_config(launch_type) - - if launch_type == "local": - from agentkit.toolkit.config import LocalDockerConfig - return LocalDockerConfig.from_dict(strategy_config_dict, skip_render=skip_render) - elif launch_type == "cloud": - from agentkit.toolkit.config import VeAgentkitConfig - return VeAgentkitConfig.from_dict(strategy_config_dict, skip_render=skip_render) - elif launch_type == "hybrid": - from agentkit.toolkit.config import HybridVeAgentkitConfig - return HybridVeAgentkitConfig.from_dict(strategy_config_dict, skip_render=skip_render) - else: - raise ValueError(f"Unknown launch_type: {launch_type}") - - def _clear_deploy_config(self, config, launch_type: str): - """ - Clear deployment-related configuration after successful destroy operation. - - Removes deployment metadata (endpoint, runtime_id, etc.) so the agent - can be deployed again from scratch. This is called after destroy succeeds. - - Args: - config: Configuration manager (AgentkitConfigManager) - launch_type: Strategy type (local/cloud/hybrid) - """ - from agentkit.toolkit.config import AUTO_CREATE_VE - - strategy_config = config.get_strategy_config(launch_type) - - # Clear common deployment metadata - strategy_config['deploy_timestamp'] = "" - - # Clear launch-type-specific deployment state - if launch_type == "local": - strategy_config['container_id'] = "" - strategy_config['container_name'] = "" - strategy_config['endpoint'] = "" - elif launch_type in ["cloud", "hybrid"]: - strategy_config['runtime_id'] = "" - strategy_config['runtime_name'] = AUTO_CREATE_VE - strategy_config['runtime_endpoint'] = "" - strategy_config['runtime_apikey'] = "" - strategy_config['runtime_apikey_name'] = AUTO_CREATE_VE - strategy_config['runtime_role_name'] = AUTO_CREATE_VE - - config.update_strategy_config(launch_type, strategy_config) - self.logger.debug(f"Cleared deploy config for {launch_type}") - - def _apply_config_updates(self, config, launch_type: str, config_updates): - """ - Apply and persist configuration updates from strategy execution. - - Design Pattern: - - Strategies are immutable: they do not modify input configuration - - Strategies return ConfigUpdates suggestions (e.g., generated endpoint, runtime_id) - - Executor applies updates and persists them to configuration file - - This ensures clean separation: Strategy computes, Executor persists - - Args: - config: Configuration manager (AgentkitConfigManager) - launch_type: Strategy type (local/cloud/hybrid) - config_updates: ConfigUpdates object with suggested changes - - Example: - ```python - # In Strategy - config_updates = ConfigUpdates() - config_updates.add('runtime_name', 'generated-name') - result.config_updates = config_updates - - # In Executor - result = strategy.build(...) - if result.config_updates: - self._apply_config_updates(config, launch_type, result.config_updates) - ``` - """ - from agentkit.toolkit.models import ConfigUpdates - - if not config_updates: - return - - if not isinstance(config_updates, ConfigUpdates): - self.logger.warning(f"Expected ConfigUpdates, got {type(config_updates)}") - return - - if not config_updates.has_updates(): - return - - # Get typed configuration object for this launch type - strategy_config_obj = self._get_strategy_config_object(config, launch_type) - - # Apply updates to configuration object - updates_dict = config_updates.to_dict() - for key, value in updates_dict.items(): - if hasattr(strategy_config_obj, key): - setattr(strategy_config_obj, key, value) - else: - self.logger.warning(f"Config field '{key}' not found in {type(strategy_config_obj).__name__}") - - # Persist to configuration file using to_persist_dict() - # This automatically preserves template values for fields not in updates - config.update_strategy_config(launch_type, strategy_config_obj.to_persist_dict()) - - # Log the updates - updated_keys = list(updates_dict.keys()) - self.logger.info(f"Applied {len(updated_keys)} config updates: {updated_keys}") - self.logger.debug(f"Config updates detail: {updates_dict}") diff --git a/agentkit/toolkit/executors/build_executor.py b/agentkit/toolkit/executors/build_executor.py deleted file mode 100644 index c2e26b4..0000000 --- a/agentkit/toolkit/executors/build_executor.py +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Build Executor - Unified build operation execution with configuration management and error handling. - -Responsibilities: -1. Configuration loading and validation -2. Strategy selection based on launch_type -3. Build execution via Strategy.build() -4. Unified error handling and logging -5. Configuration persistence for build metadata - -Design Principle: -- Strategies are immutable: they do not modify input configuration -- Strategies return ConfigUpdates suggestions; Executor applies and persists them -- This separation ensures clean layering and testability - -NOT Responsible For: -- Result transformation (Strategies return BuildResult directly) -- Progress reporting (handled by Strategy → Builder chain) -""" - -from dataclasses import dataclass -from typing import Optional, Dict, Any -from agentkit.toolkit.models import BuildResult -from agentkit.toolkit.reporter import Reporter -from .base_executor import BaseExecutor - - -@dataclass -class BuildOptions: - """ - Runtime options for build execution (from CLI, not persisted to config file). - - These options control single-run build behavior, separate from persistent configuration. - """ - platform: Optional[str] = None - """Target CPU architecture platform (e.g., linux/amd64, linux/arm64) passed to Docker build""" - - regenerate_dockerfile: bool = False - """Force regenerate Dockerfile even if it already exists""" - - -class BuildExecutor(BaseExecutor): - """ - Build executor orchestrating the build strategy. - - All Executor subclasses inherit: - - Configuration loading from file or dict with priority handling - - Configuration validation for required fields - - Strategy selection based on launch_type - - Reporter injection for progress tracking - - Unified error handling and classification - - Configuration persistence for build metadata - """ - - def __init__(self, reporter: Reporter = None): - """ - Initialize the executor with optional reporter for progress tracking. - - Args: - reporter: Reporter instance for progress reporting. If None, uses SilentReporter. - This reporter is passed through to Strategy → Builder chain. - """ - super().__init__(reporter) - - def execute( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[str] = None, - options: Optional[BuildOptions] = None - ) -> BuildResult: - """ - Execute the build operation with unified configuration and error handling. - - Strategy: - 1. Load and validate configuration (priority: config_dict > config_file > default) - 2. Apply runtime options to configuration (not persisted) - 3. Select strategy based on launch_type - 4. Get strongly-typed strategy configuration - 5. Execute build via strategy - 6. Apply and persist configuration updates from build result - 7. Log results and return BuildResult - - Args: - config_dict: Configuration dictionary (highest priority, overrides config_file) - config_file: Path to configuration file (medium priority) - options: Build runtime options (CLI parameters, not persisted) - - Returns: - BuildResult: Build result returned directly from Strategy without transformation - - Raises: - FileNotFoundError: Configuration file does not exist - ValueError: Configuration is invalid - Exception: Any exception during build is caught and converted to BuildResult - """ - if options is None: - options = BuildOptions() - try: - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - self._validate_config(config) - - # Apply runtime options to configuration (not persisted to file) - if options.regenerate_dockerfile: - self.logger.debug("Runtime option: regenerate_dockerfile=True") - config.set_docker_build_runtime_param('regenerate_dockerfile', True) - - if options.platform: - self.logger.debug(f"Runtime option: platform={options.platform}") - config.set_docker_build_runtime_param('platform', options.platform) - - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Build strategy selected: {launch_type}") - - strategy = self._get_strategy(launch_type, config_manager=config) - strategy_config = self._get_strategy_config_object(config, launch_type) - - self.logger.info(f"Starting build with {launch_type} strategy...") - result = strategy.build(common_config, strategy_config) - - # Apply configuration updates from build result - # This persists build metadata (e.g., generated image name, build timestamp) - if result.success and result.config_updates: - self._apply_config_updates(config, launch_type, result.config_updates) - - if result.success: - if result.image: - self.logger.info(f"Build completed successfully: {result.image.full_name}") - else: - self.logger.info("Build completed successfully") - else: - self.logger.error(f"Build failed: {result.error} (code: {result.error_code})") - - return result - - except Exception as e: - self.logger.exception(f"Build execution error: {e}") - error_info = self._handle_exception("Build", e) - return BuildResult(**error_info) diff --git a/agentkit/toolkit/executors/deploy_executor.py b/agentkit/toolkit/executors/deploy_executor.py deleted file mode 100644 index 8d3a38d..0000000 --- a/agentkit/toolkit/executors/deploy_executor.py +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Deploy Executor - Handles deployment operations - -Responsibilities: -1. Load and validate configuration -2. Select appropriate Strategy based on launch_type -3. Execute deployment (invoke Strategy.deploy()) -4. Apply configuration updates from deployment results -5. Unified error handling and logging - -Does NOT: -- Result transformation (Strategy returns DeployResult directly) -- Progress reporting (handled by Strategy → Runner via Reporter) -""" - -from typing import Optional, Dict, Any -from agentkit.toolkit.models import DeployResult -from agentkit.toolkit.reporter import Reporter -from .base_executor import BaseExecutor - - -class DeployExecutor(BaseExecutor): - """ - Executor for deployment operations. - - Orchestrates the deployment strategy: - 1. Loads and validates configuration - 2. Selects appropriate Strategy based on launch_type - 3. Executes deployment via Strategy.deploy() - 4. Applies configuration updates from deployment results - 5. Provides unified error handling and logging - - The Reporter is passed through to Strategy → Runner to enable - progress reporting during deployment. - """ - - def __init__(self, reporter: Reporter = None): - """ - Initialize DeployExecutor. - - Args: - reporter: Reporter instance for progress reporting (passed to Strategy) - """ - super().__init__(reporter) - - def execute( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[str] = None - ) -> DeployResult: - """ - Execute deployment operation. - - Strategy: - 1. Load and validate configuration (priority: config_dict > config_file > default) - 2. Extract launch_type from common config - 3. Instantiate appropriate Strategy with Reporter injection - 4. Execute deployment via Strategy.deploy() - 5. Apply any configuration updates returned by Strategy - 6. Return deployment result - - Args: - config_dict: Configuration dictionary (highest priority) - config_file: Path to configuration file - - Returns: - DeployResult: Deployment result from Strategy (no transformation applied) - - Raises: - FileNotFoundError: Configuration file not found - ValueError: Configuration validation failed - Exception: Any exception during deployment is caught and returned as failed result - """ - try: - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - self._validate_config(config) - - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Deployment strategy selected: {launch_type}") - - strategy = self._get_strategy(launch_type, config_manager=config) - strategy_config = self._get_strategy_config_object(config, launch_type) - - self.logger.info(f"Starting deployment with {launch_type} strategy...") - result = strategy.deploy(common_config, strategy_config) - - # Apply configuration updates returned by Strategy (e.g., generated endpoint, runtime_id) - # This ensures deployment metadata is persisted for future operations - if result.success and result.config_updates: - self._apply_config_updates(config, launch_type, result.config_updates) - - if result.success: - self.reporter.success("Deployment completed successfully") - if result.endpoint_url: - self.logger.info(f"Deployment endpoint: {result.endpoint_url}") - else: - # Log error details; CLI layer handles user-facing error messages - self.logger.error(f"Deployment failed: {result.error} (code: {result.error_code})") - - return result - - except Exception as e: - # Catch all exceptions and return as failed DeployResult - # CLI layer handles user-facing error messages to avoid duplication - self.logger.exception(f"Deployment execution error: {e}") - error_info = self._handle_exception("Deploy", e) - return DeployResult(**error_info) diff --git a/agentkit/toolkit/executors/init_executor.py b/agentkit/toolkit/executors/init_executor.py deleted file mode 100644 index c913609..0000000 --- a/agentkit/toolkit/executors/init_executor.py +++ /dev/null @@ -1,763 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Init Executor - Project initialization executor.""" - -import random -import re -import shutil -import os -from pathlib import Path -from typing import Optional, Dict, Any, List - -from agentkit.toolkit.models import InitResult -from agentkit.toolkit.models import AgentFileInfo -from .base_executor import BaseExecutor -from ..utils import AgentParser -from agentkit.toolkit.config import ( - get_config, - DEFAULT_IMAGE_TAG, - DEFAULT_CR_NAMESPACE, - LocalDockerConfig, - VeAgentkitConfig, - HybridVeAgentkitConfig, - global_config_exists, - get_global_config, -) - - -# 模板元数据配置 -TEMPLATES = { - "basic": { - "file": "basic.py", - "name": "Basic Agent App", - "language": "Python", - "language_version": "3.12", - "description": "最简单的Agent应用,快速上手", - "type": "Basic App", - }, - "basic_stream": { - "file": "basic_stream.py", - "name": "Basic Stream Agent App", - "language": "Python", - "language_version": "3.12", - "description": "支持流式输出的Agent应用", - "type": "Stream App", - "extra_requirements": ["# google-adk"], - }, - # "eino_a2a": { - # "filepath": "eino_a2a", - # "name": "Eino A2A Agent App", - # "language": "Golang", - # "language_version": "1.23", - # "description": "基于Eino框架的A2A应用", - # "type": "A2A App", - # }, -} - - -class InitExecutor(BaseExecutor): - """Executor for initializing agent projects.""" - - def __init__(self, reporter=None): - super().__init__(reporter) - self.created_files: List[str] = [] - - def get_available_templates(self) -> Dict[str, Dict[str, Any]]: - """ - Get available project templates. - - Returns: - Dictionary of template configurations. - """ - return TEMPLATES.copy() - - def init_project( - self, - project_name: str, - template: str = "basic", - directory: str = ".", - agent_name: Optional[str] = None, - description: Optional[str] = None, - system_prompt: Optional[str] = None, - model_name: Optional[str] = None, - tools: Optional[str] = None, - ) -> InitResult: - """ - Initialize a new agent project from template. - - Args: - project_name: Name of the project. - template: Template to use (basic, basic_stream, eino_a2a). - directory: Target directory for the project. - agent_name: Agent name (optional). - description: Agent description (optional). - system_prompt: System prompt (optional). - model_name: Model name (optional). - tools: Comma-separated list of tools (optional). - - Returns: - InitResult: Initialization operation result. - """ - try: - self.created_files = [] - - # Validate project name - if not re.match(r'^[a-zA-Z0-9_-]+$', project_name): - return InitResult( - success=False, - error=f"Project name '{project_name}' contains invalid characters. Only letters, numbers, hyphens, and underscores are allowed.", - error_code="INVALID_CONFIG" - ) - - # Validate template - if template not in TEMPLATES: - return InitResult( - success=False, - error=f"Unknown template '{template}'. Available: {', '.join(TEMPLATES.keys())}", - error_code="INVALID_CONFIG" - ) - - template_info = TEMPLATES[template] - language = template_info['language'] - language_version = template_info['language_version'] - - # Prepare target directory - target_dir = Path(directory).resolve() - if not target_dir.exists(): - target_dir.mkdir(parents=True, exist_ok=True) - self.logger.info(f"Created directory: {target_dir}") - elif not target_dir.is_dir(): - return InitResult( - success=False, - error=f"'{target_dir}' exists but is not a directory", - error_code="INVALID_CONFIG" - ) - - # Determine file names - if language == "Python": - file_name = f"{project_name}.py" - dependencies_file_path = target_dir / "requirements.txt" - elif language == "Golang": - file_name = project_name - dependencies_file_path = target_dir / "go.mod" - else: - return InitResult( - success=False, - error=f"Unsupported language: {language}", - error_code="INVALID_CONFIG" - ) - - agent_file_path = target_dir / file_name - config_file_path = target_dir / "agentkit.yaml" - - # Get template source - source_key = template_info.get("file") or template_info.get("filepath") - # Get the path relative to this service file - service_dir = Path(__file__).parent - source_path = service_dir.parent / "resources" / "samples" / source_key - - if not source_path.exists(): - return InitResult( - success=False, - error=f"Template resource not found: {source_path}", - error_code="FILE_NOT_FOUND" - ) - - # Build render context - render_context = self._build_render_context( - agent_name, description, system_prompt, model_name, tools - ) - - # Copy template files - if source_path.is_dir(): - # Directory template - self._copy_template_directory(source_path, target_dir, language, render_context) - else: - # Single file template - self._copy_template_file( - source_path, agent_file_path, language, render_context - ) - - # Create dependencies file - self._create_dependencies_file( - dependencies_file_path, language, language_version, - template_info, project_name, target_dir - ) - - # Determine entry point - if language == "Golang": - if (target_dir / "build.sh").exists(): - entry_point_name = "build.sh" - else: - entry_point_name = "." - else: - entry_point_name = file_name - - # Create agentkit.yaml - if not config_file_path.exists(): - self._create_config_file( - config_file_path=config_file_path, - project_name=project_name, - language=language, - language_version=language_version, - agent_type=template_info.get('type', 'Basic App'), - description=f"AgentKit project {project_name} - {template_info.get('name', '')}", - entry_point_name=entry_point_name, - dependencies_file_name=dependencies_file_path.name - ) - self.created_files.append("agentkit.yaml") - else: - self.logger.info("File agentkit.yaml already exists, skipping") - - # Create .dockerignore - self._create_dockerignore(target_dir) - - return InitResult( - success=True, - project_name=project_name, - template=template, - project_path=str(target_dir), - created_files=self.created_files, - metadata={ - "language": language, - "language_version": language_version, - "entry_point": entry_point_name, - "template_name": template_info['name'] - } - ) - - except Exception as e: - error_info = self._handle_exception("Project initialization", e) - return InitResult( - success=False, - project_name=project_name, - template=template, - error=error_info["error"], - error_code=error_info["error_code"] - ) - - def _build_render_context( - self, - agent_name: Optional[str], - description: Optional[str], - system_prompt: Optional[str], - model_name: Optional[str], - tools: Optional[str], - ) -> Dict[str, Any]: - """Build template rendering context.""" - render_context = {} - if agent_name is not None: - render_context['agent_name'] = agent_name - if description is not None: - render_context['description'] = description - if system_prompt is not None: - render_context['system_prompt'] = system_prompt - if model_name is not None: - render_context['model_name'] = model_name - if tools is not None: - tools_list = [tool.strip() for tool in tools.split(',') if tool.strip()] - render_context['tools'] = tools_list - return render_context - - def _copy_template_directory( - self, - source_path: Path, - target_dir: Path, - language: str, - render_context: Dict[str, Any] - ): - """Copy template directory contents.""" - for item in source_path.iterdir(): - dest = target_dir / item.name - if dest.exists(): - self.logger.info(f"Skipped existing: {dest}") - continue - if item.is_dir(): - shutil.copytree(item, dest) - else: - shutil.copy2(item, dest) - self.created_files.append(item.name) - - # Render Go templates if needed - if language.lower() == "golang": - self._render_go_agent_templates(target_dir, render_context) - - def _copy_template_file( - self, - source_path: Path, - agent_file_path: Path, - language: str, - render_context: Dict[str, Any] - ): - """Copy and render single template file.""" - if agent_file_path.exists(): - self.logger.info(f"File {agent_file_path.name} already exists, skipping") - return - - if language.lower() == "python": - # Render Python template - try: - import jinja2 - except ImportError: - raise ImportError("Jinja2 is required. Please install with 'pip install Jinja2'") - - template_content = source_path.read_text(encoding='utf-8') - template = jinja2.Template(template_content) - rendered_content = template.render(**render_context) - agent_file_path.write_text(rendered_content, encoding='utf-8') - self.created_files.append(agent_file_path.name) - - elif language.lower() == "golang": - shutil.copy2(source_path, agent_file_path) - self.created_files.append(agent_file_path.name) - if agent_file_path.name == "agent.go": - self._render_go_agent_templates(agent_file_path.parent, render_context) - - def _render_go_agent_templates(self, target_dir: Path, render_context: Dict[str, Any]): - """Render Go template files (agent.go).""" - try: - import jinja2 - except ImportError: - self.logger.warning("Jinja2 not available, skipping Go template rendering") - return - - for root, _, files in os.walk(target_dir): - for fname in files: - if fname == "agent.go": - p = Path(root) / fname - try: - template_content = p.read_text(encoding='utf-8') - template = jinja2.Template(template_content) - rendered_content = template.render(**render_context) - p.write_text(rendered_content, encoding='utf-8') - self.logger.info(f"Rendered Go template: {p.relative_to(target_dir)}") - except Exception as e: - self.logger.warning(f"Failed to render {p}: {e}") - - def _create_python_requirements( - self, - dependencies_file_path: Path, - extra_requirements: Optional[List[str]] = None, - include_usage_hints: bool = False - ): - """Create Python requirements.txt file.""" - if dependencies_file_path.exists(): - self.logger.info(f"File {dependencies_file_path.name} already exists, skipping") - return - - with open(dependencies_file_path, 'w', encoding='utf-8') as req_file: - if include_usage_hints: - req_file.write("# AgentKit dependencies\n") - req_file.write("# veadk-python\n") - req_file.write("# veadk-python[extensions]\n") - - if extra_requirements: - if include_usage_hints: - req_file.write("\n# Additional dependencies\n") - for requirement in extra_requirements: - req_file.write(f"{requirement}\n") - - if include_usage_hints: - req_file.write("\n# Add your Agent's additional dependencies below\n") - req_file.write("# Example:\n") - req_file.write("# requests\n") - req_file.write("# pandas\n") - - self.created_files.append(dependencies_file_path.name) - self.logger.info(f"Created {dependencies_file_path.name}") - - def _create_dependencies_file( - self, - dependencies_file_path: Path, - language: str, - language_version: str, - template_info: Dict[str, Any], - project_name: str, - target_dir: Path - ): - """Create dependencies file (requirements.txt or go.mod).""" - if dependencies_file_path.exists(): - self.logger.info(f"File {dependencies_file_path.name} already exists, skipping") - return - - if language.lower() == "python": - extra_reqs = template_info.get("extra_requirements", []) - self._create_python_requirements( - dependencies_file_path, - extra_requirements=extra_reqs, - include_usage_hints=False - ) - - elif language.lower() == "golang": - go_ver = language_version or "1.23" - with open(dependencies_file_path, 'w', encoding='utf-8') as gomod: - gomod.write(f"module {project_name}\n\ngo {go_ver}\n") - self.created_files.append(dependencies_file_path.name) - - def _setup_config_launch_type(self, config_manager, common_config): - """ - Setup launch type specific configurations (local, cloud, or hybrid). - 如果全局配置中有相关字段,则生成空值;否则使用默认值。 - This is shared logic for both template and wrapper modes. - """ - # 尝试加载全局配置 - global_config = None - if global_config_exists(): - try: - global_config = get_global_config() - except Exception as e: - self.logger.debug(f"加载全局配置失败: {e}") - - if common_config.launch_type == 'local': - local_config = LocalDockerConfig.from_dict( - config_manager.get_strategy_config(common_config.launch_type) - ) - random_port = random.randint(1024, 49151) - local_config.invoke_port = random_port - local_config.ports = [f"{random_port}:8000"] - config_manager.update_strategy_config(common_config.launch_type, local_config.to_dict()) - - elif common_config.launch_type == 'cloud': - from agentkit.toolkit.volcengine.services import TOSService,CRService - - # 直接创建配置对象,不使用 from_dict(),避免自动注入全局配置 - cloud_config = VeAgentkitConfig() - - # CR Instance Name - 字段级判断 - if global_config and global_config.cr.instance_name: - cloud_config.cr_instance_name = "" - self.logger.info("检测到全局 CR Instance 配置") - else: - cloud_config.cr_instance_name = CRService.default_cr_instance_name_template() - - # CR Namespace Name - 字段级判断 - if global_config and global_config.cr.namespace_name: - cloud_config.cr_namespace_name = "" - self.logger.info("检测到全局 CR Namespace 配置") - else: - cloud_config.cr_namespace_name = DEFAULT_CR_NAMESPACE - - # TOS Bucket - 字段级判断 - if global_config and global_config.tos.bucket: - cloud_config.tos_bucket = "" - self.logger.info("检测到全局 TOS Bucket 配置") - else: - cloud_config.tos_bucket = TOSService.default_bucket_name_template() - - # TOS Prefix - 字段级判断 - if global_config and global_config.tos.prefix: - cloud_config.tos_prefix = "" - else: - cloud_config.tos_prefix = "agentkit-builds" - - # TOS Region - 字段级判断 - if global_config and global_config.tos.region: - cloud_config.tos_region = "" - else: - cloud_config.tos_region = "cn-beijing" - - # 这些字段始终使用项目特定值 - cloud_config.cr_repo_name = common_config.agent_name - cloud_config.image_tag = DEFAULT_IMAGE_TAG - - config_manager.update_strategy_config(common_config.launch_type, cloud_config.to_dict()) - - elif common_config.launch_type == 'hybrid': - from agentkit.toolkit.volcengine.services import CRService - - # 直接创建配置对象,不使用 from_dict(),避免自动注入全局配置 - hybrid_config = HybridVeAgentkitConfig() - - # Hybrid 模式只需要 CR 配置 - # CR Instance Name - 字段级判断 - if global_config and global_config.cr.instance_name: - hybrid_config.cr_instance_name = "" - self.logger.info("检测到全局 CR Instance 配置") - else: - hybrid_config.cr_instance_name = CRService.default_cr_instance_name_template() - - # CR Namespace Name - 字段级判断 - if global_config and global_config.cr.namespace_name: - hybrid_config.cr_namespace_name = "" - self.logger.info("检测到全局 CR Namespace 配置") - else: - hybrid_config.cr_namespace_name = DEFAULT_CR_NAMESPACE - - # 这些字段始终使用项目特定值 - hybrid_config.cr_repo_name = common_config.agent_name - hybrid_config.image_tag = DEFAULT_IMAGE_TAG - - config_manager.update_strategy_config(common_config.launch_type, hybrid_config.to_dict()) - - def _create_config_file( - self, - config_file_path: Path, - project_name: str, - language: str, - language_version: str, - agent_type: str, - description: str, - entry_point_name: str, - dependencies_file_name: str - ): - """ - Create agentkit.yaml configuration file. - - This is a unified method that works for both template-based and wrapper-based projects. - """ - config_manager = get_config(config_path=config_file_path) - common_config = config_manager.get_common_config() - - # Set common configuration - common_config.launch_type = 'cloud' - common_config.language = language - common_config.language_version = language_version - common_config.agent_name = project_name - common_config.agent_type = agent_type - common_config.description = description - common_config.entry_point = entry_point_name - common_config.dependencies_file = dependencies_file_name - config_manager.update_common_config(common_config) - - # Setup launch type specific configurations - self._setup_config_launch_type(config_manager, common_config) - - def _create_dockerignore(self, target_dir: Path): - """Create .dockerignore file.""" - dockerignore_file_path = target_dir / ".dockerignore" - if dockerignore_file_path.exists(): - self.logger.info("File .dockerignore already exists, skipping") - return - - dockerignore_content = """# AgentKit configuration -agentkit.yaml -agentkit*.yaml - -# Python cache -__pycache__/ -*.py[cod] -*$py.class - -# Virtual environments -.venv/ -venv/ -ENV/ -env/ - -# IDE -.vscode/ -.idea/ -.windsurf/ - -# Git -.git/ -.gitignore - -# Docker -Dockerfile* -.dockerignore -""" - dockerignore_file_path.write_text(dockerignore_content, encoding='utf-8') - self.created_files.append(".dockerignore") - - # ========== Agent File Wrapping Methods ========== - - def init_from_agent_file( - self, - project_name: str, - agent_file_path: str, - agent_var_name: Optional[str] = None, - wrapper_type: str = "basic", - directory: str = ".", - ) -> InitResult: - """ - Initialize a project by wrapping an existing Agent definition file. - - Args: - project_name: Name of the project. - agent_file_path: Path to the existing Agent definition file. - agent_var_name: Optional explicit Agent variable name. - wrapper_type: Type of wrapper to generate (basic or stream). - directory: Target directory for the project. - - Returns: - InitResult: Initialization operation result. - """ - try: - self.created_files = [] - - # Validate project name - if not re.match(r'^[a-zA-Z0-9_-]+$', project_name): - return InitResult( - success=False, - error=f"Project name '{project_name}' contains invalid characters. " - f"Only letters, numbers, hyphens, and underscores are allowed.", - error_code="INVALID_CONFIG" - ) - - # Validate wrapper type - if wrapper_type not in ["basic", "stream"]: - return InitResult( - success=False, - error=f"Invalid wrapper type '{wrapper_type}'. Must be 'basic' or 'stream'.", - error_code="INVALID_CONFIG" - ) - - # Parse the Agent file - parser = AgentParser() - try: - agent_info = parser.parse_agent_file(agent_file_path, agent_var_name) - self.logger.info(f"Parsed Agent file: {agent_info}") - except (FileNotFoundError, ValueError) as e: - # 使用 _classify_error 统一分类错误 - error_code = "FILE_NOT_FOUND" if isinstance(e, FileNotFoundError) else "INVALID_CONFIG" - return InitResult( - success=False, - error=str(e), - error_code=error_code - ) - - # Prepare target directory - target_dir = Path(directory).resolve() - if not target_dir.exists(): - target_dir.mkdir(parents=True, exist_ok=True) - self.logger.info(f"Created directory: {target_dir}") - elif not target_dir.is_dir(): - return InitResult( - success=False, - error=f"'{target_dir}' exists but is not a directory", - error_code="INVALID_CONFIG" - ) - - # Copy user's Agent file to target directory - self._copy_agent_file(agent_info, target_dir) - - # Generate wrapper file - wrapper_file_path = target_dir / f"{project_name}.py" - self._generate_wrapper_file( - wrapper_file_path, agent_info, wrapper_type, project_name - ) - - # Create requirements.txt - dependencies_file_path = target_dir / "requirements.txt" - extra_reqs = ["google-adk"] if wrapper_type == "stream" else [] - self._create_python_requirements( - dependencies_file_path, - extra_requirements=extra_reqs, - include_usage_hints=True - ) - - # Create agentkit.yaml - config_file_path = target_dir / "agentkit.yaml" - if not config_file_path.exists(): - self._create_config_file( - config_file_path=config_file_path, - project_name=project_name, - language='Python', - language_version='3.12', - agent_type=f'Wrapped Agent ({wrapper_type.title()})', - description=f"AgentKit wrapped project: {project_name}", - entry_point_name=wrapper_file_path.name, - dependencies_file_name=dependencies_file_path.name - ) - self.created_files.append("agentkit.yaml") - else: - self.logger.info("File agentkit.yaml already exists, skipping") - - # Create .dockerignore - self._create_dockerignore(target_dir) - - return InitResult( - success=True, - project_name=project_name, - template=f"wrapper_{wrapper_type}", - project_path=str(target_dir), - created_files=self.created_files, - metadata={ - "language": "Python", - "language_version": "3.12", - "entry_point": wrapper_file_path.name, - "template_name": f"Agent Wrapper ({wrapper_type.title()})", - "agent_file": agent_info.file_name, - "agent_var": agent_info.agent_var_name, - "wrapper_type": wrapper_type - } - ) - - except Exception as e: - error_info = self._handle_exception("Agent file wrapping", e) - return InitResult( - success=False, - project_name=project_name, - template=f"wrapper_{wrapper_type}", - error=error_info["error"], - error_code=error_info["error_code"] - ) - - def _copy_agent_file(self, agent_info: AgentFileInfo, target_dir: Path): - """Copy user's Agent file to target directory.""" - source_path = Path(agent_info.file_path) - dest_path = target_dir / agent_info.file_name - - if dest_path.exists(): - self.logger.info(f"File {agent_info.file_name} already exists in target, skipping copy") - return - - shutil.copy2(source_path, dest_path) - self.created_files.append(agent_info.file_name) - self.logger.info(f"Copied Agent file: {agent_info.file_name}") - - def _generate_wrapper_file( - self, - wrapper_file_path: Path, - agent_info: AgentFileInfo, - wrapper_type: str, - project_name: str - ): - """Generate the wrapper file from template.""" - if wrapper_file_path.exists(): - self.logger.info(f"File {wrapper_file_path.name} already exists, skipping") - return - - # Load wrapper template - try: - import jinja2 - except ImportError: - raise ImportError("Jinja2 is required. Please install with 'pip install Jinja2'") - - # Get wrapper template path - service_dir = Path(__file__).parent - template_path = service_dir.parent / "resources" / "wrappers" / f"wrapper_{wrapper_type}.py.jinja2" - - if not template_path.exists(): - raise FileNotFoundError(f"Wrapper template not found: {template_path}") - - # Render template - template_content = template_path.read_text(encoding='utf-8') - template = jinja2.Template(template_content) - - # Prepare render context - render_context = { - 'agent_file_name': agent_info.file_name, - 'agent_module_name': agent_info.module_name, - 'agent_var_name': agent_info.agent_var_name, - 'app_name': project_name, - } - - rendered_content = template.render(**render_context) - wrapper_file_path.write_text(rendered_content, encoding='utf-8') - self.created_files.append(wrapper_file_path.name) - self.logger.info(f"Generated wrapper file: {wrapper_file_path.name}") - diff --git a/agentkit/toolkit/executors/invoke_executor.py b/agentkit/toolkit/executors/invoke_executor.py deleted file mode 100644 index 0019d31..0000000 --- a/agentkit/toolkit/executors/invoke_executor.py +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Invoke Executor - Executes invoke operations on deployed agents. - -This module provides unified orchestration for agent invocation across different -deployment platforms (Local, Cloud, Hybrid). It follows the Strategy pattern to -abstract platform-specific invocation logic. - -Key Responsibilities: -1. Load and validate configuration from multiple sources -2. Select appropriate Strategy based on launch_type -3. Execute invocation (call Strategy.invoke()) -4. Unified error handling and classification -5. Structured logging for debugging and monitoring - -Design Principle: -- Immutability: Configuration is loaded once and passed through the chain -- Separation of Concerns: Strategy handles platform-specific logic, Executor handles orchestration -- Reporter Injection: Progress reporting flows through Strategy → Runner - -What This Executor Does NOT Do: -- Result transformation (Strategy returns InvokeResult directly) -- User-facing error messages (CLI layer handles this) -- Progress reporting (handled by Runner via Reporter) -""" - -from typing import Optional, Dict, Any -from agentkit.toolkit.models import InvokeResult -from agentkit.toolkit.reporter import Reporter -from .base_executor import BaseExecutor - - -class InvokeExecutor(BaseExecutor): - """Orchestrates agent invocation across different deployment platforms. - - This executor provides a unified interface for invoking agents regardless of their - deployment platform. It handles configuration loading, strategy selection, and - error handling while delegating platform-specific invocation logic to the Strategy. - - Inherited Capabilities (from BaseExecutor): - - Configuration loading with priority: config_dict > config_file > default - - Strategy selection based on launch_type - - Strongly configuration object retrieval with type safety - - Unified error classification and handling - - Structured logging with context - """ - - def __init__(self, reporter: Reporter = None): - """Initialize InvokeExecutor. - - Args: - reporter: Reporter instance for progress reporting. Passed through - Strategy → Runner chain for unified progress tracking. - """ - super().__init__(reporter) - - def execute( - self, - payload: Dict[str, Any], - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[str] = None, - headers: Optional[Dict[str, str]] = None, - stream: Optional[bool] = None - ) -> InvokeResult: - """Execute an invoke operation on a deployed agent. - - Orchestrates the complete invocation strategy: - 1. Load configuration from multiple sources (priority: config_dict > config_file > default) - 2. Extract common configuration and determine launch_type - 3. Select appropriate Strategy based on launch_type - 4. Retrieve strongly-typed strategy configuration object - 5. Execute invocation through Strategy.invoke() - 6. Log results and return InvokeResult directly - - Args: - payload: Request payload containing agent input data - config_dict: Configuration dictionary (highest priority). Overrides config_file. - config_file: Path to configuration file. Used if config_dict is not provided. - headers: Optional HTTP headers for the invocation request - stream: Optional flag to enable streaming response - - Returns: - InvokeResult: Invocation result returned directly from Strategy without transformation. - Contains success flag, response data, error information, and streaming status. - - Raises: - ConfigurationError: If configuration is invalid or missing required fields - StrategyError: If strategy selection or execution fails - Exception: Other exceptions are caught and converted to InvokeResult with error info - """ - try: - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Invoke strategy selected: {launch_type}") - - # Select strategy with reporter injection for progress tracking - strategy = self._get_strategy(launch_type, config_manager=config) - - strategy_config = self._get_strategy_config_object(config, launch_type) - - self.logger.info(f"Starting invocation with {launch_type} strategy...") - result = strategy.invoke( - common_config=common_config, - strategy_config=strategy_config, - payload=payload, - headers=headers, - stream=stream - ) - - if result.success: - if result.is_streaming: - self.logger.info("Invocation completed successfully (streaming)") - else: - self.logger.info("Invocation completed successfully") - else: - # Log error details for debugging; CLI layer handles user-facing messages - # to avoid duplication and ensure consistent error presentation - self.logger.error(f"Invocation failed: {result.error} (code: {result.error_code})") - - return result - - except Exception as e: - # Log exception for debugging; CLI layer handles user-facing error messages - # to maintain separation of concerns and avoid duplicate error reporting - self.logger.exception(f"Invocation execution error: {e}") - - error_info = self._handle_exception("Invoke", e) - return InvokeResult(**error_info) diff --git a/agentkit/toolkit/executors/lifecycle_executor.py b/agentkit/toolkit/executors/lifecycle_executor.py deleted file mode 100644 index 9e0d983..0000000 --- a/agentkit/toolkit/executors/lifecycle_executor.py +++ /dev/null @@ -1,301 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Lifecycle Executor - Manages the complete lifecycle of Agent services. - -Combines Build + Deploy operations to provide launch, stop, and destroy functionality. -Each operation is a composition of lower-level executors (BuildExecutor, DeployExecutor, StatusExecutor). -""" - -from typing import Optional, Dict, Any, Union -from pathlib import Path - -from .base_executor import BaseExecutor -from .build_executor import BuildExecutor, BuildOptions -from .deploy_executor import DeployExecutor -from .status_executor import StatusExecutor -from agentkit.toolkit.models import LifecycleResult -from agentkit.toolkit.reporter import Reporter - - -class LifecycleExecutor(BaseExecutor): - """ - Lifecycle management executor that orchestrates multiple operations. - - Composite operations: - - launch: Build image and deploy service in one step - - stop: Stop a running service without removing resources - - destroy: Stop service and clean up all associated resources - """ - - def __init__(self, reporter: Reporter = None): - """ - Initialize LifecycleExecutor. - - Args: - reporter: Reporter instance for progress reporting - """ - super().__init__(reporter) - - # Reuse other executors, all sharing the same reporter for consistent output - self.build_executor = BuildExecutor(reporter=self.reporter) - self.deploy_executor = DeployExecutor(reporter=self.reporter) - self.status_executor = StatusExecutor(reporter=self.reporter) - - def launch( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[Union[str, Path]] = None, - platform: str = "auto" - ) -> LifecycleResult: - """ - Launch an Agent service (build + deploy in one step). - - Orchestrates the complete strategy from source code to running service: - 1. Build the Docker image - 2. Deploy the service to the target platform - - Args: - config_dict: Configuration dictionary (optional) - config_file: Path to configuration file (optional) - platform: Build platform: "auto", "local", or "cloud" - - Returns: - LifecycleResult: Contains build_result and deploy_result with endpoint information - - Raises: - FileNotFoundError: Configuration file not found - ValueError: Invalid configuration - """ - try: - self.reporter.info("🚀 Starting launch operation...") - - # Step 1: Build the Docker image - self.reporter.info("📦 Step 1/2: Building image...") - build_result = self.build_executor.execute( - config_dict=config_dict, - config_file=config_file, - options=BuildOptions(platform=platform) - ) - - if not build_result.success: - self.logger.error(f"Build failed: {build_result.error}") - return LifecycleResult( - success=False, - operation="launch", - build_result=build_result, - error=f"Build failed: {build_result.error}", - error_code=build_result.error_code - ) - - # Build success is already reported by BuildExecutor, just log for audit trail - self.logger.info(f"Build completed: image={build_result.image.full_name if build_result.image else 'N/A'}") - - # Step 2: Deploy the service to target platform - self.reporter.info("🚢 Step 2/2: Deploying service...") - deploy_result = self.deploy_executor.execute( - config_dict=config_dict, - config_file=config_file - ) - - if not deploy_result.success: - self.logger.error(f"Deploy failed: {deploy_result.error}") - return LifecycleResult( - success=False, - operation="launch", - build_result=build_result, - deploy_result=deploy_result, - error=f"Deploy failed: {deploy_result.error}", - error_code=deploy_result.error_code - ) - - # Both build and deploy succeeded - endpoint = deploy_result.endpoint_url or deploy_result.container_id or "N/A" - self.reporter.success(f"🎉 Launch successful! Service endpoint: {endpoint}") - self.logger.info(f"Launch completed successfully: endpoint={endpoint}") - - return LifecycleResult( - success=True, - operation="launch", - build_result=build_result, - deploy_result=deploy_result, - metadata={ - "endpoint": endpoint, - "image": build_result.image.full_name if build_result.image else None - } - ) - - except Exception as e: - # Log exception for debugging; error reporting is handled by CLI layer - self.logger.exception(f"Launch execution error: {e}") - - error_info = self._handle_exception("Launch", e) - return LifecycleResult( - success=False, - operation="launch", - error=error_info.get("error"), - error_code=error_info.get("error_code") - ) - - def stop( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[Union[str, Path]] = None - ) -> LifecycleResult: - """ - Stop a running Agent service without removing resources. - - The service can be restarted later. Configuration and deployment metadata are preserved. - - Args: - config_dict: Configuration dictionary (optional) - config_file: Path to configuration file (optional) - - Returns: - LifecycleResult: Stop operation result - - Raises: - FileNotFoundError: Configuration file not found - ValueError: Invalid configuration or unknown launch_type - """ - try: - self.reporter.info("🛑 Stopping Agent service...") - - # Load configuration (priority: config_dict > config_file > default) - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - - # Extract launch_type to determine which strategy to use - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Using launch_type: {launch_type}") - - # Get the appropriate strategy (LocalStrategy, CloudStrategy, or HybridStrategy) - strategy = self._get_strategy(launch_type, config_manager=config) - - # Get strongly-typed strategy configuration object - strategy_config = self._get_strategy_config_object(config, launch_type) - - # Invoke strategy's stop method with both common and strategy-specific config - success = strategy.stop(common_config, strategy_config) - - if success: - self.reporter.success("✅ Service stopped") - self.logger.info("Service stopped successfully") - return LifecycleResult( - success=True, - operation="stop" - ) - else: - self.reporter.error("❌ Failed to stop service") - self.logger.error("Failed to stop service") - return LifecycleResult( - success=False, - operation="stop", - error="Failed to stop service", - error_code="STOP_FAILED" - ) - - except Exception as e: - # Log exception for debugging; error reporting is handled by CLI layer - self.logger.exception(f"Stop execution error: {e}") - - error_info = self._handle_exception("Stop", e) - return LifecycleResult( - success=False, - operation="stop", - error=error_info.get("error"), - error_code=error_info.get("error_code") - ) - - def destroy( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[Union[str, Path]] = None - ) -> LifecycleResult: - """ - Destroy Agent service and all associated resources. - - This is a destructive operation that stops the service and removes all resources: - - Local: Stops and removes containers, cleans up images - - Cloud: Terminates runtime instances and removes cloud resources - - Hybrid: Cleans up both local and cloud resources - - After successful destruction, deployment metadata is cleared from configuration. - - Args: - config_dict: Configuration dictionary (optional) - config_file: Path to configuration file (optional) - - Returns: - LifecycleResult: Destroy operation result - - Raises: - FileNotFoundError: Configuration file not found - ValueError: Invalid configuration or unknown launch_type - """ - try: - self.reporter.info("💥 Destroying Agent service and resources...") - - # Load configuration (priority: config_dict > config_file > default) - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - - # Extract launch_type to determine which strategy to use - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Using launch_type: {launch_type}") - - # Get the appropriate strategy (LocalStrategy, CloudStrategy, or HybridStrategy) - strategy = self._get_strategy(launch_type, config_manager=config) - - # Get strongly-typed strategy configuration object - strategy_config = self._get_strategy_config_object(config, launch_type) - - # Invoke strategy's destroy method with both common and strategy-specific config - success = strategy.destroy(common_config, strategy_config) - - # On successful destruction, clear deployment metadata from configuration - # This ensures the config is ready for a fresh deployment later - if success: - self._clear_deploy_config(config, launch_type) - self.reporter.success("✅ Service and resources destroyed") - self.reporter.info("✅ Configuration cleaned") - self.logger.info("Service and resources destroyed successfully") - return LifecycleResult( - success=True, - operation="destroy" - ) - else: - self.reporter.error("❌ Failed to destroy service") - self.logger.error("Failed to destroy service") - return LifecycleResult( - success=False, - operation="destroy", - error="Failed to destroy service", - error_code="DESTROY_FAILED" - ) - - except Exception as e: - # Log exception for debugging; error reporting is handled by CLI layer - self.logger.exception(f"Destroy execution error: {e}") - - error_info = self._handle_exception("Destroy", e) - return LifecycleResult( - success=False, - operation="destroy", - error=error_info.get("error"), - error_code=error_info.get("error_code") - ) diff --git a/agentkit/toolkit/executors/status_executor.py b/agentkit/toolkit/executors/status_executor.py deleted file mode 100644 index 056b1d2..0000000 --- a/agentkit/toolkit/executors/status_executor.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Status Executor - Unified orchestration for status query operations. - -This module provides a unified interface for querying deployment status across different -launch types (Local, Cloud, Hybrid). It handles configuration loading, strategy selection, -and error handling in a consistent manner. - -Key Responsibilities: -1. Load and validate configuration from dict or file -2. Select appropriate Strategy based on launch_type -3. Execute status query via Strategy.status() -4. Unified error handling and classification -5. Structured logging with context - -Design Principles: -- Immutability: Configuration is loaded once and passed through the chain -- Separation of Concerns: Each component has a single responsibility -- Reporter Injection: Progress tracking flows through Strategy → Runner chain -""" - -from typing import Optional, Dict, Any -from agentkit.toolkit.models import StatusResult -from agentkit.toolkit.reporter import Reporter -from .base_executor import BaseExecutor - - -class StatusExecutor(BaseExecutor): - """Orchestrates status query operations across deployment platforms. - - Inherits from BaseExecutor and provides unified status query execution: - - Configuration loading with priority: config_dict > config_file > default - - Strategy selection based on launch_type - - Unified error handling and exception classification - - Structured logging with context information - - Reporter injection for progress tracking - - The executor does NOT: - - Transform results (Strategy returns StatusResult directly) - - Handle user-facing error messages (delegated to CLI layer) - """ - - def __init__(self, reporter: Reporter = None): - """Initialize StatusExecutor. - - Args: - reporter: Reporter instance for progress tracking. Flows through - Strategy → Runner chain for unified progress reporting. - """ - super().__init__(reporter) - - def execute( - self, - config_dict: Optional[Dict[str, Any]] = None, - config_file: Optional[str] = None - ) -> StatusResult: - """Execute status query operation. - - Steps: - 1. Load and validate configuration (priority: config_dict > config_file > default) - 2. Extract common configuration and launch_type - 3. Select appropriate Strategy based on launch_type - 4. Retrieve strategy configuration object (read-only, skip template rendering) - 5. Execute status query via Strategy.status() - 6. Return result directly without transformation - - Args: - config_dict: Configuration dictionary (highest priority) - config_file: Path to configuration file - - Returns: - StatusResult: Status query result from Strategy (no transformation) - - Raises: - ConfigurationError: If configuration is invalid or missing required fields - StrategyError: If strategy selection or execution fails - Exception: Other execution errors are caught and converted to StatusResult - """ - try: - self.logger.info("Loading configuration...") - config = self._load_config(config_dict, config_file) - - common_config = config.get_common_config() - launch_type = common_config.launch_type - self.logger.info(f"Status strategy selected: {launch_type}") - - # Inject reporter into strategy for progress tracking through Strategy → Runner chain - strategy = self._get_strategy(launch_type, config_manager=config) - - # Status is a read-only operation; skip template rendering for performance - strategy_config = self._get_strategy_config_object(config, launch_type, skip_render=True) - - self.logger.info(f"Starting status query with {launch_type} strategy...") - result = strategy.status(common_config, strategy_config) - - if result.success: - self.logger.info(f"Status query completed: {result.status}") - else: - self.logger.error(f"Status query failed: {result.error} (code: {result.error_code})") - - return result - - except Exception as e: - # Log the error but don't output user-facing messages here. - # The CLI layer handles user-facing error messages to avoid duplication. - self.logger.exception(f"Status query execution error: {e}") - - error_info = self._handle_exception("Status query", e) - return StatusResult(**error_info) diff --git a/agentkit/toolkit/models.py b/agentkit/toolkit/models.py deleted file mode 100644 index 3a885fc..0000000 --- a/agentkit/toolkit/models.py +++ /dev/null @@ -1,524 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Unified model layer for all operations. - -This module defines unified result models for all operations (build, deploy, invoke, status, etc.), -replacing previous scattered implementations: -- workflows/models.py (BuildInfo, DeployInfo, etc.) -- core/models/ (BuildResult, DeployResult, etc.) - -Key design principle: Single source of truth - one model per operation type, eliminating -duplication and unnecessary conversions between layers. -""" - -from dataclasses import dataclass, field -from typing import Optional, Dict, Any, List -from datetime import datetime - - - -@dataclass -class ConfigUpdates: - """Configuration updates produced by Strategy execution. - - This class implements the immutability pattern: Strategy methods never modify the input - configuration objects. Instead, they record configuration changes via ConfigUpdates, - which the Executor then applies and persists to the configuration file. - - Design rationale: - - Strategies are pure functions that don't mutate state - - Configuration changes are captured and applied at the Executor layer - - This separation enables testing, composition, and clear responsibility boundaries - - Usage example: - ```python - # In Strategy - def build(self, common_config, workflow_config): - config_updates = ConfigUpdates() - - # Record auto-generated values that need to be persisted - if workflow_config.runtime_name == AUTO_CREATE_VE: - runtime_name = generate_runtime_name(...) - config_updates.add('runtime_name', runtime_name) - - # Perform build operation... - result = ... - result.config_updates = config_updates - return result - - # In Executor - result = strategy.build(...) - if result.config_updates: - self._apply_config_updates(config, launch_type, result.config_updates) - ``` - - Attributes: - updates: Dictionary of configuration key-value pairs to be updated - """ - - updates: Dict[str, Any] = field(default_factory=dict) - - def add(self, key: str, value: Any) -> 'ConfigUpdates': - """Record a configuration update. - - Args: - key: Configuration field name (as it appears in workflow config) - value: New value for the configuration field - - Returns: - self, enabling method chaining - - Example: - ```python - updates = ConfigUpdates() - updates.add('runtime_name', 'my-runtime') - .add('runtime_id', 'rt-123') - .add('image_id', 'sha256:abc') - ``` - """ - self.updates[key] = value - return self - - def has_updates(self) -> bool: - """Check if any configuration updates have been recorded. - - Returns: - True if updates exist, False otherwise - """ - return bool(self.updates) - - def get(self, key: str, default: Any = None) -> Any: - """Retrieve the update value for a specific configuration key. - - Args: - key: Configuration field name - default: Value to return if the key is not found - - Returns: - The update value, or default if not found - """ - return self.updates.get(key, default) - - def to_dict(self) -> Dict[str, Any]: - """Convert updates to a dictionary for persistence. - - Returns: - A copy of the updates dictionary - """ - return self.updates.copy() - - @classmethod - def from_dict(cls, data: Dict[str, Any]) -> 'ConfigUpdates': - """Create a ConfigUpdates instance from a dictionary. - - Args: - data: Dictionary of configuration updates - - Returns: - ConfigUpdates instance - """ - return cls(updates=data.copy()) - - def merge(self, other: 'ConfigUpdates') -> 'ConfigUpdates': - """Merge another ConfigUpdates into this one. - - Args: - other: Another ConfigUpdates instance to merge - - Returns: - self, enabling method chaining - - Note: - If keys overlap, values from 'other' will override existing values - """ - self.updates.update(other.updates) - return self - - def __repr__(self) -> str: - if not self.updates: - return "ConfigUpdates(no updates)" - return f"ConfigUpdates({len(self.updates)} updates: {list(self.updates.keys())})" - - def __len__(self) -> int: - return len(self.updates) - - def __contains__(self, key: str) -> bool: - return key in self.updates - - -# ============================================================================ -# Result models (Build, Deploy, Invoke, Status, etc.) -# ============================================================================ - -@dataclass -class ImageInfo: - """Image information (value object). - - Encapsulates all image-related information in a unified structure. All workflows - must use this model to eliminate inconsistent field names like cr_image_full_url, - full_image_name, etc. - - Attributes: - repository: Image repository address (without tag), e.g. "registry.com/namespace/app" - tag: Image tag, e.g. "v1.0", "latest" - digest: Image digest (optional), e.g. "sha256:abc123..." - """ - repository: str - tag: str - digest: Optional[str] = None - - @property - def full_name(self) -> str: - """Full image name in format repository:tag""" - return f"{self.repository}:{self.tag}" - - @property - def full_name_with_digest(self) -> str: - """Full image name with digest in format repository@digest""" - if self.digest: - return f"{self.repository}@{self.digest}" - return self.full_name - - def __str__(self) -> str: - return self.full_name - - -@dataclass -class BuildResult: - """Result of a build operation. - - All workflow implementations (local/cloud/hybrid) return this unified model from - their build() methods, eliminating previous duplication between BuildInfo and BuildResult. - - Design improvement: - - Before: Builder returned Tuple[bool, Dict] → Workflow converted to BuildInfo - → Service converted to BuildResult (multiple conversions) - - Now: Builder returns BuildResult directly → Workflow returns BuildResult directly - (single model, no conversions) - """ - success: bool - """Whether the build operation succeeded""" - - image: Optional[ImageInfo] = None - """Built image information (required if success=True)""" - - build_timestamp: Optional[datetime] = None - """Timestamp when build completed""" - - build_logs: List[str] = field(default_factory=list) - """Build logs from the build process""" - - build_duration_seconds: Optional[float] = None - """Build duration in seconds""" - - error: Optional[str] = None - """Error message (populated if success=False)""" - - error_code: Optional[str] = None - """Error code (populated if success=False), e.g. "BUILD_FAILED", "DEPENDENCY_MISSING""" - - warnings: List[str] = field(default_factory=list) - """Warning messages (may be present even if success=True)""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata (workflow-specific information)""" - - config_updates: Optional['ConfigUpdates'] = None - """Configuration updates produced by the Strategy (persisted by Executor)""" - - def __bool__(self) -> bool: - return self.success - - def has_warnings(self) -> bool: - return len(self.warnings) > 0 - - def __str__(self) -> str: - if self.success and self.image: - return f"BuildResult(success=True, image={self.image})" - elif self.success: - return "BuildResult(success=True)" - else: - return f"BuildResult(success=False, error={self.error_code or 'UNKNOWN'})" - - -@dataclass -class DeployResult: - """Result of a deploy operation. - - All workflow implementations return this unified model from their deploy() methods. - """ - success: bool - """Whether the deploy operation succeeded""" - - endpoint_url: Optional[str] = None - """Service endpoint URL (populated if success=True)""" - - service_id: Optional[str] = None - """Service ID (for cloud deployments)""" - - container_id: Optional[str] = None - """Container ID (for local deployments)""" - - container_name: Optional[str] = None - """Container name (for local deployments)""" - - deploy_timestamp: Optional[datetime] = None - """Timestamp when deployment completed""" - - error: Optional[str] = None - """Error message (populated if success=False)""" - - error_code: Optional[str] = None - """Error code (populated if success=False)""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata""" - - config_updates: Optional['ConfigUpdates'] = None - """Configuration updates produced by the Strategy (persisted by Executor)""" - - def __bool__(self) -> bool: - return self.success - - def __str__(self) -> str: - if self.success: - endpoint = self.endpoint_url or self.container_id or self.service_id - return f"DeployResult(success=True, endpoint={endpoint})" - else: - return f"DeployResult(success=False, error={self.error_code or 'UNKNOWN'})" - - -@dataclass -class InvokeResult: - """Result of an invoke operation. - - All workflow implementations return this unified model from their invoke() methods. - """ - success: bool - """Whether the invoke operation succeeded""" - - response: Any = None - """Response data (can be dict, generator, or other types)""" - - is_streaming: bool = False - """Whether the response is streaming""" - - response_time_ms: Optional[float] = None - """Response time in milliseconds""" - - status_code: Optional[int] = None - """HTTP status code (if applicable)""" - - error: Optional[str] = None - """Error message (populated if success=False)""" - - error_code: Optional[str] = None - """Error code (populated if success=False)""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata""" - - def __bool__(self) -> bool: - return self.success - - def stream(self): - """Get an iterator for streaming responses. - - Returns: - Iterator over the response data - - Raises: - ValueError: If is_streaming is False - """ - if not self.is_streaming: - raise ValueError("This is not a streaming response. Check is_streaming before calling stream().") - - # Check if response is iterable (generator, list, etc.) but not string/bytes/dict - if hasattr(self.response, '__iter__') and not isinstance(self.response, (str, bytes, dict)): - return self.response - else: - # Response is not iterable, return empty iterator - return iter([]) - - def __str__(self) -> str: - if self.success: - return f"InvokeResult(success=True, streaming={self.is_streaming})" - else: - return f"InvokeResult(success=False, error={self.error_code or 'UNKNOWN'})" - - -@dataclass -class StatusResult: - """Result of a status query operation. - - All workflow implementations return this unified model from their status() methods. - """ - success: bool - """Whether the status query succeeded""" - - status: Optional[str] = None - """Service status, e.g. "running", "stopped", "not_deployed""" - - endpoint_url: Optional[str] = None - """Service endpoint URL (if service is running)""" - - service_id: Optional[str] = None - """Service ID""" - - container_id: Optional[str] = None - """Container ID (for local deployments)""" - - uptime_seconds: Optional[int] = None - """Service uptime in seconds""" - - health: Optional[str] = None - """Health status, e.g. "healthy", "unhealthy""" - - error: Optional[str] = None - """Error message (populated if success=False)""" - - error_code: Optional[str] = None - """Error code""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata""" - - def __bool__(self) -> bool: - return self.success - - def is_running(self) -> bool: - return self.success and self.status == "running" - - def __str__(self) -> str: - if self.success: - return f"StatusResult(success=True, status={self.status})" - else: - return f"StatusResult(success=False, error={self.error_code or 'UNKNOWN'})" - - -@dataclass -class LifecycleResult: - """Result of a lifecycle operation (launch/stop/destroy). - - Used for composite operations that combine multiple lower-level operations. - """ - success: bool - """Whether the lifecycle operation succeeded""" - - operation: str = "" - """Operation type, e.g. "launch", "stop", "destroy""" - - build_result: Optional[BuildResult] = None - """Build result (populated for launch operations)""" - - deploy_result: Optional[DeployResult] = None - """Deploy result (populated for launch operations)""" - - error: Optional[str] = None - """Error message""" - - error_code: Optional[str] = None - """Error code""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata""" - - def __bool__(self) -> bool: - return self.success - - def __str__(self) -> str: - if self.success: - return f"LifecycleResult(success=True, operation={self.operation})" - else: - return f"LifecycleResult(success=False, operation={self.operation}, error={self.error_code})" - - -@dataclass -class AgentFileInfo: - """Information about a file generated by Agent. - - Used to record details about generated files. - """ - path: str - """File path""" - - content: Optional[str] = None - """File content""" - - file_type: Optional[str] = None - """File type""" - - created: bool = False - """Whether this is a newly created file""" - - def __str__(self) -> str: - return f"AgentFileInfo(path={self.path}, created={self.created})" - - -@dataclass -class InitResult: - """Result of an init operation. - - Used for the init command result. - """ - success: bool - """Whether the init operation succeeded""" - - project_path: Optional[str] = None - """Project path""" - - project_name: Optional[str] = None - """Project name""" - - template: Optional[str] = None - """Template used for initialization""" - - config_file: Optional[str] = None - """Path to the generated configuration file""" - - created_files: List[str] = field(default_factory=list) - """List of created files""" - - error: Optional[str] = None - """Error message""" - - error_code: Optional[str] = None - """Error code""" - - metadata: Dict[str, Any] = field(default_factory=dict) - """Additional metadata""" - - def __bool__(self) -> bool: - return self.success - - def __str__(self) -> str: - if self.success: - return f"InitResult(success=True, project_path={self.project_path})" - else: - return f"InitResult(success=False, error={self.error_code})" - - -__all__ = [ - "ConfigUpdates", - "ImageInfo", - "BuildResult", - "DeployResult", - "InvokeResult", - "StatusResult", - "LifecycleResult", - "InitResult", - "AgentFileInfo", -] diff --git a/agentkit/toolkit/reporter.py b/agentkit/toolkit/reporter.py deleted file mode 100644 index 3ecaedd..0000000 --- a/agentkit/toolkit/reporter.py +++ /dev/null @@ -1,354 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Reporter interface - UI abstraction layer. - -Reporter decouples Builder/Runner from UI implementation details. - -Design Problem Solved: -- Previously: Builder/Runner had hardcoded console.print() calls -- Issue: Could not be used in SDK without unwanted console output -- Issue: Difficult to test - -Current Solution: -- Builder/Runner depends on abstract Reporter interface -- CLI uses ConsoleReporter (Rich output) -- SDK uses SilentReporter (silent mode) -- Tests use MockReporter -""" - -from abc import ABC, abstractmethod -from typing import Optional, List -from contextlib import contextmanager -import logging - - -class TaskHandle(ABC): - """ - Abstract interface for long-running task progress tracking. - - Returned by Reporter.long_task() to allow callers to update progress - and status information during long operations (e.g., build, deployment). - """ - - @abstractmethod - def update(self, description: Optional[str] = None, completed: Optional[float] = None): - """ - Update task progress and description. - - Args: - description: Updated task description (optional) - completed: Completed progress value (optional) - """ - pass - - -class Reporter(ABC): - """ - Abstract interface for progress and message reporting. - - Builder/Runner components report through this interface: - - Informational messages - - Progress updates - - User interactions - - Different implementations serve different contexts: - - ConsoleReporter: Output to console (CLI) - - SilentReporter: Silent mode (SDK) - - LoggingReporter: Output to Python logging - - MockReporter: For testing - """ - - @abstractmethod - def info(self, message: str, **kwargs): - """ - Report an informational message. - - Args: - message: Message content - **kwargs: Additional parameters (implementation-specific) - """ - pass - - @abstractmethod - def success(self, message: str, **kwargs): - """ - Report a success message. - - Args: - message: Message content - **kwargs: Additional parameters - """ - pass - - @abstractmethod - def warning(self, message: str, **kwargs): - """ - Report a warning message. - - Args: - message: Message content - **kwargs: Additional parameters - """ - pass - - @abstractmethod - def error(self, message: str, **kwargs): - """ - Report an error message. - - Args: - message: Message content - **kwargs: Additional parameters - """ - pass - - @abstractmethod - def progress(self, message: str, current: int, total: int = 100, **kwargs): - """ - Report progress with percentage calculation. - - Args: - message: Progress description - current: Current progress value - total: Total progress value (default: 100) - **kwargs: Additional parameters - - Example: - reporter.progress("Downloading", 50, 100) # 50% - reporter.progress("Waiting", 30, 100) # 30% - """ - pass - - @abstractmethod - def confirm(self, message: str, default: bool = False, **kwargs) -> bool: - """ - Request user confirmation. - - Args: - message: Confirmation prompt - default: Default value if user presses Enter without input - **kwargs: Additional parameters - - Returns: - User's choice (True/False) - - Example: - if reporter.confirm("Continue?", default=True): - # User confirmed - - Note: - - CLI implementations wait for user input - - Silent implementations return default immediately - """ - pass - - @contextmanager - @abstractmethod - def long_task(self, description: str, total: float = 100): - """ - Context manager for long-running task progress tracking. - - Displays progress for operations that take significant time - (e.g., build, deployment, download). - - Args: - description: Task description - total: Total progress value (used for percentage calculation) - - Yields: - TaskHandle: Handle to update progress during execution - - Example: - with reporter.long_task("Building image", total=600) as task: - while not_finished: - status = check_status() - task.update(description=f"Status: {status}", completed=elapsed_time) - time.sleep(1) - - Note: - - CLI implementations display progress bar - - Silent implementations produce no output - """ - pass - - @abstractmethod - def show_logs(self, title: str, lines: List[str], max_lines: int = 100): - """ - Display multi-line log content. - - Used to show build logs, error logs, and other multi-line text output. - - Args: - title: Log section title - lines: List of log lines - max_lines: Maximum lines to display (excess lines are truncated with notice) - - Example: - with open("build.log") as f: - lines = f.readlines() - reporter.show_logs("Build Log", lines, max_lines=100) - - Note: - - CLI implementations format output to console - - Silent implementations produce no output - """ - pass - - -class _SilentTaskHandle(TaskHandle): - """Silent task handle that produces no output.""" - - def update(self, description: Optional[str] = None, completed: Optional[float] = None): - """No-op: silent mode produces no output.""" - pass - - -class SilentReporter(Reporter): - """ - Silent reporter implementation for SDK usage. - - All methods are no-ops. This is the default Reporter for Builder/Runner - components when used in SDK mode (non-interactive). The confirm() method - automatically returns the default value without user interaction. - """ - - def info(self, message: str, **kwargs): - """No-op: silent mode produces no output.""" - pass - - def success(self, message: str, **kwargs): - """No-op: silent mode produces no output.""" - pass - - def warning(self, message: str, **kwargs): - """No-op: silent mode produces no output.""" - pass - - def error(self, message: str, **kwargs): - """No-op: silent mode produces no output.""" - pass - - def progress(self, message: str, current: int, total: int = 100, **kwargs): - """No-op: silent mode produces no output.""" - pass - - def confirm(self, message: str, default: bool = False, **kwargs) -> bool: - """Return default value without user interaction (non-interactive mode).""" - return default - - @contextmanager - def long_task(self, description: str, total: float = 100): - """Yield a silent task handle that produces no output.""" - yield _SilentTaskHandle() - - def show_logs(self, title: str, lines: List[str], max_lines: int = 100): - """No-op: silent mode produces no output.""" - pass - - -class _LoggingTaskHandle(TaskHandle): - """Task handle that logs progress to Python logging system.""" - - def __init__(self, logger: logging.Logger, description: str, total: float): - self.logger = logger - self.description = description - self.total = total - - def update(self, description: Optional[str] = None, completed: Optional[float] = None): - """Log progress update with percentage calculation.""" - if description: - self.description = description - if completed is not None: - percentage = int((completed / self.total) * 100) if self.total > 0 else 0 - self.logger.info(f"{self.description} ({percentage}%)") - - -class LoggingReporter(Reporter): - """ - Reporter implementation that outputs to Python logging system. - - All messages are logged using the standard logging module. This is suitable - for server-side scenarios, debugging, and environments where structured - logging is preferred over interactive console output. - - Example: - reporter = LoggingReporter(logger=my_logger) - reporter.info("Starting build") # Logs to configured logger - """ - - def __init__(self, logger: Optional[logging.Logger] = None): - """ - Initialize logging reporter. - - Args: - logger: Logger instance. If None, uses the module's default logger. - """ - self.logger = logger or logging.getLogger(__name__) - - def info(self, message: str, **kwargs): - """Log message at INFO level.""" - self.logger.info(message) - - def success(self, message: str, **kwargs): - """Log success message at INFO level with success indicator.""" - self.logger.info(f"✓ {message}") - - def warning(self, message: str, **kwargs): - """Log message at WARNING level.""" - self.logger.warning(message) - - def error(self, message: str, **kwargs): - """Log message at ERROR level.""" - self.logger.error(message) - - def progress(self, message: str, current: int, total: int = 100, **kwargs): - """Log progress with percentage calculation at INFO level.""" - percentage = int((current / total) * 100) if total > 0 else 0 - self.logger.info(f"{message} ({percentage}%)") - - def confirm(self, message: str, default: bool = False, **kwargs) -> bool: - """ - Log confirmation request and return default value. - - In logging mode, true user interaction is not possible, so the default - value is returned automatically. The request is logged for audit purposes. - """ - self.logger.warning(f"Auto-confirm: {message} -> {default}") - return default - - @contextmanager - def long_task(self, description: str, total: float = 100): - """Log long-running task progress.""" - self.logger.info(f"Task started: {description}") - yield _LoggingTaskHandle(self.logger, description, total) - self.logger.info(f"Task completed: {description}") - - def show_logs(self, title: str, lines: List[str], max_lines: int = 100): - """Log multi-line content with line numbers and truncation notice.""" - self.logger.info(f"=== {title} ===") - for i, line in enumerate(lines[:max_lines], 1): - self.logger.info(f"{i:3d}: {line.rstrip()}") - if len(lines) > max_lines: - self.logger.info(f"... ({len(lines) - max_lines} more lines)") - - -# Public API -__all__ = [ - "TaskHandle", - "Reporter", - "SilentReporter", - "LoggingReporter", -] diff --git a/agentkit/toolkit/resources/samples/basic.py b/agentkit/toolkit/resources/samples/basic.py deleted file mode 100644 index 9b6035b..0000000 --- a/agentkit/toolkit/resources/samples/basic.py +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' -**simple agent demo app** - -Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur: -- MODEL_AGENT_NAME # model id in Volcano Engine Ark platform -- MODEL_AGENT_API_KEY # model api key in Volcano Engine Ark platform - -MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform. -''' -import logging - -from veadk import Agent, Runner - -from agentkit.apps import AgentkitSimpleApp -from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION - -logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) - - -app = AgentkitSimpleApp() - -agent_name = "{{ agent_name | default('Agent') }}" -{% if description %}description = "{{ description }}" {% else %}description = DEFAULT_DESCRIPTION {% endif %} -{% if system_prompt %}system_prompt = "{{ system_prompt }}" {% else %}system_prompt = DEFAULT_INSTRUCTION {% endif %} -{% if model_name %}model_name = "{{ model_name }}"{% endif %} - -tools = [] -{% if tools %} -{% if 'web_search' in tools %} -from veadk.tools.builtin_tools.web_search import web_search -tools.append(web_search) -{% endif %} -{% if 'run_code' in tools %} -from veadk.tools.builtin_tools.run_code import run_code -tools.append(run_code) -{% endif %} -{% if 'get_weather' in tools %} -# from veadk.tools.builtin_tools.get_weather import get_weather -# tools.append(get_weather) -{% endif %} -{% else %} -# from veadk.tools.builtin_tools.web_search import web_search -# tools.append(web_search) -{% endif %} - -agent = Agent( - name=agent_name, - description=description, - instruction=system_prompt, -{%- if model_name %} - model_name=model_name, -{%- endif %} - tools=tools, -) -runner = Runner(agent=agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id) - - logger.info(f"Run response: {response}") - return response - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) - diff --git a/agentkit/toolkit/resources/samples/basic_stream.py b/agentkit/toolkit/resources/samples/basic_stream.py deleted file mode 100644 index c58107e..0000000 --- a/agentkit/toolkit/resources/samples/basic_stream.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -import logging - -from google.adk.agents import RunConfig -from google.adk.agents.run_config import StreamingMode -from google.genai.types import Content, Part -from veadk import Agent, Runner - -from agentkit.apps import AgentkitSimpleApp -from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION - -logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) - -app = AgentkitSimpleApp() - -app_name = "simple_streamable_app" - -agent_name = "{{ agent_name | default('Agent') }}" -{% if description %}description = "{{ description }}" {% else %}description = DEFAULT_DESCRIPTION {% endif %} -{% if system_prompt %}system_prompt = "{{ system_prompt }}" {% else %}system_prompt = DEFAULT_INSTRUCTION {% endif %} -{% if model_name %}model_name = "{{ model_name }}"{% endif %} - -tools = [] -{% if tools %} -{% if 'web_search' in tools %} -from veadk.tools.builtin_tools.web_search import web_search -tools.append(web_search) -{% endif %} -{% if 'run_code' in tools %} -from veadk.tools.builtin_tools.run_code import run_code -tools.append(run_code) -{% endif %} -{% if 'get_weather' in tools %} -# from veadk.tools.builtin_tools.get_weather import get_weather -# tools.append(get_weather) -{% endif %} -{% else %} -# from veadk.tools.builtin_tools.web_search import web_search -# tools.append(web_search) -{% endif %} - -agent = Agent( - name=agent_name, - description=description, - instruction=system_prompt, -{%- if model_name %} - model_name=model_name, -{%- endif %} - tools=tools, -) -agent.model._additional_args["stream_options"] = {"include_usage": True} -runner = Runner(agent=agent, app_name=app_name) - - -@app.entrypoint -async def run(payload: dict, headers: dict): - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - - session_service = runner.short_term_memory.session_service # type: ignore - - # prevent session recreation - session = await session_service.get_session( - app_name=app_name, user_id=user_id, session_id=session_id - ) - if not session: - await session_service.create_session( - app_name=app_name, user_id=user_id, session_id=session_id - ) - - new_message = Content(role="user", parts=[Part(text=prompt)]) - try: - async for event in runner.run_async( - user_id=user_id, - session_id=session_id, - new_message=new_message, - run_config=RunConfig(streaming_mode=StreamingMode.SSE), - ): - # Format as SSE data - sse_event = event.model_dump_json(exclude_none=True, by_alias=True) - logger.debug("Generated event in agent run streaming: %s", sse_event) - yield f"data: {sse_event}\n\n" - except Exception as e: - logger.exception("Error in event_generator: %s", e) - # You might want to yield an error event here - error_data = json.dumps({"error": str(e)}) - yield f'data: {error_data}\n\n' - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) diff --git a/agentkit/toolkit/resources/samples/customer_support_assistant.py b/agentkit/toolkit/resources/samples/customer_support_assistant.py deleted file mode 100644 index cb98a5e..0000000 --- a/agentkit/toolkit/resources/samples/customer_support_assistant.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO -if __name__ == "__main__": - pass diff --git a/agentkit/toolkit/resources/samples/financial_analyst.py b/agentkit/toolkit/resources/samples/financial_analyst.py deleted file mode 100644 index 829d6da..0000000 --- a/agentkit/toolkit/resources/samples/financial_analyst.py +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' -Financial Analyst Agent -Before Running: -1. Set the following environment variables: - - MODEL_AGENT_NAME - - MODEL_AGENT_API_KEY - - TOOL_AKSHARE_URL - - TOOL_EMAIL_URL -2. Run the following command: - - python financial_analyst.py -''' - -import logging -from datetime import datetime -from os import getenv - -from google.adk.tools import MCPToolset -from veadk.knowledgebase.knowledgebase import KnowledgeBase -from veadk.memory.long_term_memory import LongTermMemory -from veadk.memory.short_term_memory import ShortTermMemory -from veadk.tools.sandbox.code_sandbox import code_sandbox -from veadk.utils.mcp_utils import get_mcp_params -from veadk import Agent, Runner -# from veadk.tracing.telemetry.exporters.tls_exporter import TLSExporter -# from veadk.tracing.telemetry.opentelemetry_tracer import OpentelemetryTracer -# from veadk.tracing.telemetry.exporters.cozeloop_exporter import CozeloopExporter -# from veadk.tracing.telemetry.exporters.apmplus_exporter import APMPlusExporter - -from agentkit.apps import AgentkitSimpleApp - -from .agent import agent - -logger = logging.getLogger(__name__) -app = AgentkitSimpleApp() - -# 1. memory and knowledge -short_term_memory = ShortTermMemory(backend="local") -long_term_memory = LongTermMemory(backend="viking", app_name='financial') -knowledge_base = KnowledgeBase(backend="viking", app_name='financial') - -# 2. tools -tools = [] -tools.append(code_sandbox) -# tools.append(web_search) - - -# akshare 数据查询 -ak_share_url = getenv("TOOL_AKSHARE_URL") -if ak_share_url is not None and ak_share_url != "": - tools.append(MCPToolset( - connection_params=get_mcp_params(url=ak_share_url), - )) - -# 邮件发送 -email_share_url = getenv("TOOL_EMAIL_URL") -if email_share_url is not None and email_share_url != "": - tools.append(MCPToolset( - connection_params=get_mcp_params(url=email_share_url), - )) - - -# 获取当前时间 -def get_current_time(): - """获取当前时间""" - return datetime.now().strftime("%Y-%m-%d %H:%M:%S") - - -tools.append(get_current_time) - -# async def explicit_save_report_to_memory(report_content: str, tool_context: ToolContext): -# """保存报告到长期记忆. Call this function only if user explicitly requests to save""" -# await long_term_memory.add_session_to_memory(tool_context._invocation_context.session) -# tools.append(explicit_save_report_to_memory) - -# 3. tracing -# exporters = [CozeloopExporter(), TLSExporter(), APMPlusExporter()] -# tracer = OpentelemetryTracer(exporters=exporters) - -# 4. setup agent -agent: Agent = Agent( - name="financial_analysis_agent", - description="财务分析师", - instruction=""" - 你是一个财务分析师,可以调用各种工具,完成用户指定给你的财务分析任务。当你接收到任务时,可以按照如下步骤执行: - 1. 首先分析一下用户的问题,提取出任务目标,如果在此过程中,有遇到模糊不清的问题,可以提问让用户补充 - 2. 根据任务目标,调用工具进行数据查询和检索。你应该尽可能调用工具来获取数据,当你查询不到数据时,请不要生成假的模拟数据。 - 3. 对于查询到的数据,当有需要时你可以执行Python代码对其进行二次分析 - 4. 分析一下现有的数据和分析结果,是否还有缺失,如果有缺失,则重复2~4步骤 - 5. 当现有的数据和分析结果能够满足任务目标之后,生成一篇专业详细的Markdown格式分析报告,报告中的每处数据,都要标注来源,并在报告最后附带免责声明 - """, - tools=tools, - knowledgebase=knowledge_base, - long_term_memory=long_term_memory, - short_term_memory=short_term_memory, - # tracers=[tracer] -) - -runner = Runner(agent=agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id) - - logger.info(f"Run response: {response}") - return response - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) diff --git a/agentkit/toolkit/resources/samples/simple_a2a_veadk.py b/agentkit/toolkit/resources/samples/simple_a2a_veadk.py deleted file mode 100644 index 977c23f..0000000 --- a/agentkit/toolkit/resources/samples/simple_a2a_veadk.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging - -from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor -from veadk import Agent, Runner -from veadk.a2a.agent_card import get_agent_card -from veadk.tools.demo_tools import get_city_weather - -from agentkit.apps import AgentkitA2aApp - -logger = logging.getLogger(__name__) - - -a2a_app = AgentkitA2aApp() - -app_name = "weather_reporter" -agent = Agent(tools=[get_city_weather]) -runner = Runner(agent=agent) - - -@a2a_app.agent_executor(runner=runner) -class MyAgentExecutor(A2aAgentExecutor): - """Use Google ADK A2aAgentExecutor directly.""" - - pass - - -if __name__ == "__main__": - a2a_app.run( - agent_card=get_agent_card(agent=agent, url="http://0.0.0.0:8000"), - host="0.0.0.0", - port=8000, - ) diff --git a/agentkit/toolkit/resources/samples/simple_app_veadk.py b/agentkit/toolkit/resources/samples/simple_app_veadk.py deleted file mode 100644 index 10f1b1a..0000000 --- a/agentkit/toolkit/resources/samples/simple_app_veadk.py +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' -**simple agent demo app with veadk and apmplus** - -Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur: -- MODEL_AGENT_API_KEY -- OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY -- OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT -- OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME - -MODEL_AGENT_API_KEY is used to access the model service of the Volcano Engine Ark platform. -The remaining three variables are used to set up the observable services of APMPLUS - -''' - -import logging - -from veadk import Agent, Runner -# from veadk.tools.demo_tools import get_city_weather -from veadk.tracing.telemetry.exporters.apmplus_exporter import APMPlusExporter -from veadk.tracing.telemetry.opentelemetry_tracer import OpentelemetryTracer - -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) - - -app = AgentkitSimpleApp() - -tracer = OpentelemetryTracer(exporters=[APMPlusExporter()]) -agent = Agent(tracers=[tracer]) -runner = Runner(agent=agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id) - - logger.info(f"Run response: {response}") - return response - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) \ No newline at end of file diff --git a/agentkit/toolkit/resources/samples/simple_mcp_veadk.py b/agentkit/toolkit/resources/samples/simple_mcp_veadk.py deleted file mode 100644 index 1e2b063..0000000 --- a/agentkit/toolkit/resources/samples/simple_mcp_veadk.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging - -from veadk import Agent, Runner -from veadk.a2a.agent_card import get_agent_card -from veadk.tools.demo_tools import get_city_weather - -from agentkit.apps import AgentkitMCPApp - -logger = logging.getLogger(__name__) - - -mcp_app = AgentkitMCPApp() - - -# add an agent as a tool -APP_NAME = "mcp_sample_app" - -agent = Agent( - tools=[get_city_weather], description="An agent that provides weather information." -) - -runner = Runner(agent=agent, app_name=APP_NAME) - - -@mcp_app.agent_as_a_tool -async def run_agent( - user_input: str, - user_id: str = "mcp_user", - session_id: str = "mcp_session", -) -> str: - # Set user_id for runner - runner.user_id = user_id - - # Running agent and get final output - final_output = await runner.run( - messages=user_input, - session_id=session_id, - ) - return final_output - - -@mcp_app.tool -async def agent_card() -> dict: - agent_card = get_agent_card(agent=agent, url="0.0.0.0:8000") - - return agent_card.model_dump() - - -if __name__ == "__main__": - mcp_app.run(host="0.0.0.0", port=8000) \ No newline at end of file diff --git a/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 b/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 deleted file mode 100644 index e92873a..0000000 --- a/agentkit/toolkit/resources/templates/code-pipeline-tos-cr-step.j2 +++ /dev/null @@ -1,52 +0,0 @@ -version: 1.0.0 -agentPool: public/prod-v2-public -stages: - - stage: stage-c1 - displayName: TOS文件下载 - tasks: - - task: task-c3 - displayName: 镜像构建推送至镜像仓库 - timeout: 2h - steps: - - step: step-c5 - displayName: TOS 下载 - component: artifact@1.0.0/tos-download - inputs: - bucketName: {{ bucket_name }} - bucketRegion: {{ bucket_region }} - path: $TOS_PROJECT_FILE_PATH - targetPath: $DOWNLOAD_PATH - - step: step-c6 - displayName: 命令执行 - component: execCmd@1.0.0/shell - inputs: - cmd: |- - mkdir -p $PROJECT_ROOT_DIR - tar -zxvf $DOWNLOAD_PATH/$TOS_PROJECT_FILE_NAME -C $PROJECT_ROOT_DIR - shell: BASH - - step: step-c4 - displayName: 镜像构建推送至镜像仓库服务 - component: build@2.0.0/buildkit-cr@3.0.0 - inputs: - compression: gzip - contextPath: $PROJECT_ROOT_DIR - crDomain: $CR_DOMAIN - crNamespace: $CR_NAMESPACE - crRegion: $CR_REGION - crRegistryInstance: $CR_INSTANCE - crRepo: $CR_OCI - crTag: $CR_TAG - disableSSLVerify: true - dockerfiles: - default: - path: $DOCKERFILE_PATH - loginCredential: [] - useCache: false - outputs: - - imageOutput_step-c4 - workspace: {} - resourcesPolicy: all - resources: - limits: - cpu: 4C - memory: 8Gi \ No newline at end of file diff --git a/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 b/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 deleted file mode 100644 index 43517db..0000000 --- a/agentkit/toolkit/resources/templates/golang/Dockerfile.j2 +++ /dev/null @@ -1,55 +0,0 @@ -# Build stage - 支持自定义构建镜像 -{% if base_image_builder %} -FROM {{ base_image_builder }} AS builder -{% else %} -FROM agentkit-stg-cn-beijing.cr.volces.com/agentkit-cli/compile_basego:1.23 AS builder -{% endif %} - -WORKDIR /src - -# copy full build context -COPY . . - -# build-time args to control where the build places the binary -ARG BUILD_OUTPUT_DIR=/app -ARG BUILD_BINARY_NAME={{ binary_name }} - -ENV GO_VERSION=1.23 \ - GOPATH=/go \ - PATH=/usr/local/go/bin:/go/bin:$PATH \ - GO111MODULE=on \ - GOPROXY=https://goproxy.cn,direct \ - BUILD_OUTPUT_DIR=${BUILD_OUTPUT_DIR} \ - BUILD_BINARY_NAME=${BUILD_BINARY_NAME} - -# download modules if go.mod present -RUN if [ -f go.mod ]; then go mod download; fi - -# 执行自定义构建脚本(如需安装编译依赖、证书等) -{% if build_script %} -RUN chmod +x {{ build_script }} && /bin/bash {{ build_script }} -{% endif %} - -# If entry is a build script (e.g. src//build.sh), run it. -# Otherwise treat entry_relative_path as a package/directory and run go build on it. -{% if entry_relative_path.endswith('.sh') %} -# ensure output dir exists before running script (script may rely on it) -RUN mkdir -p ${BUILD_OUTPUT_DIR} && /bin/bash {{ entry_relative_path }} -{% else %} -# treat entry_relative_path as package/directory (may be e.g. src/ or src//pkg) -RUN mkdir -p ${BUILD_OUTPUT_DIR} && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ${BUILD_OUTPUT_DIR}/${BUILD_BINARY_NAME} {{ entry_relative_path }} -{% endif %} - -# Runtime stage - 支持自定义运行时镜像 -{% if base_image_runtime %} -FROM {{ base_image_runtime }} -{% else %} -FROM agentkit-stg-cn-beijing.cr.volces.com/agentkit-cli/runtime_basego:latest -{% endif %} - -# put binary into a standard location; use the same build-time args to locate artifact -ARG BUILD_OUTPUT_DIR=/app -ARG BUILD_BINARY_NAME={{ binary_name }} -COPY --from=builder ${BUILD_OUTPUT_DIR}/${BUILD_BINARY_NAME} /usr/local/bin/{{ binary_name }} - -CMD ["/usr/local/bin/{{ binary_name }}"] \ No newline at end of file diff --git a/agentkit/toolkit/resources/templates/python/Dockerfile.j2 b/agentkit/toolkit/resources/templates/python/Dockerfile.j2 deleted file mode 100644 index d710855..0000000 --- a/agentkit/toolkit/resources/templates/python/Dockerfile.j2 +++ /dev/null @@ -1,38 +0,0 @@ -# 支持自定义基础镜像 -{% if base_image %} -FROM {{ base_image }} -{% else %} -FROM agentkit-cn-beijing.cr.volces.com/base/py-simple:python{{ language_version }}-bookworm-slim-latest -{% endif %} - -ENV UV_SYSTEM_PYTHON=1 UV_COMPILE_BYTECODE=1 PYTHONUNBUFFERED=1 DOCKER_CONTAINER=1 - -{% if dependencies_file %} -{% if dependencies_install_path %} -COPY {{ dependencies_install_path }} {{ dependencies_install_path }} -{% else %} -COPY {{ dependencies_file }} {{ dependencies_file }} -{% endif %} -{% endif %} - -{% if dependencies_file or observability_enabled %} -RUN {% if dependencies_file %}{% if dependencies_install_path %}uv pip install {{ dependencies_install_path }}{% else %}uv pip install -r {{ dependencies_file }}{% endif %}{% endif %}{% if observability_enabled %}{% if dependencies_file %} && \ - {% endif %}{% endif %} -{% endif %} - -# 执行自定义构建脚本(如需安装系统依赖、编译C扩展等) -{% if build_script %} -COPY {{ build_script }} /tmp/build_script.sh -RUN chmod +x /tmp/build_script.sh && /tmp/build_script.sh && rm /tmp/build_script.sh -{% endif %} - -EXPOSE 8000 - -WORKDIR /app - -# Copy entire project -{% if not dependencies_install_path or dependencies_install_path != '.' %} -COPY . . -{% endif %} - -CMD ["python", "-m", "{{ agent_module_path }}"] diff --git a/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 b/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 deleted file mode 100644 index 0472490..0000000 --- a/agentkit/toolkit/resources/wrappers/wrapper_basic.py.jinja2 +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' -**AgentKit Wrapper for User-Defined Agent** - -This file wraps your Agent definition ({{ agent_file_name }}) to make it deployable with AgentKit. - -Your Agent is imported from: {{ agent_module_name }} -Agent variable: {{ agent_var_name }} -''' -import logging - -# Import user's Agent definition -from {{ agent_module_name }} import {{ agent_var_name }} - -from veadk import Runner -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) - - -app = AgentkitSimpleApp() - -# Use user's Agent -runner = Runner(agent={{ agent_var_name }}) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - """ - Main entrypoint for the Agent. - - This wrapper handles the standard AgentKit request/response protocol - and delegates to your Agent for processing. - """ - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - - logger.info(f"Run response: {response}") - return response - - -@app.ping -def ping() -> str: - """Health check endpoint.""" - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) diff --git a/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 b/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 deleted file mode 100644 index 8ac2385..0000000 --- a/agentkit/toolkit/resources/wrappers/wrapper_stream.py.jinja2 +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -''' -**AgentKit Streaming Wrapper for User-Defined Agent** - -This file wraps your Agent definition ({{ agent_file_name }}) to make it deployable with AgentKit. -This wrapper provides streaming response capabilities using SSE (Server-Sent Events). - -Your Agent is imported from: {{ agent_module_name }} -Agent variable: {{ agent_var_name }} -''' -import json -import logging - -# Import user's Agent definition -from {{ agent_module_name }} import {{ agent_var_name }} - -from google.adk.agents import RunConfig -from google.adk.agents.run_config import StreamingMode -from google.genai.types import Content, Part -from veadk import Runner -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) -logger.setLevel(logging.INFO) - - -app = AgentkitSimpleApp() -app_name = "{{ app_name }}" - -# Configure user's Agent for streaming -{{ agent_var_name }}.model._additional_args["stream_options"] = {"include_usage": True} - -# Use user's Agent with streaming support -runner = Runner(agent={{ agent_var_name }}, app_name=app_name) - - -@app.entrypoint -async def run(payload: dict, headers: dict): - """ - Main entrypoint for the Agent with streaming support. - - This wrapper handles the standard AgentKit request/response protocol - with SSE streaming and delegates to your Agent for processing. - """ - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - - session_service = runner.short_term_memory.session_service # type: ignore - - # Prevent session recreation - session = await session_service.get_session( - app_name=app_name, user_id=user_id, session_id=session_id - ) - if not session: - await session_service.create_session( - app_name=app_name, user_id=user_id, session_id=session_id - ) - - new_message = Content(role="user", parts=[Part(text=prompt)]) - - try: - async for event in runner.run_async( - user_id=user_id, - session_id=session_id, - new_message=new_message, - run_config=RunConfig(streaming_mode=StreamingMode.SSE), - ): - # Format as SSE data - sse_event = event.model_dump_json(exclude_none=True, by_alias=True) - logger.debug("Generated event in agent run streaming: %s", sse_event) - yield f"data: {sse_event}\n\n" - except Exception as e: - logger.exception("Error in event_generator: %s", e) - # Yield error event - error_data = json.dumps({"error": str(e)}) - yield f'data: {error_data}\n\n' - - -@app.ping -def ping() -> str: - """Health check endpoint.""" - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) diff --git a/agentkit/toolkit/runners/__init__.py b/agentkit/toolkit/runners/__init__.py deleted file mode 100644 index 8182368..0000000 --- a/agentkit/toolkit/runners/__init__.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Runners - Runner implementations for deploying and managing agent services. - -Implementations: -- LocalDockerRunner: Deploy and manage containers locally using Docker -- VeAgentkitRuntimeRunner: Deploy and manage runtimes on Volcano Engine cloud platform -""" - -# Use lazy imports to avoid dependency issues at import time -def __getattr__(name): - if name == "Runner": - from .base import Runner - return Runner - elif name == "LocalDockerRunner": - from .local_docker import LocalDockerRunner - return LocalDockerRunner - elif name == "LocalDockerRunnerConfig": - from .local_docker import LocalDockerRunnerConfig - return LocalDockerRunnerConfig - elif name == "VeAgentkitRuntimeRunner": - from .ve_agentkit import VeAgentkitRuntimeRunner - return VeAgentkitRuntimeRunner - elif name == "VeAgentkitRunnerConfig": - from .ve_agentkit import VeAgentkitRunnerConfig - return VeAgentkitRunnerConfig - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - -__all__ = [ - "Runner", - "LocalDockerRunner", - "LocalDockerRunnerConfig", - "VeAgentkitRuntimeRunner", - "VeAgentkitRunnerConfig", -] diff --git a/agentkit/toolkit/runners/base.py b/agentkit/toolkit/runners/base.py deleted file mode 100644 index 5d1e512..0000000 --- a/agentkit/toolkit/runners/base.py +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from abc import ABC, abstractmethod -from typing import Dict, Any, Optional, Union, Generator, Tuple -import logging -import requests -import json - -from agentkit.toolkit.models import DeployResult, StatusResult, InvokeResult -from agentkit.toolkit.reporter import Reporter, SilentReporter - -logger = logging.getLogger(__name__) - - -class Runner(ABC): - """ - Abstract base class for service runners. - - Responsibilities: - - Execute pre-built images (locally or in cloud) - - Provide deployment, invocation, and status query interfaces - - Manage runtime resources (containers/Runtimes) - - Design notes: - Runner does not require project_dir since it only manages execution - of pre-built images. All necessary information is passed via config objects. - """ - - def __init__(self, reporter: Optional[Reporter] = None): - """ - Initialize Runner. - - Args: - reporter: Progress reporter for deployment and runtime status updates - - Note: - Runner does not require project_dir since it only manages execution. - Project directory information should be passed via config objects if needed. - """ - self.logger = logging.getLogger(f"{__name__}.{self.__class__.__name__}") - self.reporter = reporter or SilentReporter() - - @abstractmethod - def deploy(self, config: Dict[str, Any]) -> DeployResult: - """Execute deployment. - - Args: - config: Deployment configuration - - Returns: - DeployResult: Unified deployment result object - """ - pass - - @abstractmethod - def destroy(self, config: Dict[str, Any]) -> bool: - pass - - @abstractmethod - def status(self, config: Dict[str, Any]) -> StatusResult: - """Query service status. - - Args: - config: Configuration information - - Returns: - StatusResult: Unified status result object - """ - pass - - @abstractmethod - def invoke(self, config: Dict[str, Any], payload: Dict[str, Any], headers: Optional[Dict[str, str]] = None, stream: Optional[bool] = None) -> InvokeResult: - """Invoke service. - - Args: - config: Configuration information - payload: Request payload - headers: Request headers - stream: Stream mode. None=auto-detect (default), True=force streaming, False=force non-streaming - - Returns: - InvokeResult: Unified invocation result object - - Note: - InvokeResult.response can be dict (non-streaming) or generator (streaming) - InvokeResult.is_streaming indicates response type - """ - pass - - def _http_post_invoke( - self, - endpoint: str, - payload: Dict[str, Any], - headers: Optional[Dict[str, str]] = None, - stream: Optional[bool] = None, - timeout: int = 60 - ) -> Union[Tuple[bool, Any], Tuple[bool, Generator[Dict[str, Any], None, None]]]: - """Generic HTTP POST invocation method supporting streaming and non-streaming with auto-detection. - - Args: - endpoint: Invocation endpoint URL - payload: Request payload - headers: Request headers - stream: Stream mode. None=auto-detect, True=force streaming, False=force non-streaming - timeout: Timeout in seconds. Longer timeout recommended for streaming - - Returns: - If stream=False: (success_flag, response_dict) - If stream=True: (success_flag, generator_object) - """ - try: - # Auto-detect mode: attempt to establish connection first - auto_detect = stream is None - if auto_detect: - logger.debug(f"Auto-detecting stream support for: {endpoint}") - # Default to streaming first - stream = True - else: - logger.debug(f"{'Streaming' if stream else 'Normal'} invoke service: {endpoint}") - - # Use longer timeout for streaming calls - actual_timeout = timeout if not stream else max(timeout, 300) - - response = requests.post( - url=endpoint, - json=payload, - headers=headers, - timeout=actual_timeout, - stream=stream - ) - - if response.status_code != 200: - error_msg = f"Invocation failed: {response.status_code} {response.text}" - logger.error(error_msg) - return False, error_msg - - # Log response information - logger.debug(f"Response status: {response.status_code}") - logger.debug(f"Response headers: {dict(response.headers)}") - - # Auto-detect: determine based on Content-Type - if auto_detect: - content_type = response.headers.get('Content-Type', '').lower() - logger.debug(f"Content-Type: {content_type}") - is_sse = 'text/event-stream' in content_type - - if is_sse: - logger.info(f"Detected SSE stream (Content-Type: {content_type})") - stream = True - else: - logger.info(f"Detected non-stream response (Content-Type: {content_type})") - stream = False - - # Non-streaming call: return JSON response directly - if not stream: - try: - # Log response content for debugging - response_text = response.text - logger.info(f"Response text length: {len(response_text)}") - logger.info(f"Response text preview: {response_text[:200] if response_text else '(empty)'}") - - # Double-check: if response starts with "data: ", it's actually SSE stream - if response_text.strip().startswith("data: "): - logger.warning("Response looks like SSE stream but Content-Type was not text/event-stream. Switching to stream mode.") - logger.warning(f"Using fallback stream parser - entire response ({len(response_text)} bytes) already loaded into memory. " - f"For better performance, ensure server sets 'Content-Type: text/event-stream'.") - stream = True - # Need to re-process as streaming (note: response already fully loaded, loses real-time streaming benefit) - def event_generator_fallback(): - """Parse SSE events from pre-read text""" - logger.debug(f"[FALLBACK] Starting generator, response_text length={len(response_text)}") - for i, line in enumerate(response_text.split('\n')): - line = line.strip() - if not line: - continue - logger.debug(f"[FALLBACK] Line {i}: {line[:60]}...") - if line.startswith("data: "): - data_str = line[6:].strip() # Remove "data: " prefix and trim - if not data_str: - continue - try: - event_data = json.loads(data_str) - logger.debug(f"[FALLBACK] Parsed JSON successfully, type={type(event_data)}") - yield event_data - except json.JSONDecodeError as e: - logger.warning(f"Failed to parse SSE data: {data_str[:100]}, error: {e}") - # Skip unparseable lines - continue - return True, event_generator_fallback() - - # Normal JSON response - response_data = response.json() - logger.info("Successfully parsed JSON response") - return True, response_data - except ValueError as e: - error_msg = f"Response parsing failed: {str(e)}" - logger.error(error_msg) - logger.error(f"Response content: {response.text[:500]}") - return False, error_msg - - # Streaming call: return generator - else: - def event_generator(): - """Generator function: parse SSE format streaming response line by line""" - try: - for line in response.iter_lines(decode_unicode=True): - if not line: - continue - - line = line.strip() - logger.debug(f"[STREAM] Raw line: {line[:80]}") - - # SSE format: "data: {json}\n\n" - if line.startswith("data: "): - data_str = line[6:].strip() # Remove "data: " prefix and trim - - if not data_str: - # Empty data, skip - continue - - try: - event_data = json.loads(data_str) - logger.debug("[STREAM] Yielding parsed dict") - yield event_data - except json.JSONDecodeError as e: - logger.warning(f"Failed to parse event data: {data_str[:100]}, error: {e}") - # Skip unparseable lines, don't yield strings - continue - else: - # Non-data lines, possibly comments or other SSE metadata, skip - if line.startswith(":"): - # SSE comment line, skip - logger.debug("[STREAM] Comment line, skipping") - continue - elif line: - logger.debug(f"[STREAM] Non-SSE line, skipping: {line[:80]}") - continue - except Exception as e: - logger.error(f"Error in stream processing: {str(e)}") - yield {"error": str(e)} - - return True, event_generator() - - except requests.exceptions.Timeout: - error_msg = f"Request timeout after {actual_timeout} seconds" - logger.error(error_msg) - return False, error_msg - except requests.exceptions.RequestException as e: - error_msg = f"Request error: {str(e)}" - logger.error(error_msg) - return False, error_msg - except Exception as e: - error_msg = f"Invocation error: {str(e)}" - logger.error(error_msg) - return False, error_msg diff --git a/agentkit/toolkit/runners/local_docker.py b/agentkit/toolkit/runners/local_docker.py deleted file mode 100644 index 36886eb..0000000 --- a/agentkit/toolkit/runners/local_docker.py +++ /dev/null @@ -1,580 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from typing import Dict, Any, Optional, List -from dataclasses import dataclass, field -from datetime import datetime -from urllib.parse import urljoin -from agentkit.toolkit.config import CommonConfig -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin -from agentkit.toolkit.models import DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.reporter import Reporter -from agentkit.toolkit.errors import ErrorCode - -from .base import Runner -# Docker-related imports are deferred to usage time to avoid dependency issues - - - -logger = logging.getLogger(__name__) - -@dataclass -class LocalDockerRunnerConfig(AutoSerializableMixin): - common_config: Optional[CommonConfig] = field(default=None, metadata={"system": True, "description": "Common configuration"}) - full_image_name: str = field(default=None, metadata={"system": True, "description": "Full image name"}) - image_id: str = field(default="", metadata={"description": "Image ID"}) - image_name: str = field(default="", metadata={"description": "Image name"}) - image_tag: str = field(default="latest", metadata={"description": "Image tag"}) - container_name: str = field(default="", metadata={"system": True, "description": "Container name, uses agent_name if empty"}) - container_id: str = field(default=None, metadata={"system": True, "description": "Container ID"}) - environment: Dict[str, str] = field(default_factory=lambda: {}, metadata={"system": True, "description": "Environment variables"}) - ports: List[str] = field(default_factory=lambda: ["8000:8000"], metadata={"system": True, "description": "Port mappings, format: host-port:container-port, comma-separated, default 8000:8000"}) - volumes: List[str] = field(default_factory=lambda: [], metadata={"system": True, "description": "Volume mappings, format: host-path:container-path, comma-separated"}) - restart_policy: str = field(default="unless-stopped", metadata={"system": True, "description": "Restart policy"}) - memory_limit: str = field(default="1g", metadata={"system": True, "description": "Memory limit"}) - cpu_limit: str = field(default="1", metadata={"system": True, "description": "CPU limit"}) - invoke_port: int = field(default=8000, metadata={"system": True, "description": "Agent application entry port"}) - -# LocalDockerDeployResult has been replaced by unified DeployResult -# Configuration class is retained for backward compatibility - - -class LocalDockerRunner(Runner): - def __init__(self, reporter: Optional[Reporter] = None): - """Initialize LocalDockerRunner. - - Args: - reporter: Progress reporter for deployment and invocation updates. Defaults to SilentReporter. - - Note: - LocalDockerRunner only requires image name/ID to run containers, no project directory needed. - """ - super().__init__(reporter) - # Defer Docker imports to avoid failures when Docker dependencies are not installed - try: - from agentkit.toolkit.docker.container import DockerManager - except ImportError: - raise ImportError("Missing Docker dependencies, please install agentkit[docker] extras") - self.docker_manager = DockerManager() - - def deploy(self, config: LocalDockerRunnerConfig) -> DeployResult: - """Deploy Docker container. - - Args: - config: Deployment configuration object (strongly typed) - - Returns: - DeployResult: Unified deployment result object - """ - try: - from agentkit.toolkit.docker.container import DockerManager - except ImportError: - error_msg = "Missing Docker dependencies, please install agentkit[docker] extras" - logger.error(error_msg) - self.reporter.error("Missing Docker dependencies") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.DEPENDENCY_MISSING - ) - - # Check if Docker is available before attempting deployment - docker_available, docker_message = self.docker_manager.is_docker_available() - if not docker_available: - logger.error("Docker availability check failed") - self.reporter.error("Docker is not available") - return DeployResult( - success=False, - error=docker_message, - error_code=ErrorCode.DOCKER_NOT_AVAILABLE - ) - - try: - docker_config = config - common_config = docker_config.common_config - - if common_config is None: - error_msg = "Missing common configuration" - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING - ) - - image_name = docker_config.full_image_name or f"{docker_config.image_name}:{docker_config.image_tag}" - - image_exists, image_info, actual_image_id = self.docker_manager.check_image_exists( - image_name, docker_config.image_id - ) - - if image_exists: - if docker_config.image_id and actual_image_id != docker_config.image_id: - docker_config.image_id = actual_image_id - logger.info(f"Updated image ID: {actual_image_id[:12]}") - elif not docker_config.image_id: - docker_config.image_id = actual_image_id - logger.info(f"Found image, ID: {actual_image_id[:12]}") - else: - error_msg = f"Image {image_name} does not exist" - logger.error(error_msg) - self.reporter.error(f"镜像不存在: {image_name}") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.RESOURCE_NOT_FOUND - ) - - if not docker_config.container_name: - docker_config.container_name = f"{common_config.agent_name or 'agentkit-app'}-container" - - try: - existing_container = self.docker_manager.get_container(docker_config.container_name) - if existing_container: - logger.info(f"Container {docker_config.container_name} exists, stopping and removing") - self.docker_manager.stop_container(existing_container['id']) - self.docker_manager.remove_container(existing_container['id']) - except Exception as e: - logger.warning(f"Error stopping or removing existing container: {str(e)}") - - port_dict = {} - for port in docker_config.ports: - if ":" in port: - host_port, container_port = port.split(":") - port_dict[f"{container_port}/tcp"] = host_port - elif port.isdigit(): - port_dict[f"{port}/tcp"] = str(port) - else: - error_msg = f"Invalid port format: {port}" - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID - ) - container_resources = { - 'mem_limit': docker_config.memory_limit, - 'cpu_quota': int(float(docker_config.cpu_limit) * 100000) - } - - success, cid = self.docker_manager.create_container( - image_name=image_name, - container_name=docker_config.container_name, - ports=port_dict, - environment=docker_config.environment, - volumes={vol.split(':', 1)[0]: {'bind': vol.split(':', 1)[1], 'mode': 'rw'} - for vol in docker_config.volumes if ':' in vol}, - restart_policy={'Name': docker_config.restart_policy}, - **container_resources - ) - - if success: - logger.info(f"Container deployed successfully: {docker_config.container_name} ({cid[:12]})") - self.reporter.success(f"Container deployed successfully: {docker_config.container_name}") - - # Build endpoint URL - host_port = docker_config.invoke_port - endpoint_url = f"http://localhost:{host_port}" - - return DeployResult( - success=True, - container_id=cid, - container_name=docker_config.container_name, - endpoint_url=endpoint_url, - deploy_timestamp=datetime.now() - ) - else: - error_msg = f"Container creation failed: {cid}" - logger.error(error_msg) - self.reporter.error("Container creation failed") - return DeployResult( - success=False, - error=str(cid), - error_code=ErrorCode.CONTAINER_START_FAILED - ) - - except Exception as e: - error_msg = f"Deployment error: {str(e)}" - logger.exception("Deployment failed with exception") - self.reporter.error(f"Deployment error: {e}") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.DEPLOY_FAILED - ) - - def destroy(self, config: LocalDockerRunnerConfig) -> bool: - """Destroy Docker container and image. - - Args: - config: Configuration object (strongly typed) - - Returns: - bool: True if successful - """ - try: - docker_config = config - common_config = docker_config.common_config - - if common_config is None: - logger.error("Missing common configuration") - return False - - project_name = docker_config.container_name or f"{common_config.agent_name or 'agentkit-app'}-container" - image_name = docker_config.full_image_name or f"{docker_config.image_name or common_config.agent_name or 'agentkit-app'}:{docker_config.image_tag or 'latest'}" - - logger.info(f"Cleaning up resources: {project_name}") - - container_removed = False - image_removed = False - - if docker_config.container_id: - try: - logger.info(f"Removing container: {project_name} ({docker_config.container_id[:12]})") - if self.docker_manager.remove_container(docker_config.container_id, force=True): - logger.info(f"Container removed successfully: {project_name}") - container_removed = True - else: - logger.error(f"Failed to remove container: {project_name}") - except Exception as e: - logger.error(f"Error removing container by ID: {str(e)}") - - try: - logger.info(f"Attempting to remove container by name: {project_name}") - if self.docker_manager.remove_container(project_name, force=True): - logger.info(f"Container removed successfully: {project_name}") - container_removed = True - except Exception as e2: - logger.error(f"Error removing container by name: {str(e2)}") - else: - try: - containers = self.docker_manager.list_containers(all_containers=True) - for container in containers: - if container['name'] == project_name: - logger.info(f"Removing container: {project_name}") - if self.docker_manager.remove_container(container['id'], force=True): - logger.info(f"Container removed successfully: {project_name}") - container_removed = True - break - except Exception as e: - logger.error(f"Error finding and removing container: {str(e)}") - - if docker_config.image_id: - try: - logger.info(f"Removing image: {image_name} ({docker_config.image_id[:12]})") - if self.docker_manager.remove_image(docker_config.image_id, force=True): - logger.info(f"Image removed successfully: {image_name}") - image_removed = True - else: - logger.error(f"Failed to remove image: {image_name}") - except Exception as e: - logger.error(f"Error removing image by ID: {str(e)}") - - if image_name: - try: - logger.info(f"Attempting to remove image by name: {image_name}") - if self.docker_manager.remove_image(image_name, force=True): - logger.info(f"Image removed successfully: {image_name}") - image_removed = True - except Exception as e2: - logger.error(f"Error removing image by name: {str(e2)}") - else: - if image_name: - try: - logger.info(f"Removing image: {image_name}") - if self.docker_manager.remove_image(image_name, force=True): - logger.info(f"Image removed successfully: {image_name}") - image_removed = True - except Exception as e: - logger.error(f"Error removing image: {str(e)}") - - logger.info("Local Docker resource cleanup completed") - return container_removed or image_removed - - except Exception as e: - logger.error(f"Destruction error: {str(e)}") - return False - - def status(self, config: LocalDockerRunnerConfig) -> StatusResult: - """Query container status. - - Args: - config: Configuration object (strongly typed) - - Returns: - StatusResult: Unified status result object - """ - try: - - docker_config = config - common_config = docker_config.common_config - - if common_config is None: - error_msg = "Missing common configuration" - logger.error(error_msg) - return StatusResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING, - status="unknown" - ) - - # Use explicitly saved names from config to avoid conflicts between multiple agents - container_name_in_config = docker_config.container_name # Must be saved in config - image_name_in_config = docker_config.full_image_name # Must be saved in config - - logger.info(f"Checking status with config: container_name={container_name_in_config}, image_name={image_name_in_config}") - - image_exists = False - image_info = None - actual_image_id = None - - # Prefer using image_id from config for precise lookup - if docker_config.image_id: - logger.info(f"Checking image by ID: {docker_config.image_id[:12]}") - images = self.docker_manager.list_images() - for img in images: - img_id = img.get('id', '').replace('sha256:', '') - if img_id.startswith(docker_config.image_id) or docker_config.image_id.startswith(img_id): - image_exists = True - image_info = img - actual_image_id = img_id - logger.info(f"Found image by ID: {img.get('tags', [''])[0]}") - break - elif image_name_in_config: - # Fallback: use explicitly saved image name from config - logger.info(f"No image_id in config, using saved image name: {image_name_in_config}") - images = self.docker_manager.list_images() - for img in images: - tags = img.get('tags', []) - if image_name_in_config in tags or any(tag.startswith(image_name_in_config) for tag in tags): - image_exists = True - image_info = img - actual_image_id = img.get('id', '').replace('sha256:', '') - logger.info(f"Found image by name: {tags[0] if tags else ''}") - break - else: - # No image_id or image_name in config means image not built - logger.info("No image_id or image_name in config, image not built") - - container_exists = False - container_running = False - container_info = None - - # Prefer using container_id from config for precise lookup - if docker_config.container_id: - logger.info(f"Checking container by ID: {docker_config.container_id[:12]}") - containers = self.docker_manager.list_containers(all_containers=True) - for container in containers: - if container['id'].startswith(docker_config.container_id) or docker_config.container_id.startswith(container['id']): - container_exists = True - container_running = container['status'] == 'running' - container_info = container - logger.info(f"Found container by ID: {container['name']} ({container['status']})") - break - elif container_name_in_config: - # Fallback: use explicitly saved container name from config - logger.info(f"No container_id in config, using saved container name: {container_name_in_config}") - containers = self.docker_manager.list_containers(all_containers=True) - for container in containers: - if container['name'] == container_name_in_config: - container_exists = True - container_running = container['status'] == 'running' - container_info = container - logger.info(f"Found container by name: {container['name']} ({container['status']})") - break - else: - # No container_id or container_name in config means container not deployed - logger.info("No container_id or container_name in config, container not deployed") - - # Map container status to standard status - if container_running: - status = "running" - elif container_exists: - status = "stopped" - else: - status = "not_deployed" - - # Build endpoint URL (only when running) - endpoint_url = None - if container_running and container_info: - ports = container_info.get('ports', {}) - if ports: - # Extract first port mapping - for container_port, host_bindings in ports.items(): - if host_bindings and isinstance(host_bindings, list) and len(host_bindings) > 0: - host_port = host_bindings[0].get('HostPort', '') - if host_port: - endpoint_url = f"http://localhost:{host_port}" - break - - # Prepare detailed metadata for CLI display - metadata = { - 'container_name': container_name_in_config, - 'image_name': image_name_in_config, - # Container information for CLI display - 'container': { - 'name': container_info.get('name', '') if container_info else None, - 'id': container_info.get('id', '') if container_info else None, - 'status': container_info.get('status', '') if container_info else None, - 'ports': container_info.get('ports', {}) if container_info else {}, - 'created': container_info.get('created', '') if container_info else None - }, - # Image information for CLI display - 'image': { - 'name': image_info.get('tags', [''])[0] if image_info and image_info.get('tags') else None, - 'id': actual_image_id[:12] if actual_image_id else None, - 'size': image_info.get('size', 0) if image_info else 0, - 'created': image_info.get('created', '') if image_info else None - }, - # Build/Deploy status for internal use - 'build': { - 'exists': image_exists, - 'image_id': actual_image_id[:12] if actual_image_id else None, - 'tags': image_info.get('tags', []) if image_info else [], - }, - 'deploy': { - 'exists': container_exists, - } - } - - status_result = StatusResult( - success=True, - status=status, - endpoint_url=endpoint_url, - container_id=container_info.get('id', '') if container_info else None, - metadata=metadata - ) - - if image_exists: - logger.info(f"Image status: Built ({actual_image_id[:12] if actual_image_id else 'unknown'})") - else: - logger.info("Image status: Not built") - - if container_running: - logger.info("Container status: Running") - elif container_exists: - logger.info("Container status: Created but not running") - else: - logger.info("Container status: Not deployed") - - return status_result - - except Exception as e: - error_msg = f"Failed to get status: {str(e)}" - logger.exception("Status query failed with exception") - return StatusResult( - success=False, - error=error_msg, - error_code=ErrorCode.UNKNOWN_ERROR, - status="unknown" - ) - - def invoke(self, config: LocalDockerRunnerConfig, payload: Dict[str, Any], headers: Optional[Dict[str, str]] = None, stream: Optional[bool] = None) -> InvokeResult: - """Invoke service in Docker container. - - Args: - config: Configuration object (strongly typed) - payload: Request payload - headers: HTTP request headers (optional) - stream: Stream mode (optional) - - Returns: - InvokeResult: Unified invocation result object - - Note: - - If stream=True: result.response is a generator, result.is_streaming=True - """ - try: - docker_config = config - common_config = docker_config.common_config - - if common_config is None: - error_msg = "Missing common configuration" - logger.error(error_msg) - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING - ) - - if not docker_config.container_id: - error_msg = "Container not deployed, please run deploy command first" - logger.error(error_msg) - self.reporter.error("Container not deployed") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.SERVICE_NOT_RUNNING - ) - - if payload is None: - error_msg = "Please provide payload parameter" - logger.error(error_msg) - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID - ) - - # Build invocation endpoint - port = docker_config.invoke_port or 8000 - endpoint = f"http://127.0.0.1:{port}/" - invoke_endpoint = urljoin(endpoint, "invoke") - - # Prepare default request headers - if headers is None: - headers = { - "Authorization": "Bearer xxx", - "user_id": "agentkit_user", - "session_id": "agentkit_sample_session" - } - - # Use base class generic HTTP invocation method - success, response_data = self._http_post_invoke( - endpoint=invoke_endpoint, - payload=payload, - headers=headers, - stream=stream, - timeout=600 - ) - - if success: - # Detect if response is streaming - is_streaming = hasattr(response_data, '__iter__') and not isinstance(response_data, (dict, str, list, bytes)) - - return InvokeResult( - success=True, - response=response_data, - is_streaming=is_streaming - ) - else: - error_msg = str(response_data) - logger.error(f"Invocation failed: {error_msg}") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.INVOKE_FAILED - ) - - except Exception as e: - error_msg = f"Invocation error: {str(e)}" - logger.exception("Invocation failed with exception") - self.reporter.error(f"Invocation error: {e}") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.INVOKE_FAILED - ) \ No newline at end of file diff --git a/agentkit/toolkit/runners/ve_agentkit.py b/agentkit/toolkit/runners/ve_agentkit.py deleted file mode 100644 index 554386b..0000000 --- a/agentkit/toolkit/runners/ve_agentkit.py +++ /dev/null @@ -1,862 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -import requests -import time -import os -from typing import Dict, Any, Optional, Tuple, List -from dataclasses import dataclass, field -from datetime import datetime -from urllib.parse import urljoin - -from agentkit.toolkit.config import CommonConfig, AUTO_CREATE_VE, is_valid_config, is_invalid_config -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin -from agentkit.toolkit.models import DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.reporter import Reporter -from agentkit.toolkit.errors import ErrorCode -from agentkit.utils.misc import generate_runtime_name, generate_runtime_role_name, generate_apikey_name, generate_client_token -from agentkit.runtime.client import AgentkitRuntimeClient -import agentkit.runtime.types as runtime_types - -from agentkit.toolkit.volcengine.iam import VeIAM - -ARTIFACT_TYPE_DOCKER_IMAGE = "image" -API_KEY_LOCATION = "HEADER" -PROJECT_NAME_DEFAULT = "default" -RUNTIME_STATUS_READY = "Ready" -RUNTIME_STATUS_ERROR = "Error" -RUNTIME_STATUS_UPDATING = "Updating" -RUNTIME_STATUS_UNRELEASED = "UnReleased" - - -from .base import Runner - -logger = logging.getLogger(__name__) - -@dataclass -class VeAgentkitRunnerConfig(AutoSerializableMixin): - """VeAgentkit Runtime configuration.""" - common_config: Optional[CommonConfig] = field(default=None, metadata={"system": True, "description": "Common configuration"}) - - # Runtime configuration - runtime_id: str = field(default=AUTO_CREATE_VE, metadata={"description": "Runtime ID; 'Auto' means auto-create"}) - runtime_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Runtime name; 'Auto' means auto-generate"}) - runtime_role_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Runtime role name; 'Auto' means auto-create"}) - runtime_apikey: str = field(default="", metadata={"description": "Runtime API key"}) - runtime_apikey_name: str = field(default=AUTO_CREATE_VE, metadata={"description": "Runtime API key name; 'Auto' means auto-generate"}) - runtime_endpoint: str = field(default="", metadata={"description": "Runtime endpoint URL"}) - runtime_envs: Dict[str, str] = field(default_factory=dict, metadata={"description": "Runtime environment variables"}) - - # Container image configuration - image_url: str = field(default="", metadata={"description": "Container image URL"}) - - -# VeAgentkitDeployResult has been replaced by unified DeployResult -# Configuration class is retained for backward compatibility - - -class VeAgentkitRuntimeRunner(Runner): - """VeAgentkit Runtime Runner. - - Manages the lifecycle of cloud-based Runtime instances, including: - - Creating and managing Runtime instances - - Deploying and updating Runtime configurations - - Invoking Runtime services - - Monitoring Runtime status - - Cleaning up Runtime resources - """ - - def __init__(self, reporter: Optional[Reporter] = None): - """Initialize VeAgentkitRuntimeRunner. - - Args: - reporter: Progress reporter for deployment and runtime status. Defaults to SilentReporter (no output). - - Note: - VeAgentkitRuntimeRunner only requires an image URL to deploy cloud-based Runtime; - it does not require a local project directory. - """ - super().__init__(reporter) - self.agentkit_runtime_client = AgentkitRuntimeClient() - - def deploy(self, config: VeAgentkitRunnerConfig) -> DeployResult: - """Deploy Runtime. - - Args: - config: Deployment configuration containing Runtime settings. - - Returns: - DeployResult: Unified deployment result object. - """ - try: - runner_config = config - - if not runner_config.image_url: - error_msg = "Image URL is required. Please build the image first." - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING - ) - - # Prepare Runtime configuration - if not self._prepare_runtime_config(runner_config): - error_msg = "Failed to prepare Runtime configuration." - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID - ) - - # Ensure IAM role exists for Runtime - ve_iam = VeIAM() - if not ve_iam.ensure_role_for_agentkit(runner_config.runtime_role_name): - error_msg = "Failed to create or ensure Runtime IAM role." - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.PERMISSION_DENIED - ) - - # Deploy Runtime: create new or update existing - if is_invalid_config(runner_config.runtime_id): - return self._create_new_runtime(runner_config) - else: - return self._update_existing_runtime(runner_config) - - except Exception as e: - error_msg = f"Runtime deployment failed: {str(e)}" - logger.exception("Runtime deployment failed with exception") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.DEPLOY_FAILED - ) - - def destroy(self, config: VeAgentkitRunnerConfig) -> bool: - """Destroy Runtime instance. - - Args: - config: Destroy configuration containing Runtime ID. - - Returns: - True if successful, False otherwise. - """ - try: - runner_config = config - - if not runner_config.runtime_id or runner_config.runtime_id == AUTO_CREATE_VE: - self.reporter.info("Runtime ID not configured, skipping destroy.") - return True - - self.agentkit_runtime_client.delete_runtime(runtime_types.DeleteRuntimeRequest(runtime_id=runner_config.runtime_id)) - self.reporter.success(f"Runtime destroyed successfully: {runner_config.runtime_id}") - return True - - except Exception as e: - if "InvalidAgentKitRuntime.NotFound" in str(e): - self.reporter.info(f"Runtime not found or already destroyed: {runner_config.runtime_id}") - return True - logger.error(f"Failed to destroy Runtime: {str(e)}") - return False - - def status(self, config: VeAgentkitRunnerConfig) -> StatusResult: - """Get Runtime status. - - Args: - config: Status query configuration containing Runtime ID. - - Returns: - StatusResult: Unified status result object. - """ - try: - runner_config = config - - if not runner_config.runtime_id or runner_config.runtime_id == AUTO_CREATE_VE: - return StatusResult( - success=True, - status="not_deployed", - metadata={"message": "Runtime not deployed"} - ) - - # Get Runtime information - runtime = self.agentkit_runtime_client.get_runtime(runtime_types.GetRuntimeRequest(runtime_id=runner_config.runtime_id)) - if not runner_config.runtime_apikey: - runner_config.runtime_apikey = runtime.authorizer_configuration.key_auth.api_key - - # Check endpoint connectivity - ping_status = None - public_endpoint = self.get_public_endpoint_of_runtime(runtime) - if runtime.status == RUNTIME_STATUS_READY and public_endpoint: - try: - ping_response = requests.get( - urljoin(public_endpoint, "ping"), - headers={"Authorization": f"Bearer {runner_config.runtime_apikey}"}, - timeout=10 - ) - ping_status = ping_response.status_code == 200 - except Exception as e: - logger.error(f"Failed to check endpoint connectivity: {str(e)}") - ping_status = False - - # Map Runtime status to standard status - if runtime.status == RUNTIME_STATUS_READY: - status = "running" - elif runtime.status == RUNTIME_STATUS_ERROR: - status = "error" - else: - status = runtime.status.lower() - - return StatusResult( - success=True, - status=status, - endpoint_url=public_endpoint, - service_id=runner_config.runtime_id, - health="healthy" if ping_status else "unhealthy" if ping_status is False else None, - metadata={ - "runtime_id": runner_config.runtime_id, - "runtime_name": runtime.name if hasattr(runtime, 'name') else runner_config.runtime_name, - "raw_status": runtime.status, - "image_url": runtime.artifact_url if hasattr(runtime, 'artifact_url') else "", - "ping_status": ping_status, - "timestamp": datetime.now().isoformat() - } - ) - - except Exception as e: - logger.error(f"Failed to get Runtime status: {str(e)}") - if "InvalidAgentKitRuntime.NotFound" in str(e): - return StatusResult( - success=False, - status="not_found", - error=f"Runtime not found: {runner_config.runtime_id}", - error_code=ErrorCode.RESOURCE_NOT_FOUND, - metadata={"runtime_id": runner_config.runtime_id} - ) - return StatusResult( - success=False, - status="error", - error=str(e), - error_code=ErrorCode.UNKNOWN_ERROR - ) - - def invoke(self, config: VeAgentkitRunnerConfig, payload: Dict[str, Any], headers: Optional[Dict[str, str]] = None, stream: Optional[bool] = None) -> InvokeResult: - """Invoke Runtime service. - - Args: - config: Invoke configuration containing Runtime endpoint and API key. - payload: Request payload. - headers: Request headers. - stream: Stream mode. None=auto-detect (default), True=force streaming, False=force non-streaming. - - Returns: - InvokeResult: Unified invocation result object. - """ - try: - runner_config = config - - # Get Runtime endpoint and API key - endpoint = runner_config.runtime_endpoint - api_key = runner_config.runtime_apikey - if not endpoint or not api_key: - if not runner_config.runtime_id or runner_config.runtime_id == AUTO_CREATE_VE: - error_msg = "Runtime is not deployed." - logger.error(error_msg) - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.SERVICE_NOT_RUNNING - ) - - # Auto-fetch Runtime information if not cached - try: - runtime = self.agentkit_runtime_client.get_runtime( - runtime_types.GetRuntimeRequest(runtime_id=runner_config.runtime_id) - ) - except Exception as e: - if "NotFound" in str(e): - error_msg = "Configured Runtime has been deleted externally. Please redeploy." - logger.error(error_msg) - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.RESOURCE_NOT_FOUND - ) - raise e - endpoint = self.get_public_endpoint_of_runtime(runtime) - api_key = runtime.authorizer_configuration.key_auth.api_key - - if not endpoint or not api_key: - error_msg = "Failed to obtain Runtime endpoint or API key." - logger.error(f"{error_msg}, runtime: {runtime}") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_MISSING - ) - - # Construct invoke endpoint URL - invoke_endpoint = urljoin(endpoint, "invoke") - - # Prepare request headers - if headers is None: - headers = {} - - if not headers.get("Authorization"): - headers["Authorization"] = f"Bearer {api_key}" - - # Use base class HTTP invocation method - success, response_data = self._http_post_invoke( - endpoint=invoke_endpoint, - payload=payload, - headers=headers, - stream=stream, - timeout=60 - ) - - if success: - # Detect if response is streaming - is_streaming = hasattr(response_data, '__iter__') and not isinstance(response_data, (dict, str, list, bytes)) - - return InvokeResult( - success=True, - response=response_data, - is_streaming=is_streaming - ) - else: - error_msg = str(response_data) - logger.error(f"Invocation failed: {error_msg}") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.INVOKE_FAILED - ) - - except Exception as e: - error_msg = f"Runtime invocation failed: {str(e)}" - logger.exception("Runtime invocation failed with exception") - return InvokeResult( - success=False, - error=error_msg, - error_code=ErrorCode.INVOKE_FAILED - ) - - def _prepare_runtime_config(self, config: VeAgentkitRunnerConfig) -> bool: - """Prepare Runtime configuration by generating names and keys. - - Args: - config: Runner configuration. - - Returns: - True if successful, False otherwise. - """ - try: - # Generate Runtime name if not provided - if config.runtime_name == AUTO_CREATE_VE or not config.runtime_name: - config.runtime_name = generate_runtime_name(config.common_config.agent_name) - self.reporter.success(f"Generated Runtime name: {config.runtime_name}") - - # Generate IAM role name if not provided - if config.runtime_role_name == AUTO_CREATE_VE or not config.runtime_role_name: - config.runtime_role_name = generate_runtime_role_name() - self.reporter.success(f"Generated role name: {config.runtime_role_name}") - - # Generate API key name if not provided - if config.runtime_apikey_name == AUTO_CREATE_VE or not config.runtime_apikey_name: - config.runtime_apikey_name = generate_apikey_name() - self.reporter.success(f"Generated API key name: {config.runtime_apikey_name}") - - return True - - except Exception as e: - logger.error(f"Failed to prepare Runtime configuration: {str(e)}") - return False - - def _create_new_runtime(self, config: VeAgentkitRunnerConfig) -> DeployResult: - """Create a new Runtime instance. - - Args: - config: Runner configuration. - - Returns: - DeployResult: Unified deployment result object. - """ - try: - self.reporter.info(f"Creating Runtime: {config.runtime_name}") - - # Build Runtime creation request - envs = [runtime_types.EnvsItemForCreateRuntime(key=k, value=v) for k, v in config.runtime_envs.items()] - - create_request = runtime_types.CreateRuntimeRequest( - name=config.runtime_name, - description= config.common_config.description if is_valid_config(config.common_config.description) else f"Auto created by AgentKit CLI for agent project {config.common_config.agent_name}", - artifact_type=ARTIFACT_TYPE_DOCKER_IMAGE, - artifact_url=config.image_url, - role_name=config.runtime_role_name, - envs=envs, - project_name=PROJECT_NAME_DEFAULT, - authorizer_configuration=runtime_types.AuthorizerForCreateRuntime( - key_auth=runtime_types.AuthorizerKeyAuthForCreateRuntime( - api_key_name=config.runtime_apikey_name, - api_key_location=API_KEY_LOCATION - ), - ), - client_token=generate_client_token(), - apmplus_enable=True, - ) - - # Create Runtime - runtime_resp = self.agentkit_runtime_client.create_runtime(create_request) - config.runtime_id = runtime_resp.runtime_id - - self.reporter.success(f"Runtime created successfully: {config.runtime_id}") - self.reporter.info("Waiting for Runtime to reach Ready status...") - self.reporter.info("💡 Tip: Runtime is initializing. Please wait patiently and do not interrupt.") - - # Wait for Runtime to be ready - success, runtime, error = self._wait_for_runtime_status( - runtime_id=config.runtime_id, - target_status=RUNTIME_STATUS_READY, - task_description="Waiting for Runtime to be ready...", - timeout=None, # No timeout for creation - error_message="Initialization failed" - ) - - if not success: - self.reporter.warning(f"Runtime failed to initialize: {config.runtime_id}") - self.reporter.error(f"Error: {error}") - - self._download_and_show_runtime_failed_logs(runtime, config.runtime_id) - - # Ask user if they want to clean up the failed Runtime - should_cleanup = self.reporter.confirm("Do you want to clean up the failed Runtime?", default=False) - - if should_cleanup: - self.reporter.info(f"Cleaning up failed Runtime: {config.runtime_id}") - try: - self.agentkit_runtime_client.delete_runtime(runtime_types.DeleteRuntimeRequest(runtime_id=config.runtime_id)) - self.reporter.success("Runtime cleanup successful.") - except Exception as e: - if "InvalidAgentKitRuntime.NotFound" not in str(e): - self.reporter.error(f"Failed to clean up Runtime: {str(e)}") - else: - self.reporter.info(f"Cleanup skipped, Runtime retained: {config.runtime_id}") - - return DeployResult( - success=False, - error=error, - error_code=ErrorCode.RUNTIME_NOT_READY, - service_id=config.runtime_id - ) - - # Retrieve endpoint and API key from created Runtime - public_endpoint = self.get_public_endpoint_of_runtime(runtime) - self.reporter.info(f"Endpoint: {public_endpoint}") - config.runtime_endpoint = public_endpoint - config.runtime_apikey = runtime.authorizer_configuration.key_auth.api_key - - return DeployResult( - success=True, - endpoint_url=config.runtime_endpoint, - service_id=config.runtime_id, - deploy_timestamp=datetime.now(), - metadata={ - "runtime_id": config.runtime_id, - "runtime_name": config.runtime_name, - "runtime_apikey": config.runtime_apikey, - "runtime_apikey_name": config.runtime_apikey_name, - "runtime_role_name": config.runtime_role_name, - "message": "Runtime created successfully" - } - ) - - except Exception as e: - error_msg = f"Failed to create Runtime: {str(e)}" - logger.exception("Runtime creation failed with exception") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.RUNTIME_CREATE_FAILED - ) - - def _download_and_show_runtime_failed_logs( - self, - runtime: Optional[runtime_types.GetRuntimeResponse], - runtime_id: str, - ) -> None: - """Download and display runtime failure logs for debugging. - - Helps users diagnose runtime failures by fetching logs from the remote URL, - saving them locally, and displaying the first 50 lines for immediate review. - """ - if not runtime or not hasattr(runtime, 'failed_log_file_url') or not runtime.failed_log_file_url: - logger.warning(f"No failure log URL available for runtime {runtime_id}") - return - - self.reporter.info(f"Runtime log URL: {runtime.failed_log_file_url}") - self.reporter.info("Downloading failure logs...") - - try: - log_response = requests.get(runtime.failed_log_file_url, timeout=30) - log_response.raise_for_status() - - # Create logs directory with timestamp-based filename for uniqueness - log_dir = os.path.join(os.getcwd(), ".agentkit", "logs") - os.makedirs(log_dir, exist_ok=True) - log_filename = f"runtime_failed_{runtime_id}_{int(time.time())}.log" - log_filepath = os.path.join(log_dir, log_filename) - - # Save raw log content first - with open(log_filepath, 'wb') as f: - f.write(log_response.content) - - # Read back with error handling for encoding issues - with open(log_filepath, 'r', encoding='utf-8', errors='ignore') as f: - lines = f.readlines() - - self.reporter.show_logs( - title="Runtime Failure Logs (First 50 lines)", - lines=lines, - max_lines=50 - ) - - self.reporter.success(f"Full logs saved to: {log_filepath}") - - except Exception as e: - logger.error(f"Failed to download runtime logs for {runtime_id}: {str(e)}") - self.reporter.warning(f"Could not retrieve failure logs: {str(e)}") - - def _wait_for_runtime_status( - self, - runtime_id: str, - target_status: str, - task_description: str, - timeout: Optional[int] = None, - error_message: str = "Failed to wait for Runtime status change" - ) -> Tuple[bool, Optional[runtime_types.GetRuntimeResponse], Optional[str]]: - """Wait for Runtime to reach target status (single status version).\n - Args: - runtime_id: Runtime ID. - target_status: Target status. - task_description: Progress bar task description. - timeout: Timeout in seconds; None means no timeout. - error_message: Error message on failure. - - Returns: - (success, Runtime object, error message or None) - """ - # Delegate to multi-status version with single status as list - return self._wait_for_runtime_status_multiple( - runtime_id=runtime_id, - target_statuses=[target_status], - task_description=task_description, - timeout=timeout, - error_message=error_message - ) - - def _wait_for_runtime_status_multiple( - self, - runtime_id: str, - target_statuses: List[str], - task_description: str, - timeout: Optional[int] = None, - error_message: str = "Failed to wait for Runtime status change" - ) -> Tuple[bool, Optional[runtime_types.GetRuntimeResponse], Optional[str]]: - """Wait for Runtime to reach one of multiple target statuses. - - Args: - runtime_id: Runtime ID. - target_statuses: List of target statuses. - task_description: Progress bar task description. - timeout: Timeout in seconds; None means no timeout. - error_message: Error message on failure. - - Returns: - (success, Runtime object, error message or None) - """ - last_status = None - start_time = time.time() - total_time = timeout if timeout else 300 # For progress bar display - runtime = None # Initialize runtime variable - - # Use reporter.long_task() for progress tracking - with self.reporter.long_task(task_description, total=total_time) as task: - while True: - runtime = self.agentkit_runtime_client.get_runtime(runtime_types.GetRuntimeRequest(runtime_id=runtime_id)) - - # Check if target status reached - if runtime.status in target_statuses: - task.update(completed=total_time) # 100% - self.reporter.success(f"Runtime status: {runtime.status}") - return True, runtime, None - - # Check for error status - if runtime.status == RUNTIME_STATUS_ERROR: - task.update(description="Runtime operation failed") - return False, runtime, f"Runtime status is Error. {error_message}" - - # Calculate elapsed time - elapsed_time = time.time() - start_time - - # Check timeout - if timeout and elapsed_time > timeout: - task.update(description="Wait timeout") - return False, runtime, f"{error_message} (timeout after {timeout}s)" - - # Update progress description on status change - if runtime.status != last_status: - task.update(description=f"Runtime status: {runtime.status}") - last_status = runtime.status - - # Update progress - task.update(completed=min(elapsed_time, total_time)) - - time.sleep(3) - - def _needs_runtime_update(self, runtime: runtime_types.GetRuntimeResponse, config: VeAgentkitRunnerConfig) -> Tuple[bool, str]: - """Check if Runtime needs to be updated. - - Args: - runtime: Existing Runtime object. - config: New Runner configuration. - - Returns: - (needs_update, reason_description) - """ - - update_reasons = [] - - # Check if image URL changed - if runtime.artifact_url != config.image_url: - update_reasons.append(f"Image URL changed: {runtime.artifact_url} -> {config.image_url}") - - # Check if environment variables changed - # System-injected environment variable prefixes that should not be modified by users - SYSTEM_ENV_PREFIXES = ('OTEL_', 'ENABLE_APMPLUS', 'APMPLUS_') - - # Convert runtime envs to dict for comparison (filter system env vars) - runtime_envs = {} - if hasattr(runtime, 'envs') and runtime.envs: - for env in runtime.envs: - key = None - value = None - - # Try lowercase attributes (runtime_all_types response objects) - if hasattr(env, 'key') and hasattr(env, 'value'): - key, value = env.key, env.value - # Try uppercase attributes (for compatibility) - elif hasattr(env, 'Key') and hasattr(env, 'Value'): - key, value = env.Key, env.Value - # Handle dict type - elif isinstance(env, dict): - key = env.get('key') or env.get('Key', '') - value = env.get('value') or env.get('Value', '') - - # Filter out system environment variables - if key and not key.startswith(SYSTEM_ENV_PREFIXES): - runtime_envs[key] = value - - # Compare environment variables (only user-defined ones) - if runtime_envs != config.runtime_envs: - # Find specific differences - added_keys = set(config.runtime_envs.keys()) - set(runtime_envs.keys()) - removed_keys = set(runtime_envs.keys()) - set(config.runtime_envs.keys()) - changed_keys = {k for k in set(runtime_envs.keys()) & set(config.runtime_envs.keys()) - if runtime_envs[k] != config.runtime_envs.get(k)} - - env_changes = [] - if added_keys: - env_changes.append(f"Added env vars: {', '.join(added_keys)}") - if removed_keys: - env_changes.append(f"Removed env vars: {', '.join(removed_keys)}") - if changed_keys: - env_changes.append(f"Modified env vars: {', '.join(changed_keys)}") - - update_reasons.append("Environment variables changed: " + "; ".join(env_changes)) - - needs_update = len(update_reasons) > 0 - reason = " | ".join(update_reasons) if needs_update else "No configuration changes" - - return needs_update, reason - - def _update_existing_runtime(self, config: VeAgentkitRunnerConfig) -> DeployResult: - """Update existing Runtime instance. - - Args: - config: Runner configuration. - - Returns: - DeployResult: Unified deployment result object. - """ - try: - self.reporter.info(f"Updating Runtime: {config.runtime_id}") - - # Get existing Runtime information - try: - runtime = self.agentkit_runtime_client.get_runtime( - runtime_types.GetRuntimeRequest(runtime_id=config.runtime_id) - ) - except Exception as e: - if "InvalidAgentKitRuntime.NotFound" in str(e): - error_msg = f"Runtime not found: {config.runtime_id}" - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.RESOURCE_NOT_FOUND, - service_id=config.runtime_id - ) - raise e - - if runtime.artifact_type != ARTIFACT_TYPE_DOCKER_IMAGE: - error_msg = f"Unsupported Runtime type: {runtime.artifact_type}" - logger.error(error_msg) - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.CONFIG_INVALID - ) - - # Check if update is needed - # needs_update, update_reason = self._needs_runtime_update(runtime, config) - needs_update = True # Always update for now - - if not needs_update: - self.reporter.success("Runtime configuration is up-to-date, no update needed.") - public_endpoint = self.get_public_endpoint_of_runtime(runtime) - config.runtime_endpoint = public_endpoint - config.runtime_apikey = runtime.authorizer_configuration.key_auth.api_key - - return DeployResult( - success=True, - endpoint_url=config.runtime_endpoint, - service_id=config.runtime_id, - deploy_timestamp=datetime.now(), - metadata={ - "runtime_id": config.runtime_id, - "runtime_name": config.runtime_name, - "runtime_apikey": config.runtime_apikey, - "message": "Runtime configuration is up-to-date" - } - ) - - self.reporter.info("Starting Runtime update...") - - envs = [{"Key": str(k), "Value": str(v)} for k, v in config.runtime_envs.items()] - self.agentkit_runtime_client.update_runtime(runtime_types.UpdateRuntimeRequest( - runtime_id=config.runtime_id, - artifact_url=config.image_url, - description=config.common_config.description, - envs=envs, - client_token=generate_client_token(), - )) - - self.reporter.success("Runtime update request submitted.") - - # Phase 1: Wait for Runtime update to complete (status may become UnReleased or directly Ready) - self.reporter.info("Waiting for Runtime update to complete...") - success, updated_runtime, error = self._wait_for_runtime_status_multiple( - runtime_id=config.runtime_id, - target_statuses=[RUNTIME_STATUS_UNRELEASED, RUNTIME_STATUS_READY], - task_description="Waiting for Runtime update to complete...", - timeout=180, - error_message="Update failed" - ) - - if not success: - self.reporter.warning(f"Runtime update failed: {config.runtime_id}") - if error: - self.reporter.error(f"Errpr: {error}") - self._download_and_show_runtime_failed_logs(updated_runtime, config.runtime_id) - return DeployResult( - success=False, - error=error, - error_code=ErrorCode.DEPLOY_FAILED, - service_id=config.runtime_id - ) - - # Check current status: if already Ready, update is complete without release step - if updated_runtime.status == RUNTIME_STATUS_READY: - self.reporter.success("Runtime updated directly to Ready status, no release step needed.") - else: - # Phase 2: Status is UnReleased, need to release the update - self.reporter.info("Starting Runtime release...") - self.agentkit_runtime_client.release_runtime(runtime_types.ReleaseRuntimeRequest( - runtime_id=config.runtime_id, - ) - ) - - # Wait for release to complete - self.reporter.info("Waiting for Runtime release to complete, status becoming Ready...") - self.reporter.info("💡 Tip: Runtime is being released. Please wait patiently and do not interrupt.") - - success, updated_runtime, error = self._wait_for_runtime_status( - runtime_id=config.runtime_id, - target_status=RUNTIME_STATUS_READY, - task_description="Waiting for Runtime release to complete...", - timeout=300, - error_message="Release failed" - ) - - if not success: - self.reporter.warning(f"Runtime update failed: {config.runtime_id}") - if error: - self.reporter.error(f"Error: {error}") - self._download_and_show_runtime_failed_logs(updated_runtime, config.runtime_id) - return DeployResult( - success=False, - error=error, - error_code=ErrorCode.DEPLOY_FAILED, - service_id=config.runtime_id - ) - # Retrieve endpoint and API key from updated Runtime - public_endpoint = self.get_public_endpoint_of_runtime(updated_runtime) - self.reporter.info(f"Endpoint: {public_endpoint}") - config.runtime_endpoint = public_endpoint - config.runtime_apikey = updated_runtime.authorizer_configuration.key_auth.api_key - - return DeployResult( - success=True, - endpoint_url=config.runtime_endpoint, - service_id=config.runtime_id, - deploy_timestamp=datetime.now(), - metadata={ - "runtime_id": config.runtime_id, - "runtime_name": runtime.name if hasattr(runtime, 'name') else config.runtime_name, - "runtime_apikey": config.runtime_apikey, - "runtime_apikey_name": config.runtime_apikey_name, - "runtime_role_name": config.runtime_role_name, - "message": "Runtime update completed" - } - ) - - except Exception as e: - error_msg = f"Failed to update Runtime: {str(e)}" - logger.exception("Runtime update failed with exception") - return DeployResult( - success=False, - error=error_msg, - error_code=ErrorCode.DEPLOY_FAILED - ) - - @staticmethod - def get_public_endpoint_of_runtime(runtime: runtime_types.GetRuntimeResponse) -> str: - for network_configuration in runtime.network_configurations: - if network_configuration.network_type == "public": - return network_configuration.endpoint - return "" \ No newline at end of file diff --git a/agentkit/toolkit/sdk/__init__.py b/agentkit/toolkit/sdk/__init__.py deleted file mode 100644 index d66d389..0000000 --- a/agentkit/toolkit/sdk/__init__.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -AgentKit Toolkit SDK - Python API for building and deploying agents. - -This SDK provides a programmatic interface to all toolkit functionality, -allowing you to build, deploy, invoke, and manage agents from Python code. - -Two API styles are available: - -1. Client API (Recommended for multiple operations): - >>> from agentkit.toolkit.sdk import AgentKitClient - >>> - >>> # Create client with configuration - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Perform operations without repeating config - >>> client.build() - >>> client.deploy() - >>> client.invoke({"prompt": "Hello, agent!"}) - -2. Functional API (Good for simple scripts): - >>> from agentkit.toolkit import sdk - >>> - >>> # Each operation specifies config - >>> sdk.build(config_file="agentkit.yaml") - >>> sdk.deploy(config_file="agentkit.yaml") - >>> sdk.invoke( - ... payload={"prompt": "Hello, agent!"}, - ... config_file="agentkit.yaml" - ... ) -""" - -# Import main API functions -from .builder import build -from .deployer import deploy -from .invoker import invoke -from .lifecycle import launch, destroy, stop -from .status import status -from .initializer import init_project, get_available_templates - -# Import client and config -from .client import AgentKitClient -from .config import AgentConfig - -# Import result types from unified models -from ..models import ( - BuildResult, - DeployResult, - InvokeResult, - StatusResult, - LifecycleResult, - InitResult, -) - -__all__ = [ - # Main operations - "build", - "deploy", - "invoke", - "launch", - "destroy", - "stop", - "status", - "init_project", - "get_available_templates", - # Client and Config - "AgentKitClient", - "AgentConfig", - # Result types - "BuildResult", - "DeployResult", - "InvokeResult", - "StatusResult", - "LifecycleResult", - "InitResult", -] diff --git a/agentkit/toolkit/sdk/builder.py b/agentkit/toolkit/sdk/builder.py deleted file mode 100644 index 748c5f1..0000000 --- a/agentkit/toolkit/sdk/builder.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Build API - SDK interface for building agent images.""" - -from typing import Optional, Dict, Any - -from ..executors import BuildExecutor, BuildOptions -from ..models import BuildResult -from ..reporter import SilentReporter -from ..context import ExecutionContext - - -def build( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None, - platform: str = "auto", - regenerate_dockerfile: bool = False -) -> BuildResult: - """ - Build agent image. - - This function builds a Docker image for your agent application according - to the configuration. The build can happen locally or in the cloud depending - on your strongly configuration. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - platform: Build platform: "auto", "local", or "cloud". - Default is "auto" which selects based on strongly configuration. - regenerate_dockerfile: Force regenerate Dockerfile even if it exists. - Default is False. - - Returns: - BuildResult: Build operation result containing: - - success: Whether build succeeded - - image_name: Full image name if successful - - image_id: Image ID/digest if successful - - error: Error message if failed - - build_logs: Build logs if available - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Build with default config - >>> result = sdk.build() - >>> - >>> # Build with specific config file - >>> result = sdk.build(config_file="my-config.yaml") - >>> - >>> # Check result - >>> if result.success: - ... print(f"Image built: {result.image_name}") - ... else: - ... print(f"Build failed: {result.error}") - ... for log in result.build_logs or []: - ... print(log) - - Raises: - No exceptions are raised. All errors are captured in BuildResult.error. - """ - # SDK 使用 SilentReporter(无控制台输出) - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - options = BuildOptions( - platform=platform, - regenerate_dockerfile=regenerate_dockerfile - ) - - executor = BuildExecutor(reporter=reporter) - return executor.execute( - config_dict=config_dict, - config_file=config_file, - options=options - ) diff --git a/agentkit/toolkit/sdk/client.py b/agentkit/toolkit/sdk/client.py deleted file mode 100644 index bbfa4cf..0000000 --- a/agentkit/toolkit/sdk/client.py +++ /dev/null @@ -1,502 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""AgentKit SDK Client - Configuration management and simplified API.""" - -from typing import Optional, Dict, Any, Union - -from .builder import build as _build -from .deployer import deploy as _deploy -from .invoker import invoke as _invoke -from .status import status as _status -from .lifecycle import launch as _launch, destroy as _destroy, stop as _stop -from .initializer import init_project as _init_project, get_available_templates as _get_available_templates - -from ..models import ( - BuildResult, - DeployResult, - InvokeResult, - StatusResult, - LifecycleResult, - InitResult -) - - -class AgentKitClient: - """ - AgentKit SDK Client with configuration management. - - This client wraps the functional SDK APIs and provides configuration - reuse across multiple operations. It's recommended for applications - that need to perform multiple operations on the same agent. - - Example: - >>> from agentkit.toolkit.sdk import AgentKitClient - >>> - >>> # Create client with configuration - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Perform operations without repeating config - >>> build_result = client.build() - >>> deploy_result = client.deploy() - >>> invoke_result = client.invoke({"prompt": "Hello"}) - >>> - >>> # Or use as context manager - >>> with AgentKitClient("agentkit.yaml") as client: - ... client.build() - ... client.deploy() - - Attributes: - config_file: Path to configuration file. - config_dict: Configuration dictionary (overrides config_file). - """ - - def __init__( - self, - config: Optional[Union[str, 'AgentConfig']] = None, - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None, - ): - """ - Initialize AgentKit client. - - Args: - config: Configuration source (recommended parameter): - - AgentConfig object: Use SDK config manager - - str: Path to config file (e.g., "agentkit.yaml") - - None: Use default "agentkit.yaml" in current directory - config_file: Path to configuration file (legacy parameter). - Ignored if 'config' is provided. - config_dict: Configuration as dictionary (highest priority). - Overrides config/config_file if provided. - - Example: - >>> # Recommended: With AgentConfig object - >>> from agentkit.toolkit.sdk import AgentConfig - >>> config = AgentConfig.load("./my_agent") - >>> client = AgentKitClient(config) - >>> - >>> # With config file path (string) - >>> client = AgentKitClient("my-config.yaml") - >>> - >>> # With config dict - >>> client = AgentKitClient(config_dict={ - ... "common": {"agent_name": "my-agent"} - ... }) - >>> - >>> # With both (dict takes priority) - >>> client = AgentKitClient( - ... config="base-config.yaml", - ... config_dict={"common": {"agent_name": "override"}} - ... ) - """ - # Import AgentConfig here to avoid circular import - from .config import AgentConfig - - # Handle the new 'config' parameter - if isinstance(config, AgentConfig): - # AgentConfig object provided - self.config_file = str(config.file_path) - self.config_dict = config_dict # Still allow dict overrides - self._agent_config = config - elif isinstance(config, str): - # String path provided - self.config_file = config - self.config_dict = config_dict - self._agent_config = None - elif config is None: - # Use legacy parameters or defaults - self.config_file = config_file - self.config_dict = config_dict - self._agent_config = None - else: - raise TypeError( - f"config must be AgentConfig, str, or None, got {type(config).__name__}" - ) - - @property - def config(self) -> 'AgentConfig': - """Get AgentConfig instance (lazy load). - - Returns: - AgentConfig instance for this client. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> config = client.config # Lazy load - >>> print(config.launch_type) - """ - if self._agent_config is None and self.config_file: - from .config import AgentConfig - self._agent_config = AgentConfig.load(self.config_file) - return self._agent_config - - def _merge_config(self, overrides: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: - """ - Merge client configuration with operation-specific overrides. - - Args: - overrides: Operation-specific configuration overrides. - - Returns: - Merged configuration dictionary. - """ - if overrides is None: - return self.config_dict - - if self.config_dict is None: - return overrides - - # Deep merge: overrides take priority - merged = self.config_dict.copy() - for key, value in overrides.items(): - if key in merged and isinstance(merged[key], dict) and isinstance(value, dict): - # Merge nested dicts - merged[key] = {**merged[key], **value} - else: - merged[key] = value - - return merged - - def build( - self, - platform: str = "auto", - config_overrides: Optional[Dict[str, Any]] = None - ) -> BuildResult: - """ - Build agent image using client configuration. - - Args: - platform: Build platform: "auto", "local", or "cloud". - Default is "auto" which selects based on strongly configuration. - config_overrides: Optional configuration overrides for this operation. - These will be merged with the client's base configuration. - - Returns: - BuildResult: Build operation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Simple build - >>> result = client.build() - >>> - >>> # Build with platform override - >>> result = client.build(platform="local") - >>> - >>> # Build with config overrides - >>> result = client.build( - ... config_overrides={"local": {"image_tag": "dev"}} - ... ) - """ - merged_config = self._merge_config(config_overrides) - return _build( - config_file=self.config_file, - config_dict=merged_config, - platform=platform - ) - - def deploy( - self, - config_overrides: Optional[Dict[str, Any]] = None - ) -> DeployResult: - """ - Deploy agent using client configuration. - - Args: - config_overrides: Optional configuration overrides for this operation. - These will be merged with the client's base configuration. - - Returns: - DeployResult: Deploy operation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Simple deploy - >>> result = client.deploy() - >>> - >>> # Deploy with config overrides - >>> result = client.deploy( - ... config_overrides={"cloud": {"runtime_name": "prod-v2"}} - ... ) - """ - merged_config = self._merge_config(config_overrides) - return _deploy( - config_file=self.config_file, - config_dict=merged_config - ) - - def invoke( - self, - payload: Dict[str, Any], - headers: Optional[Dict[str, str]] = None, - apikey: Optional[str] = None, - config_overrides: Optional[Dict[str, Any]] = None - ) -> InvokeResult: - """ - Invoke deployed agent using client configuration. - - Args: - payload: Request payload dictionary to send to agent. - Typically contains fields like "prompt", "messages", etc. - headers: Optional HTTP headers dictionary. - Common headers: {"user_id": "...", "session_id": "..."} - apikey: Optional API key for authentication. - config_overrides: Optional configuration overrides for this operation. - - Returns: - InvokeResult: Invocation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Simple invocation - >>> result = client.invoke({"prompt": "Hello, agent!"}) - >>> - >>> # With headers and API key - >>> result = client.invoke( - ... payload={"prompt": "What's the weather?"}, - ... headers={"user_id": "user123"}, - ... apikey="" - ... ) - >>> - >>> # Handle streaming response - >>> result = client.invoke({"prompt": "Tell me a story"}) - >>> if result.is_streaming: - ... for event in result.stream(): - ... print(event) - ... else: - ... print(result.response) - """ - merged_config = self._merge_config(config_overrides) - return _invoke( - payload=payload, - config_file=self.config_file, - config_dict=merged_config, - headers=headers, - apikey=apikey - ) - - def status( - self, - config_overrides: Optional[Dict[str, Any]] = None - ) -> StatusResult: - """ - Query agent status using client configuration. - - Args: - config_overrides: Optional configuration overrides for this operation. - - Returns: - StatusResult: Status query result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Query status - >>> result = client.status() - >>> - >>> # Check status - >>> if result.is_running(): - ... print(f"Agent running at: {result.endpoint_url}") - ... else: - ... print(f"Agent status: {result.status.value}") - """ - merged_config = self._merge_config(config_overrides) - return _status( - config_file=self.config_file, - config_dict=merged_config - ) - - def launch( - self, - platform: str = "auto", - config_overrides: Optional[Dict[str, Any]] = None - ) -> LifecycleResult: - """ - Launch agent (build + deploy) using client configuration. - - Args: - platform: Build platform: "auto", "local", or "cloud". - config_overrides: Optional configuration overrides for this operation. - - Returns: - LifecycleResult: Launch operation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Launch agent - >>> result = client.launch() - >>> if result.success: - ... print(f"Agent launched successfully") - """ - merged_config = self._merge_config(config_overrides) - return _launch( - config_file=self.config_file, - config_dict=merged_config, - platform=platform - ) - - def destroy( - self, - force: bool = False, - config_overrides: Optional[Dict[str, Any]] = None - ) -> LifecycleResult: - """ - Destroy agent runtime using client configuration. - - Args: - force: Force destroy even if there are errors. - config_overrides: Optional configuration overrides for this operation. - - Returns: - LifecycleResult: Destroy operation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Destroy agent - >>> result = client.destroy() - >>> - >>> # Force destroy - >>> result = client.destroy(force=True) - """ - merged_config = self._merge_config(config_overrides) - return _destroy( - config_file=self.config_file, - config_dict=merged_config, - force=force - ) - - def stop( - self, - config_overrides: Optional[Dict[str, Any]] = None - ) -> LifecycleResult: - """ - Stop agent runtime using client configuration. - - Args: - config_overrides: Optional configuration overrides for this operation. - - Returns: - LifecycleResult: Stop operation result. - - Example: - >>> client = AgentKitClient("agentkit.yaml") - >>> - >>> # Stop agent - >>> result = client.stop() - """ - merged_config = self._merge_config(config_overrides) - return _stop( - config_file=self.config_file, - config_dict=merged_config - ) - - def __enter__(self): - """Context manager entry - returns self.""" - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - """ - Context manager exit - cleanup if needed. - - Currently no cleanup is needed, but this allows for - future resource management (e.g., connection pooling). - """ - pass - - @staticmethod - def init_project( - project_name: str, - template: str = "basic", - directory: str = ".", - agent_name: Optional[str] = None, - description: Optional[str] = None, - system_prompt: Optional[str] = None, - model_name: Optional[str] = None, - tools: Optional[str] = None, - ) -> InitResult: - """ - Initialize a new agent project from template (static method). - - This is a static method because project initialization doesn't require - an existing configuration (it creates the configuration). - - Args: - project_name: Name of the project. - template: Project template (basic, basic_stream, eino_a2a). - directory: Target directory. - agent_name: Custom agent name (optional). - description: Agent description (optional). - system_prompt: System prompt (optional). - model_name: Model name (optional). - tools: Comma-separated tools list (optional). - - Returns: - InitResult: Initialization result. - - Example: - >>> from agentkit.toolkit.sdk import AgentKitClient - >>> - >>> # Initialize a new project - >>> result = AgentKitClient.init_project( - ... project_name="my-agent", - ... template="basic", - ... directory="./projects" - ... ) - >>> - >>> if result.success: - ... print(f"Created: {', '.join(result.created_files)}") - ... - ... # Now create client for the new project - ... client = AgentKitClient( - ... f"{result.project_path}/agentkit.yaml" - ... ) - ... client.build() - """ - return _init_project( - project_name=project_name, - template=template, - directory=directory, - agent_name=agent_name, - description=description, - system_prompt=system_prompt, - model_name=model_name, - tools=tools - ) - - @staticmethod - def get_available_templates() -> Dict[str, Dict[str, Any]]: - """ - Get available project templates (static method). - - Returns: - Dictionary of template configurations. - - Example: - >>> from agentkit.toolkit.sdk import AgentKitClient - >>> - >>> templates = AgentKitClient.get_available_templates() - >>> for key, info in templates.items(): - ... print(f"{key}: {info['name']}") - """ - return _get_available_templates() - - def __repr__(self) -> str: - """String representation of client.""" - config_source = "dict" if self.config_dict else f"file({self.config_file})" - return f"AgentKitClient(config={config_source})" diff --git a/agentkit/toolkit/sdk/config.py b/agentkit/toolkit/sdk/config.py deleted file mode 100644 index 0e80090..0000000 --- a/agentkit/toolkit/sdk/config.py +++ /dev/null @@ -1,585 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""SDK-friendly configuration management interface. - -This module provides AgentConfig, a high-level configuration management class -designed for SDK users. It wraps the internal AgentkitConfigManager with a -more intuitive API featuring: -- Type-safe property access -- Fluent/chainable methods -- Path-based get/set operations -- Automatic validation -- IDE-friendly autocomplete - -Example: - >>> # Load and modify configuration - >>> config = AgentConfig.load("./my_agent") - >>> config.launch_type = "hybrid" - >>> config.save() - >>> - >>> # Fluent API - >>> config.set_launch_type("hybrid").set_model("deepseek-v3").save() - >>> - >>> # Use with Client - >>> client = AgentKitClient(config) -""" - -from typing import Optional, Dict, Any, Union -from pathlib import Path -import logging - -logger = logging.getLogger(__name__) - - -class AgentConfig: - """SDK-friendly agent configuration manager. - - This class provides a user-friendly interface for reading and modifying - agent configurations without directly dealing with YAML files or internal - config structures. It wraps AgentkitConfigManager and provides: - - - **Type-safe properties**: Direct attribute access with validation - - **Fluent API**: Chainable methods for configuration updates - - **Path-based access**: Get/set nested config values by path - - **Automatic persistence**: Changes are saved to file - - **IDE support**: Full autocomplete and type hints - - Attributes: - file_path: Path to the configuration file (agentkit.yaml) - launch_type: Deployment mode (local/cloud/hybrid) - agent_name: Agent application name - entry_point: Entry file path - description: Agent description - language: Programming language (Python/Golang) - language_version: Language version - dependencies_file: Dependencies file path - runtime_envs: Application-level environment variables - - Example: - >>> # Load configuration - >>> config = AgentConfig.load("./my_agent") - >>> - >>> # Read properties - >>> print(config.launch_type) # "cloud" - >>> - >>> # Modify properties - >>> config.launch_type = "hybrid" - >>> config.save() - >>> - >>> # Fluent API - >>> config.set_launch_type("hybrid") \\ - ... .set_model("deepseek-v3") \\ - ... .save() - >>> - >>> # Path-based access - >>> region = config.get("launch_types.cloud.region") - >>> config.set("launch_types.hybrid.image_tag", "v1.0.0") - """ - - def __init__(self, file_path: Union[str, Path]): - """Initialize AgentConfig. - - Args: - file_path: Path to agentkit.yaml or project directory. - If a directory is provided, will look for agentkit.yaml inside. - - Raises: - FileNotFoundError: If the configuration file doesn't exist. - - Example: - >>> config = AgentConfig("./my_agent") # directory - >>> config = AgentConfig("./my_agent/agentkit.yaml") # file - """ - self.file_path = Path(file_path) - - # If directory provided, append agentkit.yaml - if self.file_path.is_dir(): - self.file_path = self.file_path / "agentkit.yaml" - - if not self.file_path.exists(): - raise FileNotFoundError( - f"Configuration file not found: {self.file_path}\n" - f"Please ensure the file exists or use AgentKitClient.init_project() " - f"to create a new project." - ) - - # Load configuration using the existing config manager - from ..config import get_config - self._manager = get_config(config_path=str(self.file_path)) - - # Cache common config for quick access - self._common_config = self._manager.get_common_config() - - @classmethod - def load(cls, path: Union[str, Path]) -> 'AgentConfig': - """Load configuration from file or directory. - - This is the recommended way to create an AgentConfig instance. - - Args: - path: Path to agentkit.yaml or project directory containing it. - - Returns: - AgentConfig instance - - Raises: - FileNotFoundError: If the configuration file doesn't exist. - - Example: - >>> # Load from directory - >>> config = AgentConfig.load("./my_agent") - >>> - >>> # Load from file - >>> config = AgentConfig.load("./my_agent/agentkit.yaml") - """ - return cls(path) - - # ========== Type-safe Property Accessors ========== - - @property - def launch_type(self) -> str: - """Get or set launch type (deployment mode). - - Valid values: 'local', 'cloud', 'hybrid' - - Example: - >>> config.launch_type = "hybrid" - >>> print(config.launch_type) # "hybrid" - """ - return self._common_config.launch_type - - @launch_type.setter - def launch_type(self, value: str): - """Set launch type with validation.""" - valid_types = ['local', 'cloud', 'hybrid'] - if value not in valid_types: - raise ValueError( - f"Invalid launch_type: '{value}'. " - f"Must be one of: {', '.join(valid_types)}" - ) - self._common_config.launch_type = value - logger.debug(f"Set launch_type to '{value}'") - - @property - def agent_name(self) -> str: - """Get or set agent name. - - Example: - >>> config.agent_name = "my_planning_agent" - """ - return self._common_config.agent_name - - @agent_name.setter - def agent_name(self, value: str): - """Set agent name.""" - self._common_config.agent_name = value - logger.debug(f"Set agent_name to '{value}'") - - @property - def entry_point(self) -> str: - """Get or set entry point file. - - Example: - >>> config.entry_point = "agent.py" - """ - return self._common_config.entry_point - - @entry_point.setter - def entry_point(self, value: str): - """Set entry point.""" - self._common_config.entry_point = value - logger.debug(f"Set entry_point to '{value}'") - - @property - def description(self) -> str: - """Get or set agent description. - - Example: - >>> config.description = "A planning agent for task decomposition" - """ - return self._common_config.description - - @description.setter - def description(self, value: str): - """Set description.""" - self._common_config.description = value - logger.debug(f"Set description to '{value}'") - - @property - def language(self) -> str: - """Get or set programming language. - - Valid values: 'Python', 'Golang' - - Example: - >>> config.language = "Python" - """ - return self._common_config.language - - @language.setter - def language(self, value: str): - """Set language.""" - self._common_config.language = value - logger.debug(f"Set language to '{value}'") - - @property - def language_version(self) -> str: - """Get or set language version. - - Example: - >>> config.language_version = "3.12" - """ - return self._common_config.language_version - - @language_version.setter - def language_version(self, value: str): - """Set language version.""" - self._common_config.language_version = value - logger.debug(f"Set language_version to '{value}'") - - @property - def dependencies_file(self) -> str: - """Get or set dependencies file path. - - Example: - >>> config.dependencies_file = "requirements.txt" - """ - return self._common_config.dependencies_file - - @dependencies_file.setter - def dependencies_file(self, value: str): - """Set dependencies file.""" - self._common_config.dependencies_file = value - logger.debug(f"Set dependencies_file to '{value}'") - - @property - def runtime_envs(self) -> Dict[str, str]: - """Get or set application-level runtime environment variables. - - These environment variables are shared across all deployment modes. - - Example: - >>> config.runtime_envs = {"KEY1": "VALUE1", "KEY2": "VALUE2"} - >>> config.runtime_envs["NEW_VAR"] = "VALUE3" - """ - return self._common_config.runtime_envs - - @runtime_envs.setter - def runtime_envs(self, value: Dict[str, str]): - """Set runtime environment variables.""" - if not isinstance(value, dict): - raise TypeError("runtime_envs must be a dictionary") - self._common_config.runtime_envs = value - logger.debug(f"Set runtime_envs with {len(value)} entries") - - # ========== Path-based Access Methods ========== - - def get(self, key_path: str, default: Any = None) -> Any: - """Get configuration value by key path. - - Supports dot-notation for nested access. - - Args: - key_path: Dot-separated key path (e.g., "common.launch_type" or - "launch_types.cloud.region") - default: Default value if key not found - - Returns: - Configuration value or default - - Example: - >>> config.get("common.launch_type") - 'cloud' - >>> config.get("launch_types.cloud.region", "cn-beijing") - 'cn-beijing' - >>> config.get("nonexistent.key", "default") - 'default' - """ - return self._manager.get_raw_value(key_path, default=default) - - def set(self, key_path: str, value: Any) -> 'AgentConfig': - """Set configuration value by key path. - - Supports dot-notation for nested access. Returns self for chaining. - - Args: - key_path: Dot-separated key path - value: Value to set - - Returns: - Self for method chaining - - Example: - >>> config.set("common.launch_type", "hybrid") - >>> config.set("launch_types.cloud.region", "cn-beijing") - >>> - >>> # Chaining - >>> config.set("common.launch_type", "hybrid") \\ - ... .set("launch_types.hybrid.image_tag", "v1.0") \\ - ... .save() - """ - # Update internal data structure - self._manager.set_raw_value(key_path, value) - - # If updating common config, reload cache - if key_path.startswith("common."): - self._common_config = self._manager.get_common_config() - - logger.debug(f"Set '{key_path}' to '{value}'") - return self - - def update(self, updates: Dict[str, Any]) -> 'AgentConfig': - """Batch update configuration. - - Updates multiple configuration values at once. Supports both flat keys - (for common config fields) and nested dictionaries. - - Args: - updates: Dictionary of updates. Can contain: - - Flat keys like "launch_type" (updates common config) - - Nested dicts like {"common": {"launch_type": "hybrid"}} - - Returns: - Self for method chaining - - Example: - >>> # Update common config fields - >>> config.update({ - ... "launch_type": "hybrid", - ... "description": "New description" - ... }) - >>> - >>> # Update nested config - >>> config.update({ - ... "common": { - ... "launch_type": "hybrid" - ... }, - ... "launch_types": { - ... "cloud": { - ... "region": "cn-beijing" - ... } - ... } - ... }) - >>> - >>> # Chaining - >>> config.update({"launch_type": "hybrid"}).save() - """ - for key, value in updates.items(): - # Check if it's a top-level field in common config - if hasattr(self._common_config, key): - setattr(self._common_config, key, value) - # Check if it's a nested dictionary update - elif isinstance(value, dict): - # Update nested structures - for nested_key, nested_value in value.items(): - path = f"{key}.{nested_key}" - self.set(path, nested_value) - else: - # Treat as path - self.set(key, value) - - logger.debug(f"Updated {len(updates)} configuration entries") - return self - - # ========== Fluent API Methods (Chainable) ========== - - def set_launch_type(self, launch_type: str) -> 'AgentConfig': - """Set launch type (fluent API). - - Args: - launch_type: 'local', 'cloud', or 'hybrid' - - Returns: - Self for method chaining - - Example: - >>> config.set_launch_type("hybrid").save() - """ - self.launch_type = launch_type - return self - - def set_agent_name(self, agent_name: str) -> 'AgentConfig': - """Set agent name (fluent API).""" - self.agent_name = agent_name - return self - - def set_description(self, description: str) -> 'AgentConfig': - """Set description (fluent API).""" - self.description = description - return self - - def set_entry_point(self, entry_point: str) -> 'AgentConfig': - """Set entry point (fluent API).""" - self.entry_point = entry_point - return self - - def set_language(self, language: str) -> 'AgentConfig': - """Set language (fluent API).""" - self.language = language - return self - - def add_runtime_env(self, key: str, value: str) -> 'AgentConfig': - """Add a runtime environment variable (fluent API). - - Args: - key: Environment variable name - value: Environment variable value - - Returns: - Self for method chaining - - Example: - >>> config.add_runtime_env("API_KEY", "") \\ - ... .add_runtime_env("DEBUG", "true") \\ - ... .save() - """ - self._common_config.runtime_envs[key] = value - logger.debug(f"Added runtime_env: {key}={value}") - return self - - # ========== Persistence Methods ========== - - def save(self, path: Optional[Union[str, Path]] = None) -> 'AgentConfig': - """Save configuration to file. - - Args: - path: Optional new path to save to. If None, saves to original file. - - Returns: - Self for method chaining - - Example: - >>> config.launch_type = "hybrid" - >>> config.save() # Save to original file - >>> - >>> config.save("new_config.yaml") # Save to new file - """ - # Update common config in manager - self._manager.update_common_config(self._common_config) - - # If new path specified, update file path - if path: - self.file_path = Path(path) - # Note: The manager still uses the original path for saving - # This is intentional to maintain consistency - - logger.info(f"Configuration saved to {self.file_path}") - return self - - def reload(self) -> 'AgentConfig': - """Reload configuration from file. - - Discards any unsaved changes and reloads from disk. - - Returns: - Self for method chaining - - Example: - >>> config.reload() # Discard changes - """ - self._manager.reload() - self._common_config = self._manager.get_common_config() - logger.info(f"Configuration reloaded from {self.file_path}") - return self - - # ========== Export Methods ========== - - def to_dict(self) -> Dict[str, Any]: - """Export configuration as dictionary. - - Returns: - Complete configuration dictionary including common config - and all workflow configurations. - - Example: - >>> config_dict = config.to_dict() - >>> print(config_dict.keys()) - dict_keys(['common', 'launch_types']) - """ - return { - "common": self._common_config.to_dict(), - "launch_types": { - name: self._manager.get_strategy_config(name) - for name in self._manager.list_strategies() - } - } - - def get_workflow_config(self, workflow_name: Optional[str] = None) -> Dict[str, Any]: - """Get workflow-specific configuration. - - Args: - workflow_name: Workflow name ('local', 'cloud', 'hybrid'). - If None, uses current launch_type. - - Returns: - Workflow configuration dictionary - - Example: - >>> cloud_config = config.get_strategy_config("cloud") - >>> print(cloud_config.get("region")) - 'cn-beijing' - >>> - >>> # Get current workflow config - >>> current_config = config.get_strategy_config() - """ - if workflow_name is None: - workflow_name = self.launch_type - return self._manager.get_strategy_config(workflow_name) - - def update_workflow_config( - self, - config: Dict[str, Any], - workflow_name: Optional[str] = None - ) -> 'AgentConfig': - """Update workflow-specific configuration. - - Args: - config: Workflow configuration updates - workflow_name: Workflow name. If None, uses current launch_type. - - Returns: - Self for method chaining - - Example: - >>> config.update_strategy_config({ - ... "region": "cn-beijing", - ... "image_tag": "v1.0.0" - ... }, strategy_name="cloud") - """ - if workflow_name is None: - workflow_name = self.launch_type - self._manager.update_strategy_config(workflow_name, config) - logger.debug(f"Updated workflow config for '{workflow_name}'") - return self - - # ========== Utility Methods ========== - - def __repr__(self) -> str: - """String representation for debugging.""" - return ( - f"AgentConfig(" - f"file={self.file_path.name}, " - f"agent={self.agent_name}, " - f"launch_type={self.launch_type})" - ) - - def __str__(self) -> str: - """Human-readable string representation.""" - return ( - f"AgentConfig: {self.agent_name}\n" - f" File: {self.file_path}\n" - f" Launch Type: {self.launch_type}\n" - f" Entry Point: {self.entry_point}" - ) diff --git a/agentkit/toolkit/sdk/deployer.py b/agentkit/toolkit/sdk/deployer.py deleted file mode 100644 index 9922ff9..0000000 --- a/agentkit/toolkit/sdk/deployer.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Deploy API - SDK interface for deploying agents.""" - -from typing import Optional, Dict, Any - -from ..executors import DeployExecutor -from ..models import DeployResult -from ..reporter import SilentReporter -from ..context import ExecutionContext - - -def deploy( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None -) -> DeployResult: - """ - Deploy agent to target environment. - - This function deploys your agent application to the configured environment. - The deployment can be local (Docker container) or cloud-based depending - on your workflow configuration. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - - Returns: - DeployResult: Deploy operation result containing: - - success: Whether deployment succeeded - - endpoint_url: Service endpoint URL if available - - container_id: Container ID for local deployments - - service_id: Service ID for cloud deployments - - error: Error message if failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Deploy with default config - >>> result = sdk.deploy() - >>> - >>> # Deploy with specific config file - >>> result = sdk.deploy(config_file="my-config.yaml") - >>> - >>> # Check result - >>> if result.success: - ... print(f"Deployed at: {result.endpoint_url}") - ... print(f"Container: {result.container_id}") - ... else: - ... print(f"Deploy failed: {result.error}") - - Raises: - No exceptions are raised. All errors are captured in DeployResult.error. - """ - # SDK 使用 SilentReporter(无控制台输出) - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = DeployExecutor(reporter=reporter) - return executor.execute( - config_dict=config_dict, - config_file=config_file - ) diff --git a/agentkit/toolkit/sdk/initializer.py b/agentkit/toolkit/sdk/initializer.py deleted file mode 100644 index 5587fc6..0000000 --- a/agentkit/toolkit/sdk/initializer.py +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Init API - SDK interface for initializing agent projects.""" - -from typing import Optional, Dict, Any - -from ..executors import InitExecutor -from ..reporter import SilentReporter -from ..models import InitResult - - -def init_project( - project_name: str, - template: str = "basic", - directory: str = ".", - agent_name: Optional[str] = None, - description: Optional[str] = None, - system_prompt: Optional[str] = None, - model_name: Optional[str] = None, - tools: Optional[str] = None, -) -> InitResult: - """ - Initialize a new agent project from template. - - This function creates a new AgentKit project with the specified template, - including project files, configuration, and dependencies. - - Args: - project_name: Name of the project. Must contain only letters, numbers, - hyphens, and underscores. - template: Project template to use. Options: - - "basic": Simple agent application (default) - - "basic_stream": Agent with streaming support - - "eino_a2a": Eino framework A2A application - directory: Target directory for the project (default: current directory). - agent_name: Custom agent name (optional). - description: Agent description (optional). - system_prompt: System prompt for the agent (optional). - model_name: Model name to use (optional, default: doubao-seed-1-6-250615). - tools: Comma-separated list of tools to include (optional). - - Returns: - InitResult: Initialization result containing: - - success: Whether initialization succeeded - - project_name: Name of the created project - - project_path: Path to the project directory - - created_files: List of created files - - error: Error message if failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Simple initialization - >>> result = sdk.init_project("my-agent") - >>> if result.success: - ... print(f"Created project at: {result.project_path}") - ... print(f"Files: {', '.join(result.created_files)}") - >>> - >>> # With custom configuration - >>> result = sdk.init_project( - ... project_name="smart-assistant", - ... template="basic_stream", - ... directory="./projects", - ... agent_name="SmartAssistant", - ... description="An intelligent assistant", - ... model_name="doubao-1.5-pro", - ... tools="web_search,run_code" - ... ) - >>> - >>> # Check available templates - >>> from agentkit.toolkit.sdk import get_available_templates - >>> templates = get_available_templates() - >>> for key, info in templates.items(): - ... print(f"{key}: {info['name']}") - - Raises: - No exceptions are raised. All errors are captured in InitResult.error. - """ - executor = InitExecutor(reporter=SilentReporter()) - return executor.init_project( - project_name=project_name, - template=template, - directory=directory, - agent_name=agent_name, - description=description, - system_prompt=system_prompt, - model_name=model_name, - tools=tools - ) - - -def get_available_templates() -> Dict[str, Dict[str, Any]]: - """ - Get available project templates. - - Returns a dictionary of template configurations, where each template - includes name, language, description, and type information. - - Returns: - Dictionary mapping template keys to template information. - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> templates = sdk.get_available_templates() - >>> - >>> # List all templates - >>> for key, info in templates.items(): - ... print(f"{key}:") - ... print(f" Name: {info['name']}") - ... print(f" Language: {info['language']}") - ... print(f" Description: {info['description']}") - >>> - >>> # Check if template exists - >>> if "basic" in templates: - ... print("Basic template available") - """ - executor = InitExecutor(reporter=SilentReporter()) - return executor.get_available_templates() diff --git a/agentkit/toolkit/sdk/invoker.py b/agentkit/toolkit/sdk/invoker.py deleted file mode 100644 index 74e1975..0000000 --- a/agentkit/toolkit/sdk/invoker.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Invoke API - SDK interface for invoking deployed agents.""" - -from typing import Optional, Dict, Any - -from ..executors import InvokeExecutor -from ..models import InvokeResult -from ..reporter import SilentReporter -from ..context import ExecutionContext - - -def invoke( - payload: Dict[str, Any], - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None, - headers: Optional[Dict[str, str]] = None, - apikey: Optional[str] = None -) -> InvokeResult: - """ - Invoke deployed agent with a request. - - This function sends a request to your deployed agent and returns the response. - The response can be either a complete response or a streaming generator. - - Args: - payload: Request payload dictionary to send to agent. - Typically contains fields like "prompt", "messages", etc. - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - headers: Optional HTTP headers dictionary. - Common headers: {"user_id": "...", "session_id": "..."} - apikey: Optional API key for authentication. - - Returns: - InvokeResult: Invocation result containing: - - success: Whether invocation succeeded - - response: Response data (dict or generator) - - is_streaming: Whether response is streaming - - error: Error message if failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Simple invocation - >>> result = sdk.invoke( - ... payload={"prompt": "Hello, agent!"} - ... ) - >>> - >>> # With headers and API key - >>> result = sdk.invoke( - ... payload={"prompt": "What's the weather?"}, - ... headers={"user_id": ""}, - ... apikey="" - ... ) - >>> - >>> # Handle streaming response - >>> if result.is_streaming: - ... for event in result.stream(): - ... print(event) - ... else: - ... print(result.response) - >>> - >>> # Or get complete response (consumes stream if streaming) - >>> full_response = result.get_response() - - Raises: - No exceptions are raised. All errors are captured in InvokeResult.error. - """ - # SDK 使用 SilentReporter(无控制台输出) - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = InvokeExecutor(reporter=reporter) - # InvokeExecutor.execute 使用 stream 参数而不是 apikey - return executor.execute( - payload=payload, - config_dict=config_dict, - config_file=config_file, - headers=headers, - stream=None # 由 Runner 自动判断 - ) diff --git a/agentkit/toolkit/sdk/lifecycle.py b/agentkit/toolkit/sdk/lifecycle.py deleted file mode 100644 index 9cea7b4..0000000 --- a/agentkit/toolkit/sdk/lifecycle.py +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Lifecycle API - SDK interface for agent lifecycle management.""" - -from typing import Optional, Dict, Any - -from ..executors import LifecycleExecutor -from ..reporter import SilentReporter -from ..models import LifecycleResult -from ..context import ExecutionContext - - -def launch( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None, - platform: str = "auto" -) -> LifecycleResult: - """ - Launch agent (build + deploy in one operation). - - This is a convenience function that combines build() and deploy() - into a single operation for faster development workflow. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - platform: Build platform: "auto", "local", or "cloud". - Default is "auto" which selects based on workflow configuration. - - Returns: - LifecycleResult: Launch operation result containing: - - success: Whether launch succeeded - - operation: "launch" - - message: Success message with endpoint info - - error: Error message if failed - - details: Contains BuildResult and DeployResult - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Launch with default config - >>> result = sdk.launch() - >>> - >>> # Launch with specific config - >>> result = sdk.launch(config_file="my-config.yaml") - >>> - >>> # Check result - >>> if result.success: - ... print(result.message) - ... build_res = result.details['build_result'] - ... deploy_res = result.details['deploy_result'] - ... print(f"Image: {build_res.image_name}") - ... print(f"Endpoint: {deploy_res.endpoint_url}") - ... else: - ... print(f"Launch failed: {result.error}") - - Raises: - No exceptions are raised. All errors are captured in LifecycleResult.error. - """ - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = LifecycleExecutor(reporter=reporter) - return executor.launch( - config_dict=config_dict, - config_file=config_file, - platform=platform - ) - - -def destroy( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None, - force: bool = False -) -> LifecycleResult: - """ - Destroy agent runtime and resources. - - This function stops and removes all resources associated with the agent, - including containers, services, and other cloud resources. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - force: Force destroy without confirmation prompts. - Default is False. When used from CLI, user is prompted. - - Returns: - LifecycleResult: Destroy operation result containing: - - success: Whether destroy succeeded - - operation: "destroy" - - message: Success message - - error: Error message if failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Destroy agent runtime - >>> result = sdk.destroy() - >>> - >>> # Force destroy - >>> result = sdk.destroy(force=True) - >>> - >>> if result.success: - ... print(result.message) - ... else: - ... print(f"Destroy failed: {result.error}") - - Raises: - No exceptions are raised. All errors are captured in LifecycleResult.error. - """ - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = LifecycleExecutor(reporter=reporter) - return executor.destroy( - config_dict=config_dict, - config_file=config_file - ) - - -def stop( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None -) -> LifecycleResult: - """ - Stop agent runtime (without destroying resources). - - This function stops the running agent but keeps resources intact, - allowing for faster restart later. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - - Returns: - LifecycleResult: Stop operation result containing: - - success: Whether stop succeeded - - operation: "stop" - - message: Success message - - error: Error message if failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Stop agent runtime - >>> result = sdk.stop() - >>> - >>> if result.success: - ... print(result.message) - ... else: - ... print(f"Stop failed: {result.error}") - - Raises: - No exceptions are raised. All errors are captured in LifecycleResult.error. - """ - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = LifecycleExecutor(reporter=reporter) - return executor.stop( - config_dict=config_dict, - config_file=config_file - ) diff --git a/agentkit/toolkit/sdk/status.py b/agentkit/toolkit/sdk/status.py deleted file mode 100644 index 31a2a57..0000000 --- a/agentkit/toolkit/sdk/status.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Status API - SDK interface for querying agent status.""" - -from typing import Optional, Dict, Any - -from ..executors import StatusExecutor -from ..models import StatusResult -from ..reporter import SilentReporter -from ..context import ExecutionContext - - -def status( - config_file: Optional[str] = None, - config_dict: Optional[Dict[str, Any]] = None -) -> StatusResult: - """ - Query agent runtime status. - - This function retrieves the current status of your deployed agent, - including whether it's running, endpoint information, and other details. - - Args: - config_file: Path to configuration file (e.g., "agentkit.yaml"). - If not provided, uses default "agentkit.yaml" in current directory. - config_dict: Configuration as dictionary (highest priority). - Overrides config_file if both provided. - - Returns: - StatusResult: Status query result containing: - - success: Whether status query succeeded - - status: ServiceStatus enum (RUNNING, STOPPED, etc.) - - endpoint_url: Service endpoint if available - - container_id: Container ID for local deployments - - service_id: Service ID for cloud deployments - - uptime: Service uptime if available - - details: Additional status details - - error: Error message if query failed - - Example: - >>> from agentkit.toolkit import sdk - >>> - >>> # Query status with default config - >>> result = sdk.status() - >>> - >>> # Query with specific config - >>> result = sdk.status(config_file="my-config.yaml") - >>> - >>> # Check result - >>> if result.success: - ... print(f"Status: {result.status.value}") - ... print(f"Running: {result.is_running()}") - ... print(f"Endpoint: {result.endpoint_url}") - ... print(f"Uptime: {result.uptime}") - ... else: - ... print(f"Status query failed: {result.error}") - - Raises: - No exceptions are raised. All errors are captured in StatusResult.error. - """ - # SDK 使用 SilentReporter(无控制台输出) - reporter = SilentReporter() - ExecutionContext.set_reporter(reporter) - - executor = StatusExecutor(reporter=reporter) - return executor.execute( - config_dict=config_dict, - config_file=config_file - ) diff --git a/agentkit/toolkit/strategies/__init__.py b/agentkit/toolkit/strategies/__init__.py deleted file mode 100644 index 534fe88..0000000 --- a/agentkit/toolkit/strategies/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Strategy 层 - 纯粹的编排逻辑 - -Strategy 层只负责编排 Builder 和 Runner 的调用顺序,不包含: -- 错误处理(由 Executor 处理) -- 进度报告(由 Executor 处理) -- 日志记录(由 Executor 处理) -- 结果转换(Builder/Runner 直接返回标准 Result) - -Strategy 是纯函数式的编排,易于测试和理解。 -""" - -from .base import Strategy -from .local_strategy import LocalStrategy -from .cloud_strategy import CloudStrategy -from .hybrid_strategy import HybridStrategy - -__all__ = ['Strategy', 'LocalStrategy', 'CloudStrategy', 'HybridStrategy'] diff --git a/agentkit/toolkit/strategies/base.py b/agentkit/toolkit/strategies/base.py deleted file mode 100644 index 5ac0c66..0000000 --- a/agentkit/toolkit/strategies/base.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -from abc import ABC, abstractmethod -from typing import Any, Optional -from agentkit.toolkit.models import BuildResult, DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.reporter import Reporter, SilentReporter -from agentkit.toolkit.config import CommonConfig - - -class Strategy(ABC): - """ - Base Strategy class for pure orchestration logic across deployment platforms. - - Design Principle: Strategies act as thin orchestration layers that delegate - to Builder/Runner components without transformation or error handling. - - This separation enables: - - **Testability**: Pure functions with predictable inputs/outputs - - **Clarity**: Focus solely on business workflow orchestration - - **Composability**: Multiple strategies can be combined or chained - - **Flexibility**: Different execution contexts (CLI vs SDK) use same logic - - Reporter Pattern: - Strategy receives a Reporter and passes it through to Builder/Runner components. - This allows different execution contexts to control progress reporting: - - CLI: Injects ConsoleReporter for user-visible progress - - SDK: Injects SilentReporter for programmatic execution - """ - - def __init__(self, config_manager=None, reporter: Reporter = None): - """ - Initialize Strategy with optional configuration manager and reporter. - - Args: - config_manager: Configuration manager instance (optional) - reporter: Reporter instance passed through to Builder/Runner components - """ - self.config_manager = config_manager - # Default to SilentReporter for programmatic usage (SDK scenarios) - self.reporter = reporter or SilentReporter() - - @abstractmethod - def build(self, common_config: CommonConfig, strategy_config: Any) -> BuildResult: - """ - Orchestrate the build process by delegating to appropriate Builder. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration (LocalDockerConfig | VeAgentkitConfig | HybridVeAgentkitConfig) - - Returns: - BuildResult: Unmodified result from Builder.build() - """ - pass - - @abstractmethod - def deploy(self, common_config: CommonConfig, strategy_config: Any) -> DeployResult: - """ - Orchestrate the deployment process by delegating to appropriate Runner. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration (LocalDockerConfig | VeAgentkitConfig | HybridVeAgentkitConfig) - - Returns: - DeployResult: Unmodified result from Runner.deploy() - """ - pass - - @abstractmethod - def invoke(self, common_config: CommonConfig, strategy_config: Any, - payload: Any, headers: Optional[dict] = None, - stream: Optional[bool] = None) -> InvokeResult: - """ - Orchestrate agent invocation by delegating to appropriate Runner. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration - payload: Request payload to send to the agent - headers: Optional HTTP headers for the request - stream: Whether to use streaming response (if supported) - - Returns: - InvokeResult: Unmodified result from Runner.invoke() - """ - pass - - @abstractmethod - def status(self, common_config: CommonConfig, strategy_config: Any) -> StatusResult: - """ - Orchestrate status query by delegating to appropriate Runner. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration - - Returns: - StatusResult: Unmodified result from Runner.status() - """ - pass - - def stop(self, common_config: CommonConfig, strategy_config: Any) -> bool: - """ - Stop the deployed service while preserving resources for restart. - - Default implementation returns True (no-op). Override in concrete strategies - that support service lifecycle management. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration - - Returns: - bool: True if stop succeeded or not applicable - """ - return True - - def destroy(self, common_config: CommonConfig, strategy_config: Any, force: bool = False) -> bool: - """ - Destroy all resources created by this strategy (containers, images, etc.). - - Default implementation returns True (no-op). Override in concrete strategies - that create persistent resources requiring cleanup. - - Args: - common_config: Common configuration shared across all strategies - strategy_config: Strategy-specific configuration - force: Whether to force destruction even if resources are in use - - Returns: - bool: True if destruction succeeded or not applicable - """ - return True diff --git a/agentkit/toolkit/strategies/cloud_strategy.py b/agentkit/toolkit/strategies/cloud_strategy.py deleted file mode 100644 index 3d77178..0000000 --- a/agentkit/toolkit/strategies/cloud_strategy.py +++ /dev/null @@ -1,289 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Cloud Strategy - VE Agentkit orchestration - -Pure orchestration logic that delegates to VeCPCRBuilder and VeAgentkitRunner. -Error handling, progress reporting, and logging are handled by the Executor layer. -""" - -from typing import Any, Optional -from agentkit.toolkit.strategies.base import Strategy -from agentkit.toolkit.models import BuildResult, DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.config import ( - AUTO_CREATE_VE, - CommonConfig, - VeAgentkitConfig, - merge_runtime_envs -) -from agentkit.toolkit.builders.ve_pipeline import ( - VeCPCRBuilder, VeCPCRBuilderConfig -) -from agentkit.toolkit.runners.ve_agentkit import ( - VeAgentkitRuntimeRunner, VeAgentkitRunnerConfig -) -from agentkit.utils.misc import generate_runtime_name - - -class CloudStrategy(Strategy): - """ - Cloud orchestration strategy using VE Agentkit. - - Orchestration flow: - 1. build: VeCPCRBuilder.build() → BuildResult - 2. deploy: VeAgentkitRunner.deploy() → DeployResult - 3. invoke: VeAgentkitRunner.invoke() → InvokeResult - 4. status: VeAgentkitRunner.status() → StatusResult - - Characteristics: - - Pure orchestration with no side effects - - Directly returns Builder/Runner results - - Exceptions propagate to Executor layer for handling - """ - - def __init__(self, config_manager=None, reporter=None): - """ - Initialize CloudStrategy. - - Args: - config_manager: Configuration manager (optional). - reporter: Reporter instance to pass to Builder/Runner. - """ - super().__init__(config_manager, reporter) - - # Lazy initialization to avoid requiring environment variables at init time - self._builder = None - self._runner = None - - @property - def builder(self): - """Lazy-load VeCPCRBuilder instance.""" - if self._builder is None: - project_dir = None - if self.config_manager: - project_dir = self.config_manager.get_project_dir() - - self._builder = VeCPCRBuilder( - project_dir=project_dir, - reporter=self.reporter - ) - return self._builder - - @property - def runner(self): - """Lazy-load VeAgentkitRuntimeRunner instance.""" - if self._runner is None: - self._runner = VeAgentkitRuntimeRunner(reporter=self.reporter) - return self._runner - - def build(self, common_config: CommonConfig, strategy_config: VeAgentkitConfig) -> BuildResult: - """ - Execute cloud build orchestration. - - Steps: - 1. Prepare runtime name (auto-generate if needed) - 2. Convert configuration to builder format - 3. Call VeCPCRBuilder.build() - 4. Extract and track configuration updates from build result - """ - from agentkit.toolkit.models import ConfigUpdates - - config_updates = ConfigUpdates() - - # Auto-generate runtime name if not explicitly set - runtime_name, cp_pipeline_name = self._prepare_runtime_name( - strategy_config.runtime_name, - common_config.agent_name - ) - - # Track generated names if they differ from config - if runtime_name != strategy_config.runtime_name: - config_updates.add('runtime_name', runtime_name) - if cp_pipeline_name != strategy_config.cp_pipeline_name: - config_updates.add('cp_pipeline_name', cp_pipeline_name) - - # Convert to builder config with prepared values - builder_config = self._to_builder_config( - common_config, - strategy_config, - runtime_name_override=runtime_name, - cp_pipeline_name_override=cp_pipeline_name - ) - - result = self.builder.build(builder_config) - - # Extract build outputs from metadata - if result.success and result.metadata: - if 'cr_image_url' in result.metadata: - config_updates.add('cr_image_full_url', result.metadata['cr_image_url']) - if 'cp_pipeline_id' in result.metadata: - config_updates.add('cp_pipeline_id', result.metadata['cp_pipeline_id']) - - result.config_updates = config_updates if config_updates.has_updates() else None - return result - - def deploy(self, common_config: CommonConfig, strategy_config: VeAgentkitConfig) -> DeployResult: - """ - Execute cloud deployment orchestration. - - Steps: - 1. Convert configuration to runner format - 2. Call VeAgentkitRunner.deploy() - 3. Extract and track configuration updates from deployment result - """ - from agentkit.toolkit.models import ConfigUpdates - - runner_config = self._to_runner_config(common_config, strategy_config) - result = self.runner.deploy(runner_config) - - # Extract deployment outputs from result - config_updates = ConfigUpdates() - if result.success: - if result.service_id: - config_updates.add('runtime_id', result.service_id) - if result.endpoint_url: - config_updates.add('runtime_endpoint', result.endpoint_url) - if result.metadata: - if 'runtime_apikey' in result.metadata: - config_updates.add('runtime_apikey', result.metadata['runtime_apikey']) - if 'runtime_name' in result.metadata: - config_updates.add('runtime_name', result.metadata['runtime_name']) - if 'runtime_apikey_name' in result.metadata: - config_updates.add('runtime_apikey_name', result.metadata['runtime_apikey_name']) - if 'runtime_role_name' in result.metadata: - config_updates.add('runtime_role_name', result.metadata['runtime_role_name']) - - result.config_updates = config_updates if config_updates.has_updates() else None - return result - - def invoke(self, common_config: CommonConfig, strategy_config: VeAgentkitConfig, - payload: Any, headers: Optional[dict] = None, - stream: Optional[bool] = None) -> InvokeResult: - """ - Execute service invocation. - - Steps: - 1. Convert configuration to runner format - 2. Call VeAgentkitRunner.invoke() - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.invoke(runner_config, payload, headers, stream) - - def status(self, common_config: CommonConfig, strategy_config: VeAgentkitConfig) -> StatusResult: - """ - Query service status. - - Steps: - 1. Convert configuration to runner format - 2. Call VeAgentkitRunner.status() - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.status(runner_config) - - def destroy(self, common_config: CommonConfig, strategy_config: VeAgentkitConfig, force: bool = False) -> bool: - """ - Destroy cloud runtime. - - Steps: - 1. Convert configuration to runner format - 2. Call VeAgentkitRunner.destroy() - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.destroy(runner_config) - - def _prepare_runtime_name(self, current_runtime_name: str, agent_name: str) -> tuple[str, str]: - """ - Prepare runtime and pipeline names. - - Auto-generates names if not explicitly set. CP Pipeline name must match - Runtime name to maintain consistency in cloud deployment. - - Args: - current_runtime_name: Current runtime name from config. - agent_name: Agent name used for auto-generation. - - Returns: - (runtime_name, cp_pipeline_name): Prepared names. - """ - # Auto-generate if not explicitly set - if current_runtime_name == AUTO_CREATE_VE or current_runtime_name == "": - runtime_name = generate_runtime_name(agent_name) - else: - runtime_name = current_runtime_name - - # CP Pipeline name must match runtime name for cloud consistency - cp_pipeline_name = runtime_name - - return runtime_name, cp_pipeline_name - - def _to_builder_config(self, common_config: CommonConfig, - strategy_config: VeAgentkitConfig, - runtime_name_override: str = None, - cp_pipeline_name_override: str = None) -> VeCPCRBuilderConfig: - """ - Convert VeAgentkitConfig to VeCPCRBuilderConfig. - - Centralizes configuration mapping to keep orchestration logic clear. - Allows overriding runtime and pipeline names for auto-generated values. - - Args: - common_config: Common configuration. - strategy_config: Strategy configuration. - runtime_name_override: Override runtime_name if provided. - cp_pipeline_name_override: Override cp_pipeline_name if provided. - """ - # Retrieve Docker build config from manager (contains CLI runtime options) - docker_build_config = None - if self.config_manager: - docker_build_config = self.config_manager.get_docker_build_config() - - return VeCPCRBuilderConfig( - common_config=common_config, - tos_bucket=strategy_config.tos_bucket, - tos_region=strategy_config.tos_region, - tos_prefix=strategy_config.tos_prefix, - cr_instance_name=strategy_config.cr_instance_name, - cr_namespace_name=strategy_config.cr_namespace_name, - cr_repo_name=strategy_config.cr_repo_name, - cr_region=strategy_config.cr_region, - cp_workspace_name=strategy_config.cp_workspace_name, - cp_pipeline_name=cp_pipeline_name_override or strategy_config.cp_pipeline_name, - cp_pipeline_id=strategy_config.cp_pipeline_id, - image_tag=strategy_config.image_tag, - build_timeout=strategy_config.build_timeout, - docker_build_config=docker_build_config - ) - - def _to_runner_config(self, common_config: CommonConfig, - strategy_config: VeAgentkitConfig) -> VeAgentkitRunnerConfig: - """ - Convert VeAgentkitConfig to VeAgentkitRunnerConfig. - - Centralizes configuration mapping to keep orchestration logic clear. - Merges environment variables from common and strategy configs. - """ - merged_envs = merge_runtime_envs(common_config, strategy_config.to_dict()) - - return VeAgentkitRunnerConfig( - common_config=common_config, - runtime_id=strategy_config.runtime_id, - runtime_name=strategy_config.runtime_name, - runtime_role_name=strategy_config.runtime_role_name, - runtime_apikey=strategy_config.runtime_apikey, - runtime_apikey_name=strategy_config.runtime_apikey_name, - runtime_endpoint=strategy_config.runtime_endpoint, - runtime_envs=merged_envs, - image_url=strategy_config.cr_image_full_url - ) diff --git a/agentkit/toolkit/strategies/hybrid_strategy.py b/agentkit/toolkit/strategies/hybrid_strategy.py deleted file mode 100644 index 0fae3aa..0000000 --- a/agentkit/toolkit/strategies/hybrid_strategy.py +++ /dev/null @@ -1,404 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Hybrid Strategy - Local build + cloud deployment orchestration. - -Builds image locally, pushes to Container Registry, then deploys to VE Runtime. -""" - -from typing import Any, Optional -from agentkit.toolkit.strategies.base import Strategy -from agentkit.toolkit.models import BuildResult, DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.config import ( - AUTO_CREATE_VE, - CommonConfig, - HybridVeAgentkitConfig, - merge_runtime_envs -) -from agentkit.toolkit.builders.local_docker import ( - LocalDockerBuilder, LocalDockerBuilderConfig -) -from agentkit.toolkit.runners.ve_agentkit import ( - VeAgentkitRuntimeRunner, VeAgentkitRunnerConfig -) -from agentkit.toolkit.volcengine.services import CRService, CRServiceConfig - - -class HybridStrategy(Strategy): - """ - Hybrid orchestration strategy combining local build and cloud deployment. - - Orchestration flow: - 1. build: LocalDockerBuilder.build() → BuildResult - 2. push: Push image to Container Registry - 3. deploy: VeAgentkitRuntimeRunner.deploy() → DeployResult - 4. invoke: VeAgentkitRuntimeRunner.invoke() → InvokeResult - 5. status: VeAgentkitRuntimeRunner.status() → StatusResult - - Characteristics: - - Combines local build speed with cloud deployment convenience - - Pure orchestration with no side effects - - Returns Builder/Runner results directly - - Exceptions propagate to Executor for handling - """ - - def __init__(self, config_manager=None, reporter=None): - """ - Initialize HybridStrategy. - - Args: - config_manager: Configuration manager (optional). - reporter: Reporter instance (passed to Builder/Runner). - """ - super().__init__(config_manager, reporter) - - # Lazy initialization to avoid requiring environment variables at init time - self._builder = None - self._runner = None - - @property - def builder(self): - """Lazy-load Builder instance.""" - if self._builder is None: - project_dir = None - if self.config_manager: - project_dir = self.config_manager.get_project_dir() - - self._builder = LocalDockerBuilder( - project_dir=project_dir, - reporter=self.reporter - ) - return self._builder - - @property - def runner(self): - """Lazy-load Runner instance.""" - if self._runner is None: - self._runner = VeAgentkitRuntimeRunner(reporter=self.reporter) - return self._runner - - def build(self, common_config: CommonConfig, strategy_config: HybridVeAgentkitConfig) -> BuildResult: - """ - Execute hybrid build (local build + push to Container Registry). - - Orchestration steps: - 1. Build image locally - 2. Prepare CR configuration (without modifying config object) - 3. Push to CR if configuration is valid - 4. Return BuildResult with ConfigUpdates - """ - from agentkit.toolkit.models import ConfigUpdates - - config_updates = ConfigUpdates() - - builder_config = self._to_builder_config(common_config, strategy_config) - result = self.builder.build(builder_config) - - if not result.success: - return result - - cr_repo_name = self._prepare_cr_config(strategy_config.cr_repo_name, common_config.agent_name) - if cr_repo_name != strategy_config.cr_repo_name: - config_updates.add('cr_repo_name', cr_repo_name) - - should_push, reason = self._should_push_to_cr(strategy_config, cr_repo_name) - if should_push: - cr_updates = self._handle_cr_push(result, strategy_config, cr_repo_name) - config_updates.merge(cr_updates) - else: - self._report_cr_skip_reason(reason, strategy_config) - - result.config_updates = config_updates if config_updates.has_updates() else None - return result - - def deploy(self, common_config: CommonConfig, strategy_config: HybridVeAgentkitConfig) -> DeployResult: - """ - Execute hybrid deployment to VE Runtime. - - Orchestration steps: - 1. Validate CR image URL - 2. Convert configuration - 3. Call VeAgentkitRuntimeRunner.deploy() - 4. Return DeployResult with ConfigUpdates - """ - from agentkit.toolkit.models import ConfigUpdates - - validation_result = self._validate_cr_image_url(strategy_config) - if not validation_result.success: - return validation_result - - runner_config = self._to_runner_config(common_config, strategy_config) - - result = self.runner.deploy(runner_config) - - # Extract and track configuration updates from deployment result - config_updates = ConfigUpdates() - if result.success: - if result.service_id: - config_updates.add('runtime_id', result.service_id) - if result.endpoint_url: - config_updates.add('runtime_endpoint', result.endpoint_url) - if result.metadata: - if 'runtime_apikey' in result.metadata: - config_updates.add('runtime_apikey', result.metadata['runtime_apikey']) - if 'runtime_name' in result.metadata: - config_updates.add('runtime_name', result.metadata['runtime_name']) - if 'runtime_apikey_name' in result.metadata: - config_updates.add('runtime_apikey_name', result.metadata['runtime_apikey_name']) - if 'runtime_role_name' in result.metadata: - config_updates.add('runtime_role_name', result.metadata['runtime_role_name']) - - result.config_updates = config_updates if config_updates.has_updates() else None - return result - - def invoke(self, common_config: CommonConfig, strategy_config: HybridVeAgentkitConfig, - payload: Any, headers: Optional[dict] = None, - stream: Optional[bool] = None) -> InvokeResult: - """ - Invoke the deployed service. - - Orchestration steps: - 1. Convert configuration - 2. Call VeAgentkitRuntimeRunner.invoke() - 3. Return InvokeResult directly - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.invoke(runner_config, payload, headers, stream) - - def status(self, common_config: CommonConfig, strategy_config: HybridVeAgentkitConfig) -> StatusResult: - """ - Query service status. - - Orchestration steps: - 1. Convert configuration - 2. Call VeAgentkitRuntimeRunner.status() - 3. Return StatusResult directly - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.status(runner_config) - - def destroy(self, common_config: CommonConfig, strategy_config: HybridVeAgentkitConfig, force: bool = False) -> bool: - """ - Destroy the VE Runtime. - - Orchestration steps: - 1. Convert configuration - 2. Call VeAgentkitRuntimeRunner.destroy() - """ - runner_config = self._to_runner_config(common_config, strategy_config) - success = self.runner.destroy(runner_config) - return success - - def _prepare_cr_config(self, current_cr_repo_name: str, agent_name: str) -> str: - """ - Prepare CR configuration by auto-filling repository name if needed. - - Args: - current_cr_repo_name: Current CR repository name. - agent_name: Agent name to use as default. - - Returns: - Prepared CR repository name. - """ - if not current_cr_repo_name: - return agent_name or "agentkit-app" - return current_cr_repo_name - - def _should_push_to_cr(self, strategy_config: HybridVeAgentkitConfig, cr_repo_name: str) -> tuple: - """ - Determine whether to push image to Container Registry. - - Args: - strategy_config: Strategy configuration. - cr_repo_name: Prepared CR repository name. - - Returns: - Tuple of (should_push: bool, reason: str). - """ - if not strategy_config.cr_instance_name: - return False, "CR instance name is empty" - - if strategy_config.cr_instance_name == AUTO_CREATE_VE: - return False, "CR instance name is 'Auto'" - - if '{{' in strategy_config.cr_instance_name: - return False, "CR instance name contains unrendered template variables" - - if not cr_repo_name: - return False, "CR repository name is empty" - - return True, "" - - def _handle_cr_push(self, result: BuildResult, strategy_config: HybridVeAgentkitConfig, - cr_repo_name: str) -> 'ConfigUpdates': - """ - Handle pushing image to Container Registry. - - Steps: - 1. Push image to CR - 2. Update result.metadata with CR image URL - 3. Return ConfigUpdates for configuration tracking - 4. Report success message - - Args: - result: Build result containing local image. - strategy_config: Strategy configuration. - cr_repo_name: Prepared CR repository name. - - Returns: - ConfigUpdates object with CR image URL. - """ - from agentkit.toolkit.models import ConfigUpdates - - config_updates = ConfigUpdates() - - local_image = result.image.full_name if result.image else None - if not local_image: - return config_updates - - cr_image_url = self._push_to_cr( - local_image, - strategy_config.cr_instance_name, - strategy_config.cr_namespace_name, - cr_repo_name, - strategy_config.image_tag - ) - - config_updates.add('cr_image_full_url', cr_image_url) - - if not result.metadata: - result.metadata = {} - result.metadata['cr_image_url'] = cr_image_url - - self.reporter.success(f"CR image URL: {cr_image_url}") - - return config_updates - - def _report_cr_skip_reason(self, reason: str, strategy_config: HybridVeAgentkitConfig) -> None: - """Report reason for skipping CR push.""" - if '{{' in strategy_config.cr_instance_name: - self.reporter.warning(f"⚠️ CR instance name contains unrendered template variables: {strategy_config.cr_instance_name}") - self.reporter.warning("⚠️ Ensure volcenginesdkcore is installed to render template variables") - elif strategy_config.cr_instance_name == AUTO_CREATE_VE: - self.reporter.warning("⚠️ CR instance name is 'Auto', skipping push to CR") - self.reporter.warning("⚠️ Use 'agentkit config' to configure a valid CR instance name") - else: - self.reporter.warning(f"⚠️ Invalid CR configuration, skipping push to CR: {reason}") - - def _validate_cr_image_url(self, strategy_config: HybridVeAgentkitConfig) -> DeployResult: - """ - Validate CR image URL is available. - - Hybrid mode requires a CR image. Returns failure if no valid CR image URL exists. - """ - image_url = strategy_config.cr_image_full_url - - if image_url: - return DeployResult(success=True) - - if '{{' in strategy_config.cr_instance_name: - error_msg = ( - f"CR instance name contains unrendered template variables: {strategy_config.cr_instance_name}\n" - f"Ensure volcenginesdkcore is installed to render template variables." - ) - elif strategy_config.cr_instance_name == AUTO_CREATE_VE or not strategy_config.cr_instance_name: - error_msg = ( - f"Hybrid mode requires valid CR configuration. Current cr_instance_name='{strategy_config.cr_instance_name}' is invalid.\n" - f"Use 'agentkit config' to configure a valid CR instance name, or switch to local/cloud mode." - ) - else: - error_msg = ( - "CR image URL not found. Run 'agentkit build' to build and push the image to CR." - ) - - return DeployResult( - success=False, - error=error_msg, - error_code="INVALID_IMAGE_URL" - ) - - def _to_builder_config(self, common_config: CommonConfig, - strategy_config: HybridVeAgentkitConfig) -> LocalDockerBuilderConfig: - """ - Convert HybridVeAgentkitConfig to LocalDockerBuilderConfig. - """ - return LocalDockerBuilderConfig( - common_config=common_config, - image_name=common_config.agent_name or "agentkit-app", - image_tag=strategy_config.image_tag - ) - - def _to_runner_config(self, common_config: CommonConfig, - strategy_config: HybridVeAgentkitConfig) -> VeAgentkitRunnerConfig: - """ - Convert HybridVeAgentkitConfig to VeAgentkitRunnerConfig. - """ - merged_envs = merge_runtime_envs(common_config, strategy_config.to_dict()) - - return VeAgentkitRunnerConfig( - common_config=common_config, - runtime_id=strategy_config.runtime_id or AUTO_CREATE_VE, - runtime_name=strategy_config.runtime_name, - runtime_role_name=strategy_config.runtime_role_name, - runtime_apikey=strategy_config.runtime_apikey, - runtime_apikey_name=strategy_config.runtime_apikey_name, - runtime_endpoint=strategy_config.runtime_endpoint, - runtime_envs=merged_envs, - image_url=strategy_config.cr_image_full_url - ) - - def _push_to_cr(self, local_image: str, cr_instance: str, - cr_namespace: str, cr_repo: str, tag: str) -> str: - """ - Push local image to Container Registry. - - Args: - local_image: Local image name (e.g., agentkit-app:v1.0). - cr_instance: CR instance name. - cr_namespace: CR namespace. - cr_repo: CR repository name. - tag: Image tag. - - Returns: - Full CR image URL. - - Raises: - Exception: If image push fails. Exceptions are handled by Executor. - """ - cr_config = CRServiceConfig( - instance_name=cr_instance, - namespace_name=cr_namespace, - repo_name=cr_repo - ) - - cr_service = CRService(reporter=self.reporter) - - import docker - client = docker.from_env() - image = client.images.get(local_image) - image_id = image.id - - self.reporter.info(f"Pushing image to CR: {cr_instance}/{cr_namespace}/{cr_repo}:{tag}") - success, result = cr_service.login_and_push_image( - cr_config=cr_config, - image_id=image_id, - image_tag=tag, - namespace=cr_namespace - ) - - if not success: - raise Exception(f"Image push failed: {result}") - - return result diff --git a/agentkit/toolkit/strategies/local_strategy.py b/agentkit/toolkit/strategies/local_strategy.py deleted file mode 100644 index 646b472..0000000 --- a/agentkit/toolkit/strategies/local_strategy.py +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Local Docker orchestration strategy. - -Pure orchestration logic that delegates to LocalDockerBuilder and LocalDockerRunner. -Error handling, progress reporting, and logging are handled by the Executor layer. -""" - -from typing import Any, Optional -from agentkit.toolkit.strategies.base import Strategy -from agentkit.toolkit.models import BuildResult, DeployResult, InvokeResult, StatusResult -from agentkit.toolkit.config import CommonConfig, LocalDockerConfig, merge_runtime_envs -from agentkit.toolkit.builders.local_docker import ( - LocalDockerBuilder, LocalDockerBuilderConfig -) -from agentkit.toolkit.runners.local_docker import ( - LocalDockerRunner, LocalDockerRunnerConfig -) - - -class LocalStrategy(Strategy): - """ - Local Docker orchestration strategy. - - Orchestration flow: - 1. build: LocalDockerBuilder.build() → BuildResult - 2. deploy: LocalDockerRunner.deploy() → DeployResult - 3. invoke: LocalDockerRunner.invoke() → InvokeResult - 4. status: LocalDockerRunner.status() → StatusResult - - Characteristics: - - Pure orchestration with no side effects - - Directly returns Builder/Runner results - - Exceptions are propagated to the Executor layer - """ - - def __init__(self, config_manager=None, reporter=None): - """ - Initialize LocalStrategy. - - Args: - config_manager: Configuration manager (optional) - reporter: Reporter instance to pass to Builder/Runner - """ - super().__init__(config_manager, reporter) - - # Lazy initialization to avoid requiring environment variables at init time - self._builder = None - self._runner = None - - @property - def builder(self): - """Lazy-load LocalDockerBuilder instance.""" - if self._builder is None: - project_dir = None - if self.config_manager: - project_dir = self.config_manager.get_project_dir() - - self._builder = LocalDockerBuilder( - project_dir=project_dir, - reporter=self.reporter - ) - return self._builder - - @property - def runner(self): - """Lazy-load LocalDockerRunner instance.""" - if self._runner is None: - self._runner = LocalDockerRunner(reporter=self.reporter) - return self._runner - - def build(self, common_config: CommonConfig, strategy_config: LocalDockerConfig) -> BuildResult: - """ - Execute local Docker build. - - Steps: - 1. Convert configuration to builder format - 2. Call LocalDockerBuilder.build() - 3. Extract and track configuration updates from build result - 4. Return BuildResult - """ - from agentkit.toolkit.models import ConfigUpdates - - builder_config = self._to_builder_config(common_config, strategy_config) - result = self.builder.build(builder_config) - - # Extract and track configuration updates from build result - config_updates = ConfigUpdates() - - if result.success: - if result.build_timestamp: - config_updates.add('build_timestamp', result.build_timestamp.isoformat()) - - if result.image: - config_updates.add('full_image_name', result.image.full_name) - config_updates.add('image_id', result.image.digest or "") - - result.config_updates = config_updates if config_updates.has_updates() else None - - return result - - def deploy(self, common_config: CommonConfig, strategy_config: LocalDockerConfig) -> DeployResult: - """ - Execute local Docker deployment. - - Steps: - 1. Convert configuration to runner format - 2. Call LocalDockerRunner.deploy() - 3. Extract and track configuration updates from deployment result - 4. Return DeployResult - """ - from agentkit.toolkit.models import ConfigUpdates - - runner_config = self._to_runner_config(common_config, strategy_config) - result = self.runner.deploy(runner_config) - - # Extract and track configuration updates from deployment result - config_updates = ConfigUpdates() - - if result.success: - if result.deploy_timestamp: - config_updates.add('deploy_timestamp', result.deploy_timestamp.isoformat()) - - if result.container_id: - config_updates.add('container_id', result.container_id) - - if result.metadata and 'container_name' in result.metadata: - config_updates.add('container_name', result.metadata['container_name']) - - if result.endpoint_url: - config_updates.add('endpoint', result.endpoint_url) - - result.config_updates = config_updates if config_updates.has_updates() else None - - return result - - def invoke(self, common_config: CommonConfig, strategy_config: LocalDockerConfig, - payload: Any, headers: Optional[dict] = None, - stream: Optional[bool] = None) -> InvokeResult: - """ - Invoke the deployed service. - - Args: - common_config: Common application configuration - strategy_config: Strategy-specific configuration - payload: Request payload - headers: Optional HTTP headers - stream: Optional streaming flag - - Returns: - InvokeResult with response data - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.invoke(runner_config, payload, headers, stream) - - def status(self, common_config: CommonConfig, strategy_config: LocalDockerConfig) -> StatusResult: - """ - Query the service status. - - Returns: - StatusResult with current container status - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.status(runner_config) - - def stop(self, common_config: CommonConfig, strategy_config: LocalDockerConfig) -> bool: - """ - Stop the container without destroying it. - - Returns: - True if stop was successful, False otherwise - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.stop(runner_config) - - def destroy(self, common_config: CommonConfig, strategy_config: LocalDockerConfig, force: bool = False) -> bool: - """ - Destroy the container and related resources. - - Args: - force: Force destruction even if container is running - - Returns: - True if destruction was successful, False otherwise - """ - runner_config = self._to_runner_config(common_config, strategy_config) - return self.runner.destroy(runner_config) - - def _to_builder_config(self, common_config: CommonConfig, - strategy_config: LocalDockerConfig) -> LocalDockerBuilderConfig: - """ - Convert configuration to builder format. - - Centralizes configuration mapping and allows overriding with CLI options. - """ - # Retrieve Docker build config from manager (contains CLI runtime options) - docker_build_config = None - if self.config_manager: - docker_build_config = self.config_manager.get_docker_build_config() - - return LocalDockerBuilderConfig( - common_config=common_config, - image_name=common_config.agent_name or "agentkit-app", - image_tag=strategy_config.image_tag, - docker_build_config=docker_build_config - ) - - def _to_runner_config(self, common_config: CommonConfig, - strategy_config: LocalDockerConfig) -> LocalDockerRunnerConfig: - """ - Convert configuration to runner format. - - Centralizes configuration mapping and merges environment variables from - both application and strategy levels. - """ - merged_envs = merge_runtime_envs(common_config, strategy_config.to_dict()) - - return LocalDockerRunnerConfig( - common_config=common_config, - full_image_name=strategy_config.full_image_name, - container_name=strategy_config.container_name, - container_id=strategy_config.container_id, - ports=strategy_config.ports, - volumes=strategy_config.volumes, - environment=merged_envs, - invoke_port=strategy_config.invoke_port - ) diff --git a/agentkit/toolkit/utils/__init__.py b/agentkit/toolkit/utils/__init__.py deleted file mode 100644 index 196fb7f..0000000 --- a/agentkit/toolkit/utils/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Utility functions and classes.""" - -from .agent_parser import AgentParser - -__all__ = ['AgentParser'] diff --git a/agentkit/toolkit/utils/agent_parser.py b/agentkit/toolkit/utils/agent_parser.py deleted file mode 100644 index 9882e5f..0000000 --- a/agentkit/toolkit/utils/agent_parser.py +++ /dev/null @@ -1,217 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Agent parser utility - Parse user's Agent definition files.""" - -import re -import logging -from pathlib import Path -from typing import Optional, List, Tuple - -from agentkit.toolkit.models import AgentFileInfo - - -logger = logging.getLogger(__name__) - - -class AgentParser: - """Utility for parsing user-provided Agent definition files.""" - - def parse_agent_file( - self, - file_path: str, - agent_var_name: Optional[str] = None - ) -> AgentFileInfo: - """ - Parse an Agent definition file and extract key information. - - Args: - file_path: Path to the Agent definition file. - agent_var_name: Optional explicit Agent variable name. - - Returns: - AgentFileInfo: Parsed information about the Agent file. - - Raises: - FileNotFoundError: If the file doesn't exist. - ValueError: If no Agent definition is found. - """ - file_path_obj = Path(file_path).resolve() - - # Validate file exists - if not file_path_obj.exists(): - raise FileNotFoundError(f"Agent file not found: {file_path}") - - if not file_path_obj.is_file(): - raise ValueError(f"Path is not a file: {file_path}") - - if file_path_obj.suffix != '.py': - raise ValueError(f"File must be a Python file (.py): {file_path}") - - # Read file content - try: - content = file_path_obj.read_text(encoding='utf-8') - except Exception as e: - raise ValueError(f"Failed to read file {file_path}: {e}") - - # Parse file content - module_name = file_path_obj.stem - file_name = file_path_obj.name - - # Find Agent variable - if agent_var_name: - # User specified the variable name - if not self._validate_agent_var(content, agent_var_name): - raise ValueError( - f"Specified variable '{agent_var_name}' not found or " - f"is not an Agent instance in {file_name}" - ) - detected_var = agent_var_name - else: - # Auto-detect Agent variable - detected_var = self._detect_agent_variable(content) - if not detected_var: - raise ValueError( - f"Could not find Agent definition in {file_name}.\n" - f"Hints:\n" - f" - Make sure your file contains: agent = Agent(...)\n" - f" - Try specifying the variable name with --agent-var" - ) - - # Extract additional information - imports = self._extract_imports(content) - has_runner = self._detect_runner(content) - has_entrypoint = self._detect_entrypoint(content) - detected_tools = self._detect_tools(content) - - return AgentFileInfo( - file_path=str(file_path_obj), - agent_var_name=detected_var, - module_name=module_name, - file_name=file_name, - imports=imports, - has_runner=has_runner, - has_entrypoint=has_entrypoint, - detected_tools=detected_tools - ) - - def validate_agent_file(self, file_path: str) -> Tuple[bool, Optional[str]]: - """ - Validate if the file contains a valid Agent definition. - - Args: - file_path: Path to the file to validate. - - Returns: - Tuple of (is_valid, error_message). - """ - try: - self.parse_agent_file(file_path) - return True, None - except FileNotFoundError as e: - return False, str(e) - except ValueError as e: - return False, str(e) - except Exception as e: - return False, f"Unexpected error: {e}" - - def _detect_agent_variable(self, content: str) -> Optional[str]: - """ - Detect Agent variable name using pattern matching. - - Patterns to match: - 1. variable_name = Agent(...) - 2. variable_name = Agent( - """ - # Pattern 1: Single line assignment - # Match: agent = Agent(...) or my_agent = Agent(...) - pattern1 = r'(\w+)\s*=\s*Agent\s*\(' - - matches = re.findall(pattern1, content, re.MULTILINE) - - if matches: - # If multiple matches, prefer common names or last one - for preferred in ['agent', 'main_agent', 'my_agent']: - if preferred in matches: - logger.info(f"Detected Agent variable: {preferred}") - return preferred - - # Return the last match - detected = matches[-1] - logger.info(f"Detected Agent variable: {detected}") - return detected - - return None - - def _validate_agent_var(self, content: str, var_name: str) -> bool: - """ - Validate that the specified variable is an Agent instance. - """ - pattern = rf'\b{re.escape(var_name)}\s*=\s*Agent\s*\(' - return bool(re.search(pattern, content)) - - def _extract_imports(self, content: str) -> List[str]: - """ - Extract import statements from the file. - - Returns list of import lines for reference. - """ - import_lines = [] - - # Match: from xxx import yyy - # Match: import xxx - import_pattern = r'^(?:from\s+[\w.]+\s+import\s+.+|import\s+[\w.,\s]+)' - - for line in content.split('\n'): - line = line.strip() - if re.match(import_pattern, line): - import_lines.append(line) - - return import_lines - - def _detect_runner(self, content: str) -> bool: - """ - Detect if Runner is already defined in the file. - """ - # Pattern: xxx = Runner(...) - pattern = r'\w+\s*=\s*Runner\s*\(' - return bool(re.search(pattern, content)) - - def _detect_entrypoint(self, content: str) -> bool: - """ - Detect if an entrypoint function is already defined. - """ - # Pattern: @app.entrypoint - pattern = r'@\w+\.entrypoint' - return bool(re.search(pattern, content)) - - def _detect_tools(self, content: str) -> List[str]: - """ - Detect which tools are used in the file. - - Common tools: web_search, run_code, get_weather - """ - tools = [] - - tool_patterns = { - 'web_search': r'\bweb_search\b', - 'run_code': r'\brun_code\b', - 'get_weather': r'\bget_weather\b', - } - - for tool_name, pattern in tool_patterns.items(): - if re.search(pattern, content): - tools.append(tool_name) - - return tools diff --git a/agentkit/toolkit/volcengine/__init__.py b/agentkit/toolkit/volcengine/__init__.py deleted file mode 100644 index 2edd41b..0000000 --- a/agentkit/toolkit/volcengine/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Volcengine - 火山引擎平台集成 - -CodePipeline、AgentKit Runtime、容器镜像服务、IAM认证等 -""" - -# 使用延迟导入,避免导入时的依赖问题 -def __getattr__(name): - if name == "VeCodePipeline": - from .code_pipeline import VeCodePipeline - return VeCodePipeline - elif name == "VeCR": - from .cr import VeCR - return VeCR - elif name == "VeIAM": - from .iam import VeIAM - return VeIAM - elif name == "CRService": - from .services import CRService - return CRService - elif name == "CRServiceConfig": - from .services import CRServiceConfig - return CRServiceConfig - elif name == "TOSService": - from .services import TOSService - return TOSService - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") - -__all__ = [ - "VeCodePipeline", - "VeCR", - "VeIAM", - "CRService", - "CRServiceConfig", - "TOSService", -] diff --git a/agentkit/toolkit/volcengine/code_pipeline.py b/agentkit/toolkit/volcengine/code_pipeline.py deleted file mode 100644 index 36cf121..0000000 --- a/agentkit/toolkit/volcengine/code_pipeline.py +++ /dev/null @@ -1,917 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import requests - -import logging - -from agentkit.utils.ve_sign import ve_request, get_volc_ak_sk_region - -logger = logging.getLogger(__name__) - - -class VeCodePipeline: - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - ) -> None: - if not any([access_key, secret_key, region]): - access_key, secret_key, region = get_volc_ak_sk_region('CP') - else: - if not all([access_key, secret_key, region]): - raise ValueError("Error create cr instance: missing access key, secret key or region") - self.volcengine_access_key = access_key - self.volcengine_secret_key = secret_key - self.region = region - self.service = "CP" - self.version = "2023-05-01" - self.host = "open.volcengineapi.com" - self.content_type = "application/json" - - def _get_default_workspace(self) -> str: - logger.info("Getting default workspace...") - - res = ve_request( - request_body={}, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetDefaultWorkspaceInner", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - logger.info( - f"Default workspace retrieved successfully, workspace id {res['Result']['Id']}, res: {res}", - ) - return res["Result"]["Id"] - except KeyError: - raise Exception(f"Get default workspace failed: {res}") - - def create_workspace( - self, - name: str, - visibility: str, - description: str = "", - visible_users: list[dict[str, int]] | None = None, - ) -> str: - """ - Create a new workspace. - - Args: - name: The name of the workspace (required) - visibility: Visibility setting - "Account" (visible to all users) or "Specified" (visible to specified users only) - description: Description of the workspace (optional) - visible_users: List of users who can see the workspace (optional, each user dict contains AccountId and UserId) - - Returns: - The workspace ID - - Raises: - Exception: If workspace creation fails - - Example: - # Create a workspace visible to all users - workspace_id = cp.create_workspace( - name="my-workspace", - visibility="Account" - ) - - # Create a workspace visible to specific users - workspace_id = cp.create_workspace( - name="my-workspace", - visibility="Specified", - description="My demo workspace", - visible_users=[{"AccountId": 24506499, "UserId": 0}] - ) - """ - logger.info(f"Creating workspace: {name}...") - - request_body = { - "Name": name, - "Visibility": visibility, - } - - if description: - request_body["Description"] = description - - if visible_users: - request_body["VisibleUsers"] = visible_users - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateWorkspace", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - workspace_id = res["Result"]["Id"] - logger.info(f"Workspace created successfully, workspace ID: {workspace_id}") - return workspace_id - except KeyError: - raise Exception(f"Create workspace failed: {res}") - - def list_workspaces( - self, - page_number: int = 1, - page_size: int = 10, - name_filter: str = "", - workspace_ids: list[str] | None = None, - ) -> dict: - """ - List workspaces with filtering options. - - Args: - page_number: Page number for pagination (starts from 1) - page_size: Number of items per page - name_filter: Filter workspaces by name (fuzzy search, optional) - workspace_ids: Filter by specific workspace IDs (optional) - - Returns: - The response containing workspace items and pagination info: - { - "Items": [...], # List of workspace objects - "PageSize": 10, # Current page size - "PageNumber": 1, # Current page number - "TotalCount": 1 # Total number of workspaces - } - - Raises: - Exception: If the request fails - - Example: - # List all workspaces - result = cp.list_workspaces() - - # List workspaces with name filter - result = cp.list_workspaces(name_filter="work") - - # List specific workspaces by IDs - result = cp.list_workspaces(workspace_ids=["2c7a85e4ac034eb790b096705694****"]) - """ - logger.info("Listing workspaces...") - - request_body = { - "PageNumber": page_number, - "PageSize": page_size, - } - - # Add filter if name_filter or workspace_ids are provided - if name_filter or workspace_ids: - request_body["Filter"] = {} - if name_filter: - request_body["Filter"]["Name"] = name_filter - if workspace_ids: - request_body["Filter"]["Ids"] = workspace_ids - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListWorkspaces", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - result = res["Result"] - total_count = result.get("TotalCount", 0) - items_count = len(result.get("Items", [])) - logger.info(f"Successfully listed workspaces, found {total_count} total, {items_count} in current page") - return result - except KeyError: - raise Exception(f"List workspaces failed: {res}") - - def get_workspaces_by_name( - self, - name: str, - page_number: int = 1, - page_size: int = 10, - ) -> dict: - """ - Get workspaces filtered by name. - - This is a convenience method that wraps list_workspaces with a name filter. - - Args: - name: The name to filter workspaces by (fuzzy search) - page_number: Page number for pagination (starts from 1) - page_size: Number of items per page - - Returns: - The response containing workspace items and pagination info: - { - "Items": [...], # List of workspace objects matching the name - "PageSize": 10, # Current page size - "PageNumber": 1, # Current page number - "TotalCount": 1 # Total number of matching workspaces - } - - Raises: - Exception: If the request fails - - Example: - # Get workspaces with name containing "work" - result = cp.get_workspaces_by_name(name="work") - for workspace in result["Items"]: - print(f"Workspace: {workspace['Name']} (ID: {workspace['Id']})") - """ - logger.info(f"Getting workspaces by name: {name}...") - return self.list_workspaces( - page_number=page_number, - page_size=page_size, - name_filter=name, - ) - - def workspace_exists_by_name(self, name: str) -> bool: - """ - Check if a workspace exists by name. - - Args: - name: The workspace name to check - - Returns: - True if at least one workspace with the given name exists, False otherwise - - Example: - # Check if workspace exists - if cp.workspace_exists_by_name("my-workspace"): - print("Workspace exists") - else: - print("Workspace does not exist") - """ - logger.info(f"Checking if workspace exists by name: {name}...") - result = self.get_workspaces_by_name(name=name, page_size=1) - exists = result.get("TotalCount", 0) > 0 - logger.info(f"Workspace '{name}' exists: {exists}") - return exists - - - def _create_pipeline( - self, - workspace_id: str, - pipeline_name: str, - spec: str, - parameters: list[dict[str, str]] | None = None, - - ) -> str: - logger.info("Creating pipeline...") - res = ve_request( - request_body={ - "WorkspaceId": workspace_id, - "Name": pipeline_name, - "Spec": spec, - "Parameters": parameters or [], - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreatePipeline", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - logger.info( - f"Pipeline created successfully, pipeline id {res['Result']['Id']}", - ) - return res["Result"]["Id"] - except KeyError: - raise Exception(f"Create pipeline failed: {res}") - - - def run_pipeline( - self, - workspace_id: str, - pipeline_id: str, - description: str = "", - parameters: list[dict[str, str]] | None = None, - resources: list[dict[str, str]] | None = None, - ) -> str: - """ - Run a pipeline with the given parameters. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID to run - description: Description of this pipeline run - parameters: List of parameters with key-value pairs - resources: List of resources with ResourceId and Reference - - Returns: - The pipeline run ID - - Raises: - Exception: If the pipeline run fails - """ - logger.info(f"Running pipeline {pipeline_id} in workspace {workspace_id}...") - - request_body = { - "WorkspaceId": workspace_id, - "Id": pipeline_id, - } - - if description: - request_body["Description"] = description - - if parameters: - request_body["Parameters"] = parameters - - if resources: - request_body["Resources"] = resources - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FRunPipeline", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - run_id = res["Result"]["Id"] - logger.info(f"Pipeline run started successfully, run ID: {run_id}") - return run_id - except KeyError: - raise Exception(f"Run pipeline failed: {res}") - - def run_pipeline_with_defaults( - self, - pipeline_id: str, - description: str = "", - parameters: list[dict[str, str]] | None = None, - resources: list[dict[str, str]] | None = None, - ) -> str: - """ - Run a pipeline using the default workspace. - - Args: - pipeline_id: The pipeline ID to run - description: Description of this pipeline run - parameters: List of parameters with key-value pairs - resources: List of resources with ResourceId and Reference - - Returns: - The pipeline run ID - - Raises: - Exception: If the pipeline run fails - """ - workspace_id = self._get_default_workspace() - return self.run_pipeline( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - description=description, - parameters=parameters, - resources=resources, - ) - - def list_pipeline_runs( - self, - workspace_id: str, - pipeline_id: str, - next_token: str = "", - max_results: int = 10, - statuses: list[str] | None = None, - run_ids: list[str] | None = None, - ) -> dict: - """ - List pipeline runs with filtering options. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID to query - next_token: Pagination token for next page - max_results: Maximum number of results to return - statuses: Filter by run statuses (e.g., ["InProgress", "Succeeded", "Failed"]) - run_ids: Filter by specific run IDs - - Returns: - The response containing pipeline runs and next token - - Raises: - Exception: If the request fails - """ - - request_body = { - "WorkspaceId": workspace_id, - "PipelineId": pipeline_id, - "MaxResults": max_results, - } - - if next_token: - request_body["NextToken"] = next_token - - if statuses or run_ids: - request_body["Filter"] = {} - if statuses: - request_body["Filter"]["Statuses"] = statuses - if run_ids: - request_body["Filter"]["Ids"] = run_ids - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListPipelineRuns", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - result = res["Result"] - return result - except KeyError: - raise Exception(f"List pipeline runs failed: {res}") - - def get_pipeline_run_status( - self, - workspace_id: str, - pipeline_id: str, - run_id: str, - ) -> str: - """ - Get the status of a specific pipeline run. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID - run_id: The pipeline run ID to query - - Returns: - The status of the pipeline run - - Raises: - Exception: If the request fails or run not found - """ - - # List pipeline runs with specific run ID filter - result = self.list_pipeline_runs( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - run_ids=[run_id], - max_results=1 - ) - - items = result.get("Items", []) - if not items: - raise Exception(f"Pipeline run {run_id} not found") - - status = items[0].get("Status", "Unknown") - return status - - def list_pipelines( - self, - workspace_id: str, - page_number: int = 1, - page_size: int = 10, - name_filter: str = "", - pipeline_ids: list[str] | None = None, - ) -> dict: - """ - List pipelines in a workspace with filtering options. - - Args: - workspace_id: The workspace ID to query pipelines from - page_number: Page number for pagination (starts from 1) - page_size: Number of items per page (max 100) - name_filter: Filter pipelines by name (fuzzy search, optional) - pipeline_ids: Filter by specific pipeline IDs (optional) - - Returns: - The response containing pipeline items and pagination info: - { - "Items": [...], # List of pipeline objects - "PageSize": 10, # Current page size - "PageNumber": 1, # Current page number - "TotalCount": 1 # Total number of pipelines - } - - Raises: - Exception: If the request fails - - Example: - # List all pipelines in workspace - result = cp.list_pipelines(workspace_id="ws-123") - - # List pipelines with name filter - result = cp.list_pipelines(workspace_id="ws-123", name_filter="test") - - # List specific pipelines by IDs - result = cp.list_pipelines(workspace_id="ws-123", pipeline_ids=["pipe-1", "pipe-2"]) - """ - logger.info(f"Listing pipelines in workspace {workspace_id}...") - - request_body = { - "WorkspaceId": workspace_id, - "PageNumber": page_number, - "PageSize": page_size, - } - - # Add filter if name_filter or pipeline_ids are provided - if name_filter or pipeline_ids: - request_body["Filter"] = {} - if name_filter: - request_body["Filter"]["Name"] = name_filter - if pipeline_ids: - request_body["Filter"]["Ids"] = pipeline_ids - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListPipelines", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - result = res["Result"] - total_count = result.get("TotalCount", 0) - items_count = len(result.get("Items", [])) - logger.info(f"Successfully listed pipelines, found {total_count} total, {items_count} in current page") - return result - except KeyError: - raise Exception(f"List pipelines failed: {res}") - - def list_pipelines_with_defaults( - self, - page_number: int = 1, - page_size: int = 10, - name_filter: str = "", - pipeline_ids: list[str] | None = None, - ) -> dict: - """ - List pipelines using the default workspace. - - Args: - page_number: Page number for pagination (starts from 1) - page_size: Number of items per page (max 100) - name_filter: Filter pipelines by name (fuzzy search, optional) - pipeline_ids: Filter by specific pipeline IDs (optional) - - Returns: - The response containing pipeline items and pagination info - - Raises: - Exception: If the request fails - - Example: - # List all pipelines in default workspace - result = cp.list_pipelines_with_defaults() - - # Search for pipelines containing "test" in name - result = cp.list_pipelines_with_defaults(name_filter="test") - """ - workspace_id = self._get_default_workspace() - return self.list_pipelines( - workspace_id=workspace_id, - page_number=page_number, - page_size=page_size, - name_filter=name_filter, - pipeline_ids=pipeline_ids, - ) - def list_pipeline_run_stages_inner( - self, - workspace_id: str, - pipeline_id: str, - pipeline_run_id: str, - ) -> dict: - """ - List all stages of a pipeline run with detailed task and step information. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID - pipeline_run_id: The pipeline run ID to query stages from - - Returns: - The response containing stage items and context: - { - "Items": [ - { - "Id": "...", - "Name": "...", - "DisplayName": "...", - "Status": "...", - "Tasks": [...] - } - ], - "context": {...} - } - - Raises: - Exception: If the request fails - - Example: - # List pipeline run stages - result = cp.list_pipeline_run_stages_inner( - workspace_id="x", - pipeline_id="x", - pipeline_run_id="x" - ) - - # Access stage information - for stage in result["Items"]: - print(f"Stage: {stage['DisplayName']} - Status: {stage['Status']}") - for task in stage["Tasks"]: - print(f" Task: {task['DisplayName']} - Status: {task['Status']}") - """ - logger.info(f"Listing pipeline run stages for run {pipeline_run_id}...") - - request_body = { - "WorkspaceId": workspace_id, - "PipelineId": pipeline_id, - "PipelineRunId": pipeline_run_id, - } - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListPipelineRunStagesInner", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - result = res["Result"] - items_count = len(result.get("Items", [])) - logger.info(f"Successfully listed pipeline run stages, found {items_count} stages") - return result - except KeyError: - raise Exception(f"List pipeline run stages failed: {res}") - - def get_task_run_log_download_uri( - self, - workspace_id: str, - pipeline_id: str, - pipeline_run_id: str, - task_run_id: str, - task_id: str, - step_name: str, - ) -> str: - """ - Get the download URI for task run logs. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID - pipeline_run_id: The pipeline run ID - task_run_id: The task run ID - task_id: The task ID - step_name: The step name to get logs from - - Returns: - The download URL for the task run logs - - Raises: - Exception: If the request fails - - Example: - # Get task run log download URI - log_url = cp.get_task_run_log_download_uri( - workspace_id="****", - pipeline_id="****", - pipeline_run_id="****", - task_run_id="****", - task_id="****", - step_name="step-name" - ) - print(f"Log URL: {log_url}") - """ - logger.info(f"Getting task run log download URI for task run {task_run_id}, step {step_name}...") - - request_body = { - "WorkspaceId": workspace_id, - "PipelineId": pipeline_id, - "PipelineRunId": pipeline_run_id, - "TaskRunId": task_run_id, - "TaskId": task_id, - "StepName": step_name, - } - - res = ve_request( - request_body=request_body, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetTaskRunLogDownloadURI", - ak=self.volcengine_access_key, - sk=self.volcengine_secret_key, - service=self.service, - version=self.version, - region=self.region, - host=self.host, - content_type=self.content_type, - ) - - try: - url = res["Result"]["Url"] - logger.info("Successfully retrieved task run log download URI") - return url - except KeyError: - raise Exception(f"Get task run log download URI failed: {res}") - - def download_and_merge_pipeline_logs( - self, - workspace_id: str, - pipeline_id: str, - pipeline_run_id: str, - output_file: str = "pipeline_run.log", - ) -> str: - """ - Download and merge all step logs from a pipeline run into a single file. - - This function retrieves all stages, tasks, and steps from a pipeline run, - downloads the log for each step, and merges them in chronological order. - If a step log fails to download, it records the failure instead of raising an error. - - Args: - workspace_id: The workspace ID - pipeline_id: The pipeline ID - pipeline_run_id: The pipeline run ID to download logs from - output_file: The output file path for merged logs (default: "pipeline_run.log") - - Returns: - The path to the merged log file - - Raises: - Exception: If unable to retrieve pipeline run stages - - Example: - # Download and merge all logs - log_file = cp.download_and_merge_pipeline_logs( - workspace_id="******", - pipeline_id="******", - pipeline_run_id="******", - output_file="build_logs.log" - ) - - # Read and display first 100 lines - with open(log_file, 'r', encoding='utf-8') as f: - lines = f.readlines() - for line in lines[:100]: - print(line.rstrip()) - """ - logger.info(f"Downloading and merging logs for pipeline run {pipeline_run_id}...") - - # Get all stages information - try: - stages_data = self.list_pipeline_run_stages_inner( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - pipeline_run_id=pipeline_run_id, - ) - except Exception as e: - logger.error(f"Failed to retrieve pipeline run stages: {e}") - raise - - # Open output file for writing - with open(output_file, 'w', encoding='utf-8') as out_file: - # Write header information - out_file.write("=" * 80 + "\n") - out_file.write("PIPELINE RUN LOG\n") - out_file.write("=" * 80 + "\n") - out_file.write(f"Workspace ID: {workspace_id}\n") - out_file.write(f"Pipeline ID: {pipeline_id}\n") - out_file.write(f"Pipeline Run ID: {pipeline_run_id}\n") - out_file.write("=" * 80 + "\n\n") - - # Process each stage - stages = stages_data.get("Items", []) - total_steps = 0 - successful_downloads = 0 - failed_downloads = 0 - - for stage_idx, stage in enumerate(stages, 1): - stage_id = stage.get("Id", "unknown") - stage_name = stage.get("Name", "unknown") - stage_display_name = stage.get("DisplayName", "unknown") - stage_status = stage.get("Status", "unknown") - - out_file.write("\n" + "=" * 80 + "\n") - out_file.write(f"STAGE {stage_idx}: {stage_display_name} ({stage_name})\n") - out_file.write(f"Stage ID: {stage_id}\n") - out_file.write(f"Status: {stage_status}\n") - out_file.write("=" * 80 + "\n\n") - - # Process each task in the stage - tasks = stage.get("Tasks", []) - for task_idx, task in enumerate(tasks, 1): - task_id = task.get("Id", "unknown") - task_run_id = task.get("TaskRunID", "unknown") - task_name = task.get("Name", "unknown") - task_display_name = task.get("DisplayName", "unknown") - task_status = task.get("Status", "unknown") - task_start_time = task.get("StartTime", "unknown") - task_finish_time = task.get("FinishTime", "unknown") - - out_file.write("\n" + "-" * 80 + "\n") - out_file.write(f"TASK {task_idx}: {task_display_name} ({task_name})\n") - out_file.write(f"Task ID: {task_id}\n") - out_file.write(f"Task Run ID: {task_run_id}\n") - out_file.write(f"Status: {task_status}\n") - out_file.write(f"Start Time: {task_start_time}\n") - out_file.write(f"Finish Time: {task_finish_time}\n") - out_file.write("-" * 80 + "\n\n") - - # Process each step in the task - steps = task.get("Steps", []) - for step_idx, step in enumerate(steps, 1): - step_name = step.get("Name", "unknown") - step_status = step.get("Status", "unknown") - step_start_time = step.get("StartTime", "unknown") - step_finish_time = step.get("FinishTime", "unknown") - - total_steps += 1 - - out_file.write(f"\n{'*' * 60}\n") - out_file.write(f"STEP {step_idx}: {step_name}\n") - out_file.write(f"Status: {step_status}\n") - out_file.write(f"Start Time: {step_start_time}\n") - out_file.write(f"Finish Time: {step_finish_time}\n") - out_file.write(f"{'*' * 60}\n\n") - - # Try to download the step log - try: - # Get log download URI - log_url = self.get_task_run_log_download_uri( - workspace_id=workspace_id, - pipeline_id=pipeline_id, - pipeline_run_id=pipeline_run_id, - task_run_id=task_run_id, - task_id=task_id, - step_name=step_name, - ) - - # Download the log content - response = requests.get(log_url, timeout=30) - response.raise_for_status() - - log_content = response.text - out_file.write(log_content) - - if not log_content.endswith('\n'): - out_file.write('\n') - - successful_downloads += 1 - logger.info(f"Successfully downloaded log for step: {step_name}") - - except Exception as e: - failed_downloads += 1 - error_msg = f"[ERROR] Failed to download log for step '{step_name}': {str(e)}\n" - out_file.write(error_msg) - logger.warning(f"Failed to download log for step {step_name}: {e}") - - out_file.write("\n") - - # Write summary at the end - out_file.write("\n" + "=" * 80 + "\n") - out_file.write("LOG DOWNLOAD SUMMARY\n") - out_file.write("=" * 80 + "\n") - out_file.write(f"Total Steps: {total_steps}\n") - out_file.write(f"Successful Downloads: {successful_downloads}\n") - out_file.write(f"Failed Downloads: {failed_downloads}\n") - out_file.write("=" * 80 + "\n") - - logger.info(f"Log file created: {output_file} ({successful_downloads}/{total_steps} steps downloaded)") - return output_file - diff --git a/agentkit/toolkit/volcengine/cr.py b/agentkit/toolkit/volcengine/cr.py deleted file mode 100644 index ed56941..0000000 --- a/agentkit/toolkit/volcengine/cr.py +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -import time - -from agentkit.utils.ve_sign import ve_request - -logger = logging.getLogger(__name__) - -DEFAULT_CR_INSTANCE_NAME = "agentkit-platform-instance" -DEFAULT_CR_NAMESPACE_NAME = "agenkit-platform-namespace" -DEFAULT_CR_REPO_NAME = "agentkit-platform-repo" - -class VeCR: - def __init__(self, access_key: str, secret_key: str, region: str = "cn-beijing"): - self.ak = access_key - self.sk = secret_key - self.region = region - assert region in ["cn-beijing", "cn-guangzhou", "cn-shanghai"] - self.version = "2022-05-12" - - def _create_instance(self, instance_name: str = DEFAULT_CR_INSTANCE_NAME) -> str: - """ - create cr instance - - Args: - instance_name: cr instance name - - Returns: - cr instance name - """ - status = self._check_instance(instance_name) - if status != "NONEXIST": - logger.debug(f"cr instance {instance_name} already running") - return instance_name - response = ve_request( - request_body={ - "Name": instance_name, - "ResourceTags": [ - {"Key": "provider", "Value": "veadk"}, - ], - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateRegistry", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"create cr instance {instance_name}: {response}") - - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - if error_code == "AlreadyExists.Registry": - logger.debug(f"cr instance {instance_name} already exists") - return instance_name - else: - logger.error( - f"Error create cr instance {instance_name}: {error_code} {error_message}" - ) - raise ValueError( - f"Error create cr instance {instance_name}: {error_code} {error_message}" - ) - - while True: - status = self._check_instance(instance_name) - if status == "Running": - break - elif status == "Failed": - raise ValueError(f"cr instance {instance_name} create failed") - else: - logger.debug(f"cr instance status: {status}") - time.sleep(30) - - return instance_name - - def _check_instance(self, instance_name: str) -> str: - """ - check cr instance status - - Args: - instance_name: cr instance name - - Returns: - cr instance status - """ - response = ve_request( - request_body={ - "Filter": { - "Names": [instance_name], - } - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListRegistries", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"check cr instance {instance_name}: {response}") - - try: - if response["Result"]["TotalCount"] == 0: - return "NONEXIST" - return response["Result"]["Items"][0]["Status"]["Phase"] - except Exception as _: - raise ValueError(f"Error check cr instance {instance_name}: {response}") - - def _create_namespace( - self, - instance_name: str = DEFAULT_CR_INSTANCE_NAME, - namespace_name: str = DEFAULT_CR_NAMESPACE_NAME, - ) -> str: - """ - create cr namespace - - Args: - instance_name: cr instance name - namespace_name: cr namespace name - - Returns: - cr namespace name - """ - response = ve_request( - request_body={ - "Name": namespace_name, - "Registry": instance_name, - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateNamespace", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"create cr namespace {namespace_name}: {response}") - - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - if error_code == "AlreadyExists.Namespace": - logger.warning(f"cr namespace {namespace_name} already exists") - return namespace_name - else: - logger.error( - f"Error create cr namespace {namespace_name}: {error_code} {error_message}" - ) - raise ValueError( - f"Error create cr namespace {namespace_name}: {error_code} {error_message}" - ) - - return namespace_name - - def _create_repo( - self, - instance_name: str = DEFAULT_CR_INSTANCE_NAME, - namespace_name: str = DEFAULT_CR_NAMESPACE_NAME, - repo_name: str = DEFAULT_CR_REPO_NAME, - ) -> str: - """ - create cr repo - - Args: - instance_name: cr instance name - namespace_name: cr namespace name - repo_name: cr repo name - - Returns: - cr repo name - """ - response = ve_request( - request_body={ - "Name": repo_name, - "Registry": instance_name, - "Namespace": namespace_name, - "Type": "Micro", - "Description": "veadk cr repo", - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateRepository", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"create cr repo {repo_name}: {response}") - - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - if error_code == "AlreadyExists.Repository": - logger.debug(f"cr repo {repo_name} already exists") - return repo_name - else: - logger.error( - f"Error create cr repo {repo_name}: {error_code} {error_message}" - ) - raise ValueError( - f"Error create cr repo {repo_name}: {error_code} {error_message}" - ) - return repo_name - - def _get_authorization_token(self, instance_name: str): - """ - get cr authorization token - """ - response = ve_request( - request_body={ - "Registry": instance_name, - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetAuthorizationToken", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"get cr authorization token: {response}") - - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - logger.error( - f"Error get cr authorization token: {error_code} {error_message}" - ) - raise ValueError( - f"Error get cr authorization token: {error_code} {error_message}" - ) - # print(json.dumps(response, indent=2)) - return response['Result']['Username'], response['Result']['Token'], response['Result']['ExpireTime'] - - # GetPublicEndpoint - def _get_public_endpoint(self, instance_name: str = DEFAULT_CR_INSTANCE_NAME): - """ - get cr public endpoint - """ - response = ve_request( - request_body={ - "Registry": instance_name, - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetPublicEndpoint", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"get cr public endpoint: {response}") - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - logger.error( - f"Error get cr public endpoint: {error_code} {error_message}" - ) - raise ValueError( - f"Error get cr public endpoint: {error_code} {error_message}" - ) - return response["Result"] - - - def _update_public_endpoint(self, instance_name: str, enabled: bool): - """ - update cr public endpoint - """ - response = ve_request( - request_body={ - "Registry": instance_name, - "Enabled": enabled, - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdatePublicEndpoint", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"update cr public endpoint: {response}") - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - logger.error( - f"Error update cr public endpoint: {error_code} {error_message}" - ) - raise ValueError( - f"Error update cr public endpoint: {error_code} {error_message}" - ) - return None - - - def _create_endpoint_acl_policies(self, instance_name: str = DEFAULT_CR_INSTANCE_NAME, acl_policies: list = [], policy_type: str = "Public", description: str = ""): - """ - create endpoint acl policies - """ - response = ve_request( - request_body={ - "Registry": instance_name, - "Type": policy_type, - "Entries": acl_policies, - "Description": description - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateEndpointAclPolicies", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"create endpoint acl policies: {response}") - - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - logger.error( - f"Error create endpoint acl policies: {error_code} {error_message}" - ) - raise ValueError( - f"Error create endpoint acl policies: {error_code} {error_message}" - ) - return None - - - - def _list_domains(self, instance_name: str = DEFAULT_CR_INSTANCE_NAME): - """ - list cr domains - """ - response = ve_request( - request_body={ - "Registry": instance_name, - }, - action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListDomains", - ak=self.ak, - sk=self.sk, - service="cr", - version=self.version, - region=self.region, - host=f"cr.{self.region}.volcengineapi.com", - ) - logger.debug(f"list cr domains: {response}") - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - logger.error( - f"Error list cr domains: {error_code} {error_message}" - ) - raise ValueError( - f"Error list cr domains: {error_code} {error_message}" - ) - return response["Result"]["Items"] - - def _get_default_domain(self, instance_name: str = DEFAULT_CR_INSTANCE_NAME): - """ - get default cr domain - """ - domains = self._list_domains(instance_name=instance_name) - for domain in domains: - if domain["Default"] == True: - return domain["Domain"] - return None - - - diff --git a/agentkit/toolkit/volcengine/iam.py b/agentkit/toolkit/volcengine/iam.py deleted file mode 100644 index 372b899..0000000 --- a/agentkit/toolkit/volcengine/iam.py +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import json -import logging -from typing import Dict, Optional, List -from pydantic import BaseModel, Field - -from agentkit.client.base_iam_client import BaseIAMClient -from agentkit.client.base_service_client import ApiConfig - - -logger = logging.getLogger(__name__) - -class UserInfo(BaseModel): - """User information""" - user_name: Optional[str] = Field(None, alias="UserName") - id: Optional[int] = Field(None, alias="Id") - trn: Optional[str] = Field(None, alias="Trn") - account_id: Optional[int] = Field(None, alias="AccountId") - display_name: Optional[str] = Field(None, alias="DisplayName") - description: Optional[str] = Field(None, alias="Description") - email: Optional[str] = Field(None, alias="Email") - mobile_phone: Optional[str] = Field(None, alias="MobilePhone") - create_date: Optional[str] = Field(None, alias="CreateDate") - update_date: Optional[str] = Field(None, alias="UpdateDate") - email_is_verified: Optional[bool] = Field(None, alias="EmailIsVerified") - mobile_phone_is_verified: Optional[bool] = Field(None, alias="MobilePhoneIsVerified") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class GetUserRequest(BaseModel): - """Get user request""" - user_name: Optional[str] = Field(None, alias="UserName") - id: Optional[str] = Field(None, alias="ID") # User ID - access_key_id: Optional[str] = Field(None, alias="AccessKeyID") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class GetUserResponse(BaseModel): - """Get user response""" - user: Optional[UserInfo] = Field(None, alias="User") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } -class ListUsersRequest(BaseModel): - """List users request""" - limit: Optional[int] = Field(None, alias="Limit") - offset: Optional[int] = Field(None, alias="Offset") - query: Optional[str] = Field(None, alias="Query") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class ListUsersResponse(BaseModel): - """List users response""" - user_metadata: Optional[List[UserInfo]] = Field(None, alias="UserMetadata") - limit: Optional[int] = Field(None, alias="Limit") - offset: Optional[int] = Field(None, alias="Offset") - total: Optional[int] = Field(None, alias="Total") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class RoleInfo(BaseModel): - """Role information""" - role_name: Optional[str] = Field(None, alias="RoleName") - role_id: Optional[int] = Field(None, alias="RoleId") - trn: Optional[str] = Field(None, alias="Trn") - account_id: Optional[int] = Field(None, alias="AccountId") - display_name: Optional[str] = Field(None, alias="DisplayName") - description: Optional[str] = Field(None, alias="Description") - trust_policy_document: Optional[str] = Field(None, alias="TrustPolicyDocument") - max_session_duration: Optional[int] = Field(None, alias="MaxSessionDuration") - create_date: Optional[str] = Field(None, alias="CreateDate") - update_date: Optional[str] = Field(None, alias="UpdateDate") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -class GetRoleRequest(BaseModel): - """Get role request""" - role_name: str = Field(..., alias="RoleName") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class GetRoleResponse(BaseModel): - """Get role response""" - role: Optional[RoleInfo] = Field(None, alias="Role") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -class ListRolesRequest(BaseModel): - """List roles request""" - limit: Optional[int] = Field(None, alias="Limit") - offset: Optional[int] = Field(None, alias="Offset") - query: Optional[str] = Field(None, alias="Query") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -class ListRolesResponse(BaseModel): - """List roles response""" - role_metadata: Optional[List[RoleInfo]] = Field(None, alias="RoleMetadata") - limit: Optional[int] = Field(None, alias="Limit") - offset: Optional[int] = Field(None, alias="Offset") - total: Optional[int] = Field(None, alias="Total") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -class CreateRoleRequest(BaseModel): - """Create role request""" - role_name: str = Field(..., alias="RoleName") - display_name: Optional[str] = Field(None, alias="DisplayName") - trust_policy_document: str = Field(..., alias="TrustPolicyDocument") - description: Optional[str] = Field(None, alias="Description") - max_session_duration: Optional[int] = Field(None, alias="MaxSessionDuration") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class CreateRoleResponse(BaseModel): - """Create role response""" - role: Optional[RoleInfo] = Field(None, alias="Role") - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - -class AttachRolePolicyRequest(BaseModel): - """Attach role policy request""" - role_name: str = Field(..., alias="RoleName") - policy_name: str = Field(..., alias="PolicyName") - policy_type: str = Field(..., alias="PolicyType") # System or Custom - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -class AttachRolePolicyResponse(BaseModel): - """Attach role policy response""" - pass # No result data in response - - -class VeIAM(BaseIAMClient): - """Volcengine IAM Service Client""" - - # Define all API actions for this service - API_ACTIONS: Dict[str, ApiConfig] = { - "GetUser": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetUser", method="GET"), - "ListUsers": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListUsers", method="GET"), - "GetRole": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetRole", method="GET"), - "ListRoles": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListRoles", method="GET"), - "CreateRole": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateRole", method="GET"), - "AttachRolePolicy": ApiConfig(action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FAttachRolePolicy", method="GET"), - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - service_name="iam", - ) - - def get_user_by_name(self, user_name: str) -> Optional[GetUserResponse]: - """Get user by name""" - request = GetUserRequest(user_name=user_name) - res = self.request( - "GetUser", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return GetUserResponse(**response_data.get('Result', {})) - - def get_user_by_uid(self, uid: str) -> Optional[GetUserResponse]: - """Get user by uid""" - request = GetUserRequest(id=uid) - res = self.request( - "GetUser", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return GetUserResponse(**response_data.get('Result', {})) - - def get_user_by_access_key_id(self, access_key_id: str = None) -> Optional[GetUserResponse]: - """Get user by access key id""" - if access_key_id is None: - from agentkit.utils.ve_sign import get_volc_ak_sk_region - access_key_id, _, _ = get_volc_ak_sk_region('IAM') - request = GetUserRequest(access_key_id=access_key_id) - res = self.request( - "GetUser", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return GetUserResponse(**response_data.get('Result', {})) - - def list_users(self, limit: int = 10, offset: int = 0, query: str = '') -> Optional[ListUsersResponse]: - """List users""" - request = ListUsersRequest(limit=limit,offset=offset,query=query) - res = self.request( - "ListUsers", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return ListUsersResponse(**response_data.get('Result', {})) - - def list_roles(self, request: ListRolesRequest) -> Optional[ListRolesResponse]: - """List roles""" - res = self.request( - "ListRoles", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return ListRolesResponse(**response_data.get('Result', {})) - - def get_role(self, role_name: str) -> Optional[GetRoleResponse]: - """Get role""" - request = GetRoleRequest(role_name=role_name) - try: - res = self.request( - "GetRole", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return GetRoleResponse(**response_data.get('Result', {})) - except Exception as e: - # If role not found, return None - if "RoleNotExist" in str(e) or "NotFound" in str(e) or "404" in str(e): - return None - raise e - - def create_role(self, role_name: str, trust_policy_document: str) -> Optional[CreateRoleResponse]: - """Create role""" - request = CreateRoleRequest( - display_name=role_name, - role_name=role_name, - trust_policy_document=trust_policy_document, - ) - res = self.request( - "CreateRole", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return CreateRoleResponse(**response_data.get('Result', {})) - - - def attach_role_policy(self, role_name: str, policy_name: str, policy_type: str) -> Optional[AttachRolePolicyResponse]: - """Attach role policy""" - request = AttachRolePolicyRequest( - role_name=role_name, - policy_name=policy_name, - policy_type=policy_type, - ) - res = self.request( - "AttachRolePolicy", - params=request.model_dump(by_alias=True, exclude_none=True), - data="{}" - ) - response_data = json.loads(res) - return AttachRolePolicyResponse(**response_data.get('Result', {})) - - def ensure_role_for_agentkit(self, role_name: str) -> bool: - """Ensure role for agentkit""" - resp = self.get_role(role_name) - agentkit_service_code = (os.getenv("VOLCENGINE_AGENTKIT_SERVICE") or os.getenv("VOLC_AGENTKIT_SERVICE") or "").strip().lower() - service = 'vefaas' - if 'stg' in agentkit_service_code: - service = 'vefaas_dev' - trust_policy_document = '{"Statement":[{"Effect":"Allow","Action":["sts:AssumeRole"],"Principal":{"Service":["%s"]}}]}' % service - if resp is None: - resp = self.create_role(role_name, trust_policy_document) - ''' - ArkReadOnlyAccess - TLSReadOnlyAccess - APMPlusServerReadOnlyAccess - VikingdbReadOnlyAccess - ESCloudReadOnlyAccess - LLMShieldProtectSdkAccess - AgentKitFullAccess - TorchlightApiFullAccess - Mem0ReadOnlyAccess - ''' - policies = [ - "ArkReadOnlyAccess", - "TLSReadOnlyAccess", - "APMPlusServerReadOnlyAccess", - "VikingdbReadOnlyAccess", - "ESCloudReadOnlyAccess", - "LLMShieldProtectSdkAccess", - "AgentKitFullAccess", - "TorchlightApiFullAccess", - "Mem0ReadOnlyAccess", - "IDReadOnlyAccess", - ] - for policy in policies: - self.attach_role_policy(role_name, policy_name=policy, policy_type="System") - return True diff --git a/agentkit/toolkit/volcengine/services/__init__.py b/agentkit/toolkit/volcengine/services/__init__.py deleted file mode 100644 index cfeb68d..0000000 --- a/agentkit/toolkit/volcengine/services/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from .cr_service import CRService, CRServiceConfig, CRServiceResult, CRConfigCallback, DefaultCRConfigCallback -from .tos_service import TOSService, TOSServiceConfig - -__all__ = [ - 'CRService', - 'CRServiceConfig', - 'CRServiceResult', - 'CRConfigCallback', - 'DefaultCRConfigCallback', - 'TOSService', - 'TOSServiceConfig' -] \ No newline at end of file diff --git a/agentkit/toolkit/volcengine/services/cr_service.py b/agentkit/toolkit/volcengine/services/cr_service.py deleted file mode 100644 index 145d29d..0000000 --- a/agentkit/toolkit/volcengine/services/cr_service.py +++ /dev/null @@ -1,444 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from typing import Dict, Any, Optional, Tuple -from dataclasses import dataclass, field -from agentkit.utils.misc import generate_random_id -from agentkit.utils.ve_sign import get_volc_ak_sk_region -import agentkit.toolkit.volcengine.cr as ve_cr -import agentkit.toolkit.config as config -from agentkit.toolkit.config import AUTO_CREATE_VE -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin -from agentkit.toolkit.reporter import Reporter -from agentkit.toolkit.context import ExecutionContext -import time - -logger = logging.getLogger(__name__) - -@dataclass -class CRServiceConfig(AutoSerializableMixin): - """Configuration for Container Registry service.""" - instance_name: str = AUTO_CREATE_VE - namespace_name: str = AUTO_CREATE_VE - repo_name: str = AUTO_CREATE_VE - region: str = "cn-beijing" - vpc_id: str = field(default=AUTO_CREATE_VE, metadata={"system": True}) - subnet_id: str = field(default=AUTO_CREATE_VE, metadata={"system": True}) - image_full_url: str = field(default=None, metadata={"system": True}) - -@dataclass -class CRServiceResult: - """Result of Container Registry service operations.""" - success: bool = False - error: Optional[str] = None - instance_name: Optional[str] = None - namespace_name: Optional[str] = None - repo_name: Optional[str] = None - registry_url: Optional[str] = None - image_full_url: Optional[str] = None - - -class CRErrorHandler: - """Unified error handler for Container Registry operations.""" - - @staticmethod - def is_quota_exceeded(error: Exception) -> bool: - return "QuotaExceeded" in str(error) - - @staticmethod - def is_already_exists(error: Exception) -> bool: - return "AlreadyExists" in str(error) - - @staticmethod - def handle_auto_create_error( - error: Exception, - resource_type: str, - result: CRServiceResult, - reporter: Reporter - ) -> bool: - """Handle errors during automatic resource creation. - - Args: - error: The exception object. - resource_type: Type of resource (e.g., "instance", "namespace", "repository"). - result: Result object to store error information. - reporter: Reporter interface for logging. - - Returns: - False to indicate creation failure and stop further processing. - """ - if CRErrorHandler.is_quota_exceeded(error): - result.error = f"Failed to create CR {resource_type}: account quota exceeded. Please upgrade your account quota or clean up unused CR {resource_type}s." - else: - result.error = f"Failed to create CR {resource_type}: {str(error)}" - - reporter.error(result.error) - return False - - @staticmethod - def handle_existing_resource_error( - error: Exception, - resource_type: str, - resource_name: str, - result: CRServiceResult, - reporter: Reporter, - status: str = "" - ) -> bool: - """Handle errors when using existing resource names. - - Args: - error: The exception object. - resource_type: Type of resource. - resource_name: Name of the resource. - result: Result object to store error information. - reporter: Reporter interface for logging. - status: Resource status (used for instance status checks). - - Returns: - True if operation can continue, False if it should stop. - """ - if CRErrorHandler.is_quota_exceeded(error): - result.error = f"Failed to create CR {resource_type}: account quota exceeded. Please upgrade your account quota or clean up unused CR {resource_type}s." - reporter.error(result.error) - return False - - if CRErrorHandler.is_already_exists(error): - reporter.success(f"CR {resource_type} already exists: {resource_name}") - - # Edge case: instance status is NONEXIST but AlreadyExists error occurs. - # This typically indicates a naming conflict or configuration issue. - if status == "NONEXIST": - reporter.error(f"Instance name is already taken. Please check your configuration: {resource_name}") - return False - - return True - - result.error = f"Failed to operate on CR {resource_type}: {str(error)}" - reporter.error(result.error) - return False - - - -class CRConfigCallback: - """Interface for Container Registry configuration updates.""" - def on_config_update(self, cr_config: Dict[str, Any]) -> None: - pass - -class DefaultCRConfigCallback(CRConfigCallback): - """Default implementation of CR configuration callback.""" - def __init__(self, config_updater=None): - self.config_updater = config_updater - - def on_config_update(self, cr_config: Dict[str, Any]) -> None: - """Notify config updater of CR configuration changes.""" - if self.config_updater: - self.config_updater("cr_service", cr_config) - -class CRService: - """Unified Container Registry service for resource management.""" - - def __init__(self, config_callback: Optional[CRConfigCallback] = None, reporter: Optional[Reporter] = None): - """Initialize the Container Registry service. - - Args: - config_callback: Callback for configuration updates. - reporter: Reporter interface for logging. If None, uses Reporter from ExecutionContext. - """ - self.config_callback = config_callback or DefaultCRConfigCallback() - self.reporter = reporter if reporter is not None else ExecutionContext.get_reporter() - self._vecr_client = None - self._init_client() - - def _init_client(self) -> None: - """Initialize the CR client with credentials from environment.""" - try: - ak, sk, region = get_volc_ak_sk_region('CR') - self._vecr_client = ve_cr.VeCR(access_key=ak, secret_key=sk, region=region) - except Exception as e: - logger.error(f"Failed to initialize CR client: {str(e)}") - raise - - def ensure_cr_resources(self, cr_config: CRServiceConfig, - common_config: Optional[config.CommonConfig] = None) -> CRServiceResult: - """Ensure all required CR resources exist or are created. - - Creates instance, namespace, and repository as needed, then retrieves the registry URL. - - Args: - cr_config: Container Registry service configuration. - common_config: Common configuration (used to retrieve agent_name, etc.). - - Returns: - CRServiceResult: Operation result with resource details and registry URL. - """ - try: - result = CRServiceResult() - - if not self._ensure_cr_instance(cr_config, result): - return result - - if not self._ensure_cr_namespace(cr_config, result): - return result - - if not self._ensure_cr_repo(cr_config, result, common_config): - return result - - registry_url = self._vecr_client._get_default_domain(instance_name=cr_config.instance_name) - result.registry_url = registry_url - - result.success = True - return result - - except Exception as e: - result.error = f"Failed to ensure CR resources: {str(e)}" - logger.error(result.error) - return result - - def _ensure_cr_instance(self, cr_config: CRServiceConfig, result: CRServiceResult) -> bool: - """Ensure a CR instance exists, creating one if needed.""" - instance_name = cr_config.instance_name - - if not instance_name or instance_name == AUTO_CREATE_VE: - # Auto-generate instance name when not configured - instance_name = CRService.generate_cr_instance_name() - self.reporter.info(f"No CR instance configured. Creating new instance: {instance_name}") - - try: - created_instance = self._vecr_client._create_instance(instance_name) - cr_config.instance_name = created_instance - result.instance_name = created_instance - self._notify_config_update(cr_config) - self.reporter.success(f"CR instance created: {created_instance}") - except Exception as e: - return CRErrorHandler.handle_auto_create_error(e, "instance", result, self.reporter) - else: - # Use existing instance name - status = "" - try: - status = self._vecr_client._check_instance(instance_name) - - if status == "NONEXIST": - self.reporter.warning(f"CR instance does not exist. Creating: {instance_name}") - self._vecr_client._create_instance(instance_name) - self.reporter.success(f"CR instance created: {instance_name}") - elif status == "Running": - self.reporter.success(f"CR instance exists and is running: {instance_name}") - else: - self.reporter.warning(f"CR instance status: {status}. Waiting for it to be ready...") - - except Exception as e: - if not CRErrorHandler.handle_existing_resource_error( - e, "instance", instance_name, result, self.reporter, status - ): - return False - - result.instance_name = cr_config.instance_name - return True - - def _ensure_cr_namespace(self, cr_config: CRServiceConfig, result: CRServiceResult) -> bool: - """Ensure a CR namespace exists, creating one if needed.""" - namespace_name = cr_config.namespace_name - - if not namespace_name or namespace_name == AUTO_CREATE_VE: - # Auto-generate namespace name with random suffix - namespace_name = f"agentkit-{generate_random_id(4)}" - self.reporter.info(f"No CR namespace configured. Creating new namespace: {namespace_name}") - - try: - created_namespace = self._vecr_client._create_namespace(cr_config.instance_name, namespace_name) - cr_config.namespace_name = created_namespace - result.namespace_name = created_namespace - self._notify_config_update(cr_config) - self.reporter.success(f"CR namespace created: {created_namespace}") - except Exception as e: - return CRErrorHandler.handle_auto_create_error(e, "namespace", result, self.reporter) - else: - # Use existing namespace name - try: - self._vecr_client._create_namespace(cr_config.instance_name, namespace_name) - self.reporter.success(f"CR namespace already exists: {namespace_name}") - except Exception as e: - if not CRErrorHandler.handle_existing_resource_error( - e, "namespace", namespace_name, result, self.reporter - ): - return False - - result.namespace_name = cr_config.namespace_name - return True - - def _ensure_cr_repo(self, cr_config: CRServiceConfig, result: CRServiceResult, - common_config: Optional[config.CommonConfig] = None) -> bool: - """Ensure a CR repository exists, creating one if needed.""" - repo_name = cr_config.repo_name - - if not repo_name or repo_name == AUTO_CREATE_VE: - # Auto-generate repository name based on agent name - agent_name = common_config.agent_name if common_config else "agentkit" - repo_name = f"{agent_name}-{generate_random_id(4)}" - self.reporter.info(f"No CR repository configured. Creating new repository: {repo_name}") - - try: - created_repo = self._vecr_client._create_repo( - cr_config.instance_name, cr_config.namespace_name, repo_name - ) - cr_config.repo_name = created_repo - result.repo_name = created_repo - self._notify_config_update(cr_config) - self.reporter.success(f"CR repository created: {created_repo}") - except Exception as e: - return CRErrorHandler.handle_auto_create_error(e, "repository", result, self.reporter) - else: - # Use existing repository name - try: - self._vecr_client._create_repo( - cr_config.instance_name, cr_config.namespace_name, repo_name - ) - self.reporter.success(f"CR repository already exists: {repo_name}") - except Exception as e: - if not CRErrorHandler.handle_existing_resource_error( - e, "repository", repo_name, result, self.reporter - ): - return False - - result.repo_name = cr_config.repo_name - return True - - def ensure_public_endpoint(self, cr_config: CRServiceConfig) -> CRServiceResult: - """Enable public endpoint access for the CR instance if not already enabled.""" - result = CRServiceResult() - try: - public_endpoint = self._vecr_client._get_public_endpoint(instance_name=cr_config.instance_name) - if public_endpoint["Enabled"] == False: - self.reporter.warning("CR public endpoint is not enabled. Enabling now...") - self._vecr_client._update_public_endpoint(instance_name=cr_config.instance_name, enabled=True) - self._vecr_client._create_endpoint_acl_policies(instance_name=cr_config.instance_name, acl_policies=["0.0.0.0/0"]) - - # Wait up to 120 seconds for the endpoint to be ready - timeout = 120 - while timeout > 0: - public_endpoint = self._vecr_client._get_public_endpoint(instance_name=cr_config.instance_name) - if public_endpoint["Status"] == "Enabled": - break - timeout -= 1 - time.sleep(1) - if timeout <= 0: - result.error = "Timeout waiting for CR public endpoint to be enabled" - self.reporter.error(result.error) - return result - self.reporter.success("CR public endpoint enabled successfully") - - result.success = True - return result - - except Exception as e: - result.error = f"Failed to configure public endpoint: {str(e)}" - self.reporter.error(result.error) - return result - - def login_and_push_image(self, cr_config: CRServiceConfig, image_id: str, - image_tag: str, namespace: str) -> Tuple[bool, str]: - """Login to CR and push a Docker image to the registry. - - Args: - cr_config: Container Registry service configuration. - image_id: Local Docker image ID. - image_tag: Tag for the remote image. - namespace: Namespace in the registry. - - Returns: - Tuple of (success: bool, remote_image_url_or_error_message: str). - """ - try: - from agentkit.toolkit.docker.container import DockerManager - except ImportError: - error_msg = "Docker dependencies are not installed" - self.reporter.error(error_msg) - return False, error_msg - - docker_manager = DockerManager() - - # Retrieve login credentials - registry_url = self._vecr_client._get_default_domain(instance_name=cr_config.instance_name) - username, token, expires = self._vecr_client._get_authorization_token(instance_name=cr_config.instance_name) - self.reporter.success(f"Retrieved CR credentials: username={username}, expires={expires}") - - # Login to registry - success, message = docker_manager.login_to_registry( - registry_url=registry_url, - username=username, - password=token - ) - - if not success: - error_msg = f"Failed to login to CR: {message}" - self.reporter.error(error_msg) - return False, error_msg - - self.reporter.success("Successfully logged in to registry") - - # Push image - self.reporter.info(f"Pushing image {image_id[:12]} to {registry_url}") - success, remote_image_full_url = docker_manager.push_image( - local_image=image_id, - registry_url=registry_url, - namespace=namespace, - remote_image_name=cr_config.repo_name, - remote_tag=image_tag - ) - - if success: - self.reporter.success(f"Image pushed successfully: {remote_image_full_url}") - cr_config.image_full_url = remote_image_full_url - self._notify_config_update(cr_config) - return True, remote_image_full_url - else: - error_msg = f"Failed to push image: {remote_image_full_url}" - self.reporter.error(error_msg) - return False, error_msg - - def _notify_config_update(self, cr_config: CRServiceConfig) -> None: - """Notify the config callback of CR configuration changes.""" - try: - config_dict = cr_config.to_dict() - self.config_callback.on_config_update(config_dict) - except Exception as e: - logger.warning(f"Failed to notify config update: {str(e)}") - - def get_cr_config(self) -> Dict[str, Any]: - """Get CR configuration for pipeline template rendering.""" - if not self._vecr_client: - return {} - - try: - return { - "cr_domain": self._vecr_client._get_default_domain(instance_name=""), - "cr_region": self._vecr_client.region, - } - except Exception as e: - logger.warning(f"Failed to retrieve CR configuration: {str(e)}") - return {} - - @staticmethod - def default_cr_instance_name_template(): - return "agentkit-cli-{{account_id}}" - - @staticmethod - def generate_cr_instance_name() -> str: - """Generate a CR instance name from the default template.""" - from agentkit.utils.template_utils import render_template - cr_instance_name_template = CRService.default_cr_instance_name_template() - rendered = render_template(cr_instance_name_template) - return rendered - diff --git a/agentkit/toolkit/volcengine/services/tos_service.py b/agentkit/toolkit/volcengine/services/tos_service.py deleted file mode 100644 index 64ede44..0000000 --- a/agentkit/toolkit/volcengine/services/tos_service.py +++ /dev/null @@ -1,310 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific governing permissions and -# limitations under the License. - -import os -import logging -from dataclasses import dataclass, field -from agentkit.toolkit.config.dataclass_utils import AutoSerializableMixin - -try: - import tos - TOS_AVAILABLE = True -except ImportError: - TOS_AVAILABLE = False - tos = None - -logger = logging.getLogger(__name__) - - -@dataclass -class TOSServiceConfig(AutoSerializableMixin): - """Configuration for TOS (Tos Object Storage) service.""" - - region: str = field(default="cn-beijing", metadata={"description": "Cloud region"}) - endpoint: str = field(default="", metadata={"description": "Custom endpoint URL; if empty, auto-generated from region"}) - bucket: str = field(default="", metadata={"description": "Bucket name"}) - prefix: str = field(default="", metadata={"description": "Object key prefix"}) - - def get_endpoint(self) -> str: - """Get the TOS endpoint URL, using custom endpoint if provided, otherwise construct from region.""" - if self.endpoint: - return self.endpoint - return f"tos-{self.region}.volces.com" - - -class TOSService: - """Wrapper for Volcano Engine TOS (Object Storage) service.""" - - def __init__(self, config: TOSServiceConfig): - """Initialize TOS service with configuration. - - Args: - config: TOS service configuration - - Raises: - ImportError: If TOS SDK is not installed - """ - if not TOS_AVAILABLE: - raise ImportError("TOS SDK not installed. Install with: pip install tos") - - self.config = config - self.client = None - self._init_client() - - def _init_client(self): - """Initialize TOS client with credentials from Volcano Engine.""" - try: - from agentkit.utils.ve_sign import get_volc_ak_sk_region - access_key, secret_key, region = get_volc_ak_sk_region("TOS") - - # Override config region if not explicitly set and region is available - if not self.config.region and region: - self.config.region = region - - self.client = tos.TosClientV2( - access_key, - secret_key, - self.config.get_endpoint(), - self.config.region - ) - logger.info(f"TOS client initialized: bucket={self.config.bucket}, region={self.config.region}") - - except Exception as e: - logger.error(f"Failed to initialize TOS client: {str(e)}") - raise - - def upload_file(self, local_path: str, object_key: str) -> str: - """Upload a file to TOS. - - Args: - local_path: Local file path - object_key: Object key in TOS - - Returns: - Accessible URL of the uploaded file - - Raises: - FileNotFoundError: If local file does not exist - tos.exceptions.TosClientError: If TOS client error occurs - tos.exceptions.TosServerError: If TOS server error occurs - """ - try: - if not os.path.exists(local_path): - raise FileNotFoundError(f"Local file not found: {local_path}") - - logger.info(f"Uploading file: {local_path} -> {object_key}") - - self.client.put_object_from_file( - bucket=self.config.bucket, - key=object_key, - file_path=local_path - ) - - url = f"https://{self.config.bucket}.{self.config.get_endpoint()}/{object_key}" - logger.info(f"File uploaded successfully: {url}") - return url - - except tos.exceptions.TosClientError as e: - logger.error(f"TOS client error: {e.message}") - raise - except tos.exceptions.TosServerError as e: - logger.error(f"TOS server error: {e.code} - {e.message}") - raise - except Exception as e: - logger.error(f"Upload failed: {str(e)}") - raise - - def download_file(self, object_key: str, local_path: str) -> bool: - """Download a file from TOS. - - Args: - object_key: Object key in TOS - local_path: Local path to save the file - - Returns: - True if download succeeded, False otherwise - - Note: - TODO: Implement file download functionality - """ - try: - logger.info(f"Downloading file: {object_key} -> {local_path}") - - # TODO: Implement download steps: - # 1. Check if object exists - # 2. Download file from TOS - # 3. Save to local path - - return True - - except Exception as e: - logger.error(f"Download failed: {str(e)}") - return False - - def delete_file(self, object_key: str) -> bool: - """Delete a file from TOS. - - Args: - object_key: Object key in TOS - - Returns: - True if deletion succeeded or file doesn't exist, False on error - """ - try: - logger.info(f"Deleting file: {object_key}") - - self.client.delete_object(bucket=self.config.bucket, key=object_key) - logger.info(f"File deleted: {object_key}") - return True - - except tos.exceptions.TosServerError as e: - if e.status_code == 404: - # Treat non-existent file as successful deletion - logger.warning(f"File not found (already deleted): {object_key}") - return True - logger.error(f"Delete failed: {e.code} - {e.message}") - return False - except Exception as e: - logger.error(f"Delete failed: {str(e)}") - return False - - def file_exists(self, object_key: str) -> bool: - """Check if a file exists in TOS. - - Args: - object_key: Object key in TOS - - Returns: - True if file exists, False otherwise - """ - try: - self.client.head_object(bucket=self.config.bucket, key=object_key) - return True - - except tos.exceptions.TosServerError as e: - if e.status_code == 404: - return False - logger.error(f"Failed to check file existence: {e.code} - {e.message}") - return False - except Exception as e: - logger.error(f"Failed to check file existence: {str(e)}") - return False - - def list_files(self, prefix: str = "") -> list: - """List files in TOS with optional prefix filter. - - Args: - prefix: Object key prefix to filter results - - Returns: - List of file objects, or empty list on error - - Note: - TODO: Implement file listing functionality - """ - try: - # TODO: Implement list_objects with prefix filtering - return [] - - except Exception as e: - logger.error(f"Failed to list files: {str(e)}") - return [] - - def bucket_exists(self) -> bool: - """Check if the configured bucket exists. - - Returns: - True if bucket exists, False otherwise - """ - try: - self.client.head_bucket(bucket=self.config.bucket) - logger.info(f"Bucket exists: {self.config.bucket}") - return True - - except tos.exceptions.TosServerError as e: - if e.status_code == 404: - logger.warning(f"Bucket not found: {self.config.bucket}") - return False - logger.error(f"Failed to check bucket existence: {e.code} - {e.message}") - return False - except Exception as e: - logger.error(f"Failed to check bucket existence: {str(e)}") - return False - - def create_bucket(self) -> bool: - """Create the configured bucket. - - Returns: - True if bucket was created or already exists - - Raises: - tos.exceptions.TosServerError: If creation fails (except for 409 conflict) - Exception: For other unexpected errors - """ - try: - logger.info(f"Creating bucket: {self.config.bucket}") - - self.client.create_bucket(bucket=self.config.bucket) - logger.info(f"Bucket created: {self.config.bucket}") - return True - - except tos.exceptions.TosServerError as e: - if e.status_code == 409: - # Bucket already exists - treat as success - logger.warning(f"Bucket already exists: {self.config.bucket}") - return True - logger.error(f"Failed to create bucket: {e.code} - {e.message}") - raise e - except Exception as e: - logger.error(f"Failed to create bucket: {str(e)}") - raise e - - - @staticmethod - def generate_bucket_name(prefix: str = "agentkit") -> str: - """Generate a unique bucket name from template. - - Args: - prefix: Bucket name prefix (used as fallback if template rendering fails) - - Returns: - Generated bucket name conforming to TOS naming requirements - - Raises: - ValueError: If template contains unresolved variables after rendering - """ - import re - from agentkit.utils.template_utils import render_template - bucket_name = TOSService.default_bucket_name_template() - bucket_name = render_template(bucket_name) - - # Verify template was fully rendered (no unresolved variables remain) - if '{{' in bucket_name and '}}' in bucket_name: - raise ValueError(f"Bucket name template not fully rendered, contains unresolved variables: {bucket_name}") - - # Ensure only valid characters (TOS allows lowercase letters, numbers, hyphens) - bucket_name = re.sub(r'[^a-z0-9-]', '-', bucket_name) - - # Enforce TOS naming constraints: 3-63 characters - if len(bucket_name) > 63: - bucket_name = bucket_name[:63] - elif len(bucket_name) < 3: - bucket_name = f"{prefix}-bucket-{generate_random_id(4)}".lower() - - return bucket_name - - @staticmethod - def default_bucket_name_template() -> str: - """Return the default template for generating bucket names.""" - return "agentkit-cli-{{account_id}}" diff --git a/agentkit/toolkit/volcengine/utils/__init__.py b/agentkit/toolkit/volcengine/utils/__init__.py deleted file mode 100644 index 33e4a13..0000000 --- a/agentkit/toolkit/volcengine/utils/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from .project_archiver import ProjectArchiver, ArchiveConfig, create_project_archive - -__all__ = [ - 'ProjectArchiver', - 'ArchiveConfig', - 'create_project_archiver' -] \ No newline at end of file diff --git a/agentkit/toolkit/volcengine/utils/project_archiver.py b/agentkit/toolkit/volcengine/utils/project_archiver.py deleted file mode 100644 index eb7cfe2..0000000 --- a/agentkit/toolkit/volcengine/utils/project_archiver.py +++ /dev/null @@ -1,280 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import tarfile -import logging -from pathlib import Path -from typing import List, Optional -from dataclasses import dataclass, field - -logger = logging.getLogger(__name__) - - -@dataclass -class ArchiveConfig: - """打包配置""" - - source_dir: str = field(default=".", metadata={"description": "源目录"}) - output_dir: str = field(default="/tmp", metadata={"description": "输出目录"}) - archive_name: str = field(default="project", metadata={"description": "压缩包名称"}) - - # 排除配置 - exclude_patterns: List[str] = field(default_factory=lambda: [ - "__pycache__", - "*.pyc", - "*.pyo", - ".git", - ".gitignore", - ".DS_Store", - "*.log", - "tmp/", - "dist/", - "build/", - "*.egg-info/" - ]) - - include_patterns: List[str] = field(default_factory=lambda: [ - "*.py", - "*.go", - "*.mod", - "*.sum", - "*.sh", - "*.txt", - "*.md", - "*.json", - "*.yaml", - "*.yml", - "Dockerfile*", - "requirements*", - "setup.py", - "pyproject.toml" - ]) - - -class ProjectArchiver: - """项目打包工具""" - - def __init__(self, config: ArchiveConfig): - """初始化打包工具 - - Args: - config: 打包配置 - """ - self.config = config - self.source_path = Path(config.source_dir).resolve() - self.output_path = Path(config.output_dir).resolve() - - def create_archive(self) -> str: - """创建项目压缩包 - - Returns: - 压缩包完整路径 - """ - try: - logger.info(f"开始打包项目: {self.source_path}") - - # 确保输出目录存在 - self.output_path.mkdir(parents=True, exist_ok=True) - - # 生成压缩包路径 - archive_path = self.output_path / f"{self.config.archive_name}.tar.gz" - - # 获取要打包的文件列表 - files_to_include = self._get_files_to_include() - - if not files_to_include: - raise ValueError("没有找到需要打包的文件") - - # 创建压缩包 - with tarfile.open(archive_path, "w:gz") as tar: - for file_path in files_to_include: - arcname = file_path.relative_to(self.source_path) - tar.add(file_path, arcname=arcname) - logger.debug(f"添加文件: {arcname}") - - logger.info(f"打包完成: {archive_path}") - return str(archive_path) - - except Exception as e: - logger.error(f"打包失败: {str(e)}") - raise - - def _get_files_to_include(self) -> List[Path]: - """获取需要打包的文件列表 - - Returns: - 文件路径列表 - """ - files_to_include = [] - - try: - # 遍历源目录 - for root, dirs, files in os.walk(self.source_path): - root_path = Path(root) - - # 检查是否需要跳过当前目录 - if self._should_skip_directory(root_path): - dirs[:] = [] # 跳过子目录 - continue - - # 处理文件 - for file_name in files: - file_path = root_path / file_name - - if self._should_include_file(file_path): - files_to_include.append(file_path) - - return files_to_include - - except Exception as e: - logger.error(f"获取文件列表失败: {str(e)}") - raise - - def _should_skip_directory(self, dir_path: Path) -> bool: - """检查是否应该跳过目录 - - Args: - dir_path: 目录路径 - - Returns: - 是否应该跳过 - """ - try: - # 检查排除模式 - 使用通配符匹配 - for pattern in self.config.exclude_patterns: - if pattern.endswith('/'): - # 目录模式匹配 - dir_pattern = pattern.rstrip('/') - if self._match_pattern(dir_path.name, dir_pattern) or self._match_pattern(str(dir_path), dir_pattern): - return True - else: - # 也检查目录名是否匹配文件模式 - if self._match_pattern(dir_path.name, pattern): - return True - - # 检查隐藏目录 - if dir_path.name.startswith('.') and dir_path.name != '.': - return True - - return False - - except Exception: - return False - - def _should_include_file(self, file_path: Path) -> bool: - """检查是否应该包含文件 - - Args: - file_path: 文件路径 - - Returns: - 是否应该包含 - """ - try: - # 检查排除模式 - for pattern in self.config.exclude_patterns: - if not pattern.endswith('/'): - if self._match_pattern(file_path.name, pattern) or self._match_pattern(str(file_path), pattern): - return False - - # 检查包含模式 - for pattern in self.config.include_patterns: - if self._match_pattern(file_path.name, pattern) or self._match_pattern(str(file_path), pattern): - return True - - return False - - except Exception: - return False - - def _match_pattern(self, text: str, pattern: str) -> bool: - """检查文本是否匹配模式(支持通配符) - - Args: - text: 要匹配的文本 - pattern: 模式(支持*通配符) - - Returns: - 是否匹配 - """ - import fnmatch - return fnmatch.fnmatch(text, pattern) - - def get_project_info(self) -> dict: - """获取项目信息 - - Returns: - 项目信息字典 - """ - try: - files = self._get_files_to_include() - - info = { - "source_dir": str(self.source_path), - "total_files": len(files), - "total_size": sum(f.stat().st_size for f in files), - "files": [str(f.relative_to(self.source_path)) for f in files] - } - - return info - - except Exception as e: - logger.error(f"获取项目信息失败: {str(e)}") - return {} - - -def create_project_archive( - source_dir: str = ".", - output_dir: str = "/tmp", - archive_name: Optional[str] = None, - exclude_patterns: Optional[List[str]] = None, - include_patterns: Optional[List[str]] = None -) -> str: - """快速创建项目压缩包 - - Args: - source_dir: 源目录 - output_dir: 输出目录 - archive_name: 压缩包名称(默认为项目目录名) - exclude_patterns: 排除模式列表 - include_patterns: 包含模式列表 - - Returns: - 压缩包完整路径 - """ - try: - source_path = Path(source_dir).resolve() - - if not archive_name: - archive_name = source_path.name - - config = ArchiveConfig( - source_dir=source_dir, - output_dir=output_dir, - archive_name=archive_name - ) - - if exclude_patterns: - config.exclude_patterns = exclude_patterns - - if include_patterns: - config.include_patterns = include_patterns - - archiver = ProjectArchiver(config) - return archiver.create_archive() - - except Exception as e: - logger.error(f"创建压缩包失败: {str(e)}") - raise \ No newline at end of file diff --git a/agentkit/tools/__init__.py b/agentkit/tools/__init__.py deleted file mode 100644 index 60906b2..0000000 --- a/agentkit/tools/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from agentkit.tools.tools import AgentkitTools - -__all__ = ["AgentkitTools"] diff --git a/agentkit/tools/client.py b/agentkit/tools/client.py deleted file mode 100644 index 8142b0c..0000000 --- a/agentkit/tools/client.py +++ /dev/null @@ -1,155 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Dict -from agentkit.client import BaseAgentkitClient -from agentkit.tools.types import ( - CreateSessionRequest, - CreateSessionResponse, - CreateToolRequest, - CreateToolResponse, - DeleteSessionRequest, - DeleteSessionResponse, - DeleteToolRequest, - DeleteToolResponse, - GetSessionLogsRequest, - GetSessionLogsResponse, - GetSessionRequest, - GetSessionResponse, - GetToolRequest, - GetToolResponse, - ListSessionsRequest, - ListSessionsResponse, - ListToolsRequest, - ListToolsResponse, - SetSessionTtlRequest, - SetSessionTtlResponse, - UpdateToolRequest, - UpdateToolResponse, -) - - -class AgentkitToolsClient(BaseAgentkitClient): - """AgentKit Tools Management Service""" - API_ACTIONS: Dict[str, str] = { - "UpdateTool": "UpdateTool", - "GetSession": "GetSession", - "DeleteSession": "DeleteSession", - "CreateSession": "CreateSession", - "GetSessionLogs": "GetSessionLogs", - "CreateTool": "CreateTool", - "GetTool": "GetTool", - "ListTools": "ListTools", - "ListSessions": "ListSessions", - "DeleteTool": "DeleteTool", - "SetSessionTtl": "SetSessionTtl", - } - - def __init__( - self, - access_key: str = "", - secret_key: str = "", - region: str = "", - session_token: str = "", - ) -> None: - super().__init__( - access_key=access_key, - secret_key=secret_key, - region=region, - session_token=session_token, - service_name="tools", - ) - - - def update_tool(self, request: UpdateToolRequest) -> UpdateToolResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FUpdateTool", - request=request, - response_type=UpdateToolResponse, - ) - - def get_session(self, request: GetSessionRequest) -> GetSessionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetSession", - request=request, - response_type=GetSessionResponse, - ) - - def delete_session(self, request: DeleteSessionRequest) -> DeleteSessionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteSession", - request=request, - response_type=DeleteSessionResponse, - ) - - def create_session(self, request: CreateSessionRequest) -> CreateSessionResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateSession", - request=request, - response_type=CreateSessionResponse, - ) - - def get_session_logs(self, request: GetSessionLogsRequest) -> GetSessionLogsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetSessionLogs", - request=request, - response_type=GetSessionLogsResponse, - ) - - def create_tool(self, request: CreateToolRequest) -> CreateToolResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FCreateTool", - request=request, - response_type=CreateToolResponse, - ) - - def get_tool(self, request: GetToolRequest) -> GetToolResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FGetTool", - request=request, - response_type=GetToolResponse, - ) - - def list_tools(self, request: ListToolsRequest) -> ListToolsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListTools", - request=request, - response_type=ListToolsResponse, - ) - - def list_sessions(self, request: ListSessionsRequest) -> ListSessionsResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FListSessions", - request=request, - response_type=ListSessionsResponse, - ) - - def delete_tool(self, request: DeleteToolRequest) -> DeleteToolResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FDeleteTool", - request=request, - response_type=DeleteToolResponse, - ) - - def set_session_ttl(self, request: SetSessionTtlRequest) -> SetSessionTtlResponse: - return self._invoke_api( - api_action="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2FSetSessionTtl", - request=request, - response_type=SetSessionTtlResponse, - ) diff --git a/agentkit/tools/types.py b/agentkit/tools/types.py deleted file mode 100644 index 8c5faaf..0000000 --- a/agentkit/tools/types.py +++ /dev/null @@ -1,332 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated from API JSON definition -# Do not edit manually - -from __future__ import annotations - -from typing import Optional -from pydantic import BaseModel, Field - -class ToolsBaseModel(BaseModel): - """AgentKit auto-generated base model""" - model_config = { - "populate_by_name": True, - "arbitrary_types_allowed": True - } - - -# Data Types -class AssociatedRuntimesForGetTool(ToolsBaseModel): - id: Optional[str] = Field(default=None, alias="Id") - name: Optional[str] = Field(default=None, alias="Name") - - -class KeyAuthForGetTool(ToolsBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForGetTool(ToolsBaseModel): - key_auth: Optional[KeyAuthForGetTool] = Field(default=None, alias="KeyAuth") - - -class VpcConfigurationForGetTool(ToolsBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForGetTool(ToolsBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForGetTool] = Field(default=None, alias="VpcConfiguration") - - -class TagsForGetTool(ToolsBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class SessionInfosForListSessions(ToolsBaseModel): - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - expire_at: Optional[str] = Field(default=None, alias="ExpireAt") - internal_endpoint: Optional[str] = Field(default=None, alias="InternalEndpoint") - name: Optional[str] = Field(default=None, alias="Name") - session_id: Optional[str] = Field(default=None, alias="SessionId") - status: Optional[str] = Field(default=None, alias="Status") - tool_type: Optional[str] = Field(default=None, alias="ToolType") - - -class KeyAuthForListTools(ToolsBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - - -class AuthorizerConfigurationForListTools(ToolsBaseModel): - key_auth: Optional[KeyAuthForListTools] = Field(default=None, alias="KeyAuth") - - -class VpcConfigurationForListTools(ToolsBaseModel): - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - vpc_id: Optional[str] = Field(default=None, alias="VpcId") - - -class NetworkConfigurationsForListTools(ToolsBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - network_type: Optional[str] = Field(default=None, alias="NetworkType") - vpc_configuration: Optional[VpcConfigurationForListTools] = Field(default=None, alias="VpcConfiguration") - - -class TagsForListTools(ToolsBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - - -class ToolsForListTools(ToolsBaseModel): - authorizer_configuration: Optional[AuthorizerConfigurationForListTools] = Field(default=None, alias="AuthorizerConfiguration") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - description: Optional[str] = Field(default=None, alias="Description") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForListTools]] = Field(default=None, alias="NetworkConfigurations") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForListTools]] = Field(default=None, alias="Tags") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - tool_type: Optional[str] = Field(default=None, alias="ToolType") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -# UpdateTool - Request -class UpdateToolRequest(ToolsBaseModel): - description: Optional[str] = Field(default=None, alias="Description") - tool_id: str = Field(..., alias="ToolId") - - -# UpdateTool - Response -class UpdateToolResponse(ToolsBaseModel): - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# GetSession - Request -class GetSessionRequest(ToolsBaseModel): - session_id: str = Field(..., alias="SessionId") - tool_id: str = Field(..., alias="ToolId") - - -# GetSession - Response -class GetSessionResponse(ToolsBaseModel): - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - expire_at: Optional[str] = Field(default=None, alias="ExpireAt") - internal_endpoint: Optional[str] = Field(default=None, alias="InternalEndpoint") - name: Optional[str] = Field(default=None, alias="Name") - session_id: Optional[str] = Field(default=None, alias="SessionId") - status: Optional[str] = Field(default=None, alias="Status") - tool_type: Optional[str] = Field(default=None, alias="ToolType") - - -# DeleteSession - Request -class DeleteSessionRequest(ToolsBaseModel): - session_id: str = Field(..., alias="SessionId") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# DeleteSession - Response -class DeleteSessionResponse(ToolsBaseModel): - session_id: Optional[str] = Field(default=None, alias="SessionId") - - -# CreateSession - Request -class CreateSessionRequest(ToolsBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - tool_id: str = Field(..., alias="ToolId") - ttl: Optional[int] = Field(default=None, alias="Ttl") - ttl_unit: Optional[str] = Field(default=None, alias="TtlUnit") - - -# CreateSession - Response -class CreateSessionResponse(ToolsBaseModel): - endpoint: Optional[str] = Field(default=None, alias="Endpoint") - internal_endpoint: Optional[str] = Field(default=None, alias="InternalEndpoint") - name: Optional[str] = Field(default=None, alias="Name") - session_id: Optional[str] = Field(default=None, alias="SessionId") - - -# GetSessionLogs - Request -class GetSessionLogsRequest(ToolsBaseModel): - limit: Optional[int] = Field(default=None, alias="Limit") - session_id: str = Field(..., alias="SessionId") - tool_id: str = Field(..., alias="ToolId") - - -# GetSessionLogs - Response -class GetSessionLogsResponse(ToolsBaseModel): - logs: Optional[str] = Field(default=None, alias="Logs") - - -# CreateTool - Request -class AuthorizerForCreateTool(ToolsBaseModel): - key_auth: Optional[AuthorizerKeyAuthForCreateTool] = Field(default=None, alias="KeyAuth") - -class AuthorizerKeyAuthForCreateTool(ToolsBaseModel): - api_key: Optional[str] = Field(default=None, alias="ApiKey") - api_key_location: Optional[str] = Field(default=None, alias="ApiKeyLocation") - api_key_name: Optional[str] = Field(default=None, alias="ApiKeyName") - -class NetworkForCreateTool(ToolsBaseModel): - vpc_configuration: Optional[NetworkVpcForCreateTool] = Field(default=None, alias="VpcConfiguration") - enable_private_network: Optional[bool] = Field(default=None, alias="EnablePrivateNetwork") - enable_public_network: Optional[bool] = Field(default=None, alias="EnablePublicNetwork") - -class NetworkVpcForCreateTool(ToolsBaseModel): - vpc_id: str = Field(..., alias="VpcId") - security_group_ids: Optional[list[str]] = Field(default=None, alias="SecurityGroupIds") - subnet_ids: Optional[list[str]] = Field(default=None, alias="SubnetIds") - -class TagsItemForCreateTool(ToolsBaseModel): - key: str = Field(..., alias="Key") - value: Optional[str] = Field(default=None, alias="Value") - -class CreateToolRequest(ToolsBaseModel): - description: Optional[str] = Field(default=None, alias="Description") - name: str = Field(..., alias="Name") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - tool_type: str = Field(..., alias="ToolType") - authorizer_configuration: Optional[AuthorizerForCreateTool] = Field(default=None, alias="AuthorizerConfiguration") - network_configuration: Optional[NetworkForCreateTool] = Field(default=None, alias="NetworkConfiguration") - tags: Optional[list[TagsItemForCreateTool]] = Field(default=None, alias="Tags") - - -# CreateTool - Response -class CreateToolResponse(ToolsBaseModel): - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# GetTool - Request -class GetToolRequest(ToolsBaseModel): - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# GetTool - Response -class GetToolResponse(ToolsBaseModel): - associated_runtimes: Optional[list[AssociatedRuntimesForGetTool]] = Field(default=None, alias="AssociatedRuntimes") - authorizer_configuration: Optional[AuthorizerConfigurationForGetTool] = Field(default=None, alias="AuthorizerConfiguration") - created_at: Optional[str] = Field(default=None, alias="CreatedAt") - description: Optional[str] = Field(default=None, alias="Description") - name: Optional[str] = Field(default=None, alias="Name") - network_configurations: Optional[list[NetworkConfigurationsForGetTool]] = Field(default=None, alias="NetworkConfigurations") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - role_name: Optional[str] = Field(default=None, alias="RoleName") - status: Optional[str] = Field(default=None, alias="Status") - tags: Optional[list[TagsForGetTool]] = Field(default=None, alias="Tags") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - tool_type: Optional[str] = Field(default=None, alias="ToolType") - updated_at: Optional[str] = Field(default=None, alias="UpdatedAt") - - -# ListTools - Request -class FiltersItemForListTools(ToolsBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class TagFiltersItemForListTools(ToolsBaseModel): - key: Optional[str] = Field(default=None, alias="Key") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListToolsRequest(ToolsBaseModel): - create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter") - create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore") - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - project_name: Optional[str] = Field(default=None, alias="ProjectName") - update_time_after: Optional[str] = Field(default=None, alias="UpdateTimeAfter") - update_time_before: Optional[str] = Field(default=None, alias="UpdateTimeBefore") - filters: Optional[list[FiltersItemForListTools]] = Field(default=None, alias="Filters") - tag_filters: Optional[list[TagFiltersItemForListTools]] = Field(default=None, alias="TagFilters") - - -# ListTools - Response -class ListToolsResponse(ToolsBaseModel): - next_token: Optional[str] = Field(default=None, alias="NextToken") - tools: Optional[list[ToolsForListTools]] = Field(default=None, alias="Tools") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - tools: Optional[list[ToolsForListTools]] = Field(default=None, alias="Tools") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# ListSessions - Request -class FiltersItemForListSessions(ToolsBaseModel): - name: Optional[str] = Field(default=None, alias="Name") - name_contains: Optional[str] = Field(default=None, alias="NameContains") - values: Optional[list[str]] = Field(default=None, alias="Values") - -class ListSessionsRequest(ToolsBaseModel): - create_time_after: Optional[str] = Field(default=None, alias="CreateTimeAfter") - create_time_before: Optional[str] = Field(default=None, alias="CreateTimeBefore") - expire_time_after: Optional[str] = Field(default=None, alias="ExpireTimeAfter") - expire_time_before: Optional[str] = Field(default=None, alias="ExpireTimeBefore") - max_results: Optional[int] = Field(default=None, alias="MaxResults") - next_token: Optional[str] = Field(default=None, alias="NextToken") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - tool_id: str = Field(..., alias="ToolId") - filters: Optional[list[FiltersItemForListSessions]] = Field(default=None, alias="Filters") - - -# ListSessions - Response -class ListSessionsResponse(ToolsBaseModel): - next_token: Optional[str] = Field(default=None, alias="NextToken") - session_infos: Optional[list[SessionInfosForListSessions]] = Field(default=None, alias="SessionInfos") - page_number: Optional[int] = Field(default=None, alias="PageNumber") - page_size: Optional[int] = Field(default=None, alias="PageSize") - session_infos: Optional[list[SessionInfosForListSessions]] = Field(default=None, alias="SessionInfos") - total_count: Optional[int] = Field(default=None, alias="TotalCount") - - -# DeleteTool - Request -class DeleteToolRequest(ToolsBaseModel): - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# DeleteTool - Response -class DeleteToolResponse(ToolsBaseModel): - tool_id: Optional[str] = Field(default=None, alias="ToolId") - - -# SetSessionTtl - Request -class SetSessionTtlRequest(ToolsBaseModel): - session_id: str = Field(..., alias="SessionId") - tool_id: str = Field(..., alias="ToolId") - ttl: int = Field(..., alias="Ttl") - ttl_unit: Optional[str] = Field(default=None, alias="TtlUnit") - - -# SetSessionTtl - Response -class SetSessionTtlResponse(ToolsBaseModel): - expire_at: Optional[str] = Field(default=None, alias="ExpireAt") - session_id: Optional[str] = Field(default=None, alias="SessionId") - tool_id: Optional[str] = Field(default=None, alias="ToolId") - diff --git a/agentkit/utils/__init__.py b/agentkit/utils/__init__.py deleted file mode 100644 index 585e151..0000000 --- a/agentkit/utils/__init__.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from agentkit.utils.logging_config import ( - setup_logging, - get_logger, - set_context, - clear_context, - get_context, - setup_sdk_logging, - setup_cli_logging, - setup_server_logging, - LOG_FORMAT_SIMPLE, - LOG_FORMAT_DETAILED, - LOG_FORMAT_JSON, -) - -__all__ = [ - "setup_logging", - "get_logger", - "set_context", - "clear_context", - "get_context", - "setup_sdk_logging", - "setup_cli_logging", - "setup_server_logging", - "LOG_FORMAT_SIMPLE", - "LOG_FORMAT_DETAILED", - "LOG_FORMAT_JSON", -] diff --git a/agentkit/utils/credential.py b/agentkit/utils/credential.py deleted file mode 100644 index b04347e..0000000 --- a/agentkit/utils/credential.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import json -import logging -from pathlib import Path - -from pydantic import BaseModel - -logger = logging.getLogger(__name__) - - -VEFAAS_IAM_CRIDENTIAL_PATH = "/var/run/secrets/iam/credential" - - -class VeIAMCredential(BaseModel): - access_key_id: str - secret_access_key: str - session_token: str - - -def get_credential_from_vefaas_iam() -> VeIAMCredential: - """Get credential from VeFaaS IAM file""" - logger.info( - f"Get Volcegnine access key or secret key from environment variables failed, try to get from VeFaaS IAM file (path={VEFAAS_IAM_CRIDENTIAL_PATH})." - ) - - path = Path(VEFAAS_IAM_CRIDENTIAL_PATH) - - if not path.exists(): - logger.error( - f"Get Volcegnine access key or secret key from environment variables failed, and VeFaaS IAM file (path={VEFAAS_IAM_CRIDENTIAL_PATH}) not exists. Please check your configuration." - ) - raise FileNotFoundError( - f"Get Volcegnine access key or secret key from environment variables failed, and VeFaaS IAM file (path={VEFAAS_IAM_CRIDENTIAL_PATH}) not exists. Please check your configuration." - ) - - with open(VEFAAS_IAM_CRIDENTIAL_PATH, "r") as f: - cred_dict = json.load(f) - access_key = cred_dict["access_key_id"] - secret_key = cred_dict["secret_access_key"] - session_token = cred_dict["session_token"] - return VeIAMCredential( - access_key_id=access_key, - secret_access_key=secret_key, - session_token=session_token, - ) diff --git a/agentkit/utils/logging_config.py b/agentkit/utils/logging_config.py deleted file mode 100644 index 5252c42..0000000 --- a/agentkit/utils/logging_config.py +++ /dev/null @@ -1,436 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Unified logging configuration with multiple formats, outputs, and env-based control.""" - -import logging -import os -import sys -import json -from typing import Optional, Dict -from datetime import datetime -from pathlib import Path -import contextvars - -# Context for request/session/user tracing -request_id_var = contextvars.ContextVar('request_id', default=None) -session_id_var = contextvars.ContextVar('session_id', default=None) -user_id_var = contextvars.ContextVar('user_id', default=None) - -# Log format constants -LOG_FORMAT_SIMPLE = "simple" -LOG_FORMAT_DETAILED = "detailed" -LOG_FORMAT_JSON = "json" - -# Defaults -DEFAULT_LOG_LEVEL = "INFO" -DEFAULT_LOG_FORMAT = LOG_FORMAT_SIMPLE -DEFAULT_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" - -# CLI defaults -DEFAULT_CLI_CONSOLE_ENABLED = False # Console logging disabled by default -DEFAULT_CLI_FILE_ENABLED = False # File logging disabled by default -DEFAULT_CLI_CONSOLE_LEVEL = "INFO" # Default console level -DEFAULT_CLI_FILE_LEVEL = "INFO" # Default file level - -# Environment variables -ENV_LOG_LEVEL = "AGENTKIT_LOG_LEVEL" # Applies to both console and file -ENV_LOG_FORMAT = "AGENTKIT_LOG_FORMAT" -ENV_LOG_FILE = "AGENTKIT_LOG_FILE" # Log file path -ENV_LOG_CONSOLE = "AGENTKIT_LOG_CONSOLE" # Enable console output -ENV_LOG_JSON_INDENT = "AGENTKIT_LOG_JSON_INDENT" -# Additional variables to control console and file separately -ENV_CONSOLE_LOG_LEVEL = "AGENTKIT_CONSOLE_LOG_LEVEL" # Console log level -ENV_FILE_LOG_LEVEL = "AGENTKIT_FILE_LOG_LEVEL" # File log level -ENV_FILE_ENABLED = "AGENTKIT_FILE_ENABLED" # Enable file logging - - -class ContextFilter(logging.Filter): - """Inject context fields into records.""" - - def filter(self, record: logging.LogRecord) -> bool: - """Attach context to record.""" - record.request_id = request_id_var.get() - record.session_id = session_id_var.get() - record.user_id = user_id_var.get() - return True - - -class JSONFormatter(logging.Formatter): - """JSON formatter.""" - - def __init__(self, indent: Optional[int] = None): - super().__init__() - self.indent = indent - - def format(self, record: logging.LogRecord) -> str: - """Format record as JSON string.""" - log_data = { - "timestamp": datetime.fromtimestamp(record.created).isoformat(), - "level": record.levelname, - "logger": record.name, - "message": record.getMessage(), - "module": record.module, - "function": record.funcName, - "line": record.lineno, - } - - # Context - if hasattr(record, 'request_id') and record.request_id: - log_data["request_id"] = record.request_id - if hasattr(record, 'session_id') and record.session_id: - log_data["session_id"] = record.session_id - if hasattr(record, 'user_id') and record.user_id: - log_data["user_id"] = record.user_id - - # Extra fields - if hasattr(record, 'extra') and record.extra: - log_data.update(record.extra) - - # Exception - if record.exc_info: - log_data["exception"] = self.formatException(record.exc_info) - - return json.dumps(log_data, ensure_ascii=False, indent=self.indent) - - -def get_log_level_from_env() -> str: - """Get log level from env.""" - return os.getenv(ENV_LOG_LEVEL, DEFAULT_LOG_LEVEL).upper() - - -def get_log_format_from_env() -> str: - """Get log format from env.""" - return os.getenv(ENV_LOG_FORMAT, DEFAULT_LOG_FORMAT).lower() - - -def get_log_file_from_env() -> Optional[str]: - """Get log file path from env.""" - return os.getenv(ENV_LOG_FILE) - - -def get_console_enabled_from_env() -> bool: - """Get console toggle from env.""" - console_enabled = os.getenv(ENV_LOG_CONSOLE, "true").lower() - return console_enabled in ("true", "1", "yes", "on") - - -def create_formatter(format_type: str = DEFAULT_LOG_FORMAT) -> logging.Formatter: - """Create formatter (simple/detailed/json).""" - if format_type == LOG_FORMAT_JSON: - indent = None - if os.getenv(ENV_LOG_JSON_INDENT): - try: - indent = int(os.getenv(ENV_LOG_JSON_INDENT)) - except ValueError: - pass - return JSONFormatter(indent=indent) - - elif format_type == LOG_FORMAT_DETAILED: - fmt = ( - "[%(asctime)s] [%(levelname)s] [%(name)s:%(funcName)s:%(lineno)d] " - "%(message)s" - ) - if request_id_var.get(): - fmt = f"[%(request_id)s] {fmt}" - return logging.Formatter(fmt, datefmt=DEFAULT_DATE_FORMAT) - - else: # simple format - fmt = "[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s" - return logging.Formatter(fmt, datefmt=DEFAULT_DATE_FORMAT) - - -def setup_logging( - level: Optional[str] = None, - format_type: Optional[str] = None, - log_file: Optional[str] = None, - console_enabled: Optional[bool] = None, - force: bool = False -) -> None: - """Configure global logging.""" - # Resolve config (args override env) - log_level = (level or get_log_level_from_env()).upper() - log_format = (format_type or get_log_format_from_env()).lower() - log_file_path = log_file or get_log_file_from_env() - console_out = console_enabled if console_enabled is not None else get_console_enabled_from_env() - - # Validate level - numeric_level = getattr(logging, log_level, None) - if not isinstance(numeric_level, int): - print(f"Warning: Invalid log level '{log_level}', using INFO", file=sys.stderr) - numeric_level = logging.INFO - - # Root logger - root_logger = logging.getLogger() - - # Skip if already configured and not forcing - if root_logger.handlers and not force: - return - - # Clear existing handlers if forcing - if force: - root_logger.handlers.clear() - - # Set level - root_logger.setLevel(numeric_level) - - # Formatter - formatter = create_formatter(log_format) - - # Context filter - context_filter = ContextFilter() - - # Console handler - if console_out: - console_handler = logging.StreamHandler(sys.stderr) - console_handler.setLevel(numeric_level) - console_handler.setFormatter(formatter) - console_handler.addFilter(context_filter) - root_logger.addHandler(console_handler) - - # File handler - if log_file_path: - try: - # Ensure log directory exists - log_dir = Path(log_file_path).parent - log_dir.mkdir(parents=True, exist_ok=True) - - file_handler = logging.FileHandler(log_file_path, encoding='utf-8') - file_handler.setLevel(numeric_level) - file_handler.setFormatter(formatter) - file_handler.addFilter(context_filter) - root_logger.addHandler(file_handler) - except Exception as e: - print(f"Warning: Failed to create log file handler: {e}", file=sys.stderr) - - -def get_logger(name: str) -> logging.Logger: - """Get a logger namespaced under 'agentkit'.""" - # Ensure namespaced under 'agentkit' - if not name.startswith("agentkit"): - name = f"agentkit.{name}" - - return logging.getLogger(name) - - -def set_context( - request_id: Optional[str] = None, - session_id: Optional[str] = None, - user_id: Optional[str] = None -) -> None: - """Set request/session/user context.""" - if request_id is not None: - request_id_var.set(request_id) - if session_id is not None: - session_id_var.set(session_id) - if user_id is not None: - user_id_var.set(user_id) - - -def clear_context() -> None: - """Clear logging context.""" - request_id_var.set(None) - session_id_var.set(None) - user_id_var.set(None) - - -def get_context() -> Dict[str, Optional[str]]: - """Return current logging context as dict.""" - return { - "request_id": request_id_var.get(), - "session_id": session_id_var.get(), - "user_id": user_id_var.get(), - } - - -# SDK usage -def setup_sdk_logging(level: str = "INFO") -> None: - """Configure logging for SDK/library usage.""" - setup_logging( - level=level, - format_type=LOG_FORMAT_SIMPLE, - console_enabled=False - ) - - -def _setup_dual_level_logging( - console_enabled: bool = False, - console_level: str = "INFO", - file_enabled: bool = True, - file_level: str = "INFO", - log_file_path: Optional[str] = None, - format_type: str = LOG_FORMAT_SIMPLE, - force: bool = False -) -> None: - """Configure logging with independent console/file levels.""" - # Root logger - root_logger = logging.getLogger() - - # Skip if already configured and not forcing - if root_logger.handlers and not force: - return - - # Clear existing handlers if forcing - if force: - root_logger.handlers.clear() - - if not console_enabled and not file_enabled: - root_logger.addHandler(logging.NullHandler()) - root_logger.setLevel(logging.CRITICAL) - return - - # Root level = min(handler levels) - levels = [] - if console_enabled: - levels.append(getattr(logging, console_level, logging.INFO)) - if file_enabled: - levels.append(getattr(logging, file_level, logging.INFO)) - - if levels: - root_logger.setLevel(min(levels)) - else: - root_logger.setLevel(logging.INFO) - - # Create formatter - formatter = create_formatter(format_type) - - # Context filter - context_filter = ContextFilter() - - # Console handler - if console_enabled: - console_handler = logging.StreamHandler(sys.stderr) - console_numeric_level = getattr(logging, console_level, None) - if not isinstance(console_numeric_level, int): - print(f"Warning: Invalid console log level '{console_level}', using INFO", file=sys.stderr) - console_numeric_level = logging.INFO - console_handler.setLevel(console_numeric_level) - console_handler.setFormatter(formatter) - console_handler.addFilter(context_filter) - root_logger.addHandler(console_handler) - - # File handler - if file_enabled and log_file_path: - try: - # Ensure log directory exists - log_dir = Path(log_file_path).parent - log_dir.mkdir(parents=True, exist_ok=True) - - file_handler = logging.FileHandler(log_file_path, encoding='utf-8') - file_numeric_level = getattr(logging, file_level, None) - if not isinstance(file_numeric_level, int): - print(f"Warning: Invalid file log level '{file_level}', using INFO", file=sys.stderr) - file_numeric_level = logging.INFO - file_handler.setLevel(file_numeric_level) - file_handler.setFormatter(formatter) - file_handler.addFilter(context_filter) - root_logger.addHandler(file_handler) - except Exception as e: - print(f"Warning: Failed to create log file handler: {e}", file=sys.stderr) - - -def setup_cli_logging( - verbose: bool = False, - quiet: bool = False, - console_enabled: Optional[bool] = None, - file_enabled: Optional[bool] = None, - console_level: Optional[str] = None, - file_level: Optional[str] = None, - log_file_path: Optional[str] = None, - force: bool = False -) -> None: - """Configure logging for CLI. - - Default (no args/env): console off, file off. If file on: INFO to .agentkit/logs/agentkit-YYYYMMDD.log. - """ - # Shortcut flags - if quiet: - # Silent mode: console off; enable file, level ERROR - console_enabled = False if console_enabled is None else console_enabled - file_enabled = True if file_enabled is None else file_enabled - file_level = file_level or "ERROR" - console_level = console_level or "ERROR" - elif verbose: - # Verbose mode: enable console and file, level DEBUG - console_enabled = True if console_enabled is None else console_enabled - file_enabled = True if file_enabled is None else file_enabled - console_level = console_level or "DEBUG" - file_level = file_level or "DEBUG" - - # Env overrides - def get_bool_env(env_name: str, default: bool) -> bool: - """Read boolean env var.""" - value = os.getenv(env_name) - if value is None: - return default - return value.lower() in ("true", "1", "yes", "on") - - # Console toggle (args > env > default) - if console_enabled is None: - console_enabled = get_bool_env(ENV_LOG_CONSOLE, DEFAULT_CLI_CONSOLE_ENABLED) - - # File toggle (args > env > default) - if file_enabled is None: - file_enabled = get_bool_env(ENV_FILE_ENABLED, DEFAULT_CLI_FILE_ENABLED) - - # Console level (args > CONSOLE_LOG_LEVEL > LOG_LEVEL > default) - if console_level is None: - console_level = os.getenv(ENV_CONSOLE_LOG_LEVEL) or \ - os.getenv(ENV_LOG_LEVEL) or \ - DEFAULT_CLI_CONSOLE_LEVEL - - # File level (args > FILE_LOG_LEVEL > LOG_LEVEL > default) - if file_level is None: - file_level = os.getenv(ENV_FILE_LOG_LEVEL) or \ - os.getenv(ENV_LOG_LEVEL) or \ - DEFAULT_CLI_FILE_LEVEL - - # Log file path - if log_file_path is None: - log_file_path = os.getenv(ENV_LOG_FILE) - - # Default log file path - if file_enabled and log_file_path is None: - # .agentkit/logs under current working directory - log_dir = os.path.join(os.getcwd(), ".agentkit", "logs") - # Date-based name - date_str = datetime.now().strftime("%Y%m%d") - log_file_path = os.path.join(log_dir, f"agentkit-{date_str}.log") - - # Apply - _setup_dual_level_logging( - console_enabled=console_enabled, - console_level=console_level.upper(), - file_enabled=file_enabled, - file_level=file_level.upper(), - log_file_path=log_file_path, - format_type=LOG_FORMAT_SIMPLE, - force=force - ) - - -def setup_server_logging( - level: str = "INFO", - log_file: Optional[str] = None, - json_format: bool = False -) -> None: - """Configure logging for server apps.""" - format_type = LOG_FORMAT_JSON if json_format else LOG_FORMAT_DETAILED - - setup_logging( - level=level, - format_type=format_type, - log_file=log_file, - console_enabled=True - ) diff --git a/agentkit/utils/misc.py b/agentkit/utils/misc.py deleted file mode 100644 index ec4c837..0000000 --- a/agentkit/utils/misc.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import string -import random - - -def generate_random_id(length=8): - """generate a random id - - Args: - length: the length of the random id - - Returns: - the random id string - """ - # define the character set: lowercase letters + digits - characters = string.ascii_lowercase + string.digits - random_id = ''.join(random.choice(characters) for _ in range(length)) - return random_id - - -def generate_runtime_name(agent_name: str) -> str: - """生成Runtime名称 - - Args: - agent_name: Agent名称 - - Returns: - 格式为 "{agent_name}-{random_id}" 的Runtime名称 - """ - return f"{agent_name}-{generate_random_id()}" - - -def generate_runtime_role_name() -> str: - """生成Runtime角色名称 - - Returns: - 格式为 "AgentKit-Runtime-Default-ServiceRole-{random_id}" 的角色名称 - """ - return f"AgentKit-Runtime-Default-ServiceRole-{generate_random_id(7)}" - - -def generate_apikey_name() -> str: - """生成API密钥名称 - - Returns: - 格式为 "API-KEY-{random_id}" 的API密钥名称 - """ - return f"API-KEY-{generate_random_id()}" - - -def generate_client_token() -> str: - """生成Client Token - - Returns: - 16位随机字符串 - """ - return generate_random_id(16) \ No newline at end of file diff --git a/agentkit/utils/request.py b/agentkit/utils/request.py deleted file mode 100644 index 2dd754f..0000000 --- a/agentkit/utils/request.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging - -from agentkit.utils.ve_sign import ve_request - -logger = logging.getLogger("agentkit." + __name__) - - -def request( - name: str, - header: dict, - body: dict, - action: str, - ak: str, - sk: str, - service: str, - version: str, - region: str, - host: str, - content_type: str = "application/json", - target_key: str = "", -): - logger.info(f"Request {name} ...") - - header = header if header else {} - - response = ve_request( - request_body=body, - header=header, - action=action, - ak=ak, - sk=sk, - service=service, - version=version, - region=region, - host=host, - content_type=content_type, - ) - - try: - if target_key: - for key in target_key.split("."): - response = getattr(response, key, None) - return response - except Exception as e: - logger.error(f"Request {name} failed {e}. Response from volcengine: {response}") diff --git a/agentkit/utils/template_utils.py b/agentkit/utils/template_utils.py deleted file mode 100644 index f6ff11f..0000000 --- a/agentkit/utils/template_utils.py +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Template rendering utilities. - -Supported variables: -- {{account_id}}: Volcengine account ID (lazy-loaded) -- {{timestamp}}: current timestamp (YYYYMMDDHHMMSS) -- {{date}}: current date (YYYYMMDD) -- {{random_id}}: 8-hex random id - -Example: - >>> from agentkit.utils.template_utils import render_template - >>> result = render_template("agentkit-cli-{{account_id}}") -""" - -import re -import logging -from datetime import datetime -from typing import Dict, Optional, Any - -logger = logging.getLogger(__name__) - -# In-memory cache for fetched account info -_ACCOUNT_CACHE: Dict[str, Any] = {} - -# Precompiled pattern for template variables like {{var}} -P_VAR = re.compile(r"\{\{([^}]+)\}\}") - - - -def _get_builtin_variables() -> Dict[str, str]: - """Return builtin variables that do not require external calls.""" - import uuid - - now = datetime.now() - - variables = { - 'timestamp': now.strftime('%Y%m%d%H%M%S'), - 'date': now.strftime('%Y%m%d'), - 'random_id': uuid.uuid4().hex[:8], - } - - return variables - - -def get_account_id() -> str: - """Get Volcengine account ID with in-memory cache. - - Raises: - ValueError: when account id cannot be retrieved - """ - # Return from cache if available - if 'account_id' in _ACCOUNT_CACHE: - logger.debug(f"Account ID from cache: {_ACCOUNT_CACHE['account_id']}") - return _ACCOUNT_CACHE['account_id'] - - try: - # Query IAM API for user info - from agentkit.toolkit.volcengine.iam import VeIAM - - logger.debug("Fetching account info via IAM API...") - iam = VeIAM() - user_response = iam.get_user_by_access_key_id() - - # Extract account_id from response (supports both obj and dict) - if hasattr(user_response, 'user') and hasattr(user_response.user, 'account_id'): - account_id = str(user_response.user.account_id) - elif isinstance(user_response, dict) and 'user' in user_response: - account_id = str(user_response['user']['account_id']) - else: - raise ValueError(f"Cannot extract account_id from IAM response: {user_response}") - - # Cache result - _ACCOUNT_CACHE['account_id'] = account_id - logger.debug(f"Retrieved account_id: {account_id}") - - return account_id - - except Exception as e: - # Build explicit error details - error_type = type(e).__name__ - error_detail = str(e) - error_msg = f"Failed to get account_id ({error_type}): {error_detail}" - logger.error(error_msg) - # Log full stack for debugging - logger.debug("Full stack trace:", exc_info=True) - raise ValueError(error_msg) from e - - -def clear_cache() -> None: - """Clear cached account info (useful for tests or refreshing).""" - global _ACCOUNT_CACHE - _ACCOUNT_CACHE.clear() - logger.debug("Account info cache cleared") - - -def render_template_safe(template_str: str, - fallback: Optional[str] = None, - extra_vars: Optional[Dict[str, str]] = None) -> str: - """Render template safely, falling back to provided value on failure.""" - try: - return render_template(template_str, extra_vars) - except Exception as e: - logger.warning(f"Template rendering failed, using fallback value: {e}") - return fallback if fallback is not None else template_str - - -# NOTE: unified lazy-loading in render_template; removed unused _get_all_variables - - -# Optimized: fetch account_id only when needed -def render_template(template_str: str, extra_vars: Optional[Dict[str, str]] = None) -> str: - """Render template string with builtin and optional variables. - - Lazily resolves account_id only when referenced. - """ - # Fast-path: no placeholders - if not template_str or '{{' not in template_str: - logger.debug("Skip rendering (no placeholders): %r", template_str) - return template_str - - # Extract placeholders - placeholders = [m.strip() for m in P_VAR.findall(template_str)] - logger.debug("Render start: raw=%r, placeholders=%s", template_str, placeholders) - - needs_account_id = any(p.replace(' ', '') == 'account_id' for p in placeholders) - logger.debug("Needs account_id: %s", needs_account_id) - - # Build variables - variables = _get_builtin_variables() - - # Fetch account_id only when needed - if needs_account_id: - try: - account_id = get_account_id() - if not account_id: - raise ValueError("get_account_id() returned empty") - variables['account_id'] = account_id - except Exception as e: - # Build full error with type and detail - error_type = type(e).__name__ - error_detail = str(e) - full_error = f"Failed to resolve account_id for template rendering ({error_type}): {error_detail}" - logger.error(full_error) - # Log full exception chain - logger.debug("Full exception chain during rendering:", exc_info=True) - raise ValueError(full_error) from e - - # Merge extra variables if provided - if extra_vars: - variables.update(extra_vars) - - # Render variables - def replace_var(match): - var_name = match.group(1).strip() - if var_name in variables: - return str(variables[var_name]) - else: - logger.warning("Unknown template variable: %s", "{{%s}}" % var_name) - return match.group(0) # keep original token - - rendered = P_VAR.sub(replace_var, template_str) - - # Warn if unresolved placeholders remain - unresolved = [m.strip() for m in P_VAR.findall(rendered)] - if unresolved: - logger.warning("Unresolved placeholders after rendering: %s; rendered=%r", unresolved, rendered) - - logger.debug("Render done: %r -> %r", template_str, rendered) - return rendered diff --git a/agentkit/utils/ve_sign.py b/agentkit/utils/ve_sign.py deleted file mode 100644 index 005b64d..0000000 --- a/agentkit/utils/ve_sign.py +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 2025 ByteDance and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import datetime -import hashlib -import hmac -import os -from urllib.parse import quote - -import requests - -Service = "" -Version = "" -Region = "" -Host = "" -ContentType = "" - - -def norm_query(params): - query = "" - for key in sorted(params.keys()): - if isinstance(params[key], list): - for k in params[key]: - query = ( - query + quote(key, safe="-_.~") + "=" + quote(k, safe="-_.~") + "&" - ) - else: - query = ( - query - + quote(key, safe="-_.~") - + "=" - + quote(params[key], safe="-_.~") - + "&" - ) - query = query[:-1] - return query.replace("+", "%20") - - -# 第一步:准备辅助函数。 -# sha256 非对称加密 -def hmac_sha256(key: bytes, content: str): - return hmac.new(key, content.encode("utf-8"), hashlib.sha256).digest() - - -# sha256 hash算法 -def hash_sha256(content: str): - return hashlib.sha256(content.encode("utf-8")).hexdigest() - - -# 第二步:签名请求函数 -def request(method, date, query, header, ak, sk, action, body): - # 第三步:创建身份证明。其中的 Service 和 Region 字段是固定的。ak 和 sk 分别代表 - # AccessKeyID 和 SecretAccessKey。同时需要初始化签名结构体。一些签名计算时需要的属性也在这里处理。 - # 初始化身份证明结构体 - credential = { - "access_key_id": ak, - "secret_access_key": sk, - "service": Service, - "region": Region, - } - # 初始化签名结构体 - request_param = { - "body": body, - "host": Host, - "path": "/", - "method": method, - "content_type": ContentType, - "date": date, - "query": {"Action": action, "Version": Version, **query}, - } - if body is None: - request_param["body"] = "" - # 第四步:接下来开始计算签名。在计算签名前,先准备好用于接收签算结果的 signResult 变量,并设置一些参数。 - # 初始化签名结果的结构体 - x_date = request_param["date"].strftime("%Y%m%dT%H%M%SZ") - short_x_date = x_date[:8] - x_content_sha256 = hash_sha256(request_param["body"]) - sign_result = { - "Host": request_param["host"], - "X-Content-Sha256": x_content_sha256, - "X-Date": x_date, - "Content-Type": request_param["content_type"], - } - # 第五步:计算 Signature 签名。 - signed_headers_str = ";".join( - ["content-type", "host", "x-content-sha256", "x-date"] - ) - # signed_headers_str = signed_headers_str + ";x-security-token" - canonical_request_str = "\n".join( - [ - request_param["method"].upper(), - request_param["path"], - norm_query(request_param["query"]), - "\n".join( - [ - "content-type:" + request_param["content_type"], - "host:" + request_param["host"], - "x-content-sha256:" + x_content_sha256, - "x-date:" + x_date, - ] - ), - "", - signed_headers_str, - x_content_sha256, - ] - ) - - # 打印正规化的请求用于调试比对 - # print(canonical_request_str) - hashed_canonical_request = hash_sha256(canonical_request_str) - - # 打印hash值用于调试比对 - # print(hashed_canonical_request) - credential_scope = "/".join( - [short_x_date, credential["region"], credential["service"], "request"] - ) - string_to_sign = "\n".join( - ["HMAC-SHA256", x_date, credential_scope, hashed_canonical_request] - ) - - # 打印最终计算的签名字符串用于调试比对 - # print(string_to_sign) - k_date = hmac_sha256(credential["secret_access_key"].encode("utf-8"), short_x_date) - k_region = hmac_sha256(k_date, credential["region"]) - k_service = hmac_sha256(k_region, credential["service"]) - k_signing = hmac_sha256(k_service, "request") - signature = hmac_sha256(k_signing, string_to_sign).hex() - - sign_result["Authorization"] = ( - "HMAC-SHA256 Credential={}, SignedHeaders={}, Signature={}".format( - credential["access_key_id"] + "/" + credential_scope, - signed_headers_str, - signature, - ) - ) - header = {**header, **sign_result} - # header = {**header, **{"X-Security-Token": SessionToken}} - # 第六步:将 Signature 签名写入 HTTP Header 中,并发送 HTTP 请求。 - r = requests.request( - method=method, - url="https://{}{}".format(request_param["host"], request_param["path"]), - headers=header, - params=request_param["query"], - data=request_param["body"], - ) - return r.json() - - -def ve_request( - request_body: dict, - action: str, - ak: str, - sk: str, - service: str, - version: str, - region: str, - host: str, - header: dict = {}, - content_type: str = "application/json", -): - # response_body = request("Get", datetime.datetime.utcnow(), {}, {}, AK, SK, "ListUsers", None) - # print(response_body) - # 以下参数视服务不同而不同,一个服务内通常是一致的 - global Service - Service = service - global Version - Version = version - global Region - Region = region - global Host - Host = host - global ContentType - ContentType = content_type - - AK = ak - SK = sk - - now = datetime.datetime.utcnow() - - # Body的格式需要配合Content-Type,API使用的类型请阅读具体的官方文档,如:json格式需要json.dumps(obj) - # response_body = request("GET", now, {"Limit": "2"}, {}, AK, SK, "ListUsers", None) - import json - - try: - response_body = request( - "POST", now, {}, header, AK, SK, action, json.dumps(request_body) - ) - check_error(response_body) - return response_body - except Exception as e: - raise e - -def check_error(response: dict) -> None: - if "Error" in response["ResponseMetadata"]: - error_code = response["ResponseMetadata"]["Error"]["Code"] - error_message = response["ResponseMetadata"]["Error"]["Message"] - action = response["ResponseMetadata"]["Action"] - raise ValueError( - f"Error when ve_request {action}: {error_code} {error_message}, res: {response}" - ) - -def get_volc_ak_sk_region(service: str = ""): - """获取火山引擎凭证 - - 优先级: - 1. 服务特定环境变量(VOLCENGINE_CR_ACCESS_KEY 等) - 2. 通用环境变量(VOLCENGINE_ACCESS_KEY 等) - 3. 全局配置文件(~/.agentkit/config.yaml) - 4. 抛出异常 - - Args: - service: 服务名称(CR/AGENTKIT/TOS/IAM等),用于查找特定环境变量 - - Returns: - (access_key, secret_key, region) 元组 - - Raises: - ValueError: 如果无法获取有效的凭证 - """ - ak, sk, region = "", "", "" - - # 1. 尝试服务特定环境变量 - if service.upper() == "CR": - # 优先使用新的 VOLCENGINE_* 环境变量,兼容旧的 VOLC_* 环境变量 - ak = os.getenv("VOLCENGINE_CR_ACCESS_KEY") or os.getenv("VOLC_CR_ACCESSKEY") - sk = os.getenv("VOLCENGINE_CR_SECRET_KEY") or os.getenv("VOLC_CR_SECRETKEY") - region = os.getenv("VOLCENGINE_CR_REGION") or os.getenv("VOLC_CR_REGION") - elif service.upper() == "AGENTKIT": - # 优先使用新的 VOLCENGINE_* 环境变量,兼容旧的 VOLC_* 环境变量 - ak = os.getenv("VOLCENGINE_AGENTKIT_ACCESS_KEY") or os.getenv("VOLC_AGENTKIT_ACCESSKEY") - sk = os.getenv("VOLCENGINE_AGENTKIT_SECRET_KEY") or os.getenv("VOLC_AGENTKIT_SECRETKEY") - region = os.getenv("VOLCENGINE_AGENTKIT_REGION") or os.getenv("VOLC_AGENTKIT_REGION") - elif service.upper() == "TOS": - # 优先使用新的 VOLCENGINE_* 环境变量,兼容旧的 VOLC_* 环境变量 - ak = os.getenv("VOLCENGINE_TOS_ACCESS_KEY") or os.getenv("VOLC_TOS_ACCESSKEY") - sk = os.getenv("VOLCENGINE_TOS_SECRET_KEY") or os.getenv("VOLC_TOS_SECRETKEY") - region = os.getenv("VOLCENGINE_TOS_REGION") or os.getenv("VOLC_TOS_REGION") - - # 2. 如果服务特定环境变量不完整,尝试通用环境变量 - if not all([ak, sk, region]): - # 优先使用新的 VOLCENGINE_* 环境变量,兼容旧的 VOLC_* 环境变量 - ak = ak or os.getenv("VOLCENGINE_ACCESS_KEY") or os.getenv("VOLC_ACCESSKEY") - sk = sk or os.getenv("VOLCENGINE_SECRET_KEY") or os.getenv("VOLC_SECRETKEY") - region = region or os.getenv("VOLCENGINE_REGION") or os.getenv("VOLC_REGION") - - # 3. 【新增】如果环境变量仍不完整,尝试全局配置 - if not all([ak, sk]): - try: - # 延迟导入,避免循环依赖 - from agentkit.toolkit.config.global_config import get_global_config - global_config = get_global_config() - ak = ak or global_config.volcengine.access_key - sk = sk or global_config.volcengine.secret_key - region = region or global_config.volcengine.region - except Exception: - # 全局配置加载失败,继续原有逻辑 - pass - - # 4. 设置默认 region - region = region if region else "cn-beijing" - - # 5. 验证必需字段 - if not ak or not sk: - raise ValueError( - "未找到火山引擎访问凭证。请设置环境变量 VOLCENGINE_ACCESS_KEY 和 " - "VOLCENGINE_SECRET_KEY (export VOLCENGINE_ACCESS_KEY=your_access_key; export VOLCENGINE_SECRET_KEY=your_secret_key),或在全局配置文件 ~/.agentkit/config.yaml 中配置" - ) - - return ak, sk, region - - -def get_volc_agentkit_host_info(): - # 优先使用新的 VOLCENGINE_* 环境变量,兼容旧的 VOLC_* 环境变量 - host = os.getenv("VOLCENGINE_AGENTKIT_HOST") or os.getenv("VOLC_AGENTKIT_HOST") - api_version = os.getenv("VOLCENGINE_AGENTKIT_API_VERSION") or os.getenv("VOLC_AGENTKIT_API_VERSION") - service_code = os.getenv("VOLCENGINE_AGENTKIT_SERVICE") or os.getenv("VOLC_AGENTKIT_SERVICE") - return host if host else "open.volcengineapi.com", api_version if api_version else "2025-10-30", service_code if service_code else "agentkit" diff --git a/agentkit/version.py b/agentkit/version.py deleted file mode 100644 index c4a131b..0000000 --- a/agentkit/version.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -VERSION = "0.1.7" diff --git a/api_jsons/knowledge_all_apis.json b/api_jsons/knowledge_all_apis.json deleted file mode 100644 index f07b37e..0000000 --- a/api_jsons/knowledge_all_apis.json +++ /dev/null @@ -1,2764 +0,0 @@ -{ - "TemplateVersion": "1.0.0", - "ServiceCode": "ecs", - "Version": "2020-04-01", - "ApiList": [ - { - "Action": "UpdateKnowledgeBase", - "NameCn": "UpdateKnowledgeBase", - "OperationType": 3, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "默认请求示例", - "Response": "默认响应示例" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "未分类" - }, - "RequestParameters": [ - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "VpcConfig.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "私有网络ID。一旦设定后不支持变更。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "VpcConfig.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "子网ID列表。每个子网占用一个IP用于创建网卡。传入多个子网来实现VPC连接的高可用。每个可用区最多传入一个子网。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "KnowledgeId", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderKnowledgeId", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "MissingParameter.KnowledgeId", - "ErrorMessage": "The required parameter KnowledgeId is not supplied.", - "ErrorDescription": "参数KnowledgeId不能为空。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 4 - } - ] - }, - { - "Action": "ListKnowledgeBases", - "NameCn": "ListKnowledgeBases", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询知识库详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListKnowledgeBases&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"PageNumber\": 1\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListKnowledgeBases\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ListKnowledgeBasesResponseNextToken\": {\n \"KnowledgeBases\": [\n {\n \"KnowledgeId\": \"kb-1761138694808283000-1\",\n \"Name\": \"my_travel_knowledge\",\n \"ProviderKnowledgeId\": \"kb-travel-001\",\n \"ProviderType\": \"VIKINGDB_KNOWLEDGE\",\n \"Description\": \"knowledge-test\",\n \"Status\": \"Ready\",\n \"CreateTime\": \"2025-09-16T10:00:00Z\",\n \"LastUpdateTime\": \"2025-09-16T10:05:00Z\"\n }\n ],\n \"NextToken\": \"next-token\"\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "CreateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点后创建的知识库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "CreateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点前创建的知识库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name", - "Description": "精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - knowledge_id:知识库ID。\n - name:知识库名称。\n - status:知识库状态。\n - provider_type:导入的知识库平台类型。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name", - "Description": "模糊过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - knowledge_id:知识库ID。\n - name:知识库名称。\n - status:知识库状态。\n - provider_type:导入的知识库平台类型。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "my_collection", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n当过滤字段为provider_type时,取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "unique-token", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "UpdateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点后更新的知识库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "UpdateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点前更新的知识库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "KnowledgeBases", - "Type": 7, - "Example": "", - "Description": "符合条件的知识库详情。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "KnowledgeBasesForListKnowledgeBases" - } - }, - { - "Name": "NextToken", - "Type": 1, - "Example": "bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "KnowledgeBases", - "Type": 7, - "Example": "--", - "Description": "符合要求的知识库信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "KnowledgeBasesForListKnowledgeBases" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "1", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "10", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "10", - "Description": "符合要求的知识库总个数。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "LimitExceeded.MaximumMaxResults", - "ErrorMessage": "The number of specified MaxResults exceeds the maximum limit.", - "ErrorDescription": "指定的MaxResults超过最大限制。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "LimitExceeded.MaximumPageSize", - "ErrorMessage": "The number of specified PageSize exceeds the maximum limit.", - "ErrorDescription": "指定的PageSize超过最大限制。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "AddKnowledgeBase", - "NameCn": "AddKnowledgeBase", - "OperationType": 1, - "Description": "导入知识库,操作说明和注意事项请参见[导入知识库](https://www.volcengine.com/docs/86681/1865671#AXRPmjaf)。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=AddKnowledgeBase&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"KnowledgeBases\":[\n {\n \"ProviderType\": \"VIKINGDB_KNOWLEDGE\",\n \"Name\": \"name1\",\n \"ProviderKnowledgeId\": \"kb-ye7s2g****\"\n }\n ],\n \"ClientToken\": \"abc123def456\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"AddKnowledgeBase\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"KnowledgeBases\": [\n {\n \"KnowledgeId\": \"kb-4yds45***\",\n \"ProviderKnowledgeId\": \"kb-ye7s2g****\",\n \"ProviderType\": \"VIKINGDB_KNOWLEDGE\",\n \"Status\": \"Ready\",\n \"Message\": \"Knowledge base is ready\"\n }\n ]\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "KnowledgeBases.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "knowledge_viking", - "Description": "待导入知识库名称。\n- 参数 - N:表示知识库的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n取值:\n- Viking知识库需填入CollectionName。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "KnowledgeBases.N.ProviderKnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "kb-ye7s2g****", - "Description": "待导入知识库ID。\n- 参数 - N:表示知识库的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n取值:\n- Viking知识库需使用ResourceId。\n", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "KnowledgeBases.N.ProviderType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "VIKINGDB_KNOWLEDGE", - "Description": "待导入知识库平台类型。\n- 参数 - N:表示知识库的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "KnowledgeBases.N.Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "knowledge-test", - "Description": "待导入知识库的描述。\n- 参数 - N:表示知识库的序号,取值范围:1~10。\n- 不填默认为空。\n- 多个字段名之间用&分隔。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "知识库所属项目名称,不填默认为default。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "KnowledgeBases", - "Type": 7, - "Example": "--", - "Description": "知识库信息。", - "IsArray": 1, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "KnowledgeBasesForAddKnowledgeBase" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MaximumKnowledgeBases", - "ErrorMessage": "The number of specified KnowledgeBases exceeds the maximum limit.", - "ErrorDescription": "指定的KnowledgeBases超过最大限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MinimumKnowledgeBases", - "ErrorMessage": "The number of specified KnowledgeBases exceeds the minimum limit.", - "ErrorDescription": "指定的KnowledgeBases超过最小限制。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "MissingParameter.KnowledgeBases", - "ErrorMessage": "The required parameter KnowledgeBases is not supplied.", - "ErrorDescription": "参数KnowledgeBases不能为空。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "MissingParameter.ProviderKnowledgeId", - "ErrorMessage": "The required parameter ProviderKnowledgeId is not supplied.", - "ErrorDescription": "参数ProviderKnowledgeId不能为空。", - "HttpCode": 400, - "SortNumber": 7 - } - ] - }, - { - "Action": "GetKnowledgeConnectionInfo", - "NameCn": "GetKnowledgeConnectionInfo", - "OperationType": 5, - "Description": "查询知识库详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetKnowledgeConnectionInfo&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"KnowledgeId\": \"kb-4yds45****\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetKnowledgeConnectionInfo\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"KnowledgeId\": \"kb-4yds45****\",\n \"ProviderKnowledgeId\": \"kb-ye7s2g****\",\n \"ProviderType\": \"VIKINGDB_KNOWLEDGE\",\n \"Status\": \"Ready\",\n \"ConnectionInfos\": [\n {\n \"BaseUrl\": \"https://viking****.volces.com\",\n \"Region\": \"cn-beijing\",\n \"AuthType\": \"BEARER_TOKEN\",\n \"AuthKey\": \"ak-abc123d****\",\n \"ExpireAt\": \"2025-09-17T10:00:00Z\",\n \"ExtraConfig\": \"{\\\"endpoint\\\":\\\"https://custom.endpoint.com\\\"}\"\n }\n ],\n \"Message\": \"Knowledge base is ready for use\",\n \"ProjectName\": \"default\",\n \"Name\": \"my_travel_knowledge\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "kb-4yds45****", - "Description": "知识库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ConnectionInfos", - "Type": 7, - "Example": "--", - "Description": "知识库的连接信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "ConnectionInfosForGetKnowledgeConnectionInfo" - } - }, - { - "Name": "KnowledgeId", - "Type": 1, - "Example": "kb-4yds45****", - "Description": "知识库ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Message", - "Type": 1, - "Example": "No ready endpoints.", - "Description": "状态消息,包含额外的状态信息或错误描述。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "my_collection", - "Description": "知识库名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "default", - "Description": "已导入的知识库所属项目名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderKnowledgeId", - "Type": 1, - "Example": "kb-ye7s2g****", - "Description": "已导入的知识库所属项目ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "VIKINGDB_KNOWLEDGE", - "Description": "已导入的知识库平台类型。取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "知识库状态,取值:\n- Importing:导入中。\n- ImportFailed:导入失败。\n- Ready:成功。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.KnowledgeId", - "ErrorMessage": "The required parameter KnowledgeId is not supplied.", - "ErrorDescription": "参数KnowledgeId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "GetKnowledgeBase", - "NameCn": "GetKnowledgeBase", - "OperationType": 5, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "默认请求示例", - "Response": "默认响应示例" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "未分类" - }, - "RequestParameters": [ - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "AssociatedRuntimes", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForGetKnowledgeBase" - } - }, - { - "Name": "CreateTime", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Description", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "KnowledgeId", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "LastUpdateTime", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderKnowledgeId", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "", - "Description": "知识库平台类型,取值:\n-VIKINGDB_KNOWLEDGE:Viking 知识库", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Region", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "", - "Description": "知识库状态,取值:\n- Ready:可用\n- Deleted:资源已失效\n- Error:状态异常", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Trn", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "VpcConfig", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 13, - "ParameterType": { - "$ref": "VpcConfigForGetKnowledgeBase" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.KnowledgeId", - "ErrorMessage": "The required parameter KnowledgeId is not supplied.", - "ErrorDescription": "参数KnowledgeId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "DeleteKnowledgeBase", - "NameCn": "DeleteKnowledgeBase", - "OperationType": 2, - "Description": "删除知识库。删除只是解除导入,并不会删除对应知识库的资源。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteKnowledgeBase&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"KnowledgeId\": \"kb-4yds45***\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteKnowledgeBase\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"KnowledgeId\": \"kb-4yds45***\",\n \"ProviderKnowledgeId\": \"kb-ye7s2g****\",\n \"ProviderType\": \"VIKINGDB_KNOWLEDGE\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "kb-4yds45****", - "Description": "知识库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "KnowledgeId", - "Type": 1, - "Example": "kb-4yds45****", - "Description": "知识库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderKnowledgeId", - "Type": 1, - "Example": "kb-ye7s2g****", - "Description": "导入的知识库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "VIKINGDB_KNOWLEDGE", - "Description": "导入的知识库平台类型。取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.KnowledgeId", - "ErrorMessage": "The required parameter KnowledgeId is not supplied.", - "ErrorDescription": "参数KnowledgeId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - } - ], - "ApiGroup": [ - { - "Name": "未分类", - "Description": "未分类", - "OpenStatus": 0, - "SortNumber": 0 - }, - { - "Name": "Memory", - "Description": "Memory", - "OpenStatus": 1, - "SortNumber": 0 - } - ], - "DataType": [ - { - "StructName": "AssociatedRuntimesForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "EnablePrivateNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "EnablePublicNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListKnowledgeBases" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KnowledgeBasesForListKnowledgeBases", - "StructDesc": "符合条件的知识库详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AssociatedRuntimes", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForListKnowledgeBases" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "知识库创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "knowledge-test", - "ElementDesc": "知识库描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KnowledgeId", - "ElementType": 1, - "Example": "kb-4yds45****", - "ElementDesc": "知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "LastUpdateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "知识库更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my_collection", - "ElementDesc": "知识库名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "NetworkConfigurationForListKnowledgeBases" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderKnowledgeId", - "ElementType": 1, - "Example": "kb-ye7s2g****", - "ElementDesc": "已导入的知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "VIKINGDB_KNOWLEDGE", - "ElementDesc": "知识库平台类型。取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Region", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "知识库状态,取值:\n- Importing:导入中。\n- ImportFailed:导入失败。\n- Ready:成功。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationForListKnowledgeBases", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "EnablePrivateNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "EnablePublicNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListKnowledgeBases" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KnowledgeBasesForListKnowledgeBases", - "StructDesc": "符合要求的知识库信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AssociatedRuntimes", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForListKnowledgeBases" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "知识库创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "knowledge-test", - "ElementDesc": "知识库描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KnowledgeId", - "ElementType": 1, - "Example": "kb-4yds45****", - "ElementDesc": "知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "LastUpdateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "知识库更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my_collection", - "ElementDesc": "知识库名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "NetworkConfigurationForListKnowledgeBases" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderKnowledgeId", - "ElementType": 1, - "Example": "kb-ye7s2g****", - "ElementDesc": "已导入的知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "VIKINGDB_KNOWLEDGE", - "ElementDesc": "知识库平台类型。取值:\n- VIKINGDB_KNOWLEDGE:Viking知识库。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Region", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "知识库状态,取值:\n- Importing:导入中。\n- ImportFailed:导入失败。\n- Ready:成功。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KnowledgeBasesForAddKnowledgeBase", - "StructDesc": "知识库信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KnowledgeId", - "ElementType": 1, - "Example": "kb-4yds45****", - "ElementDesc": "知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Message", - "ElementType": 1, - "Example": "The knowledgebase is not ready.", - "ElementDesc": "知识库状态消息,包含额外的状态信息或错误描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderKnowledgeId", - "ElementType": 1, - "Example": "kb-ye7s2g****", - "ElementDesc": "已导入的知识库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "VIKINGDB_KNOWLEDGE", - "ElementDesc": "已导入的知识库平台类型。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "知识库状态,取值:\n- Importing:导入中。\n- ImportFailed:导入失败。\n- Ready:成功。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ConnectionInfosForGetKnowledgeConnectionInfo", - "StructDesc": "知识库的连接信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AddrType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthKey", - "ElementType": 1, - "Example": "my-key", - "ElementDesc": "认证密钥。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthType", - "ElementType": 1, - "Example": "BEARER_TOKEN", - "ElementDesc": "鉴权类型,取值:\n- BEARER_TOKEN:使用AuthKey中的值作为Bearer token。\n- APIKEY:使用AuthKey中的值作为Authorization header。\n- AK_SK:使用您的火山引擎AK/SK进行标准化签名后的值作为Authorization header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "BaseUrl", - "ElementType": 1, - "Example": "https://base.url", - "ElementDesc": "知识库平台的基础URL地址。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ExpireAt", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "认证信息过期时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ExtraConfig", - "ElementType": 1, - "Example": "{}", - "ElementDesc": "额外的平台特定配置。(JSON格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Region", - "ElementType": 1, - "Example": "cn-beijing", - "ElementDesc": "服务区域。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-123", - "ElementDesc": "私有网络ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcName", - "ElementType": 1, - "Example": "Default", - "ElementDesc": "私有网络名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForGetKnowledgeBase", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigForGetKnowledgeBase", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - } - ], - "CommonErrorCode": null -} \ No newline at end of file diff --git a/api_jsons/knowledge_client_gen.sh b/api_jsons/knowledge_client_gen.sh deleted file mode 100644 index cc21861..0000000 --- a/api_jsons/knowledge_client_gen.sh +++ /dev/null @@ -1,10 +0,0 @@ -python ../tools/generate_types_from_api_json.py knowledge_all_apis.json \ - --output ../agentkit/knowledge/types.py \ - --base-class-name KnowledgeBaseModel \ - --client-output ../agentkit/knowledge/client.py \ - --client-class-name AgentkitKnowledgeClient \ - --client-description "AgentKit Knowledge Base Management Service" \ - --service-name knowledge \ - --types-module agentkit.knowledge.types \ - --base-class-import agentkit.client \ - --base-client-class BaseAgentkitClient \ No newline at end of file diff --git a/api_jsons/mcp_all_apis.json b/api_jsons/mcp_all_apis.json deleted file mode 100644 index 01c934e..0000000 --- a/api_jsons/mcp_all_apis.json +++ /dev/null @@ -1,10336 +0,0 @@ -{ - "TemplateVersion": "1.0.0", - "ServiceCode": "ecs", - "Version": "2020-04-01", - "ApiList": [ - { - "Action": "UpdateMCPToolset", - "NameCn": "UpdateMCPToolset", - "OperationType": 3, - "Description": "修改MCP工具集配置。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateMCPToolset&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPToolsetId\":\"mt-ye6xr60ikgq7oi***\",\n \"MCPServiceIds\": [\n \"m-ye6xqypudcq7oi***\",\n \"m-ye6xqyn18gq7oi***\",\n \"m-ye6xqyk83kq7oi***\"\n ]\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateMCPToolset\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPToolsetId\": \" mt-xxx\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "访问MCP工具集网关,APIKey传递的位置。取值:\n- HEADER:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ark-authkey", - "Description": "MCP工具集身份认证鉴权的APIKey名称。\n- 参数 - N:表示APIKey名称的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "8b02f2e2-ae83-11f0-b6e5-******", - "Description": "MCP工具集身份认证鉴权的APIKey。\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "访问MCP工具集时,需要携带的Header的APIKey对应的名称。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务访问后端服务时的认证类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MCPServiceIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f4f7gu8q7oi5cu***", - "Description": "MCP服务。\n- 参数 - N:表示MCP服务的序号,取值范围:1~100。\n- 多个字段名之间用&分隔。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "Description": "MCP工具集ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "Example": "mt-ye7f6gd7nktv3gi6c****", - "Description": "MCP工具集ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidAuthorizerType.Malformed", - "ErrorMessage": "The specified AuthorizerType is malformed.", - "ErrorDescription": "指定的AuthorizerType不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "LimitExceeded.MaximumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the maximum limit.", - "ErrorDescription": "指定的ApiKeys超过最大限制。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MinimumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the minimum limit.", - "ErrorDescription": "指定的ApiKeys超过最小限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "MissingParameter.AuthorizerType", - "ErrorMessage": "The required parameter AuthorizerType is not supplied.", - "ErrorDescription": "参数AuthorizerType不能为空。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "MissingParameter.MCPToolsetId", - "ErrorMessage": "The required parameter MCPToolsetId is not supplied.", - "ErrorDescription": "参数MCPToolsetId不能为空。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 7 - } - ] - }, - { - "Action": "CreateMCPService", - "NameCn": "CreateMCPService", - "OperationType": 1, - "Description": "创建MCP服务,操作说明和注意事项请参见[MCP服务](https://www.volcengine.com/docs/86681/1847933)。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateMCPService&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"Name\": \"mcp-***\",\n \"Path\": \"/mcp\",\n \"ProtocolType\": \"MCP\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \"Public\"\n }\n ],\n \"BackendType\": \"Function\",\n \"BackendConfiguration\": {\n \"FunctionConfiguration\": {\n \"FunctionId\": \"26fqb4gn\"\n }\n },\n \"InboundAuthorizerConfiguration\": {\n \"AuthorizerType\": \"ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Name\": \"***\"\n }\n ],\n \"ApiKeyLocation\": \"HEADER\"\n }\n }\n },\n \"OutboundAuthorizerConfiguration\": {\n \"AuthorizerType\": \"ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Name\": \"***\",\n \"Key\": \"usix-sixa-xxxx-***\"\n }\n ],\n \"ApiKeyLocation\": \"HEADER\"\n }\n }\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"CreateMCPService\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPServiceId\": \" m-ye7s6jatq8rxg218****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "BackendConfiguration.CustomConfiguration.Domain", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "www.****.com", - "Description": "MCP服务的后端服务的域名。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomConfiguration.Port", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "80", - "Description": "MCP服务对接的后端服务的端口。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomConfiguration.ProtocolType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HTTP", - "Description": "MCP服务对接的后端服务的协议,取值:\n- HTTP:后端为HTTP服务。\n- HTTPS:后端为HTTPS服务。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.FunctionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.FunctionName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Command", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的启动命令,由用户根据镜像自定义,默认 ./run.sh\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Envs.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的环境变量KEY", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Envs.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的环境变量VALUE", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.ImageUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的URL", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.McpType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP 服务类型:Stdio(标准输入输出)或 Remote(远程服务)\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.PackageManagerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务的公共包管理器类型:NPX 或 UVX", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.RawConfig", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务完整配置(JSON 字符串)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.FunctionConfiguration.FunctionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "u3hyod8d", - "Description": "函数服务(veFaaS)ID。\n::: tip\n当`BackendType`取值为Function时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.FunctionConfiguration.FunctionName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "vefaas01", - "Description": "函数服务(veFaaS)名称。\n::: tip\n当`BackendType`取值为Function时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Function", - "Description": "MCP服务的后端服务的类型,取值:\n- Function:veFaaS函数。\n- Domain:固定域名。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "333456899ff****", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.DiscoveryUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 17, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.AllowedClients.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 18, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "使用APIKey进行身份认证鉴权时,APIKey的传递的位置。取值:\n- HEADER:当前仅支持HEADER。\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 19, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ark-authkey", - "Description": "MCP服务身份认证鉴权的APIKey名称。\n- 参数 - N:表示APIKey名称的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 长度为4-64的字符串。\n- 由字母、数字、“-”和“_”组成\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 20, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "8b02f2e2-ae83-11f0-b6e5-******&In", - "Description": "MCP服务身份认证鉴权的APIKey值,用户需要携带该APIKey访问MCP服务。取值:\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::\n\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 21, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "MCP访问后端服务时,需要携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 22, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 23, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "MCP-001", - "Description": "MCP服务名称,取值:\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 24, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NetworkConfiguration.EnablePrivateNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "公网和私网最少开启一个\n- true 开启\n开启私网后需要填写VPCID和SubnetID\n- false 关闭", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 25, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.EnablePublicNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "公网和私网最少开启一个\n- true 开启\n- false 关闭", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 26, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "vpc-ye7s6jatq8rxg218****", - "Description": "私有网络ID", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 27, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "SubnetIds.1=subnet-ye7s6jatq8rxg218****", - "Description": "子网ID,最小为1,最大为5", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 28, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "MCP服务网关对应的后端服务使用APIKey进行身份认证鉴权时,APIKey的传递的位置。取值:\n- HEADER:当前仅支持HEADER。\n::: tip\n当`Outbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 29, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "MCP服务网关对应的后端服务身份认证鉴权的APIKey名称,取值:\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成。\n- 多个字段名之间用&分隔。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 30, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "3nr5ibubffg1s931eb5k5***", - "Description": "MCP服务网关对应的后端服务身份认证鉴权的APIKey值,用户需要携带该APIKey访问MCP服务。取值:\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 31, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "MCP服务访问后端时,携带的Header的APIKey对应的名称。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 32, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务访问后端服务时的认证类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 33, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Path", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "/mcp", - "Description": "MCP服务的访问路径。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 34, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 35, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProtocolConfiguration.HttpApiConfiguration.Configuration", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ewogICJzd2FnZ2VyIjogIjIuMCIsCiAgImluZm8iOiB7CiAgICAidGl0bGUi***", - "Description": "MCP后端服务的接口描述,如:Swagger 的json,需进行Base64编码。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 36, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ProtocolConfiguration.HttpApiConfiguration.Type", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Swagger", - "Description": "当后端接口为HTTP时,后端接口的展示形式,取值:Swagger。\n::: tip\n当ProtocolType为HTTP时,为必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 37, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ProtocolType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HTTP", - "Description": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 38, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Key", - "Description": "标签的Key值\n最大为50个Tag", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 39, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Value", - "Description": "标签的Value值\n最大为50个Tag", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 40, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "Example": "m-ye7s6jatq8rxg218****", - "Description": "MCP服务ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidAuthorizerType.Malformed", - "ErrorMessage": "The specified AuthorizerType is malformed.", - "ErrorDescription": "指定的AuthorizerType不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidBackendType.Malformed", - "ErrorMessage": "The specified BackendType is malformed.", - "ErrorDescription": "指定的BackendType不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "InvalidMcpType.Malformed", - "ErrorMessage": "The specified McpType is malformed.", - "ErrorDescription": "指定的McpType不合法。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "InvalidPackageManagerType.Malformed", - "ErrorMessage": "The specified PackageManagerType is malformed.", - "ErrorDescription": "指定的PackageManagerType不合法。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "InvalidProtocolType.Malformed", - "ErrorMessage": "The specified ProtocolType is malformed.", - "ErrorDescription": "指定的ProtocolType不合法。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "InvalidTlsMode.Malformed", - "ErrorMessage": "The specified TlsMode is malformed.", - "ErrorDescription": "指定的TlsMode不合法。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "InvalidType.Malformed", - "ErrorMessage": "The specified Type is malformed.", - "ErrorDescription": "指定的Type不合法。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "LimitExceeded.MaximumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the maximum limit.", - "ErrorDescription": "指定的ApiKeys超过最大限制。", - "HttpCode": 400, - "SortNumber": 9 - }, - { - "ErrorCode": "LimitExceeded.MaximumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the maximum limit.", - "ErrorDescription": "指定的SubnetIds超过最大限制。", - "HttpCode": 400, - "SortNumber": 10 - }, - { - "ErrorCode": "LimitExceeded.MinimumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the minimum limit.", - "ErrorDescription": "指定的ApiKeys超过最小限制。", - "HttpCode": 400, - "SortNumber": 11 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 12 - }, - { - "ErrorCode": "MissingParameter.AuthorizerType", - "ErrorMessage": "The required parameter AuthorizerType is not supplied.", - "ErrorDescription": "参数AuthorizerType不能为空。", - "HttpCode": 400, - "SortNumber": 13 - }, - { - "ErrorCode": "MissingParameter.BackendConfiguration", - "ErrorMessage": "The required parameter BackendConfiguration is not supplied.", - "ErrorDescription": "参数BackendConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 14 - }, - { - "ErrorCode": "MissingParameter.BackendType", - "ErrorMessage": "The required parameter BackendType is not supplied.", - "ErrorDescription": "参数BackendType不能为空。", - "HttpCode": 400, - "SortNumber": 15 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 16 - }, - { - "ErrorCode": "MissingParameter.InboundAuthorizerConfiguration", - "ErrorMessage": "The required parameter InboundAuthorizerConfiguration is not supplied.", - "ErrorDescription": "参数InboundAuthorizerConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 17 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 18 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 19 - }, - { - "ErrorCode": "MissingParameter.NetworkConfiguration", - "ErrorMessage": "The required parameter NetworkConfiguration is not supplied.", - "ErrorDescription": "参数NetworkConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 20 - }, - { - "ErrorCode": "MissingParameter.Path", - "ErrorMessage": "The required parameter Path is not supplied.", - "ErrorDescription": "参数Path不能为空。", - "HttpCode": 400, - "SortNumber": 21 - }, - { - "ErrorCode": "MissingParameter.ProtocolType", - "ErrorMessage": "The required parameter ProtocolType is not supplied.", - "ErrorDescription": "参数ProtocolType不能为空。", - "HttpCode": 400, - "SortNumber": 22 - }, - { - "ErrorCode": "MissingParameter.TlsMode", - "ErrorMessage": "The required parameter TlsMode is not supplied.", - "ErrorDescription": "参数TlsMode不能为空。", - "HttpCode": 400, - "SortNumber": 23 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 24 - } - ] - }, - { - "Action": "ListMCPToolsets", - "NameCn": "ListMCPToolsets", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询MCP工具集详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListMCPToolsets&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MaxResults\": 10\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListMCPToolsets\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ListMCPToolsetsResNextToken\": {\n \"MCPToolsets\": [\n {\n \"MCPToolsetId\": \" mt-xxx\",\n \"Name\": \" my_mcp_toolset\",\n \"Status\": \" Ready\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \" Public\",\n \"Endpoint\": \" \",\n }\n ],\n \"AuthorizerConfiguration\": {\n \"AuthorizerType\": \" ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Key\": \" \",\n \"Name\": \" \"\n }\n ],\n \"ApiKeyLocation\": \" HEADER\"\n }\n }\n },\n \"MCPServices\": [\n {\n \"MCPServiceId\": \" mcp-xxx\",\n \"Name\": \" mcp-service-x\",\n \"Path\": \" /mcp\",\n \"Status\": \" Ready\",\n \"NetworkConfigurations\": [\n {}\n ],\n \"ProtocolType\": \" HTTP\",\n \"ProtocolConfiguration\": {\n \"ProtocolConvertConfiguration\": \" \"\n },\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\"\n }\n ],\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"Path\": \" /mcp\"\n }\n ],\n \"NextToken\": \" eyJwYWdlIj****\"\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name1", - "Description": "精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - name:MCP工具集名称。\n - status:MCP工具集状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name1", - "Description": "精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - name:MCP工具集名称。\n - status:MCP工具集状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mcp-****", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤字段为status时,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "100", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "bS15ZTcwMjZia***cTdvaTVjc3hvZw==", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TagFilters.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "TagKey", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "TagFilters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "TagValue", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPToolsets", - "Type": 7, - "Example": "--", - "Description": "MCP服务详情。\n", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MCPToolsetsForListMCPToolsets" - } - }, - { - "Name": "NextToken", - "Type": 1, - "Example": "bS15ZTcwMjZiaWY0cTdvaTVjc3****==", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MCPToolsets", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "MCPToolsetsForListMCPToolsets" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "LimitExceeded.MaximumMaxResults", - "ErrorMessage": "The number of specified MaxResults exceeds the maximum limit.", - "ErrorDescription": "指定的MaxResults超过最大限制。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListMCPTools", - "NameCn": "ListMCPTools", - "OperationType": 6, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST /?Action=ListMCPTools&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPServiceId\": \"m-xasxa***\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListMCPTools\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPServiceTools\": [\n {\n \"Tools\":\" \" ,\n \"MCPServiceId\":\" mcp-xxx\"\n }\n ]\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPToolsetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "MCPToolsetIds.1=mt-ye7f6gd7nktv3gi6c***", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServiceTools", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MCPServiceToolsForListMCPTools" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPToolsetIds", - "ErrorMessage": "The required parameter MCPToolsetIds is not supplied.", - "ErrorDescription": "参数MCPToolsetIds不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "CreateMCPToolset", - "NameCn": "CreateMCPToolset", - "OperationType": 1, - "Description": "创建MCP工具集。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateMCPToolset&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"Name\": \"****\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\":\"Public\"\n }\n ],\n \"MCPServiceIds\": [\n \"m-ye7d2dz37kmc0z***\"\n ],\n \"Path\": \"/toolset\",\n \"AuthorizerConfiguration\": {\n \"AuthorizerType\": \"ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Name\": \"ts-***\"\n }\n ],\n \"ApiKeyLocation\": \"HEADER\"\n }\n }\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"CreateMCPToolset\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPToolsetId\": \"mt-ye7s6jatq8rxg218****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "AuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.DiscoveryUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.CustomJwtAuthorizer.AllowedClients.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "访问MCP工具集网关,APIKey传递的位置。取值:\n- HEADER:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ark-authkey", - "Description": "MCP工具集身份认证鉴权的APIKey名称。\n- 参数 - N:表示APIKey名称的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "8b02f2e2-ae83-11f0-b6e5-******", - "Description": "MCP工具集身份认证鉴权的APIKey。\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "访问MCP工具集时,需要携带的Header的APIKey对应的名称。\n::: tip\n当`AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务访问后端服务时的认证类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "65a075a2-aeff-****-b294-00163e72f914", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MCPServiceIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f4f7gu8q7oi5cu***", - "Description": "MCP服务。\n- 参数 - N:表示MCP服务的序号,取值范围:1~100。\n- 多个字段名之间用&分隔。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ToolsetName", - "Description": "MCP工具集名称。\n- 长度为4-64的字符串。\n- 由字母、数字、“-”和“_”组成。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NetworkConfiguration.EnablePrivateNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "公网和私网最少开启一个\n- true 开启\n开启私网后需要填写VPCID和SubnetID\n- false 关闭", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.EnablePublicNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "公网和私网最少开启一个\n- true 开启\n- false 关闭", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SecurityGroupIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "SubnetIds.1=subnet-ye7s6jatq8rxg218****", - "Description": "子网ID,最小为1,最大为5\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "vpc-ye7s6jatq8rxg218****", - "Description": "私有网络ID\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Path", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "/mcp", - "Description": "MCP工具集的访问路径。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "资源所在项目", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 17, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Key", - "Description": "标签的Key值\n最大为50个Tag", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 18, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Value", - "Description": "标签的Value值\n最大为50个Tag", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 19, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "Example": "mt-ye7s6jatq8rxg218****", - "Description": "MCP工具集ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidAuthorizerType.Malformed", - "ErrorMessage": "The specified AuthorizerType is malformed.", - "ErrorDescription": "指定的AuthorizerType不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MaximumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the maximum limit.", - "ErrorDescription": "指定的ApiKeys超过最大限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MaximumMCPServiceIds", - "ErrorMessage": "The number of specified MCPServiceIds exceeds the maximum limit.", - "ErrorDescription": "指定的MCPServiceIds超过最大限制。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "LimitExceeded.MaximumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the maximum limit.", - "ErrorDescription": "指定的SubnetIds超过最大限制。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "LimitExceeded.MinimumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the minimum limit.", - "ErrorDescription": "指定的ApiKeys超过最小限制。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "LimitExceeded.MinimumMCPServiceIds", - "ErrorMessage": "The number of specified MCPServiceIds exceeds the minimum limit.", - "ErrorDescription": "指定的MCPServiceIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.AuthorizerType", - "ErrorMessage": "The required parameter AuthorizerType is not supplied.", - "ErrorDescription": "参数AuthorizerType不能为空。", - "HttpCode": 400, - "SortNumber": 9 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 10 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 11 - }, - { - "ErrorCode": "MissingParameter.MCPServiceIds", - "ErrorMessage": "The required parameter MCPServiceIds is not supplied.", - "ErrorDescription": "参数MCPServiceIds不能为空。", - "HttpCode": 400, - "SortNumber": 12 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 13 - }, - { - "ErrorCode": "MissingParameter.NetworkConfiguration", - "ErrorMessage": "The required parameter NetworkConfiguration is not supplied.", - "ErrorDescription": "参数NetworkConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 14 - }, - { - "ErrorCode": "MissingParameter.Path", - "ErrorMessage": "The required parameter Path is not supplied.", - "ErrorDescription": "参数Path不能为空。", - "HttpCode": 400, - "SortNumber": 15 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 16 - } - ] - }, - { - "Action": "GetMCPTools", - "NameCn": "GetMCPTools", - "OperationType": 5, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "默认请求示例", - "Response": "默认响应示例" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "Tools", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPToolsetId", - "ErrorMessage": "The required parameter MCPToolsetId is not supplied.", - "ErrorDescription": "参数MCPToolsetId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "DeleteMCPService", - "NameCn": "DeleteMCPService", - "OperationType": 2, - "Description": "删除MCP服务。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteMCPService&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPServiceId\":\"m-ye7f6gd7nktv3gi6c***\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteMCPService\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPServiceId\": \" m-ye7f6gd7nktv3gi6c***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务ID。\n", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPServiceId", - "ErrorMessage": "The required parameter MCPServiceId is not supplied.", - "ErrorDescription": "参数MCPServiceId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "GetMCPToolset", - "NameCn": "GetMCPToolset", - "OperationType": 5, - "Description": "查询MCP工具集详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetMCPToolset&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPToolsetId\": \"mt-ye6xr60ikgq7oi5c***\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetMCPToolset\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPToolset\": {\n \"MCPToolsetId\": \" mt-xxx\",\n \"Name\": \" my_mcp_toolset\",\n \"Status\": \" Ready\",\n \"Path\": \" /mcp\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \" Public\",\n \"Endpoint\": \" \"\n }\n ],\n \"AuthorizerConfiguration\": {\n \"AuthorizerType\": \" ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Key\": \" \",\n \"Name\": \" \"\n }\n ],\n \"ApiKeyLocation\": \" HEADER\"\n }\n }\n },\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"MCPServices\": [\n {\n \"MCPServiceId\": \" mcp-xxx\",\n \"Name\": \" mcp-service-x\",\n \"Path\": \" /mcp\",\n \"Status\": \" Ready\",\n \"NetworkConfigurations\": [\n {}\n ],\n \"ProtocolType\": \" HTTP\",\n \"ProtocolConfiguration\": {\n \"ProtocolConvertConfiguration\": \" \"\n },\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\"\n }\n ]\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mt-ye7kx4****", - "Description": "MCP工具集ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPToolset", - "Type": 7, - "Example": "--", - "Description": "MCP工具集信息。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MCPToolsetForGetMCPToolset" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPToolsetId", - "ErrorMessage": "The required parameter MCPToolsetId is not supplied.", - "ErrorDescription": "参数MCPToolsetId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListMCPServices", - "NameCn": "ListMCPServices", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询MCP服务详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListMCPServices&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MaxResults\": 100,\n \"NextToken\": \"\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListMCPServices\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ListMCPServicesResNextToken\": {\n \"MCPServices\": [\n {\n \"MCPServiceId\": \" mcp-xxx\",\n \"Name\": \" mcp-service-x\",\n \"Path\": \" /mcp\",\n \"Status\": \" Ready\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \" Public\",\n \"Endpoint\": \" \"\n }\n ],\n \"ProtocolType\": \" HTTP\",\n \"ProtocolConfiguration\": {\n \"ProtocolConvertConfiguration\": \" \"\n },\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\"\n }\n ],\n \"NextToken\": \" eyJwYWdlIjoyLCJ****\"\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name1", - "Description": "精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - name:MCP服务名称。\n - status:MCP服务状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name1", - "Description": "模糊过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - name:MCP服务名称。\n - status:MCP服务状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mcp-****", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤字段为status时,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "100", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "bS15ZTcwMjZiaWY0cTdvaTVjc3****==", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TagFilters.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "TagKey", - "Description": "查询的TagKey,必填", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "TagFilters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServices", - "Type": 7, - "Example": "--", - "Description": "MCP服务详情。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MCPServicesForListMCPServices" - } - }, - { - "Name": "NextToken", - "Type": 1, - "Example": "bS15ZTcwMjZiaWY0cTdvaTVjc***w==", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MCPServices", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "MCPServicesForListMCPServices" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "LimitExceeded.MaximumMaxResults", - "ErrorMessage": "The number of specified MaxResults exceeds the maximum limit.", - "ErrorDescription": "指定的MaxResults超过最大限制。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "DeleteMCPToolset", - "NameCn": "DeleteMCPToolset", - "OperationType": 2, - "Description": "删除MCP工具集。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteMCPToolset&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPToolsetId\":\"mt-ye7d4hlbswq7oi5c****\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteMCPToolset\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPToolsetId\": \"mt-ye7f6gd7nktv3gi6c***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "Description": "MCP工具集ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPToolsetId", - "Type": 1, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "Description": "MCP工具集ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPToolsetId", - "ErrorMessage": "The required parameter MCPToolsetId is not supplied.", - "ErrorDescription": "参数MCPToolsetId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "UpdateMCPTools", - "NameCn": "UpdateMCPTools", - "OperationType": 3, - "Description": "修改MCP工具集关联的MCP服务。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateMCPTools&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPServiceId\": \"m-xasxa***\",\n \"Tools\": \"\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateMCPTools\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP工具集ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tools", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f4f7gu8q7oi5cu***", - "Description": "MCP工具集关联的MCP服务。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "Example": "m-ye7f4f7gu8q7oi5cu***", - "Description": "MCP服务ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPServiceId", - "ErrorMessage": "The required parameter MCPServiceId is not supplied.", - "ErrorDescription": "参数MCPServiceId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.Tools", - "ErrorMessage": "The required parameter Tools is not supplied.", - "ErrorDescription": "参数Tools不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "UpdateMCPService", - "NameCn": "UpdateMCPService", - "OperationType": 3, - "Description": "修改MCP服务配置。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateMCPService&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPServiceId\":\"m-ye6xqypudcq7oi5c****\",\n \"BackendType\": \"Function\",\n \"BackendConfiguration\": {\n \"FunctionConfiguration\": {\n \"FunctionId\": \"j3t****\"\n }\n },\n \"InboundAuthorizerConfiguration\": {\n \"AuthorizerType\": \"ApiKey\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Name\": \"****\"\n }\n ],\n \"ApiKeyLocation\": \"HEADER\"\n }\n }\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateMCPService\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPServiceId\":\" m-xxx\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "BackendConfiguration.CustomConfiguration.Domain", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "www.***.com", - "Description": "MCP服务的后端服务的域名。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomConfiguration.Port", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "443", - "Description": "MCP服务对接的后端服务的端口。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomConfiguration.ProtocolType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HTTP", - "Description": "MCP服务对接的后端服务的协议,取值:\n- HTTP:后端为HTTP服务。\n- HTTPS:后端为HTTPS服务。\n::: tip\n当`BackendType`取值为Domain时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.FunctionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.FunctionName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Command", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的启动命令,由用户根据镜像自定义,默认 ./run.sh\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Envs.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的环境变量KEY\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.Envs.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的环境变量VALUE\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PrivatePackage.ImageUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务镜像的URL\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.McpType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP 服务类型:Stdio(标准输入输出)或 Remote(远程服务)\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.PackageManagerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务的公共包管理器类型:NPX 或 UVX\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.CustomMcpConfiguration.PublicPackage.RawConfig", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "自定义MCP服务完整配置(JSON 字符串)\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.FunctionConfiguration.FunctionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "fc65a****", - "Description": "函数服务(veFaaS)ID。\n::: tip\n当`BackendType`取值为Function时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendConfiguration.FunctionConfiguration.FunctionName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "func-name-****", - "Description": "函数服务(veFaaS)名称。\n::: tip\n当`BackendType`取值为Function时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "BackendType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Function", - "Description": "MCP服务的后端服务的类型,取值:\n- Function:veFaaS函数。\n- Domain:固定域名。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "使用APIKey进行身份认证鉴权时,APIKey的传递的位置。取值:\n- HEADER:当前仅支持HEADER。\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ark-authkey", - "Description": "MCP服务身份认证鉴权的APIKey名称。\n- 参数 - N:表示APIKey名称的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 长度为4-64的字符串。\n- 由字母、数字、“-”和“_”组成\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 17, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "8b02f2e2-ae83-11f0-b6e5-******&In", - "Description": "MCP服务身份认证鉴权的APIKey值,用户需要携带该APIKey访问MCP服务。取值:\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 18, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "MCP访问后端服务时,需要携带的Header的APIKey对应的名称。\n::: tip\n当`Inbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 19, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "InboundAuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 20, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MCPServiceId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 21, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "HEADER", - "Description": "MCP服务网关对应的后端服务使用APIKey进行身份认证鉴权时,APIKey的传递的位置。取值:\n- HEADER:当前仅支持HEADER。\n::: tip\n当`Outbound****.AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 22, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务网关对应的后端服务身份认证鉴权的APIKey名称,取值:\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成。\n- 多个字段名之间用&分隔。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 23, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.ApiKeys.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "3nr5ibubffg1s931eb5k5***", - "Description": "MCP服务网关对应的后端服务身份认证鉴权的APIKey值,用户需要携带该APIKey访问MCP服务。取值:\n- 参数 - N:表示APIKey值的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 不填则默认随机生成一个字符串。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 24, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.Authorizer.KeyAuth.Parameter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Authorization", - "Description": "MCP服务访问后端时,携带的Header的APIKey对应的名称。\n::: tip\n当`Outbound****AuthorizerType`取值为ApiKey时必填。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 25, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "OutboundAuthorizerConfiguration.AuthorizerType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "ApiKey", - "Description": "MCP服务访问后端服务时的认证类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 26, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidAuthorizerType.Malformed", - "ErrorMessage": "The specified AuthorizerType is malformed.", - "ErrorDescription": "指定的AuthorizerType不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidBackendType.Malformed", - "ErrorMessage": "The specified BackendType is malformed.", - "ErrorDescription": "指定的BackendType不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "InvalidMcpType.Malformed", - "ErrorMessage": "The specified McpType is malformed.", - "ErrorDescription": "指定的McpType不合法。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "InvalidPackageManagerType.Malformed", - "ErrorMessage": "The specified PackageManagerType is malformed.", - "ErrorDescription": "指定的PackageManagerType不合法。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "InvalidProtocolType.Malformed", - "ErrorMessage": "The specified ProtocolType is malformed.", - "ErrorDescription": "指定的ProtocolType不合法。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "InvalidTlsMode.Malformed", - "ErrorMessage": "The specified TlsMode is malformed.", - "ErrorDescription": "指定的TlsMode不合法。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "LimitExceeded.MaximumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the maximum limit.", - "ErrorDescription": "指定的ApiKeys超过最大限制。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "LimitExceeded.MinimumApiKeys", - "ErrorMessage": "The number of specified ApiKeys exceeds the minimum limit.", - "ErrorDescription": "指定的ApiKeys超过最小限制。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.AuthorizerType", - "ErrorMessage": "The required parameter AuthorizerType is not supplied.", - "ErrorDescription": "参数AuthorizerType不能为空。", - "HttpCode": 400, - "SortNumber": 9 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 10 - }, - { - "ErrorCode": "MissingParameter.MCPServiceId", - "ErrorMessage": "The required parameter MCPServiceId is not supplied.", - "ErrorDescription": "参数MCPServiceId不能为空。", - "HttpCode": 400, - "SortNumber": 11 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 12 - }, - { - "ErrorCode": "MissingParameter.TlsMode", - "ErrorMessage": "The required parameter TlsMode is not supplied.", - "ErrorDescription": "参数TlsMode不能为空。", - "HttpCode": 400, - "SortNumber": 13 - } - ] - }, - { - "Action": "GetMCPService", - "NameCn": "GetMCPService", - "OperationType": 5, - "Description": "查询MCP服务详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetMCPService&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MCPServiceId\":\"m-ye70cet5ogtt****\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetMCPService\",\n \"Version\": \"2020-04-01\",\n \"Service\": \"ecs\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MCPService\": {\n \"MCPServiceId\": \" mcp-xxx\",\n \"Name\": \" mcp-service-x\",\n \"Path\": \" /mcp\",\n \"ProtocolType\": \" HTTP/MCP\",\n \"ProtocolConfiguration\": {\n \"ProtocolConvertConfiguration\": \" \"\n },\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \" Public\",\n \"Endpoint\": \" \"\n }\n ],\n \"InboundAuthorizerConfiguration\": {\n \"AuthorizerType\": \" ApiKey/CustomJWT\",\n \"Authorizer\": {\n \"KeyAuth\": {\n \"ApiKeys\": [\n {\n \"Key\": \" \",\n \"Name\": \" \"\n }\n ],\n \"ApiKeyLocation\": \" HEADER\"\n }\n }\n },\n \"OutboundAuthorizerConfiguration\": {},\n \"BackendConfiguration\": {\n \"FunctionConfiguration\": {\n \"FunctionId\": \" u3hyo****\",\n \"FunctionName\": \" my_function\"\n },\n \"CustomConfiguration\": {\n \"Domain\": \" api.example.com\",\n \"Port\": \" 80\",\n \"ProtocolType\": \" HTTP/HTTPS\",\n \"TlsSettings\": {\n \"Sni\": \" example.com\",\n \"TlsMode\": \" SIMPLE\"\n }\n }\n },\n \"BackendType\": \" Function/Domain\",\n \"CreatedAt\": \" 2006-01-02T15:04:05Z07:00\",\n \"UpdatedAt\": \" 2006-01-02T15:04:05Z07:00\"\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "MCP" - }, - "RequestParameters": [ - { - "Name": "MCPServiceId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-ye7f6gd7nktv3gi6c***", - "Description": "MCP服务ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MCPService", - "Type": 7, - "Example": "--", - "Description": "MCP服务详情。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MCPServiceForGetMCPService" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MCPServiceId", - "ErrorMessage": "The required parameter MCPServiceId is not supplied.", - "ErrorDescription": "参数MCPServiceId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - } - ], - "ApiGroup": [ - { - "Name": "MCP", - "Description": "MCP", - "OpenStatus": 1, - "SortNumber": 0 - } - ], - "DataType": [ - { - "StructName": "CustomJwtAuthorizerForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ApiKeysForListMCPToolsets", - "StructDesc": "APIKey详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "ElementDesc": "APIKey值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "key-ye7f6gd7nktv3gi6c***", - "ElementDesc": "APIKey名称。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListMCPToolsets", - "StructDesc": "APIKey认证配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "HEADER", - "ElementDesc": "APIKey的传递位置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeys", - "ElementType": 7, - "Example": "", - "ElementDesc": "APIKey详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "ApiKeysForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Parameter", - "ElementType": 1, - "Example": "Authorization", - "ElementDesc": "携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerForListMCPToolsets", - "StructDesc": "认证器具体配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "APIKey认证配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListMCPToolsets", - "StructDesc": "MCP工具集认证配置。\n", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Authorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "认证器具体配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerType", - "ElementType": 1, - "Example": "ApiKey", - "ElementDesc": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPToolsets", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForListMCPToolsets", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServicesForListMCPToolsets", - "StructDesc": "MCP工具集关联的MCP服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "ProtocolConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "HTTP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP服务状态,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPToolsets", - "StructDesc": "MCP工具集网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPToolsetsForListMCPToolsets", - "StructDesc": "MCP服务详情。\n", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集认证配置。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServices", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集关联的MCP服务详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "MCPServicesForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPToolsetId", - "ElementType": 1, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/toolset", - "ElementDesc": "MCP工具集访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP工具集状态\n- Ready\n- Creating\n- Updating\n- Deleting", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ApiKeysForListMCPToolsets", - "StructDesc": "APIKey详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "ElementDesc": "APIKey值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "key-ye7f6gd7nktv3gi6c***", - "ElementDesc": "APIKey名称。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListMCPToolsets", - "StructDesc": "APIKey认证配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "HEADER", - "ElementDesc": "APIKey的传递位置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeys", - "ElementType": 7, - "Example": "", - "ElementDesc": "APIKey详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "ApiKeysForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Parameter", - "ElementType": 1, - "Example": "Authorization", - "ElementDesc": "携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerForListMCPToolsets", - "StructDesc": "认证器具体配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "APIKey认证配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListMCPToolsets", - "StructDesc": "MCP工具集认证配置。\n", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Authorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "认证器具体配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerType", - "ElementType": 1, - "Example": "ApiKey", - "ElementDesc": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPToolsets", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForListMCPToolsets", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServicesForListMCPToolsets", - "StructDesc": "MCP工具集关联的MCP服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "ProtocolConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "HTTP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP服务状态,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPToolsets", - "StructDesc": "MCP工具集网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPToolsetsForListMCPToolsets", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集认证配置。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServices", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集关联的MCP服务详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "MCPServicesForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPToolsetId", - "ElementType": 1, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/toolset", - "ElementDesc": "MCP工具集访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP工具集状态\n- Ready\n- Creating\n- Updating\n- Deleting", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForListMCPToolsets" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServiceToolsForListMCPTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tools", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForGetMCPToolset", - "StructDesc": "关联的Runtime", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "r-ye7f6gd7nktv3gi6c***", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "RuntimeName", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForGetMCPToolset", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ApiKeysForGetMCPToolset", - "StructDesc": "APIKey详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "ElementDesc": "APIKey值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "k-ye7f6gd7nktv3gi6c***", - "ElementDesc": "APIKey名称。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetMCPToolset", - "StructDesc": "APIKey认证配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "HEADER", - "ElementDesc": "APIKey的传递位置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeys", - "ElementType": 7, - "Example": "", - "ElementDesc": "APIKey详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "ApiKeysForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Parameter", - "ElementType": 1, - "Example": "Authorization", - "ElementDesc": "携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerForGetMCPToolset", - "StructDesc": "认证器具体配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "APIKey认证配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForGetMCPToolset" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForGetMCPToolset", - "StructDesc": "MCP工具集认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Authorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "认证器具体配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerType", - "ElementType": 1, - "Example": "ApiKey", - "ElementDesc": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForGetMCPToolset", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "[\"subnet-ye7s6jatq8rxg218****\"]", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-ye7s6jatq8rxg218****", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForGetMCPToolset", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForGetMCPToolset" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForGetMCPToolset", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetMCPToolset", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "Key", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "Value", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServicesForGetMCPToolset", - "StructDesc": "MCP工具集关联的MCP服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "NetworkConfigurationsForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "default", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "ProtocolConfigurationForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "HTTP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP服务状态,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "--", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForGetMCPToolset", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "[\"subnet-ye7s6jatq8rxg218****\"]", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-ye7s6jatq8rxg218****", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForGetMCPToolset", - "StructDesc": "MCP工具集网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,取值:\n- Public:当前仅支持公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForGetMCPToolset" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetMCPToolset", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "Key", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "Value", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPToolsetForGetMCPToolset", - "StructDesc": "MCP工具集信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AssociatedRuntimes", - "ElementType": 7, - "Example": "--", - "ElementDesc": "关联的Runtime", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "AuthorizerConfigurationForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServices", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集关联的MCP服务详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "MCPServicesForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPToolsetId", - "ElementType": 1, - "Example": "mt-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "name-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP工具集名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP工具集网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "NetworkConfigurationsForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/toolset", - "ElementDesc": "MCP工具集访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "default", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP工具集状态,,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "TagsForGetMCPToolset" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP工具集更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPServices", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPServices", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "开启的访问类型,如:\n- Public:公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPServices" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForListMCPServices", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMCPServices", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServicesForListMCPServices", - "StructDesc": "MCP服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "mcp-name-***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务的访问路径。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "ProtocolConfigurationForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "MCP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP服务状态,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMCPServices", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListMCPServices", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "MCP服务访问的Endpoint。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "开启的访问类型,如:\n- Public:公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMCPServices" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForListMCPServices", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMCPServices", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServicesForListMCPServices", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "mcp-name-***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "NetworkConfigurationsForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务的访问路径。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "ProtocolConfigurationForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "MCP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "MCP服务状态,取值:\n- Ready:运行中。\n- Creating:创建中。\n- Updating:更新中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForListMCPServices" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomConfigurationForGetMCPService", - "StructDesc": "固定域名详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Domain", - "ElementType": 1, - "Example": "www.***.com", - "ElementDesc": "域名。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Port", - "ElementType": 2, - "Example": "80", - "ElementDesc": "端口。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "HTTP", - "ElementDesc": "协议,取值:\n- HTTP:后端为HTTP服务。\n- HTTPS:后端为HTTPS服务。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "PrivatePackageForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Command", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Envs", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "EnvsForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ImageUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "PublicPackageForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "McpType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "PackageManagerType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RawConfig", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomMcpConfigurationForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "FunctionId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "FunctionName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "PrivatePackage", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "PrivatePackageForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "PublicPackage", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "PublicPackageForGetMCPService" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "FunctionConfigurationForGetMCPService", - "StructDesc": "函数服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "FunctionId", - "ElementType": 1, - "Example": "65a075a2", - "ElementDesc": "veFaas函数ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "FunctionName", - "ElementType": 1, - "Example": "func-name-****", - "ElementDesc": "veFaas函数名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "BackendConfigurationForGetMCPService", - "StructDesc": "MCP服务的后端服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "固定域名详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CustomMcpConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "CustomMcpConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "FunctionConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "函数服务详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "FunctionConfigurationForGetMCPService" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "允许访问的客户端列表。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "认证服务地址。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ApiKeysForGetMCPService", - "StructDesc": "APIKey详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "ElementDesc": "APIKey值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "key-ye7f6gd7nktv3gi6c***", - "ElementDesc": "APIKey名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetMCPService", - "StructDesc": "APIKey认证配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "HEADER", - "ElementDesc": "APIKey的传递位置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeys", - "ElementType": 7, - "Example": "8b02f2e2-ae83-11f0-b6e5-******&In", - "ElementDesc": "APIKey详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "ApiKeysForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Parameter", - "ElementType": 1, - "Example": "Authorization", - "ElementDesc": "携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerForGetMCPService", - "StructDesc": "认证器具体配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "APIKey认证配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForGetMCPService" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "InboundAuthorizerConfigurationForGetMCPService", - "StructDesc": "MCP服务入站认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Authorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "认证器具体配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerType", - "ElementType": 1, - "Example": "ApiKey", - "ElementDesc": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "[\"subnet-ye7s6jatq8rxg218****\"]", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-ye7s6jatq8rxg218****", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForGetMCPService", - "StructDesc": "MCP服务网络配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "***.apigateway.com", - "ElementDesc": "访问MCP服务的Endpoint。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "Public", - "ElementDesc": "MCP服务开启的访问类型,如:\n- Public:公网访问。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForGetMCPService" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "允许访问的客户端列表。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "认证服务地址。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ApiKeysForGetMCPService", - "StructDesc": "APIKey详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "65a075a2-aeff-11f0-****-00163e72f914", - "ElementDesc": "APIKey值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "key-ye7f6gd7nktv3gi6c***", - "ElementDesc": "APIKey名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetMCPService", - "StructDesc": "APIKey认证配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "HEADER", - "ElementDesc": "APIKey的传递位置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeys", - "ElementType": 7, - "Example": "8b02f2e2-ae83-11f0-b6e5-******&In", - "ElementDesc": "APIKey详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "ApiKeysForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Parameter", - "ElementType": 1, - "Example": "Authorization", - "ElementDesc": "携带的Header的APIKey对应的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerForGetMCPService", - "StructDesc": "认证器具体配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "APIKey认证配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForGetMCPService" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "OutboundAuthorizerConfigurationForGetMCPService", - "StructDesc": "MCP服务出站认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Authorizer", - "ElementType": 7, - "Example": "--", - "ElementDesc": "认证器具体配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerType", - "ElementType": 1, - "Example": "ApiKey", - "ElementDesc": "MCP服务身份认证加安全的类型,取值:\n- ApiKey:当前仅支持APIKey。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ProtocolConfigurationForGetMCPService", - "StructDesc": "MCP服务协议配置详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ProtocolConvertConfiguration", - "ElementType": 1, - "Example": "", - "ElementDesc": "MCP服务后端类型为HTTP时,根据接口信息解析结果。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetMCPService", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MCPServiceForGetMCPService", - "StructDesc": "MCP服务详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "BackendConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务的后端服务详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "BackendConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "BackendType", - "ElementType": 1, - "Example": "Function", - "ElementDesc": "MCP服务的后端服务的类型,取值:\n- Function:veFaaS函数。\n- Domain:固定域名。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "InboundAuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务入站认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "InboundAuthorizerConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPServiceId", - "ElementType": 1, - "Example": "m-ye7f6gd7nktv3gi6c***", - "ElementDesc": "MCP服务ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "mcp-name-***", - "ElementDesc": "MCP服务名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务网络配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "NetworkConfigurationsForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "OutboundAuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "MCP服务出站认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "OutboundAuthorizerConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Path", - "ElementType": 1, - "Example": "/mcp", - "ElementDesc": "MCP服务的访问路径。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "MCP服务协议配置详情。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "ProtocolConfigurationForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProtocolType", - "ElementType": 1, - "Example": "HTTP", - "ElementDesc": "MCP服务后端协议类型,取值:\n- HTTP:HTTP 转 MCP。\n- MCP:直接访问 MCP。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "TagsForGetMCPService" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "MCP服务的更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - } - ], - "CommonErrorCode": null -} \ No newline at end of file diff --git a/api_jsons/mcp_client_gen.sh b/api_jsons/mcp_client_gen.sh deleted file mode 100644 index c2e4d2d..0000000 --- a/api_jsons/mcp_client_gen.sh +++ /dev/null @@ -1,10 +0,0 @@ -python ../tools/generate_types_from_api_json.py mcp_all_apis.json \ - --output ../agentkit/mcp/types.py \ - --base-class-name MCPBaseModel \ - --client-output ../agentkit/mcp/client.py \ - --client-class-name AgentkitMCPClient \ - --client-description "AgentKit MCP (Model Context Protocol) Management Service" \ - --service-name mcp \ - --types-module agentkit.mcp.types \ - --base-class-import agentkit.client \ - --base-client-class BaseAgentkitClient \ No newline at end of file diff --git a/api_jsons/memory_all_apis.json b/api_jsons/memory_all_apis.json deleted file mode 100644 index 98cbb29..0000000 --- a/api_jsons/memory_all_apis.json +++ /dev/null @@ -1,3810 +0,0 @@ -{ - "TemplateVersion": "1.0.0", - "ServiceCode": "ecs", - "Version": "2020-04-01", - "ApiList": [ - { - "Action": "UpdateMemoryCollection", - "NameCn": "UpdateMemoryCollection", - "OperationType": 3, - "Description": "修改记忆库的描述和策略信息。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateMemoryCollection&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"MemoryId\": \"mem-17611386****\",\n \"Description\": \"new Description\",\n \"LongTermConfiguration\":{\n \"Strategies\":[\n {\n \"Type\": \"Summary\",\n \"CustomExtractionInstructions\": \"Extract key information from conversation\",\n \"Name\": \"agentkit_semantic_v1\"\n }\n ]\n }\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateMemoryCollection\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MemoryId\": \"mem-17611386****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"LongTermConfiguration\": {\n \"Strategies\": [\n {\n \"Type\": \"Summary\",\n \"CustomExtractionInstructions\": \"Extract key information from conversation\",\n \"Name\": \"agentkit_semantic_v1\"\n }\n ]\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "memory-test", - "Description": "记忆库描述。最多允许输入200个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "LongTermConfiguration.Strategies.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "s_1", - "Description": "长期记忆提取策略的名称。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n\n命名规则如下:\n- 只能包含英文字符[A-Za-z]、数字和下划线“_”。\n- 长度限制在1~48个字符之间。\n::: tip\n同一个记忆库中,策略名称不可以重复。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "LongTermConfiguration.Strategies.N.Type", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Summary", - "Description": "长期记忆提取策略的类型。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 取值:\n - Summary:会话摘要(会话级别)。\n - Semantic:语义记忆(用户级别)。\n - UserPreference:用户偏好(用户级别)。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "LongTermConfiguration.Strategies.N.CustomExtractionInstructions", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Summarize facts.", - "Description": "自定义策略的系统提示词(Prompt)。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 最大长度不超过8000个字符。\n::: tip\n不含Prompt的策略即为内置策略,每种策略类型的内置策略最多只能有一个。\n:::\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "VpcConfig.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "VpcConfig.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "LongTermConfiguration", - "Type": 7, - "Example": "--", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "LongTermConfigurationForUpdateMemoryCollection" - } - }, - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderCollectionId", - "Type": 1, - "Example": "mem-294775****", - "Description": "已导入的记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "MEM0", - "Description": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "MissingParameter.MemoryId", - "ErrorMessage": "The required parameter MemoryId is not supplied.", - "ErrorDescription": "参数MemoryId不能为空。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 4 - } - ] - }, - { - "Action": "DeleteMemoryCollection", - "NameCn": "DeleteMemoryCollection", - "OperationType": 2, - "Description": "删除记忆库。\n- 如果是本平台创建的记忆库,删除时会同步回收资源。\n- 如果是从Viking或者Mem0导入的记忆库,删除时仅删除本平台的记录,不会回收资源。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteMemoryCollection&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"MemoryId\": \"mem-1761138****\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteMemoryCollection\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MemoryId\": \"mem-1761138****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Status\": \"Deleting\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderCollectionId", - "Type": 1, - "Example": "mem-294775****", - "Description": "已导入的记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "MEM0", - "Description": "导入记忆库的类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MemoryId", - "ErrorMessage": "The required parameter MemoryId is not supplied.", - "ErrorDescription": "参数MemoryId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "GetMemoryConnectionInfo", - "NameCn": "GetMemoryConnectionInfo", - "OperationType": 5, - "Description": "查询记忆库的长期记忆提取策略详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetMemoryConnectionInfo&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"MemoryId\": \"mem-17611386****\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetMemoryConnectionInfo\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MemoryId\": \"mem-176113869****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Status\": \"Ready\",\n \"ConnectionInfos\": [\n {\n \"BaseUrl\": \"https://base.url\",\n \"AuthType\": \"APIKEY\",\n \"AuthKey\": \"api-key\",\n \"ExpireAt\": \"\"\n }\n ],\n \"Managed\": \"true\",\n \"Message\": \"Collection is ready for use\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ConnectionInfos", - "Type": 7, - "Example": "--", - "Description": "长期记忆提取策略信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "ConnectionInfosForGetMemoryConnectionInfo" - } - }, - { - "Name": "Managed", - "Type": 6, - "Example": "true", - "Description": "记忆库是否由Agentkit平台管理,取值:\n- true:表示由Agentkit平台创建,删除时会同时删除对应平台的资源。\n- false:表示由提供商平台导入,删除时保留对应平台的资源。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Message", - "Type": 1, - "Example": "No ready endpoints.", - "Description": "状态消息,包含额外的状态信息或错误描述。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderCollectionId", - "Type": 1, - "Example": "mem-294775****", - "Description": "已导入的记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "MEM0", - "Description": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MemoryId", - "ErrorMessage": "The required parameter MemoryId is not supplied.", - "ErrorDescription": "参数MemoryId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListMemoryCollections", - "NameCn": "ListMemoryCollections", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询记忆库详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListMemoryCollections&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"PageNumber\": 1\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListMemoryCollections\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ListMemoryCollectionsResponseNextToken\": {\n \"Memories\": [\n {\n \"MemoryId\": \"mem-17611386****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Description\": \"memory-test\",\n \"Status\": \"Ready\",\n \"CreateTime\": \"2025-09-16T10:00:00Z\",\n \"LastUpdateTime\": \"2025-09-16T10:05:00Z\",\n \"Name\": \"my_agent_memory\",\n \"Managed\": \"true\",\n \"StrategiesCount\": \"3\"\n }\n ],\n \"NextToken\": \"eyJwYWdlIjoyL****\"\n }\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "CreateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点后创建的记忆库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "CreateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点前创建的记忆库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name", - "Description": "精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - collection_id:记忆库ID。\n - name:记忆库名称。\n - description:记忆库描述。\n - status:记忆库状态。\n - provider_type:导入的知识库平台类型。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "name", - "Description": "模糊过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - collection_id:记忆库ID。\n - name:记忆库名称。\n - description:记忆库描述。\n - status:记忆库状态。\n - provider_type:导入的知识库平台类型。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "my_memory", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤条件为status时,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。\n\n当过滤条件为provider_type时,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "unique-token", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TagFilters.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "TagFilters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "UpdateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点后更新的记忆库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "UpdateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "筛选该时间点前更新的记忆库。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "Memories", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "MemoriesForListMemoryCollections" - } - }, - { - "Name": "NextToken", - "Type": 1, - "Example": "unique-token", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Memories", - "Type": 7, - "Example": "--", - "Description": "符合条件的记忆库信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "MemoriesForListMemoryCollections" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "1", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "10", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "10", - "Description": "符合条件的记忆库合集。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidProjectName.Malformed", - "ErrorMessage": "The specified ProjectName is malformed.", - "ErrorDescription": "指定的ProjectName不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "LimitExceeded.MaximumFilters", - "ErrorMessage": "The number of specified Filters exceeds the maximum limit.", - "ErrorDescription": "指定的Filters超过最大限制。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MaximumMaxResults", - "ErrorMessage": "The number of specified MaxResults exceeds the maximum limit.", - "ErrorDescription": "指定的MaxResults超过最大限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MaximumPageSize", - "ErrorMessage": "The number of specified PageSize exceeds the maximum limit.", - "ErrorDescription": "指定的PageSize超过最大限制。", - "HttpCode": 400, - "SortNumber": 4 - } - ] - }, - { - "Action": "AddMemoryCollection", - "NameCn": "AddMemoryCollection", - "OperationType": 1, - "Description": "导入记忆库。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=AddMemoryCollection&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"Collections\": [\n {\n \"ProviderType\": \"MEM0\",\n \"ProviderCollectionId\":\"mem-294775****\"\n }\n ]\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"AddMemoryCollection\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"Collections\": [\n {\n \"MemoryId\": \" mem-1761138****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Status\": \"Ready\",\n \"Message\": \"\"\n }\n ]\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "Collections.N.ProviderCollectionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "m-123", - "Description": "待导入记忆库的ID。\n- 参数 - N:表示记忆库的序号。\n- 多个字段名之间用&分隔。\n取值:\n- Mem0:填入Mem0项目的ID,即project_id。\n- Viking:填入ResourceId。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Collections.N.Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "knmemory-test", - "Description": "待导入记忆库的描述。\n- 参数 - N:表示记忆库的序号。\n- 最多允许输入200个字符,不填默认为空。\n- 多个字段名之间用&分隔。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Collections.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "my_collection", - "Description": "待导入记忆库名称。\n- 参数 - N:表示记忆库的序号。\n- 多个字段名之间用&分隔。\n取值:\n- Mem0:填入Mem0项目的名称,即ProjectName。\n- Viking:填入CollectionName。\n\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Collections.N.ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Collections.N.ProviderType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "MEM0", - "Description": "待导入记忆库的类型。\n- 参数 - N:表示记忆库的序号。\n- 多个字段名之间用&分隔。\n- 取值:\n - MEM0:Mem0记忆库。\n - VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "Collections", - "Type": 7, - "Example": "--", - "Description": "已导入记忆库信息。", - "IsArray": 1, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "CollectionsForAddMemoryCollection" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidClientToken.Malformed", - "ErrorMessage": "The specified ClientToken is malformed.", - "ErrorDescription": "指定的ClientToken不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "InvalidProjectName.Malformed", - "ErrorMessage": "The specified ProjectName is malformed.", - "ErrorDescription": "指定的ProjectName不合法。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "InvalidProviderCollectionId.Malformed", - "ErrorMessage": "The specified ProviderCollectionId is malformed.", - "ErrorDescription": "指定的ProviderCollectionId不合法。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "InvalidRegion.Malformed", - "ErrorMessage": "The specified Region is malformed.", - "ErrorDescription": "指定的Region不合法。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "LimitExceeded.MaximumCollections", - "ErrorMessage": "The number of specified Collections exceeds the maximum limit.", - "ErrorDescription": "指定的Collections超过最大限制。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "MissingParameter.Collections", - "ErrorMessage": "The required parameter Collections is not supplied.", - "ErrorDescription": "参数Collections不能为空。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.ProviderCollectionId", - "ErrorMessage": "The required parameter ProviderCollectionId is not supplied.", - "ErrorDescription": "参数ProviderCollectionId不能为空。", - "HttpCode": 400, - "SortNumber": 9 - } - ] - }, - { - "Action": "GetMemoryCollection", - "NameCn": "GetMemoryCollection", - "OperationType": 5, - "Description": "查询记忆库详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetMemoryCollection&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"MemoryId\": \"mem-1761138****\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetMemoryCollection\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MemoryId\": \"mem-1761138****\",\n \"Name\": \"my_collection\",\n \"Description\": \"memory-test\",\n \"Trn\": \"trn:appo:memory:cn-beijing:123456:memory/mem-1761138****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Status\": \"Ready\",\n \"LongTermConfiguration\": {\n \"Strategies\": [\n {\n \"Type\": \"Summary\",\n \"CustomExtractionInstructions\": \"Extract key information from conversation\",\n \"Name\": \"agentkit_semantic_v1\"\n }\n ]\n },\n \"LastUpdateTime\": \"2025-09-16T10:05:00Z\",\n \"Managed\": \"true\",\n \"CreateTime\": \"2025-09-16T10:00:00Z\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "AssociatedRuntimes", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForGetMemoryCollection" - } - }, - { - "Name": "CreateTime", - "Type": 1, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "记忆库创建时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Description", - "Type": 1, - "Example": "memory-test", - "Description": "记忆库描述。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "LastUpdateTime", - "Type": 1, - "Example": "2025-09-17T10:00:00+8:00", - "Description": "记忆库更新时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "LongTermConfiguration", - "Type": 7, - "Example": "--", - "Description": "长期记忆提取策略信息。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "LongTermConfigurationForGetMemoryCollection" - } - }, - { - "Name": "Managed", - "Type": 6, - "Example": "true", - "Description": "记忆库是否由Agentkit平台管理,取值:\n- true:表示由Agentkit平台创建,删除时会同时删除对应平台的资源。\n- false:表示由提供商平台导入,删除时保留对应平台的资源。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "my_collection", - "Description": "记忆库名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderCollectionId", - "Type": 1, - "Example": "mem-294775****", - "Description": "Viking或者Mem0的记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "MEM0", - "Description": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Region", - "Type": 1, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tags", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 14, - "ParameterType": { - "$ref": "TagsForGetMemoryCollection" - } - }, - { - "Name": "Trn", - "Type": 1, - "Example": "trn:agentkit:cn-beijing:210000:memory:mem-****", - "Description": "记忆库的TRN。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "VpcConfig", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 16, - "ParameterType": { - "$ref": "VpcConfigForGetMemoryCollection" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.MemoryId", - "ErrorMessage": "The required parameter MemoryId is not supplied.", - "ErrorDescription": "参数MemoryId不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "CreateMemoryCollection", - "NameCn": "CreateMemoryCollection", - "OperationType": 1, - "Description": "创建记忆库,操作说明和注意事项请参见[创建记忆库](https://www.volcengine.com/docs/86681/1844843)。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateMemoryCollection&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n {\n \"Name\": \"test\",\n \"LongTermConfiguration\":{\n \"Strategies\":[\n {\n \"Type\":\"UserPreference\",\n \"Name\": \"default_user_preference\"\n },\n {\n \"Type\":\"Semantic\",\n \"Name\": \"custom_semantic\",\n \"CustomExtractionInstructions\": \"you are a robot, good at summarizing facts\"\n },\n {\n \"Type\":\"Summary\",\n \"Name\": \"custom_summary\"\n }\n ]\n },\n \"ProviderType\": \"MEM0\"\n }\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"CreateMemoryCollection\",\n \"Version\": \"2025-10-10\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"MemoryId\": \"mem-1761138****\",\n \"ProviderCollectionId\": \"mem-294775****\",\n \"ProviderType\": \"MEM0\",\n \"Status\": \"Ready\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Memory" - }, - "RequestParameters": [ - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "memory-test", - "Description": "记忆库的描述。\n- 最多允许输入200个字符。\n- 不填默认为空。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "LongTermConfiguration.Strategies.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "s_1", - "Description": "长期记忆提取策略的名称。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n\n命名规则如下:\n- 只能包含英文字符[A-Za-z]、数字和下划线“_”。\n- 长度限制在1~48个字符之间。\n::: tip\n同一个记忆库中,策略名称不可以重复。\n:::", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "LongTermConfiguration.Strategies.N.Type", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Summary", - "Description": "长期记忆提取策略的类型。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 多个字段名之间用&分隔。\n- 取值:\n - Summary:会话摘要(会话级别)。\n - Semantic:语义记忆(用户级别)。\n - UserPreference:用户偏好(用户级别)。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "LongTermConfiguration.Strategies.N.CustomExtractionInstructions", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Summarize facts.", - "Description": "自定义策略的系统提示词(Prompt)。\n- 参数 - N:表示策略的序号,取值范围:1~5。\n- 最大长度不超过8000个字符。\n::: tip\n不含Prompt的策略即为内置策略,每种策略类型的内置策略最多只能有一个。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "my_collection", - "Description": "记忆库名称,取值:\n- 只能包含英文字符[A-Za-z]、数字和下划线“_”。\n- 长度限制在1~48个字符之间。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProviderType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "MEM0", - "Description": "记忆库类型,取值:\n- MEM0(默认):Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "VpcConfig.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "VpcConfig.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - } - ], - "ResponseParameters": [ - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-17616225****", - "Description": "记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderCollectionId", - "Type": 1, - "Example": "mem-294775****", - "Description": "已导入的记忆库ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProviderType", - "Type": 1, - "Example": "MEM0", - "Description": "记忆库类型。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。 \n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "InvalidProjectName.Malformed", - "ErrorMessage": "The specified ProjectName is malformed.", - "ErrorDescription": "指定的ProjectName不合法。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MaximumTags", - "ErrorMessage": "The number of specified Tags exceeds the maximum limit.", - "ErrorDescription": "指定的标签数量超过最大限制。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "MissingParameter.LongTermConfiguration", - "ErrorMessage": "The required parameter LongTermConfiguration is not supplied.", - "ErrorDescription": "参数LongTermConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 9 - } - ] - } - ], - "ApiGroup": [ - { - "Name": "Memory", - "Description": "Memory", - "OpenStatus": 1, - "SortNumber": 0 - } - ], - "DataType": [ - { - "StructName": "StrategiesForUpdateMemoryCollection", - "StructDesc": "长期记忆提取策略信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomExtractionInstructions", - "ElementType": 1, - "Example": "--", - "ElementDesc": "长期记忆提取策略列表。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my_collection", - "ElementDesc": "记忆库名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Type", - "ElementType": 1, - "Example": "MEM0", - "ElementDesc": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "LongTermConfigurationForUpdateMemoryCollection", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Strategies", - "ElementType": 7, - "Example": "--", - "ElementDesc": "长期记忆提取策略信息。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "StrategiesForUpdateMemoryCollection" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ConnectionInfosForGetMemoryConnectionInfo", - "StructDesc": "长期记忆提取策略信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AddrType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthKey", - "ElementType": 1, - "Example": "key-123", - "ElementDesc": "认证密钥", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthType", - "ElementType": 1, - "Example": "APIKEY", - "ElementDesc": "鉴权类型,取值:\n- BEARER_TOKEN:使用AuthKey中的值作为Bearer token。\n- APIKEY:使用AuthKey中的值作为Authorization header。\n- AK_SK:使用您的火山引擎AK/SK进行标准化签名后的值作为Authorization header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "BaseUrl", - "ElementType": 1, - "Example": "https://base.url", - "ElementDesc": "记忆库平台的基础URL地址。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ExpireAt", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "认证信息过期时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "EnablePrivateNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "EnablePublicNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMemoryCollections" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MemoriesForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AssociatedRuntimes", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForListMemoryCollections" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "记忆库的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "memory-test", - "ElementDesc": "记忆库的描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "LastUpdateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "记忆库的更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Managed", - "ElementType": 6, - "Example": "true", - "ElementDesc": "记忆库是否由Agentkit平台管理,取值:\n- true:表示由Agentkit平台创建,删除时会同时删除对应平台的资源。\n- false:表示由提供商平台导入,删除时保留对应平台的资源。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryId", - "ElementType": 1, - "Example": "mem-17616225****", - "ElementDesc": "记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my_memory", - "ElementDesc": "记忆库名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "NetworkConfigurationForListMemoryCollections" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderCollectionId", - "ElementType": 1, - "Example": "mem-294775****", - "ElementDesc": "已导入的记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "MEM0", - "ElementDesc": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Region", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "StrategiesCount", - "ElementType": 2, - "Example": "3", - "ElementDesc": "记忆库的策略总数量。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "TagsForListMemoryCollections" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "EnablePrivateNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "EnablePublicNetwork", - "ElementType": 6, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListMemoryCollections" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListMemoryCollections", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "MemoriesForListMemoryCollections", - "StructDesc": "符合条件的记忆库信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AssociatedRuntimes", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForListMemoryCollections" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "记忆库的创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "memory-test", - "ElementDesc": "记忆库的描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "LastUpdateTime", - "ElementType": 1, - "Example": "2025-09-17T10:00:00+8:00", - "ElementDesc": "记忆库的更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Managed", - "ElementType": 6, - "Example": "true", - "ElementDesc": "记忆库是否由Agentkit平台管理,取值:\n- true:表示由Agentkit平台创建,删除时会同时删除对应平台的资源。\n- false:表示由提供商平台导入,删除时保留对应平台的资源。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryId", - "ElementType": 1, - "Example": "mem-17616225****", - "ElementDesc": "记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my_memory", - "ElementDesc": "记忆库名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "NetworkConfigurationForListMemoryCollections" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderCollectionId", - "ElementType": 1, - "Example": "mem-294775****", - "ElementDesc": "已导入的记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "MEM0", - "ElementDesc": "记忆库类型,取值:\n- MEM0:Mem0记忆库。\n- VIKINGDB_MEMORY:Viking长期记忆。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Region", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "StrategiesCount", - "ElementType": 2, - "Example": "3", - "ElementDesc": "记忆库的策略总数量。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "TagsForListMemoryCollections" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CollectionsForAddMemoryCollection", - "StructDesc": "已导入记忆库信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "MemoryId", - "ElementType": 1, - "Example": "mem-17616225****", - "ElementDesc": "记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Message", - "ElementType": 1, - "Example": "The collection is not ready.", - "ElementDesc": "当前状态的详细信息,作为发布状态的补充。例如启动失败的原因。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderCollectionId", - "ElementType": 1, - "Example": "mem-294775****", - "ElementDesc": "已导入的记忆库ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProviderType", - "ElementType": 1, - "Example": "MEM0", - "ElementDesc": "已导入的记忆库平台类型。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "记忆库状态,取值:\n- Creating:创建中。\n- CreateFailed:创建失败。\n- Ready:可用。\n- Deleting:删除中。\n- DeleteFailed:删除失败。\n- Deleted:已删除。\n- Error:错误。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AssociatedRuntimesForGetMemoryCollection", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "StrategiesForGetMemoryCollection", - "StructDesc": "长期记忆提取策略列表。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomExtractionInstructions", - "ElementType": 1, - "Example": "Summarize facts.", - "ElementDesc": "自定义策略的系统提示词(Prompt)。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "s_1", - "ElementDesc": "长期记忆提取策略的名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Type", - "ElementType": 1, - "Example": "Summary", - "ElementDesc": "长期记忆提取策略的类型,取值:\n- Summary:会话摘要(会话级别)。\n- Semantic:语义记忆(用户级别)。\n- UserPreference:用户偏好(用户级别)。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "LongTermConfigurationForGetMemoryCollection", - "StructDesc": "长期记忆提取策略信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Strategies", - "ElementType": 7, - "Example": "--", - "ElementDesc": "长期记忆提取策略列表。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "StrategiesForGetMemoryCollection" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetMemoryCollection", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigForGetMemoryCollection", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - } - ], - "CommonErrorCode": null -} \ No newline at end of file diff --git a/api_jsons/memory_client_gen.sh b/api_jsons/memory_client_gen.sh deleted file mode 100644 index a3b7348..0000000 --- a/api_jsons/memory_client_gen.sh +++ /dev/null @@ -1,10 +0,0 @@ -python ../tools/generate_types_from_api_json.py memory_all_apis.json \ - --output ../agentkit/memory/types.py \ - --base-class-name MemoryBaseModel \ - --client-output ../agentkit/memory/client.py \ - --client-class-name AgentkitMemoryClient \ - --client-description "AgentKit Memory Management Service" \ - --service-name memory \ - --types-module agentkit.memory.types \ - --base-class-import agentkit.client \ - --base-client-class BaseAgentkitClient \ No newline at end of file diff --git a/api_jsons/runtime_all_apis.json b/api_jsons/runtime_all_apis.json deleted file mode 100644 index 7fcf43a..0000000 --- a/api_jsons/runtime_all_apis.json +++ /dev/null @@ -1,6070 +0,0 @@ -{ - "TemplateVersion": "1.0.0", - "ServiceCode": "ecs", - "Version": "2020-04-01", - "ApiList": [ - { - "Action": "UpdateRuntime", - "NameCn": "UpdateRuntime", - "OperationType": 3, - "Description": "修改运行时配置。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateRuntime&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6hflyl1c598vs****\",\n \"Description\": \"Agent-001\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateRuntime\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"Id\": \"r-ye6hflyl1c598vs****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "ApmplusEnable", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "是否开启APMPlus服务以提供对Runtime的监控。取值:\n- true:开启。\n- false:不开启。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ArtifactType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ArtifactUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "Description": "镜像URL。格式为的镜像地址。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "AuthorizerConfiguration.CustomJwtAuthorizer.DiscoveryUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "令牌签名密钥 URL。此 URL 用于获取 OpenID Connect 配置或授权服务器元数据,以验证传入的令牌。目前仅支持火山引擎identity服务的签名秘钥URL。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.CustomJwtAuthorizer.AllowedClients.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "允许访问的客户端列表。如果允许所有客户端,则置为空列表。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKey", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "22243eefff**", - "Description": "运行时的入口鉴权ApiKey,允许为空,留空默认随机生成一个字符串。 用户访问运行时需要携带这个Key。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Header", - "Description": "用户访问运行时实例时,APIKey传递的位置。\n- Header:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "test-key", - "Description": "运行时服务的入口鉴权APIKey名字。\n- 不能为空,长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "23fa21A8823nfasd7f****", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Agent-001", - "Description": "运行时描述。\n- 长度限制为 1000 以内的 Unicode 字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Envs.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "DATABASE_MEM0_BASE_URL", - "Description": "运行时环境变量的键。\n- 1 ~ 63 个字符,字符中可包含英文、数字以及下划线(_),并且不能以数字开头。\n- 同一运行时下 Key 唯一。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Envs.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem0-cnlfjzigaku8gc****.mem0.volces.com:8000", - "Description": "运行时环境变量的值。\n", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "kb-xxxx", - "Description": "关联的知识库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mt-3tigy72q3u3vj0x2****", - "Description": "关联的知识库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-xxxx", - "Description": "关联的记忆库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ModelAgentName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "doubao-seed-1.6", - "Description": "公共镜像推理模型接入点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ReleaseEnable", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "更新完是否立即发布。取值:\n- true:立即发布。\n- false:不立即发布。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 17, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 18, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 19, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 20, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-dascxxxxx", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 21, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "MissingParameter.Value", - "ErrorMessage": "The required parameter Value is not supplied.", - "ErrorDescription": "参数Value不能为空。", - "HttpCode": 400, - "SortNumber": 5 - } - ] - }, - { - "Action": "GetRuntimeVersion", - "NameCn": "GetRuntimeVersion", - "OperationType": 5, - "Description": "查询运行时某个版本的详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetRuntimeVersion&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6xzwchkwoaroxxxxxx\",\n \"versionNumber\": \"1\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetAgentKitRuntimeVersion\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"RuntimeId\": \"r-ye7******\",\n \"Name\": \"runtime******\",\n \"Description\": \"agentkit\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit******/******/******\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"Dht******\",\n \"ApiKeyLocation\": \"Header\",\n \"ApiKeyName\": \"dsfy******\"\n },\n },\n \"Envs\": [\n {\n \"Key\": \"test\",\n \"Value\": \"test-value\"\n }\n ],\n \"RoleName\": \"TestRoleForAgentKit\",\n \"ApmplusEnable\": true,\n \"Command\": \"python3 my_agent.py\",\n \"Status\": \"Ready\",\n \"ProjectName\": \"default\",\n \"Endpoint\": \"http://sd3qupshmeps3v7l9****.apigateway-cn-beijing.volceapi.com\",\n \"CpuMilli\": 1000,\n \"MemoryMb\": 2048,\n \"VersionNumber\": 1,\n \"CreatedAt\": \"2025-10-23T20:35:07+08:00\",\n \"UpdatedAt\": \"2025-10-23T20:36:21+08:00\",\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "VersionNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "运行时版本号。不填默认为0,表示最新版本。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ApmplusEnable", - "Type": 6, - "Example": "true", - "Description": "是否开启APMPlus 服务。包括:\n- true:开启。\n- false:不开启。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ArtifactType", - "Type": 1, - "Example": "image", - "Description": "运行时镜像类型。取值:\n- image: 自定义镜像,当前只支持image。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ArtifactUrl", - "Type": 1, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "Description": "运行时镜像的URL。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "AuthorizerConfiguration", - "Type": 7, - "Example": "--", - "Description": "运行时认证配置信息。目前只支持KeyAuth 和 CustomJwtAuthorizer 认证配置。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "AuthorizerConfigurationForGetRuntimeVersion" - } - }, - { - "Name": "Command", - "Type": 1, - "Example": "./run.sh", - "Description": "运行时启动命令。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "CpuMilli", - "Type": 2, - "Example": "1000", - "Description": "单实例最大CPU。单位:milli cpu。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "CreatedAt", - "Type": 1, - "Example": "2025-10-20T16:02:15+08:00", - "Description": "版本创建时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Description", - "Type": 1, - "Example": "runtime01", - "Description": "运行时描述。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Endpoint", - "Type": 1, - "Example": "http://sd3qupshmeps3v7l9****.apigateway-cn-beijing.volceapi.com", - "Description": "运行时访问域名。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Envs", - "Type": 7, - "Example": "--", - "Description": "运行时环境变量。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 10, - "ParameterType": { - "$ref": "EnvsForGetRuntimeVersion" - } - }, - { - "Name": "MemoryMb", - "Type": 2, - "Example": "2048", - "Description": "单实例最大内存,单位 MB。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ModelAgentName", - "Type": 1, - "Example": "doubao-seed-1.6", - "Description": "公共镜像 推理模型接入点。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "my-agent", - "Description": "运行时名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "default", - "Description": "运行时所属项目名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "RoleName", - "Type": 1, - "Example": "MyTestRole", - "Description": "运行时绑定的IAM角色名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-22ddsc***", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 16, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "运行时状态。取值:\n- Creating:创建中。\n- Error: 错误。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 17, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tags", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 18, - "ParameterType": { - "$ref": "TagsForGetRuntimeVersion" - } - }, - { - "Name": "UpdatedAt", - "Type": 1, - "Example": "2025-10-20T16:02:15+08:00", - "Description": "版本更新时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 19, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "VersionNumber", - "Type": 2, - "Example": "1", - "Description": "运行时版本号。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 20, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListRuntimeCrRegistries", - "NameCn": "ListRuntimeCrRegistries", - "OperationType": 6, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "默认请求示例", - "Response": "默认响应示例" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "CrRegistries", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "CrRegistriesForListRuntimeCrRegistries" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - } - ] - }, - { - "Action": "ListRuntimes", - "NameCn": "ListRuntimes", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询运行时详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListRuntimes&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"Filters\": [\n {\n \"Name\": \"Name\",\n \"Values\": [\n \"\"\n ]\n }\n ]\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"20251027221557619118028A455F3C0C79\",\n \"Action\": \"ListRuntimes\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"AgentKitRuntimes\": [\n {\n \"RuntimeId\": \"r-ye7t******\",\n \"Name\": \"agent1******\",\n \"Description\": \"\",\n \"Status\": \"Error\",\n \"CreateTime\": \"2025-10-27T21:19:19+08:00\",\n \"UpdateTime\": \"2025-10-27T21:20:52+08:00\",\n \"ArtifactType\": \"\",\n \"ArtifactUrl\": \"\",\n \"AuthorizerConfiguration\": null,\n \"Envs\": [],\n \"Tags\": [],\n \"RoleName\": \"\",\n \"ApmplusEnable\": false,\n \"Command\": \"\",\n \"Endpoint\": \"\",\n \"CpuMilli\": 0,\n \"MemoryMb\": 0,\n \"CurrentVersionNumber\": 1,\n \"CreatedAt\": \"2025-10-27T21:19:19+08:00\",\n \"UpdatedAt\": \"2025-10-27T21:20:52+08:00\"\n },\n {\n \"RuntimeId\": \"r-ye******\",\n \"Name\": \"simple******\",\n \"Description\": \"AgentKit\",\n \"Status\": \"Ready\",\n \"CreateTime\": \"2025-10-27T17:09:37+08:00\",\n \"UpdateTime\": \"2025-10-27T17:10:52+08:00\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit******/******/******\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"Dht******\",\n \"ApiKeyLocation\": \"Header\",\n \"ApiKeyName\": \"dsfy******\"\n },\n \"CustomJwtAuthorizer\": null\n },\n \"Envs\": [],\n \"RoleName\": \"test-xxx\",\n \"ApmplusEnable\": false,\n \"Command\": \"run.sh\",\n \"Endpoint\": \"http://sd3qupshmeps3v7l9****.apigateway-cn-beijing.volceapi.com\",\n \"CpuMilli\": 1000,\n \"MemoryMb\": 2048,\n \"CurrentVersionNumber\": 1,\n \"CreatedAt\": \"2025-10-27T17:09:37+08:00\",\n \"UpdatedAt\": \"2025-10-27T17:10:52+08:00\"\n }\n ]\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "CreateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点后创建的运行时。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "CreateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前创建的运行时。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Name", - "Description": "精确过滤的字段名,取值:\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:运行时ID。\n - Name:运行时名称。\n - Description:运行时描述。\n - Status:运行时状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Name", - "Description": "模糊过滤的字段名,取值:\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:运行时ID。\n - Name:运行时名称。\n - Description:运行时描述。\n - Status:运行时状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Ready", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤字段为Status时,取值:\n- Creating:正在创建中。\n- Error: 不可用。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "--", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "SortBy", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "SortOrder", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TagFilters.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "TagFilters.1.Key=k1", - "Description": "根据标签查询资源时指定的标签键。\n\n参数 - N:表示标签键的序号,取值范围:1~10。\n多个标签键之间用&分隔。\n不允许重复。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "TagFilters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2", - "Description": "根据标签查询资源时指定的标签值。\n\n第一个N:表示标签键的序号,取值范围:1~10。\n第二个N:表示标签值的序号,取值范围:1~3,即同一标签键最多支持同时查询3个标签值。\n多个标签值之间用&分隔。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "UpdateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点后更新的运行时。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "UpdateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前更新的运行时。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "AgentKitRuntimes", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "AgentKitRuntimesForListRuntimes" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - } - ] - }, - { - "Action": "ReleaseRuntime", - "NameCn": "ReleaseRuntime", - "OperationType": 2, - "Description": "更新运行时的版本。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ReleaseRuntime&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6xzwchkwoaroxxxxxx\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ReleaseRuntime\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"RuntimeId\": \" r-3thhlu***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "VersionNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "0", - "Description": "发布版本号,0:表示发布最新版本。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.VersionNumber", - "ErrorMessage": "The required parameter VersionNumber is not supplied.", - "ErrorDescription": "runtime 版本号不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "CreateRuntime", - "NameCn": "CreateRuntime", - "OperationType": 1, - "Description": "创建一个运行时(Runtime),操作说明和注意事项请参见[创建Runtime](https://www.volcengine.com/docs/86681/1844831)。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateRuntime&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"Name\": \"my-126663mx9****\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit-center-test-cn-beijing.cr.volces.com/agentkit/simple-app:1.0\",\n \"RoleName\": \"TestRoleForAgentKit\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKeyName\": \"xxi4256666623****\",\n \"ApiKeyLocation\": \"Header\"\n }\n },\n \"Envs\": [\n {\n \"Key\": \"MODEL_AGENT_API_KEY\",\n \"Value\": \"38484cc0-29ab-****-99b1-*****\"\n },\n {\n \"Key\": \"OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY\",\n \"Value\": \"78ed39eee6fa12824042a6b2359****\"\n },\n {\n \"Key\": \"OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT\",\n \"Value\": \"http://apmplus-cn-beijing.volces.com:4317\"\n },\n {\n \"Key\": \"OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME\",\n \"Value\": \"veadk_tracing\"\n }\n ],\n \"ApmplusEnable\": true\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"CreateRuntime\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"RuntimeId\": \" r-3thhlu***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "ApmplusEnable", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "是否开启APMPlus服务以提供对Runtime的监控。取值:\n - true(默认):开启。\n - false:不开启。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ArtifactType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "image", - "Description": "镜像类型。取值:\n- image:自定义镜像,当前仅支持image。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ArtifactUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "Description": "镜像URL。格式为的镜像地址。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "AuthorizerConfiguration.CustomJwtAuthorizer.DiscoveryUrl", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "https://example.com/.well-known/openid-configuration", - "Description": "令牌签名密钥 URL。此 URL 用于获取 OpenID Connect 配置或授权服务器元数据,以验证传入的令牌。目前仅支持火山引擎identity服务的签名秘钥URL。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.CustomJwtAuthorizer.AllowedClients.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "[\"client1”, \"client2\"]", - "Description": "允许访问的客户端列表。如果允许所有客户端,则置为空列表。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Header", - "Description": "用户访问运行时实例时,APIKey传递的位置。\n- Header:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "test-key", - "Description": "运行时服务的入口鉴权APIKey名字。\n- 不能为空,长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "23fa21A8823nfasd7f****", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Agent-001", - "Description": "运行时描述。\n- 长度限制为 1000 以内的 Unicode 字符。\n- 不填默认为空。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Envs.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "DATABASE_MEM0_BASE_URL", - "Description": "运行时环境变量的键。\n- 1 ~ 63 个字符,字符中可包含英文、数字以及下划线(_),并且不能以数字开头。\n- 同一运行时下 Key 唯一。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Envs.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem0-cnlfjzigaku8gc****.mem0.volces.com:8000", - "Description": "运行时环境变量的值。\n", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "KnowledgeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "kb-xxxx", - "Description": "关联的知识库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MCPToolsetId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mt-3tigy72q3u3vj0x2****", - "Description": "关联MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "MemoryId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "mem-xxxx", - "Description": "关联的记忆库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ModelAgentName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "doubao-seed-1.6", - "Description": "公共镜像推理模型接入点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "test-runtime", - "Description": "运行时名称。\n- 长度为4 ~ 64的字符串。\n- 由字母、数字、“-”和“_”组成。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 16, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NetworkConfiguration.EnablePrivateNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "是否开启运行时的私网访问能力。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 17, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.EnablePublicNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "true", - "Description": "是否开启运行时的公网访问能力。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 18, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "vpc-257gqcdfvx6n****", - "Description": "私有网络Id。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 19, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "[\"subnet-1234567890\"]", - "Description": "子网Id列表,每个可用区只能指定一个子网Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 20, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 21, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "RoleName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "AgentKit-Runtime-Default-ServiceRole-xbv8s36", - "Description": "运行时绑定的IAM角色名称。\n", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 22, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Tags.1.Key=k1", - "Description": "为资源添加的用户标签的标签键。\n- 参数 - N:表示标签键的序号,取值范围:1~20。\n- 多个标签键之间用&分隔。\n\n命名规则如下:\n- 不能以任何大小写形式的`volc:`或`sys:`开头。\n> `volc:`或`sys:`开头为系统预留标签键禁止创建。\n- 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。\n- 长度限制在1~128个字符之间。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 23, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Tags.1.Value=v1", - "Description": "为资源添加的用户标签的标签值。\n- 参数 - N:表示标签值的序号,取值范围:1~20。\n- 多个标签值之间用&分隔。\n\n命名规则如下:\n- 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。\n- 允许为空,长度限制在0~256个字符之间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 24, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-dascxxxxx", - "Description": "关联的工具Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 25, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MaximumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the maximum limit.", - "ErrorDescription": "指定的SubnetIds超过最大限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "MissingParameter.ArtifactType", - "ErrorMessage": "The required parameter ArtifactType is not supplied.", - "ErrorDescription": "agent代码产物类型不能为空。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "MissingParameter.ArtifactUrl", - "ErrorMessage": "The required parameter ArtifactUrl is not supplied.", - "ErrorDescription": "agent代码产物地址不能为空。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "MissingParameter.AuthorizerConfiguration", - "ErrorMessage": "The required parameter AuthorizerConfiguration is not supplied.", - "ErrorDescription": "参数AuthorizerConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 9 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 10 - }, - { - "ErrorCode": "MissingParameter.NetworkConfiguration", - "ErrorMessage": "The required parameter NetworkConfiguration is not supplied.", - "ErrorDescription": "参数NetworkConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 11 - }, - { - "ErrorCode": "MissingParameter.RoleName", - "ErrorMessage": "The required parameter RoleName is not supplied.", - "ErrorDescription": "参数RoleName不能为空。", - "HttpCode": 400, - "SortNumber": 12 - }, - { - "ErrorCode": "MissingParameter.Value", - "ErrorMessage": "The required parameter Value is not supplied.", - "ErrorDescription": "参数Value不能为空。", - "HttpCode": 400, - "SortNumber": 13 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 14 - } - ] - }, - { - "Action": "GetRuntime", - "NameCn": "GetRuntime", - "OperationType": 5, - "Description": "获取一个运行时详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetRuntime&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6xzwchkwoaroxxxxxx\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetRuntime\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"RuntimeId\": \"r-ye7******\",\n \"Name\": \"runtime******\",\n \"Description\": \"agentkit\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit******/******/******\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"Dht******\",\n \"ApiKeyLocation\": \"Header\",\n \"ApiKeyName\": \"dsfy******\"\n },\n \"CustomJwtAuthorizer\": null\n },\n \"Envs\": [\n {\n \"Key\": \"test\",\n \"Value\": \"test-value\"\n }\n ],\n \"Tags\": [],\n \"RoleName\": \"TestRoleForAgentKit\",\n \"ApmplusEnable\": true,\n \"Command\": \"python3 my_agent.py\",\n \"Status\": \"Ready\",\n \"ProjectName\": \"default\",\n \"Endpoint\": \"http://sd3qupshmeps3v7l9****.apigateway-cn-beijing.volceapi.com\",\n \"CpuMilli\": 1000,\n \"MemoryMb\": 2048,\n \"CurrentVersionNumber\": 1,\n \"CreatedAt\": \"2025-10-23T20:35:07+08:00\",\n \"UpdatedAt\": \"2025-10-23T20:36:21+08:00\",\n \"StatusMessage\": \"\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ApmplusEnable", - "Type": 6, - "Example": "true", - "Description": "是否开启APMPlus 服务。包括:\n- true:开启。\n- false:不开启。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ArtifactType", - "Type": 1, - "Example": "image", - "Description": "镜像类型。取值:\n- image:自定义镜像,当前仅支持image。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ArtifactUrl", - "Type": 1, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "Description": "镜像URL。格式为的镜像地址。\n", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "AuthorizerConfiguration", - "Type": 7, - "Example": "--", - "Description": "运行时认证配置信息。目前只支持KeyAuth认证配置。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "AuthorizerConfigurationForGetRuntime" - } - }, - { - "Name": "Command", - "Type": 1, - "Example": "./run.sh", - "Description": "运行时启动命令。\n", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "CpuMilli", - "Type": 2, - "Example": "1000", - "Description": "单实例最大CPU。单位:milli cpu。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "CreatedAt", - "Type": 1, - "Example": "2025-10-20T16:02:15+08:00", - "Description": "运行时创建时间。\n", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "CurrentVersionNumber", - "Type": 2, - "Example": "1", - "Description": "当前生效版本号。\n", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Description", - "Type": 1, - "Example": "test", - "Description": "运行时描述。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Envs", - "Type": 7, - "Example": "--", - "Description": "运行时环境变量。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 10, - "ParameterType": { - "$ref": "EnvsForGetRuntime" - } - }, - { - "Name": "FailedLogFileUrl", - "Type": 1, - "Example": "https://xx.tos-s3-cn.volces.com/release_failed_instance_logs/******", - "Description": "运行时部署失败的日志文件下载地址。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "KnowledgeId", - "Type": 1, - "Example": "kb-xxxx", - "Description": "关联的知识库Id。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MCPToolsetId", - "Type": 1, - "Example": "mt-3tigy72q3qddxxxx", - "Description": "关联MCP工具集Id。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MemoryId", - "Type": 1, - "Example": "mem-xxxx", - "Description": "关联的记忆库Id。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "MemoryMb", - "Type": 2, - "Example": "2048", - "Description": "单实例最大内存,单位 MB。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ModelAgentName", - "Type": 1, - "Example": "doubao-seed-1.6", - "Description": "公共镜像推理模型接入点", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 16, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "my-agent", - "Description": "运行时名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 17, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "NetworkConfigurations", - "Type": 7, - "Example": "--", - "Description": "Runtime的访问信息,包括公网和VPC。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 18, - "ParameterType": { - "$ref": "NetworkConfigurationsForGetRuntime" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "default", - "Description": "运行时所属项目名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 19, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "RoleName", - "Type": 1, - "Example": "MyTestRole", - "Description": "运行时绑定的IAM角色名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 20, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-22ddsc***", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 21, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "运行时状态,取值:\n- Creating:正在创建中。\n- Error: 错误。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 22, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "StatusMessage", - "Type": 1, - "Example": "release finished successfully", - "Description": "当前状态的详细信息,作为发布状态的补充。例如启动失败的原因。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 23, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tags", - "Type": 7, - "Example": "--", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 24, - "ParameterType": { - "$ref": "TagsForGetRuntime" - } - }, - { - "Name": "ToolId", - "Type": 1, - "Example": "t-dascxxxxx", - "Description": "关联的工具Id。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 25, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "UpdatedAt", - "Type": 1, - "Example": "2025-10-20T16:02:15+08:00", - "Description": "运行时更新时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 26, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListRuntimeVersions", - "NameCn": "ListRuntimeVersions", - "OperationType": 6, - "Description": "查询运行时所有版本的详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListRuntimeVersions&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6xzwchkwoaroxxxxxx\",\n \"MaxResults\": \"10\",\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202510272157150B50CD9A1448B0289A80\",\n \"Action\": \"ListRuntimeVersions\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"AgentKitRuntimeVersions\": [\n {\n \"RuntimeId\": \"rv-ye7******\",\n \"Description\": \"AgentKit project\",\n \"VersionNumber\": 1,\n \"CreatedAt\": \"2025-10-27T17:04:53+08:00\",\n \"UpdatedAt\": \"2025-10-27T17:05:20+08:00\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit-cli-******\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"dsdsds******\",\n \"ApiKeyLocation\": \"Header\",\n \"ApiKeyName\": \"API-KEY-******\"\n },\n },\n \"Envs\": [\n {\n \"Key\": \"MODEL_AGENT_API_KEY\",\n \"Value\": \"38484******\"\n }\n ],\n \"Command\": \"\",\n \"RoleName\": \"AgentKit-Runtime******\",\n \"Status\": \"Ready\",\n \"CpuMilli\": 1000,\n \"MemoryMb\": 2048,\n \"ApmplusEnable\": true\n },\n {\n \"RuntimeId\": \"rv-ye7s******\",\n \"Description\": \"AgentKit project\",\n \"VersionNumber\": 0,\n \"CreatedAt\": \"2025-10-27T17:04:04+08:00\",\n \"UpdatedAt\": \"2025-10-27T17:04:04+08:00\",\n \"ArtifactType\": \"image\",\n \"ArtifactUrl\": \"agentkit-******\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"dsdd******\",\n \"ApiKeyLocation\": \"Header\",\n \"ApiKeyName\": \"API-KEY-******\"\n },\n },\n \"Envs\": [\n {\n \"Key\": \"MODEL_AGENT_API_KEY\",\n \"Value\": \"38484******\"\n }\n ],\n \"Command\": \"\",\n \"RoleName\": \"AgentKit******\",\n \"Status\": \"Creating\",\n \"CpuMilli\": 0,\n \"MemoryMb\": 0,\n \"ApmplusEnable\": true,\n }\n ],\n \"NextToken\": \"dC15ZTdjZ2xlM3VvYzFrZHRvcn****\",\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "--", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "当前页码。\n- 起始值:1。\n- 默认值:1。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 取值范围:1~100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "AgentKitRuntimeVersions", - "Type": 7, - "Example": "--", - "Description": "运行时所有版本的详情。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "AgentKitRuntimeVersionsForListRuntimeVersions" - } - }, - { - "Name": "NextToken", - "Type": 1, - "Example": "bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq****", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "AgentKitRuntimeVersions", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "AgentKitRuntimeVersionsForListRuntimeVersions" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "GetRuntimeCozeToken", - "NameCn": "GetRuntimeCozeToken", - "OperationType": 5, - "Description": "默认API描述", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetRuntimeCozeToken&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6hflyl1c598vs****\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"GetRuntimeCozeToken\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"JwtToken\": \" 3thhlu***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-22ddsc***", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "JwtToken", - "Type": 1, - "Example": "ader4dfa***", - "Description": "coze 私钥签发的秘钥。\n", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "DeleteRuntime", - "NameCn": "DeleteRuntime", - "OperationType": 2, - "Description": "删除一个运行时。\n", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteRuntime&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"RuntimeId\": \"r-ye6hflyl1c598vs****\"\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteRuntime\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"RuntimeId\": \" r-3thhlu***\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Runtime" - }, - "RequestParameters": [ - { - "Name": "ClientToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "23fa21A8823nfasd7f****", - "Description": "保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。\n取值:仅支持ASCII字符,且不能超过64个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "RuntimeId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "RuntimeId", - "Type": 1, - "Example": "r-ye7agye1a8cr38iu****", - "Description": "运行时ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.RuntimeId", - "ErrorMessage": "The required parameter RuntimeId is not supplied.", - "ErrorDescription": "runtime id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - } - ], - "ApiGroup": [ - { - "Name": "Runtime", - "Description": "Runtime", - "OpenStatus": 1, - "SortNumber": 0 - } - ], - "DataType": [ - { - "StructName": "CustomJwtAuthorizerForGetRuntimeVersion", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetRuntimeVersion", - "StructDesc": "keyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "API Key的值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "API Key位置。取值:\n- Header,目前只支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "API Key的名字。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForGetRuntimeVersion", - "StructDesc": "运行时认证配置信息。目前只支持KeyAuth 和 CustomJwtAuthorizer 认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForGetRuntimeVersion" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "keyAuth认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForGetRuntimeVersion" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForGetRuntimeVersion", - "StructDesc": "运行时环境变量。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "运行时环境变量的Key。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "test-value", - "ElementDesc": "运行时环境变量的Value。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetRuntimeVersion", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CrRegistriesForListRuntimeCrRegistries", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ArtifactUrl", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "FrameworkType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Label", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Language", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tag", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForListRuntimes", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "[\"client1\"]", - "ElementDesc": "允许访问的客户端列表。当允许所有客户端访问时,置为空列表。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "https://example.com/.well-known/openid-configuration", - "ElementDesc": "令牌签名密钥 URL。此 URL 用于获取 OpenID Connect 配置或授权服务器元数据,以验证传入的令牌。目前仅支持火山引擎identity服务的签名秘钥URL。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListRuntimes", - "StructDesc": "keyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "API Key的值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "APIKey传递的位置。取值:\n- Header:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "API Key的名字。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListRuntimes", - "StructDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForListRuntimes" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "keyAuth认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForListRuntimes" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForListRuntimes", - "StructDesc": "运行时环境变量。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "运行时环境变量的Key。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "test-value", - "ElementDesc": "运行时环境变量的Value。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListRuntimes", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "[\"sg-1234567890\"]", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "[\"subnet-1234567890\"]", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-257gqcdfvx6n****", - "ElementDesc": "VPC的ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListRuntimes", - "StructDesc": "运行时访问信息,包括公网和VPC。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "http://sd3qupshmeps3v7l9****.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "运行时访问域名。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "public", - "ElementDesc": "运行时访问域名的类型,可选:\n- public\n- private", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListRuntimes" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListRuntimes", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AgentKitRuntimesForListRuntimes", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApmplusEnable", - "ElementType": 6, - "Example": "true", - "ElementDesc": "是否开启APMPlus 服务。包括:\n- true:开启。\n- false:不开启。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactType", - "ElementType": 1, - "Example": "image", - "ElementDesc": "运行时镜像类型。取值:\n- image: 自定义镜像,当前只支持image。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactUrl", - "ElementType": 1, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "ElementDesc": "运行时镜像的URL。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListRuntimes" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Command", - "ElementType": 1, - "Example": "./run.sh", - "ElementDesc": "运行时启动命令。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CpuMilli", - "ElementType": 2, - "Example": "1000", - "ElementDesc": "单实例最大CPU。单位:milli cpu。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CurrentVersionNumber", - "ElementType": 2, - "Example": "1", - "ElementDesc": "当前生效版本号。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "runtime01", - "ElementDesc": "运行时描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Envs", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时环境变量。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "EnvsForListRuntimes" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KnowledgeId", - "ElementType": 1, - "Example": "kb-xxxx", - "ElementDesc": "关联的知识库Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MCPToolsetId", - "ElementType": 1, - "Example": "mt-3tigy72q3u3vj0x2****", - "ElementDesc": "关联MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryId", - "ElementType": 1, - "Example": "mem-xxxx", - "ElementDesc": "关联MCP工具集ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryMb", - "ElementType": 2, - "Example": "2048", - "ElementDesc": "单实例最大内存,单位 MB。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "my-agent", - "ElementDesc": "运行时名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "运行时访问信息,包括公网和VPC。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 16, - "ParameterType": { - "$ref": "NetworkConfigurationsForListRuntimes" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "default", - "ElementDesc": "项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 17, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RoleName", - "ElementType": 1, - "Example": "MyTestRole", - "ElementDesc": "运行时绑定的IAM角色名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 18, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RuntimeId", - "ElementType": 1, - "Example": "r-daf******", - "ElementDesc": "运行时ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 19, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "运行时状态。取值:\n- Creating:创建中。\n- Error: 错误。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 20, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 21, - "ParameterType": { - "$ref": "TagsForListRuntimes" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolId", - "ElementType": 1, - "Example": "t-dascxxxxx", - "ElementDesc": "关联的工具ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 22, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 23, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "CustomJwtAuthorizerForGetRuntime", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AllowedClients", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "DiscoveryUrl", - "ElementType": 1, - "Example": "https://example.com/.well-known/openid-configuration", - "ElementDesc": "令牌签名密钥 URL。此 URL 用于获取 OpenID Connect 配置或授权服务器元数据,以验证传入的令牌。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetRuntime", - "StructDesc": "keyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "API Key的值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "APIKey传递的位置。当前只支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "API Key的名字。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForGetRuntime", - "StructDesc": "运行时认证配置信息。目前只支持KeyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CustomJwtAuthorizer", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "CustomJwtAuthorizerForGetRuntime" - }, - "OpenStatus": 1 - }, - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "keyAuth认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "KeyAuthForGetRuntime" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForGetRuntime", - "StructDesc": "运行时环境变量。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "运行时环境变量的Key。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "test-value", - "ElementDesc": "运行时环境变量的Value。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForGetRuntime", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "vpc-257gqcdfvx6n****", - "ElementDesc": "私网vpc的Id。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForGetRuntime", - "StructDesc": "Runtime的访问信息,包括公网和VPC。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "https://sd3p0u******.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "运行时访问域名。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "public", - "ElementDesc": "运行时访问域名的类型,可选:\n- public\n- private\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForGetRuntime" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetRuntime", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "k1", - "ElementDesc": "实例的标签键。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "v1", - "ElementDesc": "实例的标签值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListRuntimeVersions", - "StructDesc": "keyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "API Key的值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "APIKey传递的位置。取值:\n- Header:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "API Key的名字。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListRuntimeVersions", - "StructDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "keyAuth认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "KeyAuthForListRuntimeVersions" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForListRuntimeVersions", - "StructDesc": "运行时环境变量。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "运行时环境变量的Key。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "test-value", - "ElementDesc": "运行时环境变量的Value。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AgentKitRuntimeVersionsForListRuntimeVersions", - "StructDesc": "运行时所有版本的详情。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApmplusEnable", - "ElementType": 6, - "Example": "true", - "ElementDesc": "是否开启APMPlus 服务。包括:\n- true:开启。\n- false:不开启。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactType", - "ElementType": 1, - "Example": "image", - "ElementDesc": "运行时镜像类型。取值: \n- image: 自定义镜像,当前只支持image。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactUrl", - "ElementType": 1, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "ElementDesc": "运行时镜像的URL。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListRuntimeVersions" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Command", - "ElementType": 1, - "Example": "./run.sh", - "ElementDesc": "运行时启动命令。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CpuMilli", - "ElementType": 2, - "Example": "1000", - "ElementDesc": "单实例最大CPU。单位:milli cpu。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "runtime01", - "ElementDesc": "运行时描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Envs", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时环境变量。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "EnvsForListRuntimeVersions" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryMb", - "ElementType": 2, - "Example": "2048", - "ElementDesc": "单实例最大内存,单位 MB。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RoleName", - "ElementType": 1, - "Example": "MyTestRole", - "ElementDesc": "运行时绑定的IAM角色名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RuntimeId", - "ElementType": 1, - "Example": "r-22ddsc***", - "ElementDesc": "运行时ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "运行时状态。取值:\n- Creating:创建中。\n- Error: 错误。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VersionNumber", - "ElementType": 2, - "Example": "1", - "ElementDesc": "版本号。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListRuntimeVersions", - "StructDesc": "keyAuth认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "API Key的值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "APIKey传递的位置。取值:\n- Header:当前仅支持Header。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "API Key的名字。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListRuntimeVersions", - "StructDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "--", - "ElementDesc": "keyAuth认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "KeyAuthForListRuntimeVersions" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "EnvsForListRuntimeVersions", - "StructDesc": "运行时环境变量。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "运行时环境变量的Key。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "test-value", - "ElementDesc": "运行时环境变量的Value。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AgentKitRuntimeVersionsForListRuntimeVersions", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApmplusEnable", - "ElementType": 6, - "Example": "true", - "ElementDesc": "是否开启APMPlus 服务。包括:\n- true:开启。\n- false:不开启。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactType", - "ElementType": 1, - "Example": "image", - "ElementDesc": "运行时镜像类型。取值: \n- image: 自定义镜像,当前只支持image。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ArtifactUrl", - "ElementType": 1, - "Example": "cp-enterprise-cn-beijing.cr.volces.com/demo/agent:latest", - "ElementDesc": "运行时镜像的URL。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时认证配置信息。目前支持KeyAuth和CustomJwtAuthorizer认证配置。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListRuntimeVersions" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Command", - "ElementType": 1, - "Example": "./run.sh", - "ElementDesc": "运行时启动命令。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CpuMilli", - "ElementType": 2, - "Example": "1000", - "ElementDesc": "单实例最大CPU。单位:milli cpu。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "runtime01", - "ElementDesc": "运行时描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Envs", - "ElementType": 7, - "Example": "--", - "ElementDesc": "运行时环境变量。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "EnvsForListRuntimeVersions" - }, - "OpenStatus": 1 - }, - { - "ElementName": "MemoryMb", - "ElementType": 2, - "Example": "2048", - "ElementDesc": "单实例最大内存,单位 MB。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RoleName", - "ElementType": 1, - "Example": "MyTestRole", - "ElementDesc": "运行时绑定的IAM角色名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RuntimeId", - "ElementType": 1, - "Example": "r-22ddsc***", - "ElementDesc": "运行时ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "运行时状态。取值:\n- Creating:创建中。\n- Error: 错误。\n- Releasing: 发布中。\n- Ready: 运行中。\n- Deleting: 删除中。\n- Deleted: 已删除。\n- Updating: 更新中。\n- UnReleased: 未发布。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2025-10-20T16:02:15+08:00", - "ElementDesc": "运行时版本更新时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 14, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VersionNumber", - "ElementType": 2, - "Example": "1", - "ElementDesc": "版本号。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 15, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - } - ], - "CommonErrorCode": null -} \ No newline at end of file diff --git a/api_jsons/runtime_client_gen.sh b/api_jsons/runtime_client_gen.sh deleted file mode 100644 index 601dbf4..0000000 --- a/api_jsons/runtime_client_gen.sh +++ /dev/null @@ -1,11 +0,0 @@ - -python ../tools/generate_types_from_api_json.py runtime_all_apis.json \ - --output ../agentkit/runtime/types.py \ - --base-class-name RuntimeTypeBaseModel \ - --client-output ../agentkit/runtime/client.py \ - --client-class-name AgentkitRuntimeClient \ - --client-description "AgentKit Runtime Management Service" \ - --service-name runtime \ - --types-module agentkit.runtime.types \ - --base-class-import agentkit.client \ - --base-client-class BaseAgentkitClient \ No newline at end of file diff --git a/api_jsons/tools_all_apis.json b/api_jsons/tools_all_apis.json deleted file mode 100644 index 0d95124..0000000 --- a/api_jsons/tools_all_apis.json +++ /dev/null @@ -1,4524 +0,0 @@ -{ - "TemplateVersion": "1.0.0", - "ServiceCode": "ecs", - "Version": "2020-04-01", - "ApiList": [ - { - "Action": "UpdateTool", - "NameCn": "UpdateTool", - "OperationType": 3, - "Description": "修改工具的描述信息。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=UpdateTool&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\"\n \"Description\": \"123\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"UpdateTool\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ToolId\": \"t-ye7hr4n01soarome****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "tool01", - "Description": "工具的描述,取值:长度限制为 1000 以内的 Unicode 字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ToolId", - "Type": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "GetSession", - "NameCn": "GetSession", - "OperationType": 5, - "Description": "查询工具的会话详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetSession&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"SessionId\": \"s-ye6xzwchkwoaroxxxxxx\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202510271450109FD029A85C12E74BE556\",\n \"Action\": \"GetSession\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"SessionId\": \"s-ye7sfdm2o0c1kdto****\",\n \"Status\": \"Ready\",\n \"Name\": \"\",\n \"Endpoint\": \"http://sd3s4ng567ui2e1ad****.apigateway-cn-beijing.volceapi.com/?faasInstanceName=vefaas-bf5xfrv4-qa6b0ee7db-d3vh9b033fo44goh****-sandbox\",\n \"InternalEndpoint\": \"\",\n \"ToolType\": \"All-in-one\",\n \"SessionMeta\": {\n \"WebshellUrl\": \"http://sd3s4ng567ui2e1ad****.apigateway-cn-beijing.volceapi.com/terminal?faasInstanceName=vefaas-bf5xfrv4-qa6b0ee7db-d3vh9b033fo44goh****-sandbox\",\n \"VncUrl\": \"http://sd3s4ng567ui2e1ad****.apigateway-cn-beijing.volceapi.com/vnc/index.html?faasInstanceName=vefaas-bf5xfrv4-qa6b0ee7db-d3vh9b033fo44goh****-sandbox\"\n },\n \"CreatedAt\": \"2025-10-27T14:44:12+08:00\",\n \"ExpireAt\": \"2025-10-28T14:44:12+08:00\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "SessionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "CreatedAt", - "Type": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "会话创建时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Endpoint", - "Type": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "Description": "会话公网访问端点。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ExpireAt", - "Type": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "会话过期时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "InternalEndpoint", - "Type": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing-inner.volceapi.com", - "Description": "会话私网访问端点。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "session-test", - "Description": "会话名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "SessionId", - "Type": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "会话状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ToolType", - "Type": 1, - "Example": "All-in-one", - "Description": "工具类型。取值:\n- All-in-one:一体化工具集,当前仅支持All-in-one。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.SessionId", - "ErrorMessage": "The required parameter SessionId is not supplied.", - "ErrorDescription": "session id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "DeleteSession", - "NameCn": "DeleteSession", - "OperationType": 2, - "Description": "删除工具的会话实例。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteSession&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"SessionId\": \"s-ye6xzwchkwoaroxxxxxx\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"20251027144356FBC64212879D5D3A****\",\n \"Action\": \"DeleteSession\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"SessionId\": \"s-ye7sfdm2o0c1kdto****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "SessionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "SessionId", - "Type": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.SessionId", - "ErrorMessage": "The required parameter SessionId is not supplied.", - "ErrorDescription": "session id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "CreateSession", - "NameCn": "CreateSession", - "OperationType": 1, - "Description": "创建工具的会话实例。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateSession&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"Ttl\": 1440\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"20251027144356FBC64212879D5D3A****\",\n \"Action\": \"CreateSession\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"SessionId\": \"s-ye7sfdm2o0c1kdto****\",\n \"Name\": \"\",\n \"Endpoint\": \"http://sd3s4ng567ui2e1ad****.apigateway-cn-beijing.volceapi.com/?faasInstanceName=vefaas-bf5xfrv4-qa6b0ee7db-d3vh9b033fo44gohgrj0-sandbox\",\n \"InternalEndpoint\": \"\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "session-test", - "Description": "会话名称,取值:\n- 支持大小写英文字母、数字、中划线(-)、下划线(_)。\n- 长度限制为0 ~ 64个字符。\n- 不填默认为空。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Ttl", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "30", - "Description": "会话实例存活时长,即工具在一次 “用户 - 工具交互会话” 中,保持用户状态、操作上下文不丢失的有效时长。会话过期后,只需重新登录或重启操作即可。\n- 单位:分钟。\n- 取值范围:3~1440。\n- 默认值为:30。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TtlUnit", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "Endpoint", - "Type": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "Description": "会话公网访问端点。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "InternalEndpoint", - "Type": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing-inner.volceapi.com", - "Description": "会话私网访问端点。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "session-test", - "Description": "会话名称。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "SessionId", - "Type": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "GetSessionLogs", - "NameCn": "GetSessionLogs", - "OperationType": 5, - "Description": "查看实例日志。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetSessionLogs&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"SessionId\": \"s-ye6xzwchkwoaroxxxxxx\",\n \"Limit\": 1000\n}", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202511231712426C9C75D44DC92BEC157C\",\n \"Action\": \"GetSessionLogs\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit_stg\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"Logs\": \"2025-11-23T17:11:12.902769436+08:00 [FaaS System] starting user function at port 8080\\n2025-11-23T17:11:12.902934949+08:00 [FaaS System] run user command: ulimit -n ${BYTEFAAS_FUNC_ULIMIT:-2048} \\u0026\\u0026 /opt/gem/run.sh\\n2025-11-23T09:11:13.144314961Z stdout F\\n2025-11-23T17:11:13.144560943+08:00 \\u001b[36m █████╗ ██╗ ██████╗ ███████╗ █████╗ ███╗ ██╗██████╗ ██████╗ ██████╗ ██╗ ██╗\\u001b[0m\\n2025-11-23T17:11:13.144659227+08:00 \\u001b[36m██╔══██╗██║██╔═══██╗ ██╔════╝██╔══██╗████╗ ██║██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝\\u001b[0m\\n2025-11-23T17:11:13.145226319+08:00 \\u001b[36m███████║██║██║ ██║ ███████╗███████║██╔██╗ ██║██║ ██║██████╔╝██║ ██║ ╚███╔╝\\u001b[0m\\n2025-11-23T17:11:13.145321164+08:00 \\u001b[36m██╔══██║██║██║ ██║ ╚════██║██╔══██║██║╚██╗██║██║ ██║██╔══██╗██║ ██║ ██╔██╗\\u001b[0m\\n2025-11-23T17:11:13.145481959+08:00 \\u001b[36m██║ ██║██║╚██████╔╝ ███████║██║ ██║██║ ╚████║██████╔╝██████╔╝╚██████╔╝██╔╝ ██╗\\u001b[0m\\n2025-11-23T17:11:13.145564679+08:00 \\u001b[36m╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝\\u001b[0m\\n2025-11-23T09:11:13.145715039Z stdout F\\n2025-11-23T17:11:13.145795033+08:00 \\u001b[32m🚀 AIO(All-in-One) Agent Sandbox Environment\\u001b[0m\\n2025-11-23T17:11:13.145939335+08:00 \\u001b[34m📦 Image Version: 1.0.0.153\\u001b[0m\\n2025-11-23T17:11:13.146033315+08:00 \\u001b[33m🌈 Dashboard: http://localhost:8080\\u001b[0m\\n2025-11-23T17:11:13.14613258+08:00 \\u001b[33m📚 Documentation: http://localhost:8080/v1/docs\\u001b[0m\\n2025-11-23T09:11:13.146228544Z stdout F\\n2025-11-23T17:11:13.146344354+08:00 \\u001b[35m================================================================\\u001b[0m\\n2025-11-23T17:11:13.156181374+08:00 2025-11-23 17:11:13,155 INFO Starting entrypoint script...\\n2025-11-23T17:11:13.159989898+08:00 2025-11-23 17:11:13,159 INFO Creating user ('gem') with UID (1000) and GID (1000)...\\n2025-11-23T17:11:13.172062049+08:00 2025-11-23 17:11:13,171 INFO Setting up X11 permissions...\\n2025-11-23T17:11:13.186684304+08:00 2025-11-23 17:11:13,186 INFO Creating necessary directories...\\n2025-11-23T17:11:13.201151259+08:00 2025-11-23 17:11:13,200 INFO Setting up Nginx directories...\\n2025-11-23T17:11:13.215513249+08:00 2025-11-23 17:11:13,214 INFO Copying the browser preferences file to user's config directory...\\n2025-11-23T17:11:13.274221392+08:00 2025-11-23 17:11:13,273 INFO DNS_OVER_HTTPS_TEMPLATES is not set or empty. Skipping DNS over HTTPS configuration...\\n2025-11-23T17:11:13.286168797+08:00 2025-11-23 17:11:13,285 INFO JWT_PUBLIC_KEY is not set or is empty. Activating direct routing server configuration...\\n2025-11-23T17:11:13.293842903+08:00 2025-11-23 17:11:13,293 INFO Generating other Nginx config files...\\n2025-11-23T17:11:13.308247682+08:00 2025-11-23 17:11:13,307 INFO /opt/gem/mcp.disabled found. Skipping MCP server configuration...\\n2025-11-23T17:11:13.312059779+08:00 2025-11-23 17:11:13,311 INFO Starting supervisord as the main process...\\n2025-11-23T17:11:13.498817424+08:00 2025-11-23 17:11:13,498 INFO Included extra file \\\"/opt/gem/supervisord/browser.conf\\\" during parsing\\n2025-11-23T17:11:13.498976016+08:00 2025-11-23 17:11:13,498 INFO Included extra file \\\"/opt/gem/supervisord/nginx.conf\\\" during parsing\\n2025-11-23T17:11:13.499219448+08:00 2025-11-23 17:11:13,498 INFO Included extra file \\\"/opt/gem/supervisord/openbox.conf\\\" during parsing\\n2025-11-23T17:11:13.499412804+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/srv.conf\\\" during parsing\\n2025-11-23T17:11:13.499654501+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/supervisord.code_server.conf\\\" during parsing\\n2025-11-23T17:11:13.499796627+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/supervisord.jupyter.conf\\\" during parsing\\n2025-11-23T17:11:13.499878917+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/supervisord.mcp.conf\\\" during parsing\\n2025-11-23T17:11:13.500016947+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/supervisord.mcp_hub.conf\\\" during parsing\\n2025-11-23T17:11:13.500116761+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/supervisord.python_srv.conf\\\" during parsing\\n2025-11-23T17:11:13.50020469+08:00 2025-11-23 17:11:13,499 INFO Included extra file \\\"/opt/gem/supervisord/vnc.conf\\\" during parsing\\n2025-11-23T17:11:13.500291562+08:00 2025-11-23 17:11:13,499 INFO Set uid to user 0 succeeded\\n2025-11-23T17:11:13.5046513+08:00 2025-11-23 17:11:13,504 INFO RPC interface 'supervisor' initialized\\n2025-11-23T17:11:13.50489762+08:00 2025-11-23 17:11:13,504 CRIT Server 'unix_http_server' running without any HTTP authentication checking\\n2025-11-23T17:11:13.50517907+08:00 2025-11-23 17:11:13,505 INFO supervisord started with pid 12\\n2025-11-23T17:11:14.508854821+08:00 2025-11-23 17:11:14,508 INFO spawned: 'python-server' with pid 102\\n2025-11-23T17:11:14.511587567+08:00 2025-11-23 17:11:14,511 INFO spawned: 'gem-server' with pid 103\\n2025-11-23T17:11:14.514848983+08:00 2025-11-23 17:11:14,514 INFO spawned: 'browser' with pid 104\\n2025-11-23T17:11:14.522847387+08:00 2025-11-23 17:11:14,521 INFO spawned: 'nginx' with pid 105\\n2025-11-23T17:11:14.526889832+08:00 2025-11-23 17:11:14,526 INFO spawned: 'websocat' with pid 106\\n2025-11-23T17:11:14.533408482+08:00 2025-11-23 17:11:14,533 INFO spawned: 'code-server' with pid 107\\n2025-11-23T17:11:14.543151291+08:00 2025-11-23 17:11:14,542 INFO spawned: 'mcp-server-browser' with pid 108\\n2025-11-23T17:11:14.545962901+08:00 2025-11-23 17:11:14,545 INFO spawned: 'jupyter' with pid 109\\n2025-11-23T17:11:14.550355845+08:00 2025-11-23 17:11:14,550 INFO spawned: 'mcp-hub' with pid 110\\n2025-11-23T17:11:14.554971756+08:00 2025-11-23 17:11:14,554 INFO spawned: 'openbox' with pid 111\\n2025-11-23T17:11:14.570142478+08:00 2025-11-23 17:11:14,569 INFO spawned: 'tigervnc' with pid 115\\n2025-11-23T17:11:15.58332743+08:00 2025-11-23 17:11:15,582 INFO success: python-server entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.583459722+08:00 2025-11-23 17:11:15,582 INFO success: gem-server entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.58363154+08:00 2025-11-23 17:11:15,583 INFO success: browser entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.583746925+08:00 2025-11-23 17:11:15,583 INFO success: nginx entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.583862284+08:00 2025-11-23 17:11:15,583 INFO success: websocat entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.583955344+08:00 2025-11-23 17:11:15,583 INFO success: code-server entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.584058029+08:00 2025-11-23 17:11:15,583 INFO success: mcp-server-browser entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.584144866+08:00 2025-11-23 17:11:15,583 INFO success: jupyter entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.584254032+08:00 2025-11-23 17:11:15,583 INFO success: mcp-hub entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.584338034+08:00 2025-11-23 17:11:15,583 INFO success: openbox entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n2025-11-23T17:11:15.584490281+08:00 2025-11-23 17:11:15,583 INFO success: tigervnc entered RUNNING state, process has stayed up for \\u003e than 1 seconds (startsecs)\\n\\n\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "未分类" - }, - "RequestParameters": [ - { - "Name": "Limit", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "日志行数限制。\n不传入时展示返回所有日志。\n传入值为 N 时, 显示最新 N 行日志。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "SessionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "Logs", - "Type": 1, - "Example": "", - "Description": "实例日志。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.SessionId", - "ErrorMessage": "The required parameter SessionId is not supplied.", - "ErrorDescription": "session id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "CreateTool", - "NameCn": "CreateTool", - "OperationType": 1, - "Description": "创建沙箱工具,操作说明和注意事项请参见[创建沙箱工具](https://www.volcengine.com/docs/86681/1847934)。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=CreateTool&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolType\": \"All-in-one\",\n \"Name\": \"test2\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"CreateTool\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ToolId\": \"t-ye7hr4n01so****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKey", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "22243eefff**", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyLocation", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Header", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "AuthorizerConfiguration.KeyAuth.ApiKeyName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "test-key", - "Description": "apiKey 名字。支持大小写英文字母、数字、中划线(-)、下划线(_),长度限制为 4~64 个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Description", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "this is a tool", - "Description": "工具的描述信息,取值:\n- 长度限制为 1000 以内的 Unicode 字符。\n- 不填默认为空。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "tool-test", - "Description": "工具的名称,取值:\n- 支持大小写英文字母、数字、中划线(-)、下划线(_)。\n- 长度限制为4 ~ 64个字符。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NetworkConfiguration.EnablePrivateNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.EnablePublicNetwork", - "Type": 6, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.VpcId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SecurityGroupIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "NetworkConfiguration.VpcConfiguration.SubnetIds.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "default", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "RoleName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "示例角色名称。", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Tags.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Tags.1.Key=k1", - "Description": "为资源添加的用户标签的标签键。\n- 参数 - N:表示标签键的序号,取值范围:1~20。\n- 多个标签键之间用&分隔。\n\n命名规则如下:\n- 不能以任何大小写形式的`volc:`或`sys:`开头。\n> `volc:`或`sys:`开头为系统预留标签键禁止创建。\n- 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。\n- 长度限制在1~128个字符之间。\n参数 - N:表示是第几个标签,取值范围:1~20。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Tags.N.Value", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Tags.1.Value=v1", - "Description": "为资源添加的用户标签的标签值。\n- 参数 - N:表示标签值的序号,取值范围:1~20。\n- 多个标签值之间用&分隔。\n\n命名规则如下:\n- 只能包含语言字符、数字、空格和英文符号“_”、“.”、“:”、“/”、“=”、“+”、“-”、“@”。\n- 允许为空,长度限制在0~256个字符之间。\n参数 - N:表示是第几个标签,取值范围:1~20。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "ToolType", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "All-in-one", - "Description": "工具类型。取值:\n- All-in-one:一体化工具集,当前仅支持All-in-one。\n", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 15, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ToolId", - "Type": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "InvalidDescription.Malformed", - "ErrorMessage": "The specified Description is malformed.", - "ErrorDescription": "指定的描述不合法。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "InvalidName.Malformed", - "ErrorMessage": "The specified Name is malformed.", - "ErrorDescription": "指定的Name不合法。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "LimitExceeded.MaximumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the maximum limit.", - "ErrorDescription": "指定的SubnetIds超过最大限制。", - "HttpCode": 400, - "SortNumber": 3 - }, - { - "ErrorCode": "LimitExceeded.MinimumSubnetIds", - "ErrorMessage": "The number of specified SubnetIds exceeds the minimum limit.", - "ErrorDescription": "指定的SubnetIds超过最小限制。", - "HttpCode": 400, - "SortNumber": 4 - }, - { - "ErrorCode": "MissingParameter.AuthorizerConfiguration", - "ErrorMessage": "The required parameter AuthorizerConfiguration is not supplied.", - "ErrorDescription": "参数AuthorizerConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 5 - }, - { - "ErrorCode": "MissingParameter.DiscoveryUrl", - "ErrorMessage": "The required parameter DiscoveryUrl is not supplied.", - "ErrorDescription": "参数DiscoveryUrl不能为空。", - "HttpCode": 400, - "SortNumber": 6 - }, - { - "ErrorCode": "MissingParameter.Key", - "ErrorMessage": "The required parameter Key is not supplied.", - "ErrorDescription": "参数Key不能为空。", - "HttpCode": 400, - "SortNumber": 7 - }, - { - "ErrorCode": "MissingParameter.Name", - "ErrorMessage": "The required parameter Name is not supplied.", - "ErrorDescription": "名称不能为空。", - "HttpCode": 400, - "SortNumber": 8 - }, - { - "ErrorCode": "MissingParameter.NetworkConfiguration", - "ErrorMessage": "The required parameter NetworkConfiguration is not supplied.", - "ErrorDescription": "参数NetworkConfiguration不能为空。", - "HttpCode": 400, - "SortNumber": 9 - }, - { - "ErrorCode": "MissingParameter.ToolType", - "ErrorMessage": "The required parameter ToolType is not supplied.", - "ErrorDescription": "参数ToolType不能为空。", - "HttpCode": 400, - "SortNumber": 10 - }, - { - "ErrorCode": "MissingParameter.Value", - "ErrorMessage": "The required parameter Value is not supplied.", - "ErrorDescription": "参数Value不能为空。", - "HttpCode": 400, - "SortNumber": 11 - }, - { - "ErrorCode": "MissingParameter.VpcId", - "ErrorMessage": "The required parameter VpcId is not supplied.", - "ErrorDescription": "参数VpcId不能为空。", - "HttpCode": 400, - "SortNumber": 12 - } - ] - }, - { - "Action": "GetTool", - "NameCn": "GetTool", - "OperationType": 5, - "Description": "查询工具详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=GetTool&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"20251027142329504394C726CC0349****\",\n \"Action\": \"GetTool\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ToolId\": \"t-ye9qwatywwb6wrvc****\",\n \"Name\": \"test-name\",\n \"Description\": \"\",\n \"Status\": \"Ready\",\n \"ToolType\": \"All-in-one\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"****\",\n \"ApiKeyLocation\": \"header\",\n \"ApiKeyName\": \"test-api-key\"\n }\n },\n \"RoleName\": \"\",\n \"ApmplusEnable\": true,\n \"CreatedAt\": \"2025-11-23T16:55:21+08:00\",\n \"UpdatedAt\": \"2025-11-23T16:55:29+08:00\",\n \"Tags\": [],\n \"ProjectName\": \"default\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \"public\",\n \"Endpoint\": \"https://sd4hcnv3318ffuppa***.apigateway-cn-beijing.volceapi.com\",\n \"VpcConfiguration\": {\n \"VpcId\": \"vpc-1unjb731ek1s51j8e75l****\",\n \"SubnetIds\": [\n \"subnet-w0eiz5pvhlhc865ykakf****\"\n ],\n \"SecurityGroupIds\": [\n \"sg-1c11cukupn1ts5e8j711g****\"\n ]\n }\n }\n ]\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "AssociatedRuntimes", - "Type": 7, - "Example": "", - "Description": "工具关联的智能体运行时。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "AssociatedRuntimesForGetTool" - } - }, - { - "Name": "AuthorizerConfiguration", - "Type": 7, - "Example": "-", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "AuthorizerConfigurationForGetTool" - } - }, - { - "Name": "CreatedAt", - "Type": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "工具的创建时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Description", - "Type": 1, - "Example": "this is a tool", - "Description": "工具的描述信息。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Name", - "Type": 1, - "Example": "tool-test", - "Description": "工具的名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "NetworkConfigurations", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 6, - "ParameterType": { - "$ref": "NetworkConfigurationsForGetTool" - } - }, - { - "Name": "ProjectName", - "Type": 1, - "Example": "", - "Description": "工具所属项目名称。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "RoleName", - "Type": 1, - "Example": "示例角色名称。", - "Description": "默认描述", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Status", - "Type": 1, - "Example": "Ready", - "Description": "工具的状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 9, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tags", - "Type": 7, - "Example": "", - "Description": "工具标签。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 10, - "ParameterType": { - "$ref": "TagsForGetTool" - } - }, - { - "Name": "ToolId", - "Type": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ToolType", - "Type": 1, - "Example": "All-in-one", - "Description": "工具类型。取值:\n- All-in-one:一体化工具集。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "UpdatedAt", - "Type": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "工具的更新时间。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 13, - "ParameterType": { - "$ref": "" - } - } - ] - }, - { - "Action": "ListTools", - "NameCn": "ListTools", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询工具详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListTools&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"Filters\": [\n {\n \"Name\": \"Name\",\n \"Values\": [\n \"\"\n ]\n }\n ]\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"ListTools\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"Tools\": [\n {\n \"ToolId\": \"t-ye9qwatywwb6wrvc****\",\n \"Name\": \"test-name\",\n \"Description\": \"\",\n \"Status\": \"Ready\",\n \"ToolType\": \"All-in-one\",\n \"AuthorizerConfiguration\": {\n \"KeyAuth\": {\n \"ApiKey\": \"\",\n \"ApiKeyLocation\": \"header\",\n \"ApiKeyName\": \"test-api-key\"\n },\n \"CustomJwtAuthorizer\": null\n },\n \"RoleName\": \"\",\n \"ApmplusEnable\": true,\n \"CreatedAt\": \"2025-11-23T16:55:21+08:00\",\n \"UpdatedAt\": \"2025-11-23T16:55:29+08:00\",\n \"Tags\": [],\n \"ProjectName\": \"default\",\n \"NetworkConfigurations\": [\n {\n \"NetworkType\": \"public\",\n \"Endpoint\": \"https://sd4hcnv3318ffuppa***.apigateway-cn-beijing.volceapi.com\",\n \"VpcConfiguration\": {\n \"VpcId\": \"vpc-1unjb731ek1s51j8e75l****\",\n \"SubnetIds\": [\n \"subnet-w0eiz5pvhlhc865ykakf****\"\n ],\n \"SecurityGroupIds\": [\n \"sg-1c11cukupn1ts5e8j711g****\"\n ]\n }\n }\n ]\n }\n ],\n \"NextToken\": \"dC15ZTdjZ2xlM3VvYzFrZHRvcn****==\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "CreateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点后创建的工具。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "CreateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前创建的工具。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Name", - "Description": "精确过滤的字段名,取值:\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:工具ID。\n - Name:工具名称。\n - Description:工具描述。\n - Status:工具状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Status", - "Description": "模糊过滤的字段名,取值:\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:工具ID。\n - Name:工具名称。\n - Description:工具描述。\n - Status:工具状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Ready", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤字段为Status时,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "unique-token", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "当前页码。\n- 起始值:1。\n- 默认值:1。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 取值范围:1~100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ProjectName", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TagFilters.N.Key", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "标签过滤键。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 11, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "TagFilters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "标签过滤值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "UpdateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前更新的工具。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 13, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "UpdateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前更新的工具。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 14, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "NextToken", - "Type": 1, - "Example": "bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tools", - "Type": 7, - "Example": "--", - "Description": "符合条件的工具信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "ToolsForListTools" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "1", - "Description": "当前页码。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "10", - "Description": "分页查询时设置的每页行数。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "Tools", - "Type": 7, - "Example": "", - "Description": "符合条件的工具信息。", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "ToolsForListTools" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "10", - "Description": "符合条件的工具总个数。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "LimitExceeded.MaximumFilters", - "ErrorMessage": "The number of specified Filters exceeds the maximum limit.", - "ErrorDescription": "指定的Filters超过最大限制。", - "HttpCode": 400, - "SortNumber": 1 - } - ] - }, - { - "Action": "ListSessions", - "NameCn": "ListSessions", - "OperationType": 6, - "Description": "通过自定义筛选条件批量查询工具的会话详情。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=ListSessions&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"Filters\": [\n {\n \"Name\": \"Name\",\n \"Values\": [\n \"\"\n ]\n }\n ]\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202510271421540541FD6FB0976A53AC40\",\n \"Action\": \"ListSessions\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"SessionInfos\": [\n {\n \"SessionId\": \"s-ye7sfdm2o0c1kdto****\",\n \"Status\": \"Ready\",\n \"Name\": \"\",\n \"Endpoint\": \"http://sd3s4ng567ui2e1ad****.apigateway-cn-beijing.volceapi.com/?faasInstanceName=vefaas-bf5xfrv4-qa6b0ee7db-d3vh9b033fo44goh****-sandbox\",\n \"InternalEndpoint\": \"\",\n \"ToolType\": \"All-in-one\",\n \"CreatedAt\": \"2025-10-27T14:44:12+08:00\",\n \"ExpireAt\": \"2025-10-28T14:44:12+08:00\"\n }\n ],\n \"NextToken\": \"dC15ZTdpdnliMm04YzFrZHRvc2****==\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "CreateTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点后创建的会话。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "CreateTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前创建的会话。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ExpireTimeAfter", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点后更新的会话。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ExpireTimeBefore", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "筛选该时间点前更新的会话。(RFC3339格式)", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Filters.N.Name", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Name", - "Description": "支持精确过滤的字段名。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:工具ID。\n - Name:工具名称。\n - Description:工具描述。\n - Status:工具状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。\n:::", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 5, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.NameContains", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Status", - "Description": "模糊过滤的字段名,取值:\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔,为“或”的关系。\n- 取值:\n - Id:工具ID。\n - Name:工具名称。\n - Description:工具描述。\n - Status:工具状态。\n::: tip\n当`Filters.N.Name`和`Filters.N.NameContains`同时传入时,仅`Filters.N.Name`生效。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 6, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "Filters.N.Values.N", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "Ready", - "Description": "过滤字段的值。\n- 参数 - N:表示过滤条件的序号,取值范围:1~10。\n- 多个字段名之间用&分隔。\n\n当过滤字段为Status时,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 7, - "SplitType": 3, - "Location": 0, - "LocationMulti": "0,1" - }, - { - "Name": "MaxResults", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "分页查询时设置的每页行数。\n- 最小值:1。\n- 最大值:100。\n- 默认值:10。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 8, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "NextToken", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "unique-token", - "Description": "分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的`NextToken`参数值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 9, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageNumber", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "1", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 10, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "PageSize", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "10", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 0, - "SortNumber": 11, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 12, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "NextToken", - "Type": 1, - "Example": "bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******", - "Description": "本次调用返回的查询凭证值,返回为空表示该页为末页。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "SessionInfos", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "SessionInfosForListSessions" - } - }, - { - "Name": "PageNumber", - "Type": 2, - "Example": "1", - "Description": "起始页码:默认值:1", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "PageSize", - "Type": 2, - "Example": "10", - "Description": "分页查询时设置的每页行数:最大值:100,默认值:10", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "SessionInfos", - "Type": 7, - "Example": "", - "Description": "默认描述", - "IsArray": 1, - "IsTrailCollect": 0, - "OpenStatus": 1, - "SortNumber": 5, - "ParameterType": { - "$ref": "SessionInfosForListSessions" - } - }, - { - "Name": "TotalCount", - "Type": 2, - "Example": "10", - "Description": "总结果数量。", - "IsArray": 0, - "IsTrailCollect": 0, - "OpenStatus": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "LimitExceeded.MaximumFilters", - "ErrorMessage": "The number of specified Filters exceeds the maximum limit.", - "ErrorDescription": "指定的Filters超过最大限制。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - } - ] - }, - { - "Action": "DeleteTool", - "NameCn": "DeleteTool", - "OperationType": 2, - "Description": "删除沙箱工具。删除工具的同时将自动回收关联Session,删除后,不可恢复,请谨慎操作。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=DeleteTool&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\"\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"202106111445100102252431000052****\",\n \"Action\": \"DeleteTool\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"ToolId\": \"t-ye7hr4n01soarome****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ToolId", - "Type": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - } - ] - }, - { - "Action": "SetSessionTtl", - "NameCn": "SetSessionTtl", - "OperationType": 3, - "Description": "配置会话实例的存活时长。", - "Timeout": 30000, - "QpsLimit": 0, - "AccountDefaultQpsLimit": 0, - "DemoGroup": [ - { - "Name": "", - "Description": "", - "Request": "POST https://agentkit.cn-beijing.volcengineapi.com?Action=SetSessionTtl&Version=2025-10-30 HTTP/1.1\nContent-Type: application/json\n{\n \"ToolId\": \"t-ye6xzwchkwoaroxxxxxx\",\n \"SessionId\": \"s-ye6xzwchkwoaroxxxxxx\",\n \"Ttl\": 30\n}\n", - "Response": "{\n \"ResponseMetadata\": {\n \"RequestId\": \"20251027144356FBC64212879D5D3A****\",\n \"Action\": \"SetSessionTtl\",\n \"Version\": \"2025-10-30\",\n \"Service\": \"agentkit\",\n \"Region\": \"cn-beijing\"\n },\n \"Result\": {\n \"SessionId\": \"s-ye7sfdm2o0c1kdto****\"\n }\n}" - } - ], - "IsAuth": 1, - "AccessAsUserStatus": 1, - "AccessAsUserByOpenapiStatus": 1, - "AccessAsUserByConsoleStatus": 1, - "IsCross": 0, - "IsWhiteList": 0, - "AccountWhiteList": "", - "Is2xx": 0, - "ApiGroup": { - "$ref": "Tool" - }, - "RequestParameters": [ - { - "Name": "SessionId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "ToolId", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "Ttl", - "Type": 2, - "ParameterType": { - "$ref": "" - }, - "Example": "30", - "Description": "会话实例存活时长,即工具在一次 “用户 - 工具交互会话” 中,保持用户状态、操作上下文不丢失的有效时长。会话过期后,只需重新登录或重启操作即可。\n- 单位:分钟。\n- 取值范围:3~1440。\n- 默认值为:30。", - "IsRequired": 1, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - }, - { - "Name": "TtlUnit", - "Type": 1, - "ParameterType": { - "$ref": "" - }, - "Example": "", - "Description": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 4, - "SplitType": 0, - "Location": 0, - "LocationMulti": "0,1,2" - } - ], - "ResponseParameters": [ - { - "Name": "ExpireAt", - "Type": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "Description": "会话过期时间。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "SessionId", - "Type": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "Description": "会话ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - } - }, - { - "Name": "ToolId", - "Type": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "Description": "工具ID。", - "IsArray": 0, - "IsTrailCollect": 1, - "OpenStatus": 1, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - } - } - ], - "ApiErrorCode": [ - { - "ErrorCode": "MissingParameter.SessionId", - "ErrorMessage": "The required parameter SessionId is not supplied.", - "ErrorDescription": "session id不能为空。", - "HttpCode": 400, - "SortNumber": 1 - }, - { - "ErrorCode": "MissingParameter.ToolId", - "ErrorMessage": "The required parameter ToolId is not supplied.", - "ErrorDescription": "tool id不能为空。", - "HttpCode": 400, - "SortNumber": 2 - }, - { - "ErrorCode": "MissingParameter.Ttl", - "ErrorMessage": "The required parameter Ttl is not supplied.", - "ErrorDescription": "参数Ttl不能为空。", - "HttpCode": 400, - "SortNumber": 3 - } - ] - } - ], - "ApiGroup": [ - { - "Name": "Tool", - "Description": "Tool", - "OpenStatus": 1, - "SortNumber": 0 - }, - { - "Name": "未分类", - "Description": "未分类", - "OpenStatus": 0, - "SortNumber": 0 - } - ], - "DataType": [ - { - "StructName": "AssociatedRuntimesForGetTool", - "StructDesc": "工具关联的智能体运行时。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Id", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForGetTool", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "Header", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "apiKey 名字。支持大小写英文字母、数字、中划线(-)、下划线(_),长度限制为 4~64 个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForGetTool", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "-", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "KeyAuthForGetTool" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForGetTool", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForGetTool", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForGetTool" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForGetTool", - "StructDesc": "工具标签。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签键。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "SessionInfosForListSessions", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "会话创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "会话公网访问端点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ExpireAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "会话过期时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "InternalEndpoint", - "ElementType": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "会话私网访问端点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "session-test", - "ElementDesc": "会话名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SessionId", - "ElementType": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "ElementDesc": "会话ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "工具状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolType", - "ElementType": 1, - "Example": "All-in-one", - "ElementDesc": "工具类型。取值:\n- All-in-one:一体化工具集。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "SessionInfosForListSessions", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "会话创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "会话公网访问端点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ExpireAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "会话过期时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "InternalEndpoint", - "ElementType": 1, - "Example": "https://sd391h67itqkq7brr****.apigateway-cn-beijing.volceapi.com", - "ElementDesc": "会话私网访问端点。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "session-test", - "ElementDesc": "会话名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SessionId", - "ElementType": 1, - "Example": "s-3tigy72q3u3vj0x2****", - "ElementDesc": "会话ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "工具状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolType", - "ElementType": 1, - "Example": "All-in-one", - "ElementDesc": "工具类型。取值:\n- All-in-one:一体化工具集。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "header", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "apiKey 名字。支持大小写英文字母、数字、中划线(-)、下划线(_),长度限制为 4~64 个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "-", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "KeyAuthForListTools" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListTools", - "StructDesc": "工具所属项目名称。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListTools" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListTools", - "StructDesc": "工具标签。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签键。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ToolsForListTools", - "StructDesc": "符合条件的工具信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "-", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "工具创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "this is a tool", - "ElementDesc": "工具的描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "tool-test", - "ElementDesc": "工具名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "工具所属项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "NetworkConfigurationsForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "工具所属项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RoleName", - "ElementType": 1, - "Example": "示例角色名称。", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "工具状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "工具标签。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "TagsForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolId", - "ElementType": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "ElementDesc": "工具的ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolType", - "ElementType": 1, - "Example": "All-in-one", - "ElementDesc": "工具类型。取值:\n- All-in-one:一体化工具集。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "工具的更新时间。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "KeyAuthForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "ApiKey", - "ElementType": 1, - "Example": "22243eefff**", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyLocation", - "ElementType": 1, - "Example": "header", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ApiKeyName", - "ElementType": 1, - "Example": "test-key", - "ElementDesc": "apiKey 名字。支持大小写英文字母、数字、中划线(-)、下划线(_),长度限制为 4~64 个字符。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "AuthorizerConfigurationForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "KeyAuth", - "ElementType": 7, - "Example": "-", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "KeyAuthForListTools" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "VpcConfigurationForListTools", - "StructDesc": "默认结构体描述", - "SortNumber": 0, - "Element": [ - { - "ElementName": "SecurityGroupIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "SubnetIds", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcId", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "NetworkConfigurationsForListTools", - "StructDesc": "工具所属项目名称。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Endpoint", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkType", - "ElementType": 1, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "VpcConfiguration", - "ElementType": 7, - "Example": "", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "VpcConfigurationForListTools" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "TagsForListTools", - "StructDesc": "工具标签。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "Key", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签键。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Value", - "ElementType": 1, - "Example": "", - "ElementDesc": "标签值。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - }, - { - "StructName": "ToolsForListTools", - "StructDesc": "符合条件的工具信息。", - "SortNumber": 0, - "Element": [ - { - "ElementName": "AuthorizerConfiguration", - "ElementType": 7, - "Example": "-", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 1, - "ParameterType": { - "$ref": "AuthorizerConfigurationForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "CreatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "工具创建时间。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 2, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Description", - "ElementType": 1, - "Example": "this is a tool", - "ElementDesc": "工具的描述。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 3, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Name", - "ElementType": 1, - "Example": "tool-test", - "ElementDesc": "工具名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 4, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "NetworkConfigurations", - "ElementType": 7, - "Example": "", - "ElementDesc": "工具所属项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 5, - "ParameterType": { - "$ref": "NetworkConfigurationsForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ProjectName", - "ElementType": 1, - "Example": "", - "ElementDesc": "工具所属项目名称。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 6, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "RoleName", - "ElementType": 1, - "Example": "示例角色名称。", - "ElementDesc": "默认参数描述", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 7, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Status", - "ElementType": 1, - "Example": "Ready", - "ElementDesc": "工具状态,取值:\n- Creating:创建中。\n- Error:错误。\n- Ready:运行中。\n- Deleting:删除中。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 8, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "Tags", - "ElementType": 7, - "Example": "", - "ElementDesc": "工具标签。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 1, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 9, - "ParameterType": { - "$ref": "TagsForListTools" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolId", - "ElementType": 1, - "Example": "t-3tigy72q3u3vj0x2****", - "ElementDesc": "工具的ID。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 10, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "ToolType", - "ElementType": 1, - "Example": "All-in-one", - "ElementDesc": "工具类型。取值:\n- All-in-one:一体化工具集。", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 11, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - }, - { - "ElementName": "UpdatedAt", - "ElementType": 1, - "Example": "2006-01-02T15:04:05Z07:00", - "ElementDesc": "工具的更新时间。\n", - "IsRequired": 0, - "DefaultValue": "", - "IsArray": 0, - "IsEnum": 0, - "EnumValue": "", - "RegPattern": "", - "MaxLength": 0, - "MinLength": 0, - "MaxValue": "", - "MinValue": "", - "IsTrailCollect": 0, - "SortNumber": 12, - "ParameterType": { - "$ref": "" - }, - "OpenStatus": 1 - } - ] - } - ], - "CommonErrorCode": null -} \ No newline at end of file diff --git a/api_jsons/tools_client_gen.sh b/api_jsons/tools_client_gen.sh deleted file mode 100644 index c484e13..0000000 --- a/api_jsons/tools_client_gen.sh +++ /dev/null @@ -1,10 +0,0 @@ -python ../tools/generate_types_from_api_json.py tools_all_apis.json \ - --output ../agentkit/tools/types.py \ - --base-class-name ToolsBaseModel \ - --client-output ../agentkit/tools/client.py \ - --client-class-name AgentkitToolsClient \ - --client-description "AgentKit Tools Management Service" \ - --service-name tools \ - --types-module agentkit.tools.types \ - --base-class-import agentkit.client \ - --base-client-class BaseAgentkitClient \ No newline at end of file diff --git a/assets/README.md.CsTNQcgo.js b/assets/README.md.CsTNQcgo.js new file mode 100644 index 0000000..058cc55 --- /dev/null +++ b/assets/README.md.CsTNQcgo.js @@ -0,0 +1,11 @@ +import{_ as s,c as i,o as e,ag as n}from"./chunks/framework.CA4hJK0u.js";const k=JSON.parse('{"title":"AgentKit 文档","description":"","frontmatter":{},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1770735100000}'),t={name:"README.md"};function l(p,a,h,d,o,c){return e(),i("div",null,[...a[0]||(a[0]=[n(`

AgentKit 文档

本目录包含 AgentKit SDK 和 CLI 的完整文档。

本地开发

安装依赖

bash
npm install

启动开发服务器

bash
npm run docs:dev

访问 http://localhost:5173 查看文档站点。

构建生产版本

bash
npm run docs:build

构建结果位于 .vitepress/dist 目录。

预览生产版本

bash
npm run docs:preview

目录结构

docs/
+├── .vitepress/          # VitePress 配置
+│   └── config.js        # 站点配置文件
+├── content/             # 文档内容
+│   ├── 1.introduction/  # 入门指南
+│   ├── 2.agentkit-sdk/  # SDK 文档
+│   └── 3.agentkit-cli/  # CLI 文档
+├── public/              # 静态资源
+│   └── images/          # 图片文件
+├── index.md             # 首页
+└── package.json         # 项目配置

文档规范

  • 所有 Markdown 文件使用中文编写
  • 代码示例使用英文注释
  • 图片存放在 public/images/ 目录
  • 使用相对路径引用图片:![描述](../../public/images/xxx.png)
`,17)])])}const g=s(t,[["render",l]]);export{k as __pageData,g as default}; diff --git a/assets/README.md.CsTNQcgo.lean.js b/assets/README.md.CsTNQcgo.lean.js new file mode 100644 index 0000000..d8fdb14 --- /dev/null +++ b/assets/README.md.CsTNQcgo.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as e,ag as n}from"./chunks/framework.CA4hJK0u.js";const k=JSON.parse('{"title":"AgentKit 文档","description":"","frontmatter":{},"headers":[],"relativePath":"README.md","filePath":"README.md","lastUpdated":1770735100000}'),t={name:"README.md"};function l(p,a,h,d,o,c){return e(),i("div",null,[...a[0]||(a[0]=[n("",17)])])}const g=s(t,[["render",l]]);export{k as __pageData,g as default}; diff --git a/assets/app.CtGOgGkw.js b/assets/app.CtGOgGkw.js new file mode 100644 index 0000000..80fec02 --- /dev/null +++ b/assets/app.CtGOgGkw.js @@ -0,0 +1 @@ +import{t as p}from"./chunks/theme.BeLitqQO.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.CA4hJK0u.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp}; diff --git a/assets/chunks/@localSearchIndexen.C2rQIYcR.js b/assets/chunks/@localSearchIndexen.C2rQIYcR.js new file mode 100644 index 0000000..51fc0d4 --- /dev/null +++ b/assets/chunks/@localSearchIndexen.C2rQIYcR.js @@ -0,0 +1 @@ +const t='{"documentCount":446,"nextId":446,"documentIds":{"0":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#agentkit","1":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#product-positioning","2":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#key-advantages","3":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#architecture-concept","4":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#applicable-scenarios","5":"/agentkit-sdk-python/en/content/1.introduction/1.overview.html#get-started","6":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#install-agentkit","7":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#environment-requirements","8":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#installation-methods","9":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#method-1-install-with-pip","10":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#stable-version","11":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#development-version","12":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#install-a-specific-version","13":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#method-2-install-with-uv-recommended","14":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#method-3-install-from-source","15":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#install-from-the-official-github-repository","16":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#verify-installation","17":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#authentication-configuration","18":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#recommended-use-global-configuration","19":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#environment-variables-for-development-debugging","20":"/agentkit-sdk-python/en/content/1.introduction/2.installation.html#next-steps","21":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#quick-start","22":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#preparation","23":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#_1-obtain-volcengine-access-keys-ak-sk","24":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#_2-obtain-a-model-inference-api-key-optional","25":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#_3-local-debugging-credential-configuration-required-for-local-mode","26":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#getting-started","27":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#step-1-install-agentkit","28":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#step-2-initialize-a-project","29":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#step-3-configure-and-deploy","30":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#use-the-agent","31":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#invoke-the-agent","32":"/agentkit-sdk-python/en/content/1.introduction/3.quickstart.html#next-steps","33":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#troubleshooting-guide","34":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#installation-issues","35":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_1-agentkit-command-not-found","36":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_2-dependency-conflicts","37":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#configuration-issues","38":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_1-environment-variables-not-taking-effect","39":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_2-configuration-file-format-error","40":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#deployment-issues","41":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_1-cr-creation-failed","42":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_2-image-build-failed","43":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_3-runtime-deployment-timeout","44":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_4-runtime-status-abnormal","45":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#invocation-issues","46":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_1-invoke-failed","47":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_2-model-invocation-failed","48":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#permission-issues","49":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_1-ak-sk-authentication-failed","50":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#_2-resource-access-denied","51":"/agentkit-sdk-python/en/content/1.introduction/4.troubleshooting.html#getting-help","52":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#agentkit-cli-overview","53":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#key-advantages","54":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#main-commands","55":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#core-commands","56":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#platform-service-commands","57":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#three-deployment-modes","58":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#_1-local-mode-local","59":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#_2-cloud-mode-cloud","60":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#_3-hybrid-mode-hybrid","61":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#configuration-file-agentkit-yaml","62":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#quick-start","63":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#explore-more-features","64":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#environment-requirements","65":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#✅-basic-requirements-all-modes","66":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#🐍-python-development-environment","67":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#🐹-golang-development-environment","68":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#🐳-local-development-local-hybrid-mode","69":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#☁️-cloud-deployment-cloud-hybrid-mode","70":"/agentkit-sdk-python/en/content/2.agentkit-cli/1.overview.html#next-steps","71":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#cli-command-reference","72":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#command-overview","73":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-init","74":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#modes","75":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#syntax","76":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#core-parameter","77":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#template-mode-options","78":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#wrapper-mode-options","79":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#common-options","80":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#examples","81":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#template-mode","82":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#wrapper-mode","83":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#output","84":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#template-mode-output","85":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#wrapper-mode-output-🆕","86":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#wrapper-mode-deep-dive-🆕","87":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#how-it-works","88":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#what-the-wrapper-does","89":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#requirements-for-the-agent-file","90":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#wrapper-type-comparison","91":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#when-to-use-which","92":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#project-structure-after-wrapping","93":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#faq","94":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-config","95":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage","96":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#three-configuration-modes","97":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🎯-interactive-mode-default-recommended-for-first-time-setup","98":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#⚡-non-interactive-mode-fast-updates-suitable-for-scripts-ci-cd","99":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🔀-hybrid-mode","100":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#main-parameters","101":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#general-configuration-parameters","102":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#environment-variable-configuration-important-⭐","103":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#cloud-hybrid-mode-parameters","104":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#runtime-resource-bindings-cloud-hybrid","105":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#runtime-network-configuration-cloud-hybrid","106":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#control-options","107":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#global-configuration-options-🆕","108":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#examples-1","109":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-1-first-time-configuration-interactive","110":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-2-quickly-update-a-single-field","111":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-3-complete-non-interactive-configuration","112":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-4-configuration-preview-dry-run","113":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-5-show-current-configuration","114":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-6-global-configuration-management-🆕","115":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-7-ci-cd-integration","116":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#interactive-input-for-environment-variables","117":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#configuration-validation","118":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#best-practices","119":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-build","120":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-1","121":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description","122":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#docker-build-customization-🛠","123":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#configuration-fields","124":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#complete-example","125":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#use-cases","126":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#dockerfile-auto-management","127":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#build-process","128":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🏠-local-mode-build-locally","129":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#☁️-cloud-mode-build-in-the-cloud","130":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#build-result","131":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#examples-2","132":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#custom-build-examples","133":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#notes","134":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-deploy","135":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-2","136":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description-1","137":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#deployment-process","138":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🏠-local-mode-local-deployment","139":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#☁️-cloud-mode-cloud-deployment","140":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-examples","141":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#after-deployment","142":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-launch","143":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-3","144":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description-2","145":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#execution-flow","146":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-examples-1","147":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#why-use-launch","148":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-invoke","149":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-4","150":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description-3","151":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-examples-2","152":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-1-send-message-directly-simplest","153":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-2-custom-request-content","154":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-3-with-headers","155":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#example-4-cloud-deployment-with-api-key","156":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#execution-output","157":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#notes-1","158":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-status","159":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-5","160":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description-4","161":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#output-example","162":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🏠-local-mode","163":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#☁️-cloud-mode","164":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#status-description","165":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-examples-3","166":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-destroy","167":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-6","168":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#parameter-description-5","169":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#safety-confirmation","170":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#what-will-be-deleted","171":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🏠-local-mode-1","172":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#☁️-cloud-mode-1","173":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#execution-output-1","174":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#usage-examples-4","175":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#important-notes","176":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#common-options-1","177":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#help-view-help","178":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#version-view-version","179":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#platform-service-commands","180":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-memory","181":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-knowledge","182":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-tools","183":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#agentkit-runtime","184":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#common-workflows","185":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#📝-complete-development-workflow-template-mode","186":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🔄-quick-deploy-existing-agent-wrapper-mode-🆕","187":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🔄-quick-iteration-workflow","188":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#🌍-multi-environment-management","189":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#faq-1","190":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#❌-configuration-file-not-found","191":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#❌-docker-not-running-local-mode","192":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#❌-cloud-credentials-not-configured-cloud-mode","193":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#❌-build-failed","194":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#💡-debugging-tips","195":"/agentkit-sdk-python/en/content/2.agentkit-cli/2.commands.html#next-steps","196":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#configuration-file-reference","197":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#configuration-system-overview","198":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#file-structure","199":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#common","200":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example","201":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#fields","202":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#agent-name-required","203":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#entry-point-required","204":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#description-optional","205":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#language-optional","206":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#language-version-optional","207":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#dependencies-file-optional","208":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#launch-type-required","209":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cloud-provider-optional","210":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-envs-optional","211":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#local-launch-type","212":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example-1","213":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#fields-1","214":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#image-tag","215":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#invoke-port","216":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#container-name","217":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-envs","218":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#ports","219":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#volumes","220":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#restart-policy","221":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#memory-limit-cpu-limit","222":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#auto-managed-fields","223":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cloud-launch-type","224":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example-2","225":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#template-variables","226":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#the-auto-keyword","227":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#fields-2","228":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#region","229":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#image-tag-1","230":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#tos-bucket","231":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cr-instance-name","232":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cr-namespace-name","233":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cr-repo-name","234":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-name-runtime-role-name-runtime-apikey-name","235":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-envs-1","236":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#build-timeout","237":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#auto-managed-fields-1","238":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#hybrid-launch-type","239":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example-3","240":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#differences-from-cloud-mode","241":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#fields-3","242":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#region-1","243":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#image-tag-2","244":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cr-instance-name-cr-namespace-name-cr-repo-name","245":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-name-runtime-role-name-runtime-apikey-name-1","246":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#runtime-envs-2","247":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#auto-managed-fields-2","248":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#docker-build","249":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example-4","250":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#fields-4","251":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#base-image","252":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#build-script","253":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#regenerate-dockerfile","254":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#platform","255":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#global-configuration","256":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#location","257":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#example-5","258":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#precedence","259":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#typical-use-cases","260":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#best-practices","261":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#🌍-multi-environment-management","262":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#🔐-secure-handling-of-secrets","263":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#📝-add-helpful-comments","264":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#✅-validate-configuration-regularly","265":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#full-examples","266":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#📱-local-development-config-python","267":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#golang-project-config","268":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#production-config","269":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#🎯-minimal-configuration-examples","270":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#faq","271":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-configuration-file-not-found","272":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-invalid-yaml-format","273":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-missing-required-fields","274":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-template-variables-failed-to-render","275":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-environment-variables-not-taking-effect","276":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#❓-legacy-field-names-are-incompatible","277":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#configuration-field-quick-reference","278":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#common-fields","279":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#cloud-hybrid-fields","280":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#docker-build-fields","281":"/agentkit-sdk-python/en/content/2.agentkit-cli/3.configurations.html#next-steps","282":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#logging-system","283":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#default-behavior","284":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#quick-start","285":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#enable-file-logging","286":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#enable-console-logging","287":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#enable-both-console-and-file-logging","288":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#debug-mode","289":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#environment-variable-configuration","290":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#basic-configuration","291":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#advanced-configuration","292":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#log-levels","293":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#common-scenarios","294":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-1-normal-use-default-configuration","295":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-1-1-need-to-save-log-records","296":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-2-debugging-issues","297":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-3-ci-cd-environment","298":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-4-production-environment","299":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#scenario-5-fully-silent","300":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#log-file-management","301":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#log-file-location","302":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#automatic-cleanup-of-old-logs","303":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#custom-log-path","304":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#configuration-precedence","305":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#troubleshooting","306":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#no-log-file-created","307":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#no-console-log-output","308":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#too-many-or-too-few-logs","309":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#best-practices","310":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#recommended-development-configuration","311":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#team-collaboration","312":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#production-deployment-recommendations","313":"/agentkit-sdk-python/en/content/2.agentkit-cli/4.logging.html#summary","314":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkit-sdk-overview","315":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#core-architecture","316":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_1-runtime-application-framework","317":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitsimpleapp","318":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitmcpapp","319":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkita2aapp","320":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_2-platform-service-clients","321":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitmemory","322":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitknowledge","323":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitmcp","324":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#agentkitruntime","325":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_3-infrastructure-modules","326":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#baseagentkitclient","327":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#context-management","328":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#module-dependencies","329":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#key-features","330":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_1-decorator-driven","331":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_2-framework-agnostic","332":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_3-automated-observability","333":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_4-production-ready","334":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#_5-type-safety","335":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#quick-start","336":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#installation","337":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#create-a-simple-agent","338":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#use-platform-services","339":"/agentkit-sdk-python/en/content/3.agentkit-sdk/1.overview.html#next-steps","340":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#annotation-usage-guide","341":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#simple-agent-annotations","342":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-entrypoint","343":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature","344":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#parameter-description","345":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#complete-example","346":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes","347":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#error-handling-example","348":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-ping","349":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature-1","350":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#parameter-description-1","351":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#basic-example","352":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#advanced-example-including-dependency-checks","353":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes-1","354":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#available-endpoints","355":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-async-task-planned","356":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#mcp-agent-annotations","357":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-tool","358":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature-2","359":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#parameter-description-2","360":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#basic-example-1","361":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#async-tool-example","362":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes-2","363":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#complex-parameter-example","364":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-agent-as-a-tool","365":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature-3","366":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#usage-example","367":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#multi-agent-collaboration-example","368":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes-3","369":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#a2a-agent-annotations","370":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-agent-executor","371":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature-4","372":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#parameter-description-3","373":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#basic-example-2","374":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#custom-executor-example","375":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes-4","376":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#app-task-store","377":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#function-signature-5","378":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#using-default-storage","379":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#custom-task-storage-example","380":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#notes-5","381":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#best-practices","382":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#_1-error-handling","383":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#_2-logging","384":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#_3-type-annotations","385":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#_4-docstrings","386":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#_5-performance-optimization","387":"/agentkit-sdk-python/en/content/3.agentkit-sdk/2.annotation.html#next-steps","388":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#agentkit-runtime-from-local-development-to-cloud-deployment","389":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#what-does-agentkit-runtime-solve-for-you","390":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#core-advantages","391":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_1-serverless-architecture-simplified-operations-optimized-costs","392":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_2-enterprise-grade-security-isolation","393":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_3-framework-agnostic-quick-integration","394":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#three-step-guide-from-local-development-to-cloud-deployment","395":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#prerequisites","396":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#step-1-environment-configuration","397":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#step-2-create-and-debug-agent-locally","398":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_1-initialize-agent-project","399":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_2-agent-code-overview","400":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_3-configure-environment-variables","401":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#_4-start-and-invoke-service-locally","402":"/agentkit-sdk-python/en/content/4.runtime/1.runtime_quickstart.html#step-3-deploy-to-production-environment","403":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#agentkit-built-in-tools-quick-start-guide","404":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#core-capabilities","405":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#prerequisites-creating-a-sandbox-tool","406":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#agent-code-example","407":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#complete-code","408":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#code-explanation","409":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#local-debugging","410":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#_1-install-veadk-from-official-source","411":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#_2-configure-environment-variables","412":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#_3-start-the-agent-service-locally","413":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#_4-invoke-the-agent","414":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#tool-instance-invocation-mechanism","415":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#invocation-example","416":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#execution-log-example","417":"/agentkit-sdk-python/en/content/5.tools/1.sandbox_quickstart.html#deploying-to-production","418":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#agentkit-memory-quick-start-guide","419":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#usage-examples","420":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#creating-a-memory-store","421":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#obtaining-memory-resource-connection-information","422":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#building-an-agent-with-long-term-memory","423":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#environment-configuration","424":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#starting-the-service","425":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#how-to-invoke","426":"/agentkit-sdk-python/en/content/6.memory/1.memory_quickstart.html#verifying-memory-store-functionality","427":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#agentkit-knowledge-quickstart-guide","428":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#usage-example","429":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#creating-a-knowledge-base","430":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#importing-the-knowledge-base","431":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#obtaining-connection-information-for-memory-resources","432":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#building-an-agent-with-knowledge-base-capabilities","433":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#environment-configuration","434":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#starting-the-service","435":"/agentkit-sdk-python/en/content/7.knowledge/1.knowledge_quickstart.html#how-to-initiate-a-call","436":"/agentkit-sdk-python/en/content/8.mcp/1.overview.html#agentkit-mcp","437":"/agentkit-sdk-python/en/content/8.mcp/1.overview.html#agentkit-mcp-features","438":"/agentkit-sdk-python/en/content/8.mcp/1.overview.html#mcp-services","439":"/agentkit-sdk-python/en/content/8.mcp/1.overview.html#mcp-toolsets","440":"/agentkit-sdk-python/en/content/8.mcp/1.overview.html#authentication-security","441":"/agentkit-sdk-python/en/content/8.mcp/2.mcp_quickstart.html#agentkit-mcp-quick-start","442":"/agentkit-sdk-python/en/content/8.mcp/2.mcp_quickstart.html#prerequisites","443":"/agentkit-sdk-python/en/content/8.mcp/2.mcp_quickstart.html#step-1-configure-local-environment","444":"/agentkit-sdk-python/en/content/8.mcp/2.mcp_quickstart.html#step-2-create-agentkit-mcp","445":"/agentkit-sdk-python/en/content/8.mcp/2.mcp_quickstart.html#step-3-set-environment-variables-and-run-agent"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[1,1,1],"1":[2,1,42],"2":[2,1,116],"3":[2,1,80],"4":[2,1,62],"5":[2,1,21],"6":[2,1,14],"7":[2,2,30],"8":[2,2,1],"9":[5,4,1],"10":[2,8,10],"11":[2,8,13],"12":[4,8,12],"13":[7,4,46],"14":[5,4,6],"15":[6,8,51],"16":[2,2,23],"17":[2,2,18],"18":[4,4,41],"19":[6,4,47],"20":[2,2,36],"21":[2,1,41],"22":[1,2,1],"23":[8,3,47],"24":[9,3,96],"25":[9,3,107],"26":[2,2,1],"27":[4,4,20],"28":[5,4,70],"29":[5,4,200],"30":[3,2,1],"31":[3,5,85],"32":[2,2,41],"33":[2,1,31],"34":[2,2,1],"35":[5,4,78],"36":[3,4,64],"37":[2,2,1],"38":[6,4,51],"39":[5,4,31],"40":[2,2,1],"41":[4,4,35],"42":[4,4,58],"43":[4,4,48],"44":[4,4,43],"45":[2,2,1],"46":[3,4,36],"47":[4,4,38],"48":[2,2,1],"49":[5,4,38],"50":[4,4,33],"51":[2,2,49],"52":[3,1,43],"53":[2,3,79],"54":[2,3,15],"55":[2,5,63],"56":[3,5,27],"57":[3,3,21],"58":[5,6,32],"59":[5,6,39],"60":[5,6,45],"61":[5,3,72],"62":[2,3,67],"63":[3,5,18],"64":[2,3,1],"65":[6,5,12],"66":[4,5,15],"67":[4,5,15],"68":[6,5,12],"69":[6,5,40],"70":[2,3,37],"71":[3,1,61],"72":[2,3,116],"73":[2,3,25],"74":[1,5,30],"75":[1,5,26],"76":[2,5,41],"77":[3,5,68],"78":[3,5,47],"79":[2,5,13],"80":[1,5,1],"81":[2,6,62],"82":[2,6,98],"83":[1,5,1],"84":[3,6,96],"85":[4,6,67],"86":[5,5,24],"87":[3,10,35],"88":[4,10,39],"89":[5,10,74],"90":[3,10,52],"91":[4,10,51],"92":[4,10,80],"93":[1,10,81],"94":[2,3,37],"95":[1,5,18],"96":[3,5,1],"97":[10,8,72],"98":[12,8,44],"99":[3,8,18],"100":[2,5,1],"101":[3,7,44],"102":[6,7,73],"103":[4,7,39],"104":[6,7,80],"105":[6,7,102],"106":[2,5,27],"107":[4,5,71],"108":[1,5,1],"109":[7,6,3],"110":[7,6,23],"111":[6,6,31],"112":[7,6,39],"113":[5,6,4],"114":[6,6,95],"115":[5,6,36],"116":[5,5,47],"117":[2,5,47],"118":[2,5,96],"119":[2,3,13],"120":[1,5,4],"121":[2,5,41],"122":[4,5,17],"123":[2,8,42],"124":[2,8,61],"125":[2,8,53],"126":[3,8,68],"127":[2,5,11],"128":[6,7,28],"129":[8,7,44],"130":[2,5,19],"131":[1,5,24],"132":[3,6,61],"133":[1,5,78],"134":[2,3,11],"135":[1,5,4],"136":[2,5,11],"137":[2,5,11],"138":[5,7,39],"139":[5,7,43],"140":[2,5,16],"141":[2,5,26],"142":[2,3,14],"143":[1,5,4],"144":[2,5,11],"145":[2,5,26],"146":[2,5,17],"147":[3,5,28],"148":[2,3,10],"149":[1,5,19],"150":[2,5,128],"151":[2,5,1],"152":[7,7,17],"153":[5,7,9],"154":[4,7,13],"155":[8,7,9],"156":[2,5,31],"157":[1,5,25],"158":[2,3,16],"159":[1,5,4],"160":[2,5,11],"161":[2,5,1],"162":[3,7,28],"163":[3,7,40],"164":[2,5,29],"165":[2,5,15],"166":[2,3,14],"167":[1,5,4],"168":[2,5,27],"169":[2,5,32],"170":[4,5,1],"171":[3,9,15],"172":[3,9,18],"173":[2,5,27],"174":[2,5,20],"175":[2,5,31],"176":[2,3,6],"177":[4,5,20],"178":[4,5,9],"179":[3,3,17],"180":[2,6,56],"181":[2,6,52],"182":[2,6,56],"183":[2,6,98],"184":[2,3,1],"185":[7,5,39],"186":[8,5,44],"187":[4,5,33],"188":[4,5,19],"189":[1,3,11],"190":[5,4,24],"191":[7,4,19],"192":[7,4,38],"193":[3,4,35],"194":[3,4,48],"195":[2,3,23],"196":[3,1,23],"197":[3,3,36],"198":[2,3,61],"199":[1,3,8],"200":[1,4,46],"201":[1,4,1],"202":[4,5,45],"203":[4,5,46],"204":[3,5,37],"205":[3,5,29],"206":[4,5,34],"207":[4,5,34],"208":[4,5,42],"209":[4,5,87],"210":[4,5,44],"211":[3,3,11],"212":[1,6,44],"213":[1,6,1],"214":[2,7,15],"215":[2,7,20],"216":[2,7,18],"217":[2,7,46],"218":[1,7,17],"219":[1,7,18],"220":[2,7,16],"221":[3,7,27],"222":[3,6,43],"223":[3,3,9],"224":[1,6,55],"225":[2,6,40],"226":[3,6,35],"227":[1,6,1],"228":[1,7,29],"229":[2,7,33],"230":[2,7,53],"231":[3,7,23],"232":[3,7,16],"233":[3,7,19],"234":[4,7,25],"235":[2,7,72],"236":[2,7,14],"237":[3,6,68],"238":[3,3,24],"239":[1,6,44],"240":[4,6,33],"241":[1,6,24],"242":[1,7,15],"243":[2,7,14],"244":[5,7,31],"245":[4,7,14],"246":[2,7,15],"247":[3,6,48],"248":[2,3,13],"249":[1,5,45],"250":[1,5,1],"251":[2,6,65],"252":[2,6,36],"253":[2,6,15],"254":[1,6,24],"255":[2,3,14],"256":[1,5,5],"257":[1,5,29],"258":[1,5,31],"259":[3,5,39],"260":[2,3,1],"261":[4,5,24],"262":[5,5,64],"263":[4,5,43],"264":[4,5,25],"265":[2,3,1],"266":[6,5,60],"267":[3,5,53],"268":[2,5,84],"269":[4,5,28],"270":[1,3,1],"271":[5,4,18],"272":[4,4,30],"273":[4,4,13],"274":[6,4,39],"275":[6,4,48],"276":[6,4,41],"277":[4,3,1],"278":[2,6,39],"279":[3,6,31],"280":[3,6,21],"281":[2,3,24],"282":[2,1,23],"283":[2,2,65],"284":[2,2,1],"285":[3,4,34],"286":[3,4,27],"287":[6,4,19],"288":[2,4,35],"289":[3,2,10],"290":[2,5,44],"291":[2,5,41],"292":[2,2,51],"293":[2,2,1],"294":[7,4,31],"295":[7,4,34],"296":[4,4,43],"297":[5,4,53],"298":[4,4,37],"299":[4,4,47],"300":[3,2,1],"301":[3,5,37],"302":[5,5,32],"303":[3,5,24],"304":[2,2,44],"305":[1,2,1],"306":[4,3,48],"307":[4,3,38],"308":[5,3,21],"309":[2,2,1],"310":[3,4,51],"311":[2,4,69],"312":[3,4,39],"313":[1,2,94],"314":[3,1,35],"315":[2,3,13],"316":[4,5,16],"317":[1,9,39],"318":[1,9,29],"319":[1,9,31],"320":[4,5,13],"321":[1,9,60],"322":[1,9,40],"323":[1,9,25],"324":[1,9,21],"325":[3,5,1],"326":[1,8,25],"327":[2,8,18],"328":[2,3,28],"329":[2,3,1],"330":[3,5,34],"331":[3,5,21],"332":[3,5,10],"333":[3,5,15],"334":[3,5,13],"335":[2,3,1],"336":[1,5,6],"337":[4,5,49],"338":[3,5,35],"339":[2,3,25],"340":[3,1,26],"341":[3,3,14],"342":[3,6,13],"343":[2,8,13],"344":[2,8,31],"345":[2,8,55],"346":[1,8,32],"347":[3,8,38],"348":[3,6,12],"349":[2,8,8],"350":[2,8,21],"351":[2,8,11],"352":[5,8,53],"353":[1,8,34],"354":[2,8,20],"355":[5,6,39],"356":[3,3,16],"357":[3,6,11],"358":[2,8,13],"359":[2,8,26],"360":[2,8,53],"361":[3,8,38],"362":[1,8,53],"363":[3,8,48],"364":[6,6,13],"365":[2,11,13],"366":[2,11,57],"367":[4,11,40],"368":[1,11,30],"369":[3,3,15],"370":[4,6,10],"371":[2,9,11],"372":[2,9,8],"373":[2,9,52],"374":[3,9,64],"375":[1,9,29],"376":[4,6,8],"377":[2,9,10],"378":[3,9,24],"379":[4,9,49],"380":[1,9,34],"381":[2,3,1],"382":[3,5,49],"383":[2,5,44],"384":[3,5,29],"385":[2,5,65],"386":[3,5,42],"387":[2,3,20],"388":[8,1,31],"389":[8,8,90],"390":[2,8,1],"391":[7,10,92],"392":[5,10,46],"393":[5,10,57],"394":[9,8,24],"395":[1,11,30],"396":[4,11,62],"397":[7,11,1],"398":[4,17,44],"399":[4,17,253],"400":[4,17,30],"401":[6,17,126],"402":[6,11,73],"403":[7,1,32],"404":[2,7,59],"405":[5,7,31],"406":[3,7,64],"407":[2,10,53],"408":[2,10,41],"409":[2,7,1],"410":[6,9,32],"411":[4,9,50],"412":[6,9,35],"413":[4,9,1],"414":[4,13,64],"415":[2,13,54],"416":[3,13,175],"417":[3,7,98],"418":[5,1,54],"419":[2,1,30],"420":[4,2,15],"421":[5,6,62],"422":[7,2,202],"423":[2,2,52],"424":[3,2,16],"425":[3,2,22],"426":[4,2,57],"427":[4,1,34],"428":[2,1,19],"429":[4,2,186],"430":[4,2,15],"431":[6,6,33],"432":[7,2,184],"433":[2,2,23],"434":[3,2,17],"435":[5,2,31],"436":[2,1,74],"437":[3,2,8],"438":[2,3,76],"439":[2,3,67],"440":[3,3,61],"441":[4,1,1],"442":[1,4,54],"443":[5,4,53],"444":[5,4,48],"445":[8,4,402]},"averageFieldLength":[3.154708520179371,5.304932735426008,36.60762331838562],"storedFields":{"0":{"title":"AgentKit","titles":[]},"1":{"title":"Product Positioning","titles":["AgentKit"]},"2":{"title":"Key Advantages","titles":["AgentKit"]},"3":{"title":"Architecture Concept","titles":["AgentKit"]},"4":{"title":"Applicable Scenarios","titles":["AgentKit"]},"5":{"title":"Get Started","titles":["AgentKit"]},"6":{"title":"Install AgentKit","titles":[]},"7":{"title":"Environment Requirements","titles":["Install AgentKit"]},"8":{"title":"Installation Methods","titles":["Install AgentKit"]},"9":{"title":"Method 1: Install with pip","titles":["Install AgentKit","Installation Methods"]},"10":{"title":"Stable Version","titles":["Install AgentKit","Installation Methods","Method 1: Install with pip"]},"11":{"title":"Development Version","titles":["Install AgentKit","Installation Methods","Method 1: Install with pip"]},"12":{"title":"Install a Specific Version","titles":["Install AgentKit","Installation Methods","Method 1: Install with pip"]},"13":{"title":"Method 2: Install with uv (Recommended)","titles":["Install AgentKit","Installation Methods"]},"14":{"title":"Method 3: Install from Source","titles":["Install AgentKit","Installation Methods"]},"15":{"title":"Install from the official Github repository","titles":["Install AgentKit","Installation Methods","Method 3: Install from Source"]},"16":{"title":"Verify Installation","titles":["Install AgentKit"]},"17":{"title":"Authentication Configuration","titles":["Install AgentKit"]},"18":{"title":"Recommended: Use global configuration","titles":["Install AgentKit","Authentication Configuration"]},"19":{"title":"Environment variables (for development debugging)","titles":["Install AgentKit","Authentication Configuration"]},"20":{"title":"Next Steps","titles":["Install AgentKit"]},"21":{"title":"Quick Start","titles":[]},"22":{"title":"Preparation","titles":["Quick Start"]},"23":{"title":"1. Obtain Volcengine access keys (AK/SK)","titles":["Quick Start","Preparation"]},"24":{"title":"2. Obtain a model inference API Key (Optional)","titles":["Quick Start","Preparation"]},"25":{"title":"3. Local debugging credential configuration (Required for Local mode)","titles":["Quick Start","Preparation"]},"26":{"title":"Getting Started","titles":["Quick Start"]},"27":{"title":"Step 1: Install AgentKit","titles":["Quick Start","Getting Started"]},"28":{"title":"Step 2: Initialize a project","titles":["Quick Start","Getting Started"]},"29":{"title":"Step 3: Configure and deploy","titles":["Quick Start","Getting Started"]},"30":{"title":"Use the Agent","titles":["Quick Start"]},"31":{"title":"Invoke the Agent","titles":["Quick Start","Use the Agent"]},"32":{"title":"Next Steps","titles":["Quick Start"]},"33":{"title":"Troubleshooting Guide","titles":[]},"34":{"title":"Installation Issues","titles":["Troubleshooting Guide"]},"35":{"title":"1. agentkit command not found","titles":["Troubleshooting Guide","Installation Issues"]},"36":{"title":"2. Dependency conflicts","titles":["Troubleshooting Guide","Installation Issues"]},"37":{"title":"Configuration Issues","titles":["Troubleshooting Guide"]},"38":{"title":"1. Environment variables not taking effect","titles":["Troubleshooting Guide","Configuration Issues"]},"39":{"title":"2. Configuration file format error","titles":["Troubleshooting Guide","Configuration Issues"]},"40":{"title":"Deployment Issues","titles":["Troubleshooting Guide"]},"41":{"title":"1. CR creation failed","titles":["Troubleshooting Guide","Deployment Issues"]},"42":{"title":"2. Image build failed","titles":["Troubleshooting Guide","Deployment Issues"]},"43":{"title":"3. Runtime deployment timeout","titles":["Troubleshooting Guide","Deployment Issues"]},"44":{"title":"4. Runtime status abnormal","titles":["Troubleshooting Guide","Deployment Issues"]},"45":{"title":"Invocation Issues","titles":["Troubleshooting Guide"]},"46":{"title":"1. invoke failed","titles":["Troubleshooting Guide","Invocation Issues"]},"47":{"title":"2. Model invocation failed","titles":["Troubleshooting Guide","Invocation Issues"]},"48":{"title":"Permission Issues","titles":["Troubleshooting Guide"]},"49":{"title":"1. AK/SK authentication failed","titles":["Troubleshooting Guide","Permission Issues"]},"50":{"title":"2. Resource access denied","titles":["Troubleshooting Guide","Permission Issues"]},"51":{"title":"Getting Help","titles":["Troubleshooting Guide"]},"52":{"title":"AgentKit CLI Overview","titles":[]},"53":{"title":"Key Advantages","titles":["AgentKit CLI Overview"]},"54":{"title":"Main Commands","titles":["AgentKit CLI Overview"]},"55":{"title":"Core Commands","titles":["AgentKit CLI Overview","Main Commands"]},"56":{"title":"Platform Service Commands","titles":["AgentKit CLI Overview","Main Commands"]},"57":{"title":"Three Deployment Modes","titles":["AgentKit CLI Overview"]},"58":{"title":"1. Local Mode (local)","titles":["AgentKit CLI Overview","Three Deployment Modes"]},"59":{"title":"2. Cloud Mode (cloud)","titles":["AgentKit CLI Overview","Three Deployment Modes"]},"60":{"title":"3. Hybrid Mode (hybrid)","titles":["AgentKit CLI Overview","Three Deployment Modes"]},"61":{"title":"Configuration File (agentkit.yaml)","titles":["AgentKit CLI Overview"]},"62":{"title":"Quick Start","titles":["AgentKit CLI Overview"]},"63":{"title":"Explore More Features","titles":["AgentKit CLI Overview","Quick Start"]},"64":{"title":"Environment Requirements","titles":["AgentKit CLI Overview"]},"65":{"title":"✅ Basic Requirements (All Modes)","titles":["AgentKit CLI Overview","Environment Requirements"]},"66":{"title":"🐍 Python Development Environment","titles":["AgentKit CLI Overview","Environment Requirements"]},"67":{"title":"🐹 Golang Development Environment","titles":["AgentKit CLI Overview","Environment Requirements"]},"68":{"title":"🐳 Local Development (Local/Hybrid Mode)","titles":["AgentKit CLI Overview","Environment Requirements"]},"69":{"title":"☁️ Cloud Deployment (Cloud/Hybrid Mode)","titles":["AgentKit CLI Overview","Environment Requirements"]},"70":{"title":"Next Steps","titles":["AgentKit CLI Overview"]},"71":{"title":"CLI Command Reference","titles":[]},"72":{"title":"Command Overview","titles":["CLI Command Reference"]},"73":{"title":"agentkit init","titles":["CLI Command Reference"]},"74":{"title":"Modes","titles":["CLI Command Reference","agentkit init"]},"75":{"title":"Syntax","titles":["CLI Command Reference","agentkit init"]},"76":{"title":"Core Parameter","titles":["CLI Command Reference","agentkit init"]},"77":{"title":"Template Mode Options","titles":["CLI Command Reference","agentkit init"]},"78":{"title":"Wrapper Mode Options","titles":["CLI Command Reference","agentkit init"]},"79":{"title":"Common Options","titles":["CLI Command Reference","agentkit init"]},"80":{"title":"Examples","titles":["CLI Command Reference","agentkit init"]},"81":{"title":"Template Mode","titles":["CLI Command Reference","agentkit init","Examples"]},"82":{"title":"Wrapper Mode","titles":["CLI Command Reference","agentkit init","Examples"]},"83":{"title":"Output","titles":["CLI Command Reference","agentkit init"]},"84":{"title":"Template mode output","titles":["CLI Command Reference","agentkit init","Output"]},"85":{"title":"Wrapper mode output 🆕","titles":["CLI Command Reference","agentkit init","Output"]},"86":{"title":"Wrapper mode deep dive 🆕","titles":["CLI Command Reference","agentkit init"]},"87":{"title":"How it works","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"88":{"title":"What the wrapper does","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"89":{"title":"Requirements for the Agent file","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"90":{"title":"Wrapper type comparison","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"91":{"title":"When to use which","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"92":{"title":"Project structure after wrapping","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"93":{"title":"FAQ","titles":["CLI Command Reference","agentkit init","Wrapper mode deep dive 🆕"]},"94":{"title":"agentkit config","titles":["CLI Command Reference"]},"95":{"title":"Usage","titles":["CLI Command Reference","agentkit config"]},"96":{"title":"Three configuration modes","titles":["CLI Command Reference","agentkit config"]},"97":{"title":"🎯 Interactive mode (default; recommended for first-time setup)","titles":["CLI Command Reference","agentkit config","Three configuration modes"]},"98":{"title":"⚡ Non-interactive mode (fast updates; suitable for scripts/CI/CD)","titles":["CLI Command Reference","agentkit config","Three configuration modes"]},"99":{"title":"🔀 Hybrid mode","titles":["CLI Command Reference","agentkit config","Three configuration modes"]},"100":{"title":"Main parameters","titles":["CLI Command Reference","agentkit config"]},"101":{"title":"General configuration parameters","titles":["CLI Command Reference","agentkit config","Main parameters"]},"102":{"title":"Environment variable configuration (important ⭐)","titles":["CLI Command Reference","agentkit config","Main parameters"]},"103":{"title":"Cloud/Hybrid mode parameters","titles":["CLI Command Reference","agentkit config","Main parameters"]},"104":{"title":"Runtime resource bindings (Cloud/Hybrid)","titles":["CLI Command Reference","agentkit config","Main parameters"]},"105":{"title":"Runtime network configuration (Cloud/Hybrid)","titles":["CLI Command Reference","agentkit config","Main parameters"]},"106":{"title":"Control options","titles":["CLI Command Reference","agentkit config"]},"107":{"title":"Global configuration options 🆕","titles":["CLI Command Reference","agentkit config"]},"108":{"title":"Examples","titles":["CLI Command Reference","agentkit config"]},"109":{"title":"Example 1: first-time configuration (interactive)","titles":["CLI Command Reference","agentkit config","Examples"]},"110":{"title":"Example 2: quickly update a single field","titles":["CLI Command Reference","agentkit config","Examples"]},"111":{"title":"Example 3: complete non-interactive configuration","titles":["CLI Command Reference","agentkit config","Examples"]},"112":{"title":"Example 4: configuration preview (dry run)","titles":["CLI Command Reference","agentkit config","Examples"]},"113":{"title":"Example 5: show current configuration","titles":["CLI Command Reference","agentkit config","Examples"]},"114":{"title":"Example 6: global configuration management 🆕","titles":["CLI Command Reference","agentkit config","Examples"]},"115":{"title":"Example 7: CI/CD integration","titles":["CLI Command Reference","agentkit config","Examples"]},"116":{"title":"Interactive input for environment variables","titles":["CLI Command Reference","agentkit config"]},"117":{"title":"Configuration validation","titles":["CLI Command Reference","agentkit config"]},"118":{"title":"Best practices","titles":["CLI Command Reference","agentkit config"]},"119":{"title":"agentkit build","titles":["CLI Command Reference"]},"120":{"title":"Usage","titles":["CLI Command Reference","agentkit build"]},"121":{"title":"Parameter description","titles":["CLI Command Reference","agentkit build"]},"122":{"title":"Docker build customization 🛠","titles":["CLI Command Reference","agentkit build"]},"123":{"title":"Configuration fields","titles":["CLI Command Reference","agentkit build","Docker build customization 🛠"]},"124":{"title":"Complete example","titles":["CLI Command Reference","agentkit build","Docker build customization 🛠"]},"125":{"title":"Use cases","titles":["CLI Command Reference","agentkit build","Docker build customization 🛠"]},"126":{"title":"Dockerfile auto-management","titles":["CLI Command Reference","agentkit build","Docker build customization 🛠"]},"127":{"title":"Build process","titles":["CLI Command Reference","agentkit build"]},"128":{"title":"🏠 Local mode (build locally)","titles":["CLI Command Reference","agentkit build","Build process"]},"129":{"title":"☁️ Cloud mode (build in the cloud)","titles":["CLI Command Reference","agentkit build","Build process"]},"130":{"title":"Build result","titles":["CLI Command Reference","agentkit build"]},"131":{"title":"Examples","titles":["CLI Command Reference","agentkit build"]},"132":{"title":"Custom build examples","titles":["CLI Command Reference","agentkit build","Examples"]},"133":{"title":"Notes","titles":["CLI Command Reference","agentkit build"]},"134":{"title":"agentkit deploy","titles":["CLI Command Reference"]},"135":{"title":"Usage","titles":["CLI Command Reference","agentkit deploy"]},"136":{"title":"Parameter Description","titles":["CLI Command Reference","agentkit deploy"]},"137":{"title":"Deployment Process","titles":["CLI Command Reference","agentkit deploy"]},"138":{"title":"🏠 Local Mode (Local Deployment)","titles":["CLI Command Reference","agentkit deploy","Deployment Process"]},"139":{"title":"☁️ Cloud Mode (Cloud Deployment)","titles":["CLI Command Reference","agentkit deploy","Deployment Process"]},"140":{"title":"Usage Examples","titles":["CLI Command Reference","agentkit deploy"]},"141":{"title":"After Deployment","titles":["CLI Command Reference","agentkit deploy"]},"142":{"title":"agentkit launch","titles":["CLI Command Reference"]},"143":{"title":"Usage","titles":["CLI Command Reference","agentkit launch"]},"144":{"title":"Parameter Description","titles":["CLI Command Reference","agentkit launch"]},"145":{"title":"Execution Flow","titles":["CLI Command Reference","agentkit launch"]},"146":{"title":"Usage Examples","titles":["CLI Command Reference","agentkit launch"]},"147":{"title":"Why Use launch","titles":["CLI Command Reference","agentkit launch"]},"148":{"title":"agentkit invoke","titles":["CLI Command Reference"]},"149":{"title":"Usage","titles":["CLI Command Reference","agentkit invoke"]},"150":{"title":"Parameter Description","titles":["CLI Command Reference","agentkit invoke"]},"151":{"title":"Usage Examples","titles":["CLI Command Reference","agentkit invoke"]},"152":{"title":"Example 1: Send message directly (simplest)","titles":["CLI Command Reference","agentkit invoke","Usage Examples"]},"153":{"title":"Example 2: Custom request content","titles":["CLI Command Reference","agentkit invoke","Usage Examples"]},"154":{"title":"Example 3: With headers","titles":["CLI Command Reference","agentkit invoke","Usage Examples"]},"155":{"title":"Example 4: Cloud deployment (with API Key)","titles":["CLI Command Reference","agentkit invoke","Usage Examples"]},"156":{"title":"Execution Output","titles":["CLI Command Reference","agentkit invoke"]},"157":{"title":"Notes","titles":["CLI Command Reference","agentkit invoke"]},"158":{"title":"agentkit status","titles":["CLI Command Reference"]},"159":{"title":"Usage","titles":["CLI Command Reference","agentkit status"]},"160":{"title":"Parameter Description","titles":["CLI Command Reference","agentkit status"]},"161":{"title":"Output Example","titles":["CLI Command Reference","agentkit status"]},"162":{"title":"🏠 Local Mode","titles":["CLI Command Reference","agentkit status","Output Example"]},"163":{"title":"☁️ Cloud Mode","titles":["CLI Command Reference","agentkit status","Output Example"]},"164":{"title":"Status Description","titles":["CLI Command Reference","agentkit status"]},"165":{"title":"Usage Examples","titles":["CLI Command Reference","agentkit status"]},"166":{"title":"agentkit destroy","titles":["CLI Command Reference"]},"167":{"title":"Usage","titles":["CLI Command Reference","agentkit destroy"]},"168":{"title":"Parameter Description","titles":["CLI Command Reference","agentkit destroy"]},"169":{"title":"Safety Confirmation","titles":["CLI Command Reference","agentkit destroy"]},"170":{"title":"What Will Be Deleted","titles":["CLI Command Reference","agentkit destroy"]},"171":{"title":"🏠 Local Mode","titles":["CLI Command Reference","agentkit destroy","What Will Be Deleted"]},"172":{"title":"☁️ Cloud Mode","titles":["CLI Command Reference","agentkit destroy","What Will Be Deleted"]},"173":{"title":"Execution Output","titles":["CLI Command Reference","agentkit destroy"]},"174":{"title":"Usage Examples","titles":["CLI Command Reference","agentkit destroy"]},"175":{"title":"Important Notes","titles":["CLI Command Reference","agentkit destroy"]},"176":{"title":"Common Options","titles":["CLI Command Reference"]},"177":{"title":"--help View Help","titles":["CLI Command Reference","Common Options"]},"178":{"title":"--version View Version","titles":["CLI Command Reference","Common Options"]},"179":{"title":"Platform Service Commands","titles":["CLI Command Reference"]},"180":{"title":"agentkit memory","titles":["CLI Command Reference","Platform Service Commands"]},"181":{"title":"agentkit knowledge","titles":["CLI Command Reference","Platform Service Commands"]},"182":{"title":"agentkit tools","titles":["CLI Command Reference","Platform Service Commands"]},"183":{"title":"agentkit runtime","titles":["CLI Command Reference","Platform Service Commands"]},"184":{"title":"Common Workflows","titles":["CLI Command Reference"]},"185":{"title":"📝 Complete Development Workflow (Template Mode)","titles":["CLI Command Reference","Common Workflows"]},"186":{"title":"🔄 Quick Deploy Existing Agent (Wrapper Mode) 🆕","titles":["CLI Command Reference","Common Workflows"]},"187":{"title":"🔄 Quick Iteration Workflow","titles":["CLI Command Reference","Common Workflows"]},"188":{"title":"🌍 Multi-Environment Management","titles":["CLI Command Reference","Common Workflows"]},"189":{"title":"FAQ","titles":["CLI Command Reference"]},"190":{"title":"❌ Configuration file not found","titles":["CLI Command Reference","FAQ"]},"191":{"title":"❌ Docker not running (Local Mode)","titles":["CLI Command Reference","FAQ"]},"192":{"title":"❌ Cloud credentials not configured (Cloud Mode)","titles":["CLI Command Reference","FAQ"]},"193":{"title":"❌ Build failed","titles":["CLI Command Reference","FAQ"]},"194":{"title":"💡 Debugging Tips","titles":["CLI Command Reference","FAQ"]},"195":{"title":"Next Steps","titles":["CLI Command Reference"]},"196":{"title":"Configuration File Reference","titles":[]},"197":{"title":"Configuration system overview","titles":["Configuration File Reference"]},"198":{"title":"File structure","titles":["Configuration File Reference"]},"199":{"title":"common","titles":["Configuration File Reference"]},"200":{"title":"Example","titles":["Configuration File Reference","common"]},"201":{"title":"Fields","titles":["Configuration File Reference","common"]},"202":{"title":"agent_name (required)","titles":["Configuration File Reference","common","Fields"]},"203":{"title":"entry_point (required)","titles":["Configuration File Reference","common","Fields"]},"204":{"title":"description (optional)","titles":["Configuration File Reference","common","Fields"]},"205":{"title":"language (optional)","titles":["Configuration File Reference","common","Fields"]},"206":{"title":"language_version (optional)","titles":["Configuration File Reference","common","Fields"]},"207":{"title":"dependencies_file (optional)","titles":["Configuration File Reference","common","Fields"]},"208":{"title":"launch_type (required)","titles":["Configuration File Reference","common","Fields"]},"209":{"title":"cloud_provider (optional)","titles":["Configuration File Reference","common","Fields"]},"210":{"title":"runtime_envs (optional)","titles":["Configuration File Reference","common","Fields"]},"211":{"title":"Local launch type","titles":["Configuration File Reference"]},"212":{"title":"Example","titles":["Configuration File Reference","Local launch type"]},"213":{"title":"Fields","titles":["Configuration File Reference","Local launch type"]},"214":{"title":"image_tag","titles":["Configuration File Reference","Local launch type","Fields"]},"215":{"title":"invoke_port","titles":["Configuration File Reference","Local launch type","Fields"]},"216":{"title":"container_name","titles":["Configuration File Reference","Local launch type","Fields"]},"217":{"title":"runtime_envs","titles":["Configuration File Reference","Local launch type","Fields"]},"218":{"title":"ports","titles":["Configuration File Reference","Local launch type","Fields"]},"219":{"title":"volumes","titles":["Configuration File Reference","Local launch type","Fields"]},"220":{"title":"restart_policy","titles":["Configuration File Reference","Local launch type","Fields"]},"221":{"title":"memory_limit / cpu_limit","titles":["Configuration File Reference","Local launch type","Fields"]},"222":{"title":"Auto-managed fields","titles":["Configuration File Reference","Local launch type"]},"223":{"title":"Cloud launch type","titles":["Configuration File Reference"]},"224":{"title":"Example","titles":["Configuration File Reference","Cloud launch type"]},"225":{"title":"Template variables","titles":["Configuration File Reference","Cloud launch type"]},"226":{"title":"The Auto keyword","titles":["Configuration File Reference","Cloud launch type"]},"227":{"title":"Fields","titles":["Configuration File Reference","Cloud launch type"]},"228":{"title":"region","titles":["Configuration File Reference","Cloud launch type","Fields"]},"229":{"title":"image_tag","titles":["Configuration File Reference","Cloud launch type","Fields"]},"230":{"title":"tos_bucket","titles":["Configuration File Reference","Cloud launch type","Fields"]},"231":{"title":"cr_instance_name","titles":["Configuration File Reference","Cloud launch type","Fields"]},"232":{"title":"cr_namespace_name","titles":["Configuration File Reference","Cloud launch type","Fields"]},"233":{"title":"cr_repo_name","titles":["Configuration File Reference","Cloud launch type","Fields"]},"234":{"title":"runtime_name / runtime_role_name / runtime_apikey_name","titles":["Configuration File Reference","Cloud launch type","Fields"]},"235":{"title":"runtime_envs","titles":["Configuration File Reference","Cloud launch type","Fields"]},"236":{"title":"build_timeout","titles":["Configuration File Reference","Cloud launch type","Fields"]},"237":{"title":"Auto-managed fields","titles":["Configuration File Reference","Cloud launch type"]},"238":{"title":"Hybrid launch type","titles":["Configuration File Reference"]},"239":{"title":"Example","titles":["Configuration File Reference","Hybrid launch type"]},"240":{"title":"Differences from Cloud mode","titles":["Configuration File Reference","Hybrid launch type"]},"241":{"title":"Fields","titles":["Configuration File Reference","Hybrid launch type"]},"242":{"title":"region","titles":["Configuration File Reference","Hybrid launch type","Fields"]},"243":{"title":"image_tag","titles":["Configuration File Reference","Hybrid launch type","Fields"]},"244":{"title":"cr_instance_name / cr_namespace_name / cr_repo_name","titles":["Configuration File Reference","Hybrid launch type","Fields"]},"245":{"title":"runtime_name / runtime_role_name / runtime_apikey_name","titles":["Configuration File Reference","Hybrid launch type","Fields"]},"246":{"title":"runtime_envs","titles":["Configuration File Reference","Hybrid launch type","Fields"]},"247":{"title":"Auto-managed fields","titles":["Configuration File Reference","Hybrid launch type"]},"248":{"title":"docker_build","titles":["Configuration File Reference"]},"249":{"title":"Example","titles":["Configuration File Reference","docker_build"]},"250":{"title":"Fields","titles":["Configuration File Reference","docker_build"]},"251":{"title":"base_image","titles":["Configuration File Reference","docker_build","Fields"]},"252":{"title":"build_script","titles":["Configuration File Reference","docker_build","Fields"]},"253":{"title":"regenerate_dockerfile","titles":["Configuration File Reference","docker_build","Fields"]},"254":{"title":"platform","titles":["Configuration File Reference","docker_build","Fields"]},"255":{"title":"Global configuration","titles":["Configuration File Reference"]},"256":{"title":"Location","titles":["Configuration File Reference","Global configuration"]},"257":{"title":"Example","titles":["Configuration File Reference","Global configuration"]},"258":{"title":"Precedence","titles":["Configuration File Reference","Global configuration"]},"259":{"title":"Typical use cases","titles":["Configuration File Reference","Global configuration"]},"260":{"title":"Best practices","titles":["Configuration File Reference"]},"261":{"title":"🌍 Multi-environment management","titles":["Configuration File Reference","Best practices"]},"262":{"title":"🔐 Secure handling of secrets","titles":["Configuration File Reference","Best practices"]},"263":{"title":"📝 Add helpful comments","titles":["Configuration File Reference","Best practices"]},"264":{"title":"✅ Validate configuration regularly","titles":["Configuration File Reference","Best practices"]},"265":{"title":"Full examples","titles":["Configuration File Reference"]},"266":{"title":"📱 Local development config (Python)","titles":["Configuration File Reference","Full examples"]},"267":{"title":"Golang project config","titles":["Configuration File Reference","Full examples"]},"268":{"title":"Production config","titles":["Configuration File Reference","Full examples"]},"269":{"title":"🎯 Minimal configuration examples","titles":["Configuration File Reference","Full examples"]},"270":{"title":"FAQ","titles":["Configuration File Reference"]},"271":{"title":"❓ Configuration file not found","titles":["Configuration File Reference","FAQ"]},"272":{"title":"❓ Invalid YAML format","titles":["Configuration File Reference","FAQ"]},"273":{"title":"❓ Missing required fields","titles":["Configuration File Reference","FAQ"]},"274":{"title":"❓ Template variables failed to render","titles":["Configuration File Reference","FAQ"]},"275":{"title":"❓ Environment variables not taking effect","titles":["Configuration File Reference","FAQ"]},"276":{"title":"❓ Legacy field names are incompatible","titles":["Configuration File Reference","FAQ"]},"277":{"title":"Configuration field quick reference","titles":["Configuration File Reference"]},"278":{"title":"common fields","titles":["Configuration File Reference","Configuration field quick reference"]},"279":{"title":"Cloud/Hybrid fields","titles":["Configuration File Reference","Configuration field quick reference"]},"280":{"title":"docker_build fields","titles":["Configuration File Reference","Configuration field quick reference"]},"281":{"title":"Next steps","titles":["Configuration File Reference"]},"282":{"title":"Logging System","titles":[]},"283":{"title":"Default Behavior","titles":["Logging System"]},"284":{"title":"Quick Start","titles":["Logging System"]},"285":{"title":"Enable File Logging","titles":["Logging System","Quick Start"]},"286":{"title":"Enable Console Logging","titles":["Logging System","Quick Start"]},"287":{"title":"Enable Both Console and File Logging","titles":["Logging System","Quick Start"]},"288":{"title":"Debug Mode","titles":["Logging System","Quick Start"]},"289":{"title":"Environment Variable Configuration","titles":["Logging System"]},"290":{"title":"Basic Configuration","titles":["Logging System","Environment Variable Configuration"]},"291":{"title":"Advanced Configuration","titles":["Logging System","Environment Variable Configuration"]},"292":{"title":"Log Levels","titles":["Logging System"]},"293":{"title":"Common Scenarios","titles":["Logging System"]},"294":{"title":"Scenario 1: Normal Use (Default Configuration)","titles":["Logging System","Common Scenarios"]},"295":{"title":"Scenario 1.1: Need to Save Log Records","titles":["Logging System","Common Scenarios"]},"296":{"title":"Scenario 2: Debugging Issues","titles":["Logging System","Common Scenarios"]},"297":{"title":"Scenario 3: CI/CD Environment","titles":["Logging System","Common Scenarios"]},"298":{"title":"Scenario 4: Production Environment","titles":["Logging System","Common Scenarios"]},"299":{"title":"Scenario 5: Fully Silent","titles":["Logging System","Common Scenarios"]},"300":{"title":"Log File Management","titles":["Logging System"]},"301":{"title":"Log File Location","titles":["Logging System","Log File Management"]},"302":{"title":"Automatic Cleanup of Old Logs","titles":["Logging System","Log File Management"]},"303":{"title":"Custom Log Path","titles":["Logging System","Log File Management"]},"304":{"title":"Configuration Precedence","titles":["Logging System"]},"305":{"title":"Troubleshooting","titles":["Logging System"]},"306":{"title":"No Log File Created","titles":["Logging System","Troubleshooting"]},"307":{"title":"No Console Log Output","titles":["Logging System","Troubleshooting"]},"308":{"title":"Too Many or Too Few Logs","titles":["Logging System","Troubleshooting"]},"309":{"title":"Best Practices","titles":["Logging System"]},"310":{"title":"Recommended Development Configuration","titles":["Logging System","Best Practices"]},"311":{"title":"Team Collaboration","titles":["Logging System","Best Practices"]},"312":{"title":"Production Deployment Recommendations","titles":["Logging System","Best Practices"]},"313":{"title":"Summary","titles":["Logging System"]},"314":{"title":"AgentKit SDK Overview","titles":[]},"315":{"title":"Core Architecture","titles":["AgentKit SDK Overview"]},"316":{"title":"1. Runtime Application Framework","titles":["AgentKit SDK Overview","Core Architecture"]},"317":{"title":"AgentkitSimpleApp","titles":["AgentKit SDK Overview","Core Architecture","1. Runtime Application Framework"]},"318":{"title":"AgentkitMCPApp","titles":["AgentKit SDK Overview","Core Architecture","1. Runtime Application Framework"]},"319":{"title":"AgentkitA2aApp","titles":["AgentKit SDK Overview","Core Architecture","1. Runtime Application Framework"]},"320":{"title":"2. Platform Service Clients","titles":["AgentKit SDK Overview","Core Architecture"]},"321":{"title":"AgentkitMemory","titles":["AgentKit SDK Overview","Core Architecture","2. Platform Service Clients"]},"322":{"title":"AgentkitKnowledge","titles":["AgentKit SDK Overview","Core Architecture","2. Platform Service Clients"]},"323":{"title":"AgentkitMCP","titles":["AgentKit SDK Overview","Core Architecture","2. Platform Service Clients"]},"324":{"title":"AgentkitRuntime","titles":["AgentKit SDK Overview","Core Architecture","2. Platform Service Clients"]},"325":{"title":"3. Infrastructure Modules","titles":["AgentKit SDK Overview","Core Architecture"]},"326":{"title":"BaseAgentkitClient","titles":["AgentKit SDK Overview","Core Architecture","3. Infrastructure Modules"]},"327":{"title":"Context Management","titles":["AgentKit SDK Overview","Core Architecture","3. Infrastructure Modules"]},"328":{"title":"Module Dependencies","titles":["AgentKit SDK Overview"]},"329":{"title":"Key Features","titles":["AgentKit SDK Overview"]},"330":{"title":"1. Decorator-Driven","titles":["AgentKit SDK Overview","Key Features"]},"331":{"title":"2. Framework-Agnostic","titles":["AgentKit SDK Overview","Key Features"]},"332":{"title":"3. Automated Observability","titles":["AgentKit SDK Overview","Key Features"]},"333":{"title":"4. Production-Ready","titles":["AgentKit SDK Overview","Key Features"]},"334":{"title":"5. Type Safety","titles":["AgentKit SDK Overview","Key Features"]},"335":{"title":"Quick Start","titles":["AgentKit SDK Overview"]},"336":{"title":"Installation","titles":["AgentKit SDK Overview","Quick Start"]},"337":{"title":"Create a Simple Agent","titles":["AgentKit SDK Overview","Quick Start"]},"338":{"title":"Use Platform Services","titles":["AgentKit SDK Overview","Quick Start"]},"339":{"title":"Next Steps","titles":["AgentKit SDK Overview"]},"340":{"title":"Annotation Usage Guide","titles":[]},"341":{"title":"Simple Agent Annotations","titles":["Annotation Usage Guide"]},"342":{"title":"@app.entrypoint","titles":["Annotation Usage Guide","Simple Agent Annotations"]},"343":{"title":"Function Signature","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.entrypoint"]},"344":{"title":"Parameter Description","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.entrypoint"]},"345":{"title":"Complete Example","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.entrypoint"]},"346":{"title":"Notes","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.entrypoint"]},"347":{"title":"Error Handling Example","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.entrypoint"]},"348":{"title":"@app.ping","titles":["Annotation Usage Guide","Simple Agent Annotations"]},"349":{"title":"Function Signature","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"350":{"title":"Parameter Description","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"351":{"title":"Basic Example","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"352":{"title":"Advanced Example: Including Dependency Checks","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"353":{"title":"Notes","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"354":{"title":"Available Endpoints","titles":["Annotation Usage Guide","Simple Agent Annotations","@app.ping"]},"355":{"title":"@app.async_task (Planned)","titles":["Annotation Usage Guide","Simple Agent Annotations"]},"356":{"title":"MCP Agent Annotations","titles":["Annotation Usage Guide"]},"357":{"title":"@app.tool","titles":["Annotation Usage Guide","MCP Agent Annotations"]},"358":{"title":"Function Signature","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"359":{"title":"Parameter Description","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"360":{"title":"Basic Example","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"361":{"title":"Async Tool Example","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"362":{"title":"Notes","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"363":{"title":"Complex Parameter Example","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.tool"]},"364":{"title":"@app.agent_as_a_tool","titles":["Annotation Usage Guide","MCP Agent Annotations"]},"365":{"title":"Function Signature","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.agent_as_a_tool"]},"366":{"title":"Usage Example","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.agent_as_a_tool"]},"367":{"title":"Multi-Agent Collaboration Example","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.agent_as_a_tool"]},"368":{"title":"Notes","titles":["Annotation Usage Guide","MCP Agent Annotations","@app.agent_as_a_tool"]},"369":{"title":"A2A Agent Annotations","titles":["Annotation Usage Guide"]},"370":{"title":"@app.agent_executor","titles":["Annotation Usage Guide","A2A Agent Annotations"]},"371":{"title":"Function Signature","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.agent_executor"]},"372":{"title":"Parameter Description","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.agent_executor"]},"373":{"title":"Basic Example","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.agent_executor"]},"374":{"title":"Custom Executor Example","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.agent_executor"]},"375":{"title":"Notes","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.agent_executor"]},"376":{"title":"@app.task_store","titles":["Annotation Usage Guide","A2A Agent Annotations"]},"377":{"title":"Function Signature","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.task_store"]},"378":{"title":"Using Default Storage","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.task_store"]},"379":{"title":"Custom Task Storage Example","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.task_store"]},"380":{"title":"Notes","titles":["Annotation Usage Guide","A2A Agent Annotations","@app.task_store"]},"381":{"title":"Best Practices","titles":["Annotation Usage Guide"]},"382":{"title":"1. Error Handling","titles":["Annotation Usage Guide","Best Practices"]},"383":{"title":"2. Logging","titles":["Annotation Usage Guide","Best Practices"]},"384":{"title":"3. Type Annotations","titles":["Annotation Usage Guide","Best Practices"]},"385":{"title":"4. Docstrings","titles":["Annotation Usage Guide","Best Practices"]},"386":{"title":"5. Performance Optimization","titles":["Annotation Usage Guide","Best Practices"]},"387":{"title":"Next Steps","titles":["Annotation Usage Guide"]},"388":{"title":"AgentKit Runtime: From Local Development to Cloud Deployment","titles":[]},"389":{"title":"What Does AgentKit Runtime Solve for You?","titles":["AgentKit Runtime: From Local Development to Cloud Deployment"]},"390":{"title":"Core Advantages","titles":["AgentKit Runtime: From Local Development to Cloud Deployment"]},"391":{"title":"1. Serverless Architecture: Simplified Operations, Optimized Costs","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Core Advantages"]},"392":{"title":"2. Enterprise-Grade Security Isolation","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Core Advantages"]},"393":{"title":"3. Framework-Agnostic Quick Integration","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Core Advantages"]},"394":{"title":"Three-Step Guide: From Local Development to Cloud Deployment","titles":["AgentKit Runtime: From Local Development to Cloud Deployment"]},"395":{"title":"Prerequisites","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment"]},"396":{"title":"Step 1: Environment Configuration","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment"]},"397":{"title":"Step 2: Create and Debug Agent Locally","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment"]},"398":{"title":"1. Initialize Agent Project","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment","Step 2: Create and Debug Agent Locally"]},"399":{"title":"2. Agent Code Overview","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment","Step 2: Create and Debug Agent Locally"]},"400":{"title":"3. Configure Environment Variables","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment","Step 2: Create and Debug Agent Locally"]},"401":{"title":"4. Start and Invoke Service Locally","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment","Step 2: Create and Debug Agent Locally"]},"402":{"title":"Step 3: Deploy to Production Environment","titles":["AgentKit Runtime: From Local Development to Cloud Deployment","Three-Step Guide: From Local Development to Cloud Deployment"]},"403":{"title":"AgentKit Built-in Tools Quick Start Guide","titles":[]},"404":{"title":"Core Capabilities","titles":["AgentKit Built-in Tools Quick Start Guide"]},"405":{"title":"Prerequisites: Creating a Sandbox Tool","titles":["AgentKit Built-in Tools Quick Start Guide"]},"406":{"title":"Agent Code Example","titles":["AgentKit Built-in Tools Quick Start Guide"]},"407":{"title":"Complete Code","titles":["AgentKit Built-in Tools Quick Start Guide","Agent Code Example"]},"408":{"title":"Code Explanation","titles":["AgentKit Built-in Tools Quick Start Guide","Agent Code Example"]},"409":{"title":"Local Debugging","titles":["AgentKit Built-in Tools Quick Start Guide"]},"410":{"title":"1. Install VeADK from Official Source","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging"]},"411":{"title":"2. Configure Environment Variables","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging"]},"412":{"title":"3. Start the Agent Service Locally","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging"]},"413":{"title":"4. Invoke the Agent","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging"]},"414":{"title":"Tool Instance Invocation Mechanism","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging","4. Invoke the Agent"]},"415":{"title":"Invocation Example","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging","4. Invoke the Agent"]},"416":{"title":"Execution Log Example","titles":["AgentKit Built-in Tools Quick Start Guide","Local Debugging","4. Invoke the Agent"]},"417":{"title":"Deploying to Production","titles":["AgentKit Built-in Tools Quick Start Guide"]},"418":{"title":"AgentKit Memory Quick Start Guide","titles":[]},"419":{"title":"Usage Examples","titles":[]},"420":{"title":"Creating a Memory Store","titles":["Usage Examples"]},"421":{"title":"Obtaining Memory Resource Connection Information","titles":["Usage Examples","Creating a Memory Store"]},"422":{"title":"Building an Agent with Long-Term Memory","titles":["Usage Examples"]},"423":{"title":"Environment Configuration","titles":["Usage Examples"]},"424":{"title":"Starting the Service","titles":["Usage Examples"]},"425":{"title":"How to Invoke","titles":["Usage Examples"]},"426":{"title":"Verifying Memory Store Functionality","titles":["Usage Examples"]},"427":{"title":"AgentKit Knowledge Quickstart Guide","titles":[]},"428":{"title":"Usage Example","titles":[]},"429":{"title":"Creating a Knowledge Base","titles":["Usage Example"]},"430":{"title":"Importing the Knowledge Base","titles":["Usage Example"]},"431":{"title":"Obtaining Connection Information for Memory Resources","titles":["Usage Example","Importing the Knowledge Base"]},"432":{"title":"Building an Agent with Knowledge Base Capabilities","titles":["Usage Example"]},"433":{"title":"Environment Configuration","titles":["Usage Example"]},"434":{"title":"Starting the Service","titles":["Usage Example"]},"435":{"title":"How to Initiate a Call","titles":["Usage Example"]},"436":{"title":"AgentKit MCP","titles":[]},"437":{"title":"AgentKit MCP Features","titles":["AgentKit MCP"]},"438":{"title":"MCP Services","titles":["AgentKit MCP","AgentKit MCP Features"]},"439":{"title":"MCP Toolsets","titles":["AgentKit MCP","AgentKit MCP Features"]},"440":{"title":"Authentication & Security","titles":["AgentKit MCP","AgentKit MCP Features"]},"441":{"title":"AgentKit MCP Quick Start","titles":[]},"442":{"title":"Prerequisites","titles":["AgentKit MCP Quick Start"]},"443":{"title":"Step 1: Configure Local Environment","titles":["AgentKit MCP Quick Start"]},"444":{"title":"Step 2: Create AgentKit MCP","titles":["AgentKit MCP Quick Start"]},"445":{"title":"Step 3: Set Environment Variables and Run Agent","titles":["AgentKit MCP Quick Start"]}},"dirtCount":0,"index":[["°c",{"2":{"360":1}}],["❗",{"2":{"215":1}}],["❓",{"0":{"271":1,"272":1,"273":1,"274":1,"275":1,"276":1},"2":{"195":1}}],["zone",{"2":{"445":11}}],["zoho",{"2":{"429":1}}],["zero",{"2":{"185":1,"391":3}}],["zshrc",{"2":{"19":1,"35":1,"310":1}}],["`ecs",{"2":{"445":1}}],["`memory",{"2":{"183":1}}],["`agentkit",{"2":{"183":1}}],["⏸️",{"2":{"164":1}}],["japanese",{"2":{"429":1}}],["javascript",{"2":{"408":1}}],["jwrcwdayjj8xnlgalyzzcoqq",{"2":{"416":1}}],["job",{"2":{"401":2}}],["joke",{"2":{"401":2,"402":1}}],["json",{"2":{"150":4,"152":2,"346":1,"379":2,"399":3,"401":1,"415":1,"442":1,"444":1,"445":1}}],["just",{"2":{"62":1,"93":1,"294":1}}],["━━━",{"2":{"145":4}}],["━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",{"2":{"29":1}}],["⏳",{"2":{"139":1}}],["┌──────────────┬──────────────┬──────────────┐",{"2":{"112":1}}],["┌────┬──────────────────────────┬──────────┬──────────────────────────────────────────────┐",{"2":{"84":1}}],["⭐",{"0":{"102":1}}],["⚡",{"0":{"98":1},"2":{"147":1}}],["🤖",{"2":{"97":1}}],["🎮",{"2":{"281":1}}],["🌍",{"0":{"188":1,"261":1}}],["🌐",{"2":{"138":1,"139":1,"156":1,"162":1,"163":1}}],["🏠",{"0":{"128":1,"138":1,"162":1,"171":1}}],["🎯",{"0":{"97":1,"269":1},"2":{"202":1,"203":1,"204":1,"205":1,"207":1,"209":1,"210":1,"313":1}}],["🆕",{"0":{"85":1,"86":1,"107":1,"114":1,"186":1},"1":{"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"94":1,"95":1,"118":1}}],[">>>",{"2":{"385":1}}],[">",{"2":{"92":2,"107":3,"183":1,"197":3,"209":3,"330":1,"337":2,"343":1,"345":1,"347":1,"349":1,"351":1,"352":1,"355":1,"358":1,"360":1,"361":1,"363":1,"365":1,"366":1,"367":3,"374":1,"379":3,"382":1,"383":1,"384":1,"385":1,"386":2,"399":1,"407":2,"422":2,"432":2,"445":2}}],["+7",{"2":{"302":1}}],["+",{"2":{"90":1,"115":1,"142":1,"208":1,"240":1,"251":1,"285":1,"313":1,"416":3}}],["❌",{"0":{"190":1,"191":1,"192":1,"193":1},"2":{"89":3,"164":3,"193":1,"262":1,"278":6,"386":1}}],["===",{"2":{"311":2}}],["============================================================================",{"2":{"126":3}}],["==",{"2":{"92":1,"337":1,"373":1,"399":1,"407":1,"416":9,"422":2,"432":1,"445":1}}],["=",{"2":{"89":1,"92":6,"224":2,"244":1,"330":1,"337":7,"338":3,"345":7,"347":3,"352":2,"355":1,"360":4,"361":1,"363":3,"366":4,"367":3,"373":3,"374":2,"378":1,"379":3,"382":2,"383":2,"384":2,"386":4,"399":18,"407":7,"416":8,"422":13,"432":11,"445":12}}],["✓",{"2":{"84":4,"85":5}}],["│",{"2":{"84":23,"112":12,"301":4,"328":11}}],["✨",{"2":{"84":3,"85":3,"145":1}}],["9090",{"2":{"218":2}}],["9",{"2":{"82":1,"385":1,"445":2}}],["8192mb",{"2":{"445":10}}],["8080",{"2":{"218":2}}],["8000",{"2":{"138":1,"162":3,"212":3,"215":1,"218":2,"266":3,"373":1,"401":3,"412":1,"415":1,"421":1,"445":2}}],["8",{"2":{"82":1,"445":2}}],["⚙️",{"2":{"70":1}}],["☁️",{"0":{"69":1,"129":1,"139":1,"163":1,"172":1}}],["→",{"2":{"58":2,"59":3,"60":3}}],["$agentkit",{"2":{"306":1}}],["$volc",{"2":{"274":2}}],["$volcengine",{"2":{"38":2}}],["$tag",{"2":{"118":1}}],["$project",{"2":{"118":1}}],["$path",{"2":{"35":1}}],["$",{"2":{"115":2,"285":1,"297":1,"313":1}}],["😄",{"2":{"401":2}}],["📁",{"2":{"313":1}}],["📊",{"2":{"313":1}}],["🔧",{"2":{"313":1}}],["📱",{"0":{"266":1}}],["🗑️",{"2":{"169":1,"173":1}}],["📡",{"2":{"156":1}}],["💬",{"2":{"156":1}}],["🔒",{"2":{"147":1,"313":1}}],["🔨",{"2":{"128":1,"129":1,"145":2}}],["🛠",{"0":{"122":1},"1":{"123":1,"124":1,"125":1,"126":1}}],["📋",{"2":{"116":1}}],["🗂️",{"2":{"114":1}}],["🔍",{"2":{"112":1}}],["🔀",{"0":{"99":1}}],["🔐",{"0":{"262":1},"2":{"97":1,"114":1,"116":1}}],["📦",{"2":{"97":1,"114":1}}],["📄",{"2":{"97":1}}],["🔄",{"0":{"186":1,"187":1},"2":{"85":1,"164":2}}],["🚀",{"2":{"70":1,"97":1,"138":1,"139":1,"145":2,"147":1,"195":1,"281":1}}],["📖",{"2":{"70":1,"195":1,"281":1}}],["🐳",{"0":{"68":1}}],["🐹",{"0":{"67":1}}],["🐍",{"0":{"66":1},"2":{"97":1}}],["📝",{"0":{"185":1,"263":1},"2":{"31":1,"97":1,"114":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"411":1}}],["💡",{"0":{"194":1},"2":{"29":1,"103":1,"104":1,"175":1,"183":1,"228":1,"276":1,"283":1}}],["▶",{"2":{"29":1}}],["02",{"2":{"445":1}}],["06",{"2":{"445":1}}],["05+08",{"2":{"445":2}}],["05",{"2":{"445":1}}],["0x7f8b4f24b9b0>",{"2":{"445":1}}],["0xabcd",{"2":{"425":1,"426":1}}],["04uyfx",{"2":{"421":1}}],["09",{"2":{"283":4,"445":7}}],["00",{"2":{"126":1,"162":2,"163":2,"445":11}}],["01",{"2":{"29":1,"126":1,"162":1,"163":1,"401":28}}],["0",{"2":{"29":1,"92":4,"98":3,"103":2,"110":1,"111":2,"112":3,"214":1,"229":4,"266":1,"337":4,"373":4,"396":1,"399":6,"401":10,"407":4,"410":1,"412":4,"416":11,"422":4,"432":4,"443":1,"445":15}}],["✅",{"0":{"65":1,"264":1},"2":{"29":2,"31":1,"91":7,"114":1,"116":1,"117":4,"128":1,"129":1,"133":10,"138":1,"139":3,"141":6,"145":2,"156":2,"162":2,"163":2,"164":2,"171":2,"172":2,"173":3,"175":2,"202":1,"203":1,"204":1,"205":2,"206":3,"207":1,"208":1,"209":2,"262":1,"272":4,"278":2,"283":2,"294":2,"295":2,"296":2,"297":2,"298":2,"299":2,"386":1}}],["57",{"2":{"445":1}}],["578",{"2":{"416":1}}],["52785",{"2":{"416":1}}],["586",{"2":{"416":1}}],["54+08",{"2":{"445":2}}],["54",{"2":{"416":1}}],["51",{"2":{"401":18}}],["512m",{"2":{"266":1}}],["50",{"2":{"401":10,"415":1,"416":4,"417":1,"439":1}}],["56",{"2":{"283":4,"416":1}}],["5678",{"2":{"262":1}}],["5️⃣",{"2":{"185":1,"186":1}}],["5344",{"2":{"29":1}}],["5",{"0":{"113":1,"299":1,"334":1,"386":1},"2":{"29":1,"43":1,"62":1,"81":1,"97":1,"129":2,"132":1,"266":1,"292":1,"385":2,"416":3,"445":4}}],["46+08",{"2":{"445":1}}],["44",{"2":{"445":1}}],["44+08",{"2":{"445":1}}],["49+08",{"2":{"445":1}}],["4567",{"2":{"429":1}}],["400",{"2":{"429":1}}],["48",{"2":{"416":1}}],["4317",{"2":{"235":1,"268":1}}],["4️⃣",{"2":{"185":1,"186":1}}],["4",{"0":{"44":1,"112":1,"155":1,"298":1,"333":1,"385":1,"401":1,"413":1},"1":{"414":1,"415":1,"416":1},"2":{"29":1,"62":1,"81":1,"84":1,"97":1,"129":1,"131":1,"194":1,"306":1,"313":1,"385":1,"429":1,"445":12}}],["└──────────────┴──────────────┴──────────────┘",{"2":{"112":1}}],["└────┴──────────────────────────┴──────────┴──────────────────────────────────────────────┘",{"2":{"84":1}}],["└──",{"2":{"28":1,"92":1,"301":3,"328":4}}],["├──────────────┼──────────────┼──────────────┤",{"2":{"112":1}}],["├────┼──────────────────────────┼──────────┼──────────────────────────────────────────────┤",{"2":{"84":1}}],["├──",{"2":{"28":2,"92":4,"301":4,"328":10}}],["67",{"2":{"416":2}}],["652",{"2":{"416":1}}],["65",{"2":{"416":1}}],["6379",{"2":{"379":1}}],["64",{"2":{"254":1,"445":12}}],["6️⃣",{"2":{"186":1}}],["60807",{"2":{"401":1}}],["60",{"2":{"182":1}}],["6",{"0":{"114":1},"2":{"24":1,"29":1,"62":1,"81":2,"89":1,"97":1,"129":7,"132":1,"432":1,"445":2}}],["xlarge",{"2":{"445":11}}],["xbyfcvc86wc26mbxz39vst12",{"2":{"445":1}}],["x86",{"2":{"254":1}}],["x",{"2":{"126":2,"445":4}}],["xxxx",{"2":{"262":1}}],["xxxxxxx",{"2":{"421":1}}],["xxxxxxxx",{"2":{"105":2,"183":1,"257":1}}],["xxxxxx",{"2":{"139":1,"156":1,"163":2,"173":1,"421":1}}],["xxxxx",{"2":{"24":1}}],["xxx",{"2":{"104":8,"129":1,"139":1,"156":1,"163":3,"183":4,"212":1,"224":2,"235":5,"239":2,"263":2,"266":1,"267":1,"268":3,"269":1}}],["x26",{"2":{"28":2,"62":2,"124":2,"132":2,"429":1}}],["x3c",{"2":{"23":2,"25":4,"75":1,"180":5,"181":5,"182":14,"183":14,"262":2,"275":1,"416":2,"421":1,"423":4,"433":1,"445":2}}],["⚠️",{"2":{"19":1,"105":1,"149":1,"157":3,"166":1,"169":1,"171":1,"172":1,"175":1,"206":1,"210":1}}],["~",{"2":{"18":1,"19":2,"31":1,"35":3,"82":1,"94":1,"107":1,"114":2,"186":1,"197":1,"209":1,"255":1,"256":1,"258":1,"259":1,"274":1}}],["|",{"2":{"13":1,"105":2,"379":1,"401":56,"416":18,"445":24}}],["288",{"2":{"445":1}}],["280",{"2":{"445":1}}],["265",{"2":{"445":1}}],["217",{"2":{"445":1}}],["21",{"2":{"416":9}}],["2100123456",{"2":{"225":1}}],["21076x",{"2":{"29":1}}],["22t14",{"2":{"445":1}}],["22",{"2":{"360":1}}],["22°c",{"2":{"156":1}}],["250",{"2":{"445":1}}],["250115",{"2":{"445":2}}],["250615",{"2":{"81":1,"89":1,"432":1}}],["256k",{"2":{"445":2}}],["25",{"2":{"360":1,"416":1,"445":2}}],["2gb",{"2":{"221":1}}],["2g",{"2":{"221":1}}],["2️⃣",{"2":{"185":1,"186":1}}],["2022",{"2":{"445":8}}],["20250120",{"2":{"139":1,"163":1}}],["20250520174054",{"2":{"24":1}}],["2025",{"2":{"126":1,"162":1,"163":1,"283":4,"399":1,"401":28,"416":10,"445":21}}],["20251101",{"2":{"302":1}}],["20251118",{"2":{"301":1}}],["20251119",{"2":{"301":1}}],["20251128153042",{"2":{"225":1}}],["2025112017",{"2":{"29":1}}],["20251120",{"2":{"29":1,"301":1}}],["20251218154940",{"2":{"29":1}}],["200",{"2":{"401":1,"416":1}}],["20",{"2":{"68":1,"162":1,"163":1,"283":4,"401":28,"445":12}}],["24t10",{"2":{"445":1}}],["24t14",{"2":{"445":2}}],["24",{"2":{"67":1,"132":1,"206":3,"249":1,"251":2,"267":2,"278":1,"416":6,"445":13}}],["23t11",{"2":{"445":1}}],["23t16",{"2":{"445":2}}],["23t20",{"2":{"445":1}}],["23t21",{"2":{"445":2}}],["23",{"2":{"29":1,"416":9}}],["2",{"0":{"13":1,"24":1,"28":1,"36":1,"39":1,"42":1,"47":1,"50":1,"59":1,"110":1,"153":1,"296":1,"320":1,"331":1,"383":1,"392":1,"397":1,"399":1,"411":1,"444":1},"1":{"321":1,"322":1,"323":1,"324":1,"398":1,"399":1,"400":1,"401":1},"2":{"25":1,"29":3,"43":1,"62":1,"81":1,"84":3,"85":1,"97":2,"114":1,"128":1,"129":1,"131":1,"138":1,"139":1,"140":1,"145":1,"146":1,"165":1,"174":1,"187":1,"194":1,"209":1,"229":1,"258":1,"262":1,"264":1,"275":1,"306":1,"307":1,"310":1,"313":1,"345":1,"385":1,"396":1,"399":2,"410":1,"416":9,"429":1,"445":31}}],["77",{"2":{"416":1}}],["7",{"0":{"115":1},"2":{"12":1,"29":1,"82":1,"97":8,"132":1,"302":1,"445":2}}],["18",{"2":{"445":3}}],["1761311852",{"2":{"445":2}}],["17",{"2":{"445":8}}],["17t10",{"2":{"126":1}}],["156",{"2":{"445":1}}],["155",{"2":{"445":1}}],["153",{"2":{"445":1}}],["15",{"2":{"410":1}}],["151",{"2":{"401":28}}],["14",{"2":{"283":4,"445":1}}],["1g",{"2":{"212":1}}],["1️⃣",{"2":{"185":1,"186":1}}],["1+1=",{"2":{"150":1}}],["198",{"2":{"445":1}}],["19",{"2":{"132":1,"445":1}}],["1330124",{"2":{"445":1}}],["13",{"2":{"66":1,"206":1,"445":7}}],["118",{"2":{"422":1,"445":1}}],["116",{"2":{"385":1}}],["11",{"2":{"66":1,"82":1,"206":1,"283":4,"416":9}}],["123",{"2":{"429":1}}],["1234",{"2":{"262":1}}],["121",{"2":{"385":1}}],["127",{"2":{"373":2,"401":1,"416":1,"445":1}}],["12",{"2":{"13":1,"15":1,"42":1,"61":1,"66":1,"82":1,"84":1,"85":1,"97":1,"101":1,"123":2,"124":2,"125":1,"132":1,"198":1,"200":1,"206":3,"249":1,"251":1,"266":1,"268":2,"278":1,"396":1,"401":56,"443":1,"445":4}}],["1",{"0":{"9":1,"23":1,"27":1,"35":1,"38":1,"41":1,"46":1,"49":1,"58":1,"109":1,"152":1,"294":1,"295":2,"316":1,"330":1,"382":1,"391":1,"396":1,"398":1,"410":1,"443":1},"1":{"10":1,"11":1,"12":1,"317":1,"318":1,"319":1},"2":{"12":1,"24":2,"25":1,"28":1,"29":2,"62":1,"67":1,"81":2,"84":4,"85":1,"89":1,"97":2,"98":1,"110":1,"114":1,"116":1,"128":2,"129":1,"131":1,"132":1,"138":1,"139":1,"140":1,"145":1,"146":1,"165":1,"174":1,"187":1,"194":1,"206":3,"209":3,"212":1,"221":2,"229":1,"249":1,"251":3,"258":1,"262":1,"264":1,"267":2,"275":1,"278":1,"306":1,"307":1,"310":1,"313":1,"345":1,"352":1,"353":1,"373":2,"396":1,"401":3,"416":10,"422":1,"426":1,"429":1,"432":1,"445":4}}],["103",{"2":{"416":1}}],["101",{"2":{"416":3}}],["1067",{"2":{"385":1}}],["10+",{"2":{"68":1,"395":1,"442":1}}],["1000",{"2":{"361":2}}],["100",{"2":{"29":2,"415":1,"416":1,"417":1}}],["10",{"2":{"7":1,"65":1,"66":1,"82":1,"138":1,"162":1,"163":1,"180":1,"206":1,"363":1,"416":10,"445":20}}],["37+08",{"2":{"445":1}}],["36",{"2":{"445":1}}],["3600",{"2":{"236":1}}],["35+08",{"2":{"445":1}}],["35",{"2":{"445":2}}],["33",{"2":{"445":8}}],["334df4",{"2":{"444":2}}],["38",{"2":{"416":2,"445":1}}],["38120",{"2":{"401":1}}],["31+08",{"2":{"445":1}}],["31",{"2":{"385":1}}],["39",{"2":{"385":1}}],["3️⃣",{"2":{"185":1,"186":1}}],["30",{"2":{"126":1,"138":1,"182":1,"414":1,"416":1}}],["32k",{"2":{"77":1}}],["3",{"0":{"14":1,"25":1,"29":1,"43":1,"60":1,"111":1,"154":1,"297":1,"325":1,"332":1,"384":1,"393":1,"400":1,"402":1,"412":1,"445":1},"1":{"15":1,"326":1,"327":1},"2":{"7":1,"13":1,"15":1,"29":3,"42":1,"43":1,"61":1,"62":1,"65":1,"66":4,"81":1,"84":3,"85":2,"97":3,"101":1,"114":1,"123":2,"124":2,"125":1,"128":5,"129":2,"131":1,"132":2,"138":4,"174":1,"194":1,"198":1,"200":1,"206":6,"209":1,"229":1,"249":1,"251":1,"258":1,"262":1,"264":1,"266":1,"268":2,"275":1,"278":1,"306":1,"307":1,"313":1,"345":1,"395":1,"396":1,"416":3,"429":1,"442":1,"443":1,"445":2}}],["ydzwsvfxhokhx11pdmlv",{"2":{"445":2}}],["ydzwsvy72n46nmxzvafi",{"2":{"445":1}}],["yield",{"2":{"399":3}}],["yyyymmdd",{"2":{"290":1}}],["yyyymmddhhmmss",{"2":{"225":1}}],["y",{"2":{"115":1,"124":1,"132":1,"169":2,"285":1,"313":1}}],["ye5blj0xdsxjd1tk1vfh",{"2":{"445":1}}],["ye5c4end34xjd1umbfns",{"2":{"445":1}}],["ye5c4jbx8gqc6ily6b30",{"2":{"445":1}}],["ye5e5jyq68bw80c889i5",{"2":{"445":1}}],["ye5ejub08wbw80bpd7hr",{"2":{"445":1}}],["ye5ejwoow0cva4fqydfc",{"2":{"445":1}}],["ye5907jc6ikhx1exow93",{"2":{"445":7}}],["ye7fg1hgqoxjd1utrfy3",{"2":{"445":1}}],["ye7fhfmghsc1kdxxxxxx",{"2":{"411":1}}],["ye7ilsbbpcbw80ca2ymj",{"2":{"445":1}}],["ye7ipm0dtsqc6imh310d",{"2":{"445":1}}],["ye7irm2sqobw80cqxd40",{"2":{"445":1}}],["ye7yhff668o2eybtfvr0",{"2":{"416":1}}],["yet",{"2":{"355":1}}],["yesterday",{"2":{"301":2}}],["yes",{"2":{"93":1,"429":1}}],["ye9j62wydcn",{"2":{"29":1}}],["your",{"2":{"18":4,"19":2,"20":1,"23":2,"24":2,"25":5,"28":1,"31":1,"32":1,"35":2,"36":2,"42":1,"51":1,"54":1,"55":1,"58":1,"61":1,"62":2,"69":4,"71":1,"72":1,"76":1,"82":1,"84":1,"85":1,"87":3,"88":2,"89":1,"91":1,"92":2,"93":1,"119":1,"128":1,"138":1,"150":1,"155":1,"192":4,"196":1,"202":1,"203":1,"207":1,"208":3,"215":2,"217":1,"228":1,"230":1,"231":1,"238":1,"262":1,"264":1,"276":1,"297":1,"301":1,"310":1,"338":2,"393":1,"394":1,"395":2,"396":1,"398":1,"400":4,"401":1,"402":3,"404":1,"406":4,"411":3,"417":2,"420":1,"421":2,"422":1,"423":5,"429":1,"430":1,"432":2,"433":2,"444":1,"445":1}}],["you",{"0":{"389":1},"2":{"6":1,"15":2,"17":1,"19":1,"20":3,"21":1,"23":1,"24":5,"25":6,"27":2,"28":1,"29":5,"31":2,"32":1,"33":3,"35":1,"36":1,"49":1,"52":1,"53":2,"62":1,"71":2,"73":1,"77":1,"81":1,"82":2,"84":1,"85":1,"86":1,"89":2,"91":2,"93":1,"97":1,"104":1,"105":2,"121":1,"126":1,"149":1,"150":1,"169":3,"189":1,"193":1,"222":1,"230":2,"237":1,"238":1,"247":1,"282":1,"283":1,"285":1,"286":2,"288":1,"289":1,"292":1,"297":1,"299":1,"313":1,"388":2,"389":3,"391":1,"393":1,"394":1,"395":1,"396":1,"398":1,"399":3,"400":1,"402":3,"404":1,"405":1,"406":1,"410":1,"411":1,"412":1,"414":1,"417":2,"418":1,"421":2,"422":3,"426":3,"431":1,"432":2,"435":3,"442":2,"443":2,"444":1,"445":12}}],["yamlentry",{"2":{"417":1}}],["yamlplatform",{"2":{"254":1}}],["yamlports",{"2":{"218":1}}],["yamlbuild",{"2":{"252":1}}],["yamlcr",{"2":{"244":1}}],["yamlcommon",{"2":{"198":1,"200":1,"210":1,"263":1,"266":1,"267":1,"268":1,"269":2}}],["yamlimage",{"2":{"225":1}}],["yamlmemory",{"2":{"221":1}}],["yamlvolumes",{"2":{"219":1}}],["yamlruntime",{"2":{"217":1,"234":1,"235":2,"262":1}}],["yamllanguage",{"2":{"205":1}}],["yamllaunch",{"2":{"104":1,"105":1,"208":1,"212":1,"224":1,"239":1}}],["yamldescription",{"2":{"204":1}}],["yamldocker",{"2":{"123":2,"132":3,"249":2}}],["yamlagent",{"2":{"124":1,"202":1}}],["yaml",{"0":{"61":1,"272":1},"2":{"2":1,"3":1,"18":1,"25":1,"28":1,"29":2,"39":1,"53":1,"55":1,"61":2,"70":1,"84":1,"85":1,"87":1,"92":1,"94":1,"104":2,"105":2,"106":1,"107":2,"114":4,"121":1,"122":1,"126":2,"131":2,"132":3,"136":1,"140":1,"144":1,"145":1,"146":1,"150":1,"160":1,"165":1,"168":1,"174":1,"175":1,"188":4,"190":1,"194":1,"196":1,"197":2,"203":1,"206":1,"207":1,"209":6,"229":1,"230":1,"231":1,"251":1,"255":1,"256":1,"257":1,"258":1,"259":4,"261":5,"262":5,"264":1,"272":1,"274":1,"275":1,"301":1,"417":2,"422":1,"423":1,"424":1,"432":1,"433":1,"434":1}}],["u003c=",{"2":{"416":1}}],["ultimately",{"2":{"394":1}}],["u",{"2":{"115":1}}],["ux",{"2":{"90":1}}],["url=url",{"2":{"445":1}}],["url=",{"2":{"373":1,"379":1,"421":1}}],["url>",{"2":{"183":3,"423":1}}],["url",{"2":{"72":1,"138":1,"139":1,"141":1,"158":1,"162":1,"163":1,"183":3,"237":5,"247":3,"361":4,"379":3,"421":1,"423":1,"445":1}}],["updating",{"2":{"104":1,"183":1}}],["update`",{"2":{"183":1}}],["updated",{"2":{"126":2,"133":1,"180":1,"181":1,"429":1}}],["updateruntime",{"2":{"105":2}}],["updates",{"0":{"98":1},"2":{"94":1,"98":1,"104":1,"118":1,"321":1,"429":1}}],["update",{"0":{"110":1},"2":{"72":1,"110":2,"124":1,"125":2,"132":1,"180":3,"181":2,"182":2,"183":3,"187":2,"276":1,"321":1}}],["up",{"2":{"44":1,"62":1,"72":1,"126":1,"133":1,"173":1,"302":1,"396":1,"439":1,"443":1}}],["uploads",{"2":{"230":1}}],["uploading",{"2":{"129":1}}],["upload",{"2":{"29":1,"60":1,"240":1,"241":1,"404":1,"438":1}}],["ui",{"2":{"42":1}}],["unauthorized",{"2":{"392":1}}],["unattended",{"2":{"391":1}}],["unknown",{"2":{"383":1}}],["unexpected",{"2":{"382":1}}],["unnecessary",{"2":{"312":1}}],["unconfigured",{"2":{"310":1}}],["unchanged",{"2":{"93":1}}],["unset",{"2":{"299":2,"306":1}}],["unsupported",{"2":{"89":1}}],["unless",{"2":{"212":1,"220":3,"399":1}}],["undone",{"2":{"169":1,"175":1}}],["underlying",{"2":{"391":1}}],["underscore",{"2":{"117":1}}],["underscores",{"2":{"76":1}}],["understanding",{"2":{"292":1}}],["understand",{"2":{"4":1,"118":1,"204":1,"263":1,"282":1,"359":1,"362":1,"387":1}}],["under",{"2":{"25":1,"35":1,"301":1,"399":3}}],["unbind",{"2":{"104":4}}],["unified",{"2":{"312":1,"326":1,"388":1,"389":1,"391":2,"418":1,"427":1,"436":2}}],["unit",{"2":{"182":2,"385":1}}],["uniqueness",{"2":{"229":1,"268":1}}],["unique",{"2":{"76":1,"225":1,"229":1}}],["uninstall",{"2":{"36":2}}],["usage",{"0":{"95":1,"120":1,"135":1,"140":1,"143":1,"146":1,"149":1,"151":1,"159":1,"165":1,"167":1,"174":1,"340":1,"366":1,"419":1,"428":1},"1":{"152":1,"153":1,"154":1,"155":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"426":1,"429":1,"430":1,"431":1,"432":1,"433":1,"434":1,"435":1},"2":{"56":1,"70":1,"92":1,"93":1,"102":1,"261":1,"339":2,"340":1,"399":1}}],["us",{"2":{"33":1,"429":1}}],["usually",{"2":{"24":1,"25":1,"29":1,"35":1,"43":1,"121":1,"350":1,"368":1}}],["using",{"0":{"378":1},"2":{"13":2,"17":1,"21":1,"28":2,"31":1,"33":1,"36":1,"69":1,"81":1,"84":1,"88":1,"194":1,"218":1,"219":1,"283":1,"396":1,"398":1,"399":1,"401":1,"402":1,"406":1,"410":1,"422":3,"427":1,"429":1,"430":1,"432":1,"445":1}}],["useful",{"2":{"238":1,"311":1}}],["used",{"2":{"38":1,"55":1,"114":1,"123":1,"150":3,"202":1,"203":1,"204":1,"205":2,"207":1,"209":2,"210":1,"215":1,"244":1,"245":1,"317":1,"318":1,"319":1,"341":1,"348":1,"355":1,"356":1,"359":1,"369":1,"374":1,"378":1,"380":1,"408":1,"415":1,"422":1,"432":1}}],["uses",{"2":{"29":1,"105":1,"118":2,"197":1,"216":1,"233":1,"251":1,"259":2,"276":1,"279":1,"327":1,"330":1,"385":1,"399":1,"408":1,"422":1,"432":1}}],["use",{"0":{"18":1,"30":1,"91":1,"125":1,"147":1,"259":1,"294":1,"338":1},"1":{"31":1},"2":{"5":1,"15":1,"18":1,"25":2,"28":2,"29":2,"32":1,"36":2,"41":1,"43":1,"46":1,"71":1,"72":1,"82":1,"84":2,"85":2,"89":1,"93":1,"102":1,"104":1,"105":1,"114":1,"115":1,"118":4,"121":1,"123":1,"125":1,"126":1,"132":1,"133":1,"147":1,"168":1,"192":1,"206":1,"209":1,"221":1,"224":1,"229":2,"230":1,"231":1,"244":1,"252":1,"262":1,"263":1,"268":1,"272":2,"292":1,"294":2,"313":2,"322":1,"331":1,"346":1,"353":1,"375":1,"384":1,"396":1,"398":1,"399":1,"402":1,"404":1,"405":1,"406":1,"414":2,"415":1,"417":1,"419":1,"422":1,"425":1,"432":2,"439":2,"443":2,"445":3}}],["user123",{"2":{"154":1}}],["usersessionid",{"2":{"416":1}}],["users",{"2":{"29":1,"82":1,"228":1,"263":1}}],["user",{"2":{"4":1,"31":2,"77":1,"92":3,"150":2,"153":1,"154":1,"197":1,"303":1,"316":1,"327":1,"337":3,"344":4,"345":3,"366":1,"374":1,"384":2,"389":1,"399":8,"401":5,"407":3,"408":1,"415":4,"416":1,"422":9,"425":2,"426":2,"429":2,"432":8,"436":1,"445":10}}],["uvicorn",{"2":{"401":1,"445":1}}],["uv",{"0":{"13":1},"2":{"7":1,"13":9,"15":4,"35":1,"36":2,"396":6,"443":6}}],["q4",{"2":{"429":1}}],["q3",{"2":{"429":1}}],["q2",{"2":{"429":1}}],["q1",{"2":{"429":1}}],["qa",{"2":{"429":1,"435":1}}],["quantities",{"2":{"439":1}}],["quality",{"2":{"384":1}}],["quit",{"2":{"401":1,"445":1}}],["quickstart",{"0":{"427":1},"2":{"396":2,"443":2}}],["quick",{"0":{"21":1,"62":1,"186":1,"187":1,"277":1,"284":1,"335":1,"393":1,"403":1,"418":1,"441":1},"1":{"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"63":1,"278":1,"279":1,"280":1,"285":1,"286":1,"287":1,"288":1,"336":1,"337":1,"338":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"442":1,"443":1,"444":1,"445":1},"2":{"5":1,"20":2,"55":1,"70":1,"195":1,"281":1,"313":1,"353":1,"393":1,"402":1,"417":2}}],["quickly",{"0":{"110":1},"2":{"2":1,"4":1,"5":1,"21":1,"53":1,"72":1,"74":1,"86":1,"91":1,"186":1,"238":1,"391":1,"398":1,"429":2,"438":2}}],["question",{"2":{"429":4}}],["questions",{"2":{"77":1,"204":1,"429":2,"432":2}}],["queue",{"2":{"374":5,"375":2}}],["queries",{"2":{"324":1,"366":1}}],["querying",{"2":{"283":1,"366":1}}],["query",{"2":{"4":1,"97":1,"200":1,"204":1,"266":1,"268":1,"283":1,"363":3,"366":2,"367":3,"373":1}}],["quote",{"2":{"272":2}}],["quotes",{"2":{"38":1}}],["quot",{"2":{"77":10,"78":2,"101":2,"104":2,"125":4,"150":24,"272":2,"350":4,"391":2,"404":6,"425":4,"436":2,"439":2}}],["quota",{"2":{"41":4,"47":2}}],["quotaexceeded",{"2":{"41":1}}],["q",{"2":{"4":2,"93":4,"322":1,"429":1}}],["hub",{"2":{"436":1}}],["human",{"2":{"429":1}}],["humans",{"2":{"404":2}}],["h",{"2":{"115":1,"150":1}}],["httpurl",{"2":{"444":2}}],["http",{"2":{"88":1,"138":1,"139":1,"150":1,"156":1,"162":1,"163":2,"235":1,"268":1,"316":1,"326":1,"341":1,"373":1,"393":1,"399":1,"401":4,"412":1,"415":1,"416":1,"438":3,"442":1,"444":2,"445":2}}],["https",{"2":{"13":1,"29":3,"421":1,"429":2,"444":1,"445":1}}],["hyphen",{"2":{"117":1}}],["hyphens",{"2":{"76":1}}],["hybrid",{"0":{"60":2,"68":1,"69":1,"99":1,"103":1,"104":1,"105":1,"238":1,"279":1},"1":{"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1},"2":{"53":1,"94":1,"97":1,"101":1,"104":1,"105":1,"117":1,"198":2,"208":3,"239":1,"240":1,"241":1,"261":1,"267":2}}],["heavy",{"2":{"355":1,"389":1}}],["header",{"2":{"126":4,"133":1,"401":3,"415":3,"445":3}}],["headers=",{"2":{"445":1}}],["headers",{"0":{"154":1},"2":{"31":1,"92":3,"150":4,"154":1,"330":1,"337":3,"343":1,"344":3,"345":3,"346":1,"347":1,"382":1,"383":2,"384":2,"386":2,"399":3,"407":3,"422":3,"426":1,"432":3,"444":1,"445":5}}],["healthy",{"2":{"162":1,"352":1}}],["health",{"2":{"72":1,"141":1,"162":1,"317":3,"333":1,"348":2,"350":2,"351":1,"352":2,"354":4,"389":1,"445":1}}],["here",{"2":{"33":1,"155":1,"189":1,"399":1,"445":1}}],["helper`",{"2":{"445":1}}],["helper",{"2":{"445":3}}],["helpful",{"0":{"263":1},"2":{"422":1}}],["helps",{"2":{"82":1}}],["helping",{"2":{"71":1,"204":1}}],["help",{"0":{"51":1,"177":2},"2":{"31":1,"33":1,"53":1,"177":4,"282":1,"295":1,"362":1,"445":1}}],["hello",{"2":{"31":3,"62":1,"150":3,"155":1}}],["hotline",{"2":{"429":1}}],["hosting",{"2":{"440":1}}],["host=agentkit",{"2":{"416":1}}],["host=",{"2":{"92":1,"337":1,"352":1,"373":1,"399":1,"407":1,"422":1,"432":1,"445":1}}],["host",{"2":{"25":1,"59":1,"218":3,"219":2}}],["how",{"0":{"87":1,"425":1,"435":1},"2":{"5":1,"93":1,"150":1,"152":2,"185":1,"186":1,"209":1,"281":1,"306":1,"307":1,"399":1,"404":2,"406":1,"419":1,"422":1,"429":1,"432":1}}],["historical",{"2":{"438":1}}],["history",{"2":{"18":1,"295":1,"374":1,"419":1}}],["hit",{"2":{"436":1}}],["highlights",{"2":{"399":1}}],["higher",{"2":{"292":1,"304":1}}],["highest",{"2":{"118":1,"209":1,"258":1}}],["high",{"2":{"2":1,"53":1,"59":1,"67":1,"304":1,"307":1,"408":1,"429":1,"439":1}}],["happens",{"2":{"429":1}}],["happy",{"2":{"31":1}}],["hard",{"2":{"262":1}}],["hangzhou",{"2":{"152":2,"153":2,"154":1,"156":1,"185":1}}],["handling",{"0":{"262":1,"347":1,"382":1},"2":{"88":1,"333":1,"342":1,"346":1,"362":1,"382":1,"445":1}}],["handle",{"2":{"77":1,"346":1,"362":1,"366":1}}],["handles",{"2":{"3":1,"399":1,"436":1}}],["haversine",{"2":{"385":1}}],["have",{"2":{"20":1,"24":1,"27":1,"31":1,"38":1,"49":1,"50":1,"82":1,"91":1,"118":1,"193":1,"359":1,"362":1,"382":1,"389":1,"395":1,"402":1,"435":1,"438":1,"439":1,"445":1}}],["has",{"2":{"16":1,"35":1,"44":1,"47":1,"49":1,"50":1,"114":1,"121":1,"193":1,"198":1,"395":1,"414":1,"442":1}}],["volume",{"2":{"219":1}}],["volumes",{"0":{"219":1}}],["volcano",{"2":{"209":1,"235":2,"263":1,"399":1,"420":1,"422":4,"429":1,"430":1,"432":4}}],["volc",{"2":{"192":4}}],["volces",{"2":{"29":1,"129":1,"163":1,"235":1,"251":3,"268":1,"416":2,"421":1,"445":1}}],["volceapi",{"2":{"29":3,"139":1,"156":1,"163":2,"444":1}}],["volcengine",{"0":{"23":1},"2":{"1":1,"15":1,"18":2,"19":2,"23":4,"24":2,"25":4,"51":2,"69":3,"77":1,"95":1,"101":1,"103":1,"107":5,"114":3,"129":1,"133":1,"139":1,"192":3,"197":1,"209":2,"223":1,"225":1,"228":1,"242":1,"251":1,"257":2,"274":1,"279":1,"331":1,"395":1,"399":1,"400":4,"405":1,"411":4,"429":1,"442":1,"444":1}}],["v",{"2":{"178":1}}],["v2>",{"2":{"423":1}}],["v2",{"2":{"112":2,"202":1,"421":1}}],["vpc",{"2":{"105":7,"183":3}}],["v1",{"2":{"98":2,"103":1,"110":1,"111":1,"112":1,"126":1,"214":1,"229":2,"421":1,"423":2}}],["various",{"2":{"320":1,"339":1,"340":1}}],["variable",{"0":{"102":1,"289":1},"1":{"290":1,"291":1},"2":{"35":1,"38":1,"44":1,"78":1,"82":2,"85":1,"89":2,"93":1,"97":1,"102":1,"110":1,"116":7,"225":1,"275":1,"290":1,"291":1,"406":1,"422":1,"432":1,"445":1}}],["variables",{"0":{"19":1,"38":1,"116":1,"225":1,"274":1,"275":1,"400":1,"411":1,"445":1},"2":{"19":1,"23":1,"24":1,"25":2,"29":1,"38":3,"72":1,"97":1,"102":3,"107":1,"116":3,"118":3,"192":1,"197":1,"198":1,"209":2,"210":3,"217":3,"224":2,"225":1,"235":1,"239":2,"243":1,"246":2,"272":1,"274":2,"278":1,"279":1,"283":2,"289":1,"299":1,"304":2,"306":1,"313":1,"324":1,"411":1,"412":1,"416":1,"421":2,"422":2,"431":1,"432":2}}],["vars",{"2":{"200":1,"212":1,"299":1}}],["var",{"2":{"78":2,"82":3,"89":1,"93":2,"275":1,"297":1,"298":1,"312":1}}],["valueerror",{"2":{"382":1,"422":1,"432":1}}],["value",{"2":{"110":1,"112":2,"225":1,"226":1,"258":1,"304":1,"344":1,"346":1,"350":1,"359":1}}],["values",{"2":{"29":1,"105":1,"235":1,"258":1,"262":1,"411":1,"414":1}}],["validity",{"2":{"414":1}}],["validate",{"0":{"264":1},"2":{"264":1,"379":1}}],["validated",{"2":{"117":1}}],["validations",{"2":{"438":1}}],["validation",{"0":{"117":1},"2":{"72":2,"117":2,"187":2}}],["valid",{"2":{"47":1,"49":1,"264":1}}],["v3",{"2":{"24":1,"445":1}}],["vefaas",{"2":{"442":1}}],["vector",{"2":{"439":1}}],["vectorized",{"2":{"322":1}}],["veauth",{"2":{"445":1}}],["veagent",{"2":{"416":1}}],["veadk",{"0":{"410":1},"2":{"13":2,"25":1,"74":1,"78":1,"82":1,"88":1,"89":1,"90":2,"91":1,"92":1,"331":1,"337":2,"345":2,"366":2,"373":3,"393":1,"396":1,"399":4,"406":1,"407":2,"410":3,"415":1,"416":1,"422":6,"432":6,"443":1,"445":17}}],["vendor",{"2":{"392":1}}],["venv",{"2":{"13":2,"15":6,"36":3,"396":3,"443":3}}],["ve",{"2":{"103":1,"276":7,"429":1}}],["verbose",{"2":{"194":1,"266":1}}],["verification",{"2":{"141":1}}],["verifying",{"0":{"426":1},"2":{"128":1,"138":1}}],["verify",{"0":{"16":1},"2":{"16":1,"18":1,"148":1,"150":1,"194":1,"426":1}}],["version>",{"2":{"183":2}}],["versions",{"2":{"36":1,"42":1,"126":1,"183":2,"214":1,"229":1,"243":1}}],["version",{"0":{"10":1,"11":1,"12":1,"178":2,"206":1},"2":{"7":1,"12":1,"13":1,"16":2,"36":1,"53":1,"61":1,"97":1,"101":2,"124":1,"138":1,"147":1,"178":2,"183":6,"200":2,"202":1,"206":6,"214":1,"229":2,"243":1,"251":2,"266":1,"267":1,"268":1,"276":3,"278":2,"399":1,"410":1,"416":1,"445":3}}],["viking",{"2":{"422":3,"431":3,"432":3,"433":2}}],["vikingmem",{"2":{"421":2,"422":2,"423":2}}],["vikingdb",{"2":{"180":1,"181":1,"421":2,"423":3,"429":1,"431":1,"432":1}}],["vim",{"2":{"114":1}}],["viewing",{"2":{"311":1}}],["view",{"0":{"177":1,"178":1},"2":{"51":1,"55":1,"72":1,"158":1,"165":2,"177":3,"180":3,"181":2,"182":2,"183":2,"194":1,"285":1,"286":1,"288":1,"308":1,"313":1}}],["visit",{"2":{"23":1,"51":1,"405":1}}],["visual",{"2":{"4":1}}],["virtualization",{"2":{"392":1}}],["virtual",{"2":{"7":1,"13":2,"15":3,"36":2,"396":2,"443":2}}],["via",{"2":{"3":1,"24":1,"25":2,"33":1,"55":1,"62":1,"89":2,"98":1,"99":1,"122":1,"141":1,"209":1,"276":1,"283":2,"313":1,"396":1}}],["nprint",{"2":{"416":2}}],["nprimes",{"2":{"416":2}}],["nrandom",{"2":{"416":2}}],["ndef",{"2":{"416":2}}],["n",{"2":{"169":1,"416":67}}],["null",{"2":{"104":1,"416":5}}],["numbers",{"2":{"76":1,"117":1,"202":1}}],["number",{"2":{"41":1,"183":2,"323":1,"415":1,"416":1,"417":1,"439":1}}],["nhsoa",{"2":{"29":1}}],["natural",{"2":{"401":1,"415":1,"429":1}}],["nationwide",{"2":{"204":1}}],["native",{"2":{"1":1,"2":1,"393":1}}],["naming",{"2":{"117":1}}],["name>",{"2":{"423":1,"433":1}}],["named",{"2":{"42":1}}],["names",{"0":{"276":1},"2":{"38":1,"82":2,"89":2,"276":3}}],["namespace",{"0":{"232":1,"244":1},"2":{"29":1,"103":2,"107":2,"114":1,"209":1,"224":2,"232":1,"239":2,"244":2,"257":1,"259":1,"267":1,"268":1,"276":2,"279":2}}],["name=model",{"2":{"432":1}}],["name=app",{"2":{"399":3}}],["name=agent",{"2":{"399":1}}],["name=team",{"2":{"114":1,"118":1}}],["name=",{"2":{"25":1,"338":1,"416":1,"422":1,"445":3}}],["name",{"0":{"202":1,"216":1,"231":1,"232":1,"233":1,"234":3,"244":3,"245":3},"2":{"24":1,"29":5,"41":1,"61":1,"75":2,"76":2,"77":6,"78":1,"81":3,"82":2,"84":1,"85":1,"89":2,"92":1,"93":2,"97":1,"98":1,"99":1,"101":2,"102":1,"103":5,"107":4,"111":1,"114":3,"115":2,"117":2,"118":1,"124":1,"130":2,"139":1,"162":1,"163":1,"180":3,"181":1,"182":2,"183":6,"198":1,"200":2,"202":8,"210":1,"212":2,"216":4,"217":1,"222":2,"224":13,"225":1,"226":4,"230":1,"231":3,"233":2,"234":5,"235":3,"237":4,"239":12,"244":5,"247":2,"257":2,"259":3,"262":1,"263":2,"266":1,"267":3,"268":9,"269":2,"273":1,"274":1,"275":1,"276":9,"278":2,"279":8,"302":1,"337":1,"347":1,"358":1,"360":1,"373":1,"382":1,"399":8,"407":1,"416":2,"421":1,"422":7,"432":9,"445":5}}],["networking",{"2":{"105":1}}],["network",{"0":{"105":1},"2":{"46":2,"105":7,"133":1,"183":4,"193":2,"389":1}}],["news",{"2":{"367":4}}],["new",{"2":{"24":1,"55":1,"71":1,"72":2,"73":1,"82":1,"87":1,"91":1,"98":1,"110":2,"112":1,"118":1,"138":1,"182":1,"183":2,"190":1,"271":1,"276":2,"399":2,"405":1}}],["next",{"0":{"20":1,"32":1,"70":1,"195":1,"281":1,"339":1,"387":1},"2":{"32":1,"84":1,"85":1}}],["neednum",{"2":{"445":1}}],["needed",{"2":{"93":1,"121":1,"283":1,"294":1,"299":1,"310":1,"311":1,"313":1}}],["need",{"0":{"295":1},"2":{"17":1,"23":1,"25":1,"29":1,"91":1,"93":1,"105":1,"121":1,"222":1,"237":1,"247":1,"283":1,"288":1,"299":1,"330":1,"389":1,"391":1,"400":1,"405":1,"406":1,"411":1,"422":2,"426":1,"432":2,"442":1,"445":1}}],["needs",{"2":{"2":1,"24":1,"31":1,"182":1,"183":1,"311":1,"362":1,"393":1}}],["necessary",{"2":{"15":1,"50":1,"402":1}}],["normal",{"0":{"294":1}}],["normally",{"2":{"164":1,"194":1}}],["none>",{"2":{"445":1}}],["none=true",{"2":{"399":1}}],["none",{"2":{"90":1,"252":1,"280":1,"363":1,"379":4,"445":1}}],["non",{"0":{"98":1,"111":1},"2":{"72":1,"94":1,"118":2,"150":1,"209":1,"429":1}}],["now",{"2":{"20":1,"286":1,"401":1,"402":1}}],["not",{"0":{"35":1,"38":1,"190":1,"191":1,"192":1,"271":1,"275":1},"2":{"19":1,"24":1,"25":3,"29":1,"35":2,"38":1,"43":1,"49":1,"50":1,"93":1,"104":1,"105":3,"112":1,"121":1,"133":1,"149":1,"169":1,"175":2,"190":1,"191":2,"192":2,"209":1,"220":1,"222":1,"229":1,"237":1,"240":1,"241":2,"247":1,"271":1,"272":1,"274":2,"275":2,"299":1,"331":1,"350":1,"355":1,"360":1,"380":1,"399":2,"422":2,"432":2}}],["notes",{"0":{"133":1,"157":1,"175":1,"346":1,"353":1,"362":1,"368":1,"375":1,"380":1},"2":{"92":1,"93":1,"411":1}}],["note",{"2":{"19":1,"25":1,"206":1,"230":1,"355":1,"395":1,"410":1}}],["no",{"0":{"306":1,"307":1},"2":{"13":1,"38":1,"44":1,"59":1,"89":1,"93":1,"97":1,"112":1,"124":1,"126":1,"132":1,"150":1,"190":1,"220":1,"283":3,"294":4,"298":1,"299":3,"313":1,"350":1,"353":1,"391":2,"414":1,"416":2,"445":2}}],["db",{"2":{"352":2}}],["days",{"2":{"302":1}}],["day",{"2":{"294":2,"301":1}}],["daemon",{"2":{"133":1,"191":1}}],["daily",{"2":{"118":1,"187":1}}],["date",{"2":{"115":1,"285":1,"313":2}}],["datacenter",{"2":{"445":8}}],["database",{"2":{"352":1,"380":1,"421":4,"422":2,"423":4,"431":3,"432":2,"433":1}}],["databases",{"2":{"4":1}}],["data",{"2":{"4":3,"31":2,"51":1,"150":1,"175":1,"219":3,"321":2,"355":2,"360":3,"362":1,"379":5,"389":1,"392":1,"399":3,"401":1,"415":1,"416":2,"429":1,"445":1}}],["dt",{"2":{"115":1}}],["driven",{"0":{"330":1}}],["dry",{"0":{"112":1},"2":{"106":1,"112":2,"118":1}}],["dramatically",{"2":{"53":1}}],["dumps",{"2":{"399":1}}],["dump",{"2":{"379":1,"399":1}}],["dual",{"2":{"105":1}}],["during",{"2":{"24":1,"25":2,"55":1,"123":1,"207":1,"225":1,"238":1,"252":1,"418":1}}],["d",{"2":{"31":1,"285":1,"313":1,"401":1}}],["dialog=none",{"2":{"445":1}}],["dialogue",{"2":{"422":1}}],["diagnose",{"2":{"33":1}}],["did",{"2":{"401":2}}],["difficult",{"2":{"389":1}}],["differences",{"0":{"240":1}}],["different",{"2":{"2":1,"53":1,"57":1,"198":1,"214":1,"229":1,"243":1,"261":1,"313":3,"340":1,"389":1,"414":1,"427":1}}],["dictionary",{"2":{"360":1,"361":1,"385":1}}],["dict",{"2":{"92":2,"330":2,"337":2,"343":2,"344":2,"345":2,"347":2,"355":2,"358":1,"359":1,"360":1,"361":1,"362":1,"363":2,"382":2,"383":2,"384":3,"385":1,"386":4,"399":2,"407":2,"422":2,"432":2,"445":2}}],["distinctions",{"2":{"440":1}}],["distinguishes",{"2":{"214":1,"229":1,"243":1}}],["distributed",{"2":{"399":2}}],["distance",{"2":{"385":7}}],["disable",{"2":{"312":1}}],["disables",{"2":{"133":1}}],["disabled",{"2":{"49":1,"283":2,"306":2,"307":1,"311":1}}],["displayed",{"2":{"150":1,"283":1}}],["display",{"2":{"77":1,"90":1,"178":1,"290":1}}],["diverse",{"2":{"393":1}}],["dive",{"0":{"86":1},"1":{"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"70":1,"195":1}}],["directories",{"2":{"219":1}}],["directory",{"2":{"28":2,"35":2,"42":2,"79":3,"81":2,"82":3,"87":1,"93":1,"150":1,"186":1,"190":1,"219":2,"303":1,"306":3,"339":1,"387":1,"417":1}}],["direct",{"2":{"89":1,"438":1}}],["directly",{"0":{"152":1},"2":{"25":2,"28":1,"58":1,"81":1,"98":1,"150":1,"168":1,"194":1,"410":1}}],["dough",{"2":{"401":1}}],["doubao",{"2":{"24":1,"77":1,"81":1,"89":1,"399":1,"432":1,"445":2}}],["domains",{"2":{"438":1}}],["domain",{"2":{"368":1}}],["download",{"2":{"252":1,"404":1}}],["downloaded",{"2":{"42":1}}],["done",{"2":{"445":1}}],["don",{"2":{"189":1,"262":3,"299":1,"422":1,"432":1}}],["dot",{"2":{"117":1}}],["dockerimage",{"2":{"183":3}}],["dockerignore",{"2":{"84":1,"85":1,"92":1}}],["docker",{"0":{"122":1,"191":1,"248":1,"280":1},"1":{"123":1,"124":1,"125":1,"126":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1},"2":{"55":1,"58":1,"59":1,"60":1,"68":3,"72":1,"92":1,"119":1,"122":2,"124":2,"128":2,"133":3,"138":1,"171":1,"175":1,"191":4,"193":1,"198":4,"202":1,"209":1,"211":1,"216":1,"231":1,"240":1,"248":1,"252":2,"267":1,"268":1}}],["dockerfiles",{"2":{"133":1,"209":1}}],["dockerfile",{"0":{"126":1,"253":1},"2":{"29":1,"121":4,"126":4,"128":1,"129":1,"131":3,"133":2,"205":1,"249":2,"253":3,"280":1}}],["docstrings",{"0":{"385":1},"2":{"362":2,"368":1,"385":1}}],["docstring",{"2":{"359":1}}],["docs",{"2":{"51":1}}],["documents",{"2":{"363":2}}],["documentation",{"2":{"51":1,"339":1}}],["document",{"2":{"31":1,"71":1,"196":1,"322":1,"340":1,"404":1}}],["does",{"0":{"88":1,"389":1},"2":{"25":1,"50":1,"77":1,"93":1,"105":1,"196":1,"202":1,"203":1,"204":2,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"241":1,"331":1,"350":1,"389":1,"429":1}}],["do",{"2":{"24":1,"25":1,"29":1,"93":1,"104":1,"112":1,"133":1,"220":1,"222":1,"237":1,"241":1,"247":1,"262":1,"272":1,"299":1,"389":1,"435":1}}],["debian",{"2":{"445":4}}],["debug=true",{"2":{"102":2}}],["debugged",{"2":{"91":1}}],["debugging",{"0":{"19":1,"25":1,"194":1,"296":1,"409":1},"1":{"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1},"2":{"2":1,"13":1,"19":1,"58":1,"150":2,"187":1,"192":1,"208":1,"211":1,"217":1,"238":1,"240":1,"266":2,"292":2,"310":1,"313":1,"394":1,"422":1,"432":1}}],["debug",{"0":{"288":1,"397":1},"1":{"398":1,"399":1,"400":1,"401":1},"2":{"25":1,"58":1,"72":1,"102":1,"118":1,"217":2,"235":2,"266":2,"282":1,"288":2,"290":1,"292":1,"296":2,"399":1,"401":28,"416":8,"445":5}}],["degrees",{"2":{"385":4}}],["degraded",{"2":{"352":1}}],["demonstrates",{"2":{"399":1,"406":1,"419":1,"422":1,"432":1}}],["demo",{"2":{"337":1,"345":1,"366":1,"373":1,"422":1,"432":1}}],["demand",{"2":{"283":1,"313":1}}],["dedicated",{"2":{"304":2,"366":1,"367":1}}],["dev",{"2":{"124":3,"132":5,"174":1,"188":3,"192":1,"214":1,"261":2,"266":3,"311":1}}],["developer",{"2":{"52":1}}],["developers",{"2":{"1":1,"3":2,"14":1,"52":1,"74":1,"314":1,"330":1}}],["developed",{"2":{"31":1,"91":1}}],["developing",{"2":{"1":1,"21":1}}],["development",{"0":{"11":1,"19":1,"66":1,"67":1,"68":1,"185":1,"266":1,"310":1,"388":1,"394":1},"1":{"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2},"2":{"1":2,"2":2,"3":1,"5":1,"19":1,"20":1,"21":2,"31":1,"32":1,"52":1,"53":1,"55":1,"57":1,"58":1,"71":1,"72":1,"91":1,"187":1,"188":1,"208":2,"211":1,"238":1,"240":1,"261":2,"266":2,"292":1,"310":1,"314":1,"330":1,"394":1,"398":1,"402":2,"417":1,"422":2,"432":2,"445":1}}],["deeply",{"2":{"393":1}}],["deep",{"0":{"86":1},"1":{"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"195":1,"392":1}}],["deepseek",{"2":{"24":1}}],["details",{"2":{"162":1,"163":1,"180":1,"181":1,"182":2,"183":2,"296":1,"321":1,"340":1,"421":1,"431":1,"442":1,"445":2}}],["detailed",{"2":{"42":1,"51":2,"56":1,"61":1,"117":1,"177":1,"194":1,"288":2,"292":1,"296":2,"297":1,"308":1,"339":1,"362":1,"385":1,"401":1,"404":1,"416":1}}],["detected",{"2":{"278":1}}],["detects",{"2":{"89":1}}],["detect",{"2":{"82":1,"121":1}}],["detection",{"2":{"78":1,"352":1}}],["deletion",{"2":{"174":2,"175":1}}],["deletes",{"2":{"321":1,"322":1}}],["deleted",{"0":{"170":1},"1":{"171":1,"172":1},"2":{"171":1,"172":1,"173":1,"175":2}}],["delete",{"2":{"72":1,"116":1,"166":1,"168":2,"171":1,"172":1,"174":1,"180":3,"181":2,"182":4,"183":3,"302":3,"321":1,"322":1,"379":3,"380":1}}],["del",{"2":{"116":1}}],["delivers",{"2":{"52":1}}],["delivery",{"2":{"3":1}}],["denied",{"0":{"50":1}}],["desktop",{"2":{"68":1,"191":1}}],["descriptive",{"2":{"82":1,"202":1}}],["descriptions",{"2":{"177":1,"362":1,"368":1,"438":1}}],["description=description",{"2":{"399":1}}],["description=",{"2":{"89":1,"445":1}}],["description",{"0":{"121":1,"136":1,"144":1,"150":1,"160":1,"164":1,"168":1,"204":1,"344":1,"350":1,"359":1,"372":1},"2":{"29":2,"55":1,"56":1,"72":1,"76":1,"77":3,"78":1,"79":1,"81":1,"84":1,"97":1,"101":3,"102":1,"103":1,"106":1,"107":2,"111":1,"180":3,"181":2,"182":3,"183":4,"200":2,"204":2,"222":1,"225":1,"237":4,"247":1,"266":1,"267":1,"268":1,"278":3,"279":1,"280":1,"290":1,"291":1,"292":1,"359":1,"399":3,"415":1}}],["describe",{"2":{"51":1,"77":1,"445":1}}],["destroyed",{"2":{"414":1}}],["destroy",{"0":{"166":1},"1":{"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1},"2":{"43":1,"44":1,"55":2,"62":1,"72":1,"105":1,"167":1,"169":2,"173":1,"174":3}}],["designed",{"2":{"52":1,"57":1,"71":1,"366":1,"388":1}}],["design",{"2":{"3":1,"4":1,"313":1,"315":1,"321":1}}],["def",{"2":{"92":2,"330":1,"337":2,"343":1,"345":1,"346":1,"347":1,"349":1,"351":1,"352":1,"353":3,"355":1,"358":1,"360":1,"361":1,"362":2,"363":1,"365":1,"366":1,"367":3,"374":1,"379":4,"382":1,"383":1,"384":1,"385":1,"386":2,"399":2,"407":2,"416":1,"422":2,"432":2,"445":2}}],["defaults",{"2":{"69":1,"107":1,"118":1,"197":1,"209":2,"258":1,"283":1,"423":1}}],["default",{"0":{"97":1,"283":1,"294":1,"378":1},"2":{"29":7,"31":1,"61":1,"69":1,"76":1,"79":1,"106":1,"107":1,"121":3,"131":1,"136":1,"140":1,"144":1,"150":2,"160":1,"168":2,"169":1,"180":1,"202":1,"205":1,"206":1,"207":1,"209":3,"214":1,"215":1,"216":1,"220":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"236":1,"237":1,"242":1,"243":1,"251":3,"252":1,"253":1,"254":1,"257":2,"278":1,"279":1,"280":1,"283":1,"285":1,"290":1,"291":1,"292":1,"295":1,"299":2,"304":1,"306":1,"307":1,"310":1,"311":1,"313":1,"345":1,"399":6,"414":1,"445":1}}],["defining",{"2":{"370":1}}],["definitions",{"2":{"438":1}}],["definition",{"2":{"2":1,"3":4,"74":1,"75":1,"78":1,"86":1,"87":1,"89":4,"91":1,"92":1,"93":1,"442":1}}],["defined",{"2":{"210":1,"438":1}}],["defines",{"2":{"61":1,"210":1,"317":3,"342":1,"348":1}}],["define",{"2":{"2":2,"3":1,"61":1,"77":1,"346":1,"355":1,"368":1}}],["deprecated",{"2":{"206":1}}],["deps",{"2":{"125":1,"132":2,"252":1}}],["depth",{"2":{"31":1}}],["dependency",{"0":{"36":1,"352":1},"2":{"29":1,"36":1,"42":3,"93":1,"193":1,"200":1,"207":2,"278":1,"352":1,"389":1,"440":1}}],["dependencies",{"0":{"207":1,"328":1},"2":{"3":1,"13":1,"28":1,"42":1,"66":1,"67":1,"90":1,"92":1,"93":1,"97":1,"101":2,"123":1,"124":2,"125":1,"132":1,"200":1,"207":4,"252":1,"267":1,"278":1,"352":1,"396":1,"402":2,"417":2,"418":1,"443":1}}],["deployable",{"2":{"74":1}}],["deployed",{"2":{"55":1,"72":2,"82":2,"148":1,"157":1,"442":1}}],["deploy",{"0":{"29":1,"134":1,"186":1,"402":1},"1":{"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1},"2":{"4":1,"29":3,"53":1,"55":3,"58":1,"62":2,"72":4,"82":1,"84":1,"85":1,"86":1,"91":1,"104":1,"105":1,"115":1,"133":1,"134":1,"135":1,"140":4,"142":2,"145":1,"147":1,"175":1,"185":1,"186":2,"187":1,"194":2,"208":1,"222":1,"225":1,"237":1,"275":1,"285":1,"294":1,"295":1,"298":1,"303":1,"387":1,"402":2,"417":3}}],["deployments",{"2":{"10":1}}],["deployment",{"0":{"40":1,"43":1,"57":1,"69":1,"137":1,"138":1,"139":1,"141":1,"155":1,"312":1,"388":1,"394":1},"1":{"41":1,"42":1,"43":1,"44":1,"58":1,"59":1,"60":1,"138":1,"139":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2},"2":{"2":3,"3":1,"5":1,"20":1,"21":1,"24":1,"29":7,"32":1,"43":2,"52":1,"53":3,"57":1,"59":1,"60":1,"61":1,"71":1,"72":2,"82":2,"87":2,"88":1,"91":1,"92":1,"97":1,"101":1,"102":2,"119":1,"137":1,"138":2,"139":1,"145":2,"150":1,"157":1,"164":1,"198":2,"199":1,"208":1,"210":1,"222":2,"237":1,"263":1,"393":2,"402":3,"417":2}}],["deploying",{"0":{"417":1},"2":{"1":2,"52":1,"164":1,"264":1,"394":1}}],["decorated",{"2":{"382":1,"386":1}}],["decorator",{"0":{"330":1},"2":{"380":1}}],["decorators",{"2":{"314":1,"317":1,"318":1,"319":1,"330":1,"339":1,"340":1}}],["decoupling",{"2":{"321":1}}],["decomposition",{"2":{"2":1}}],["declares",{"2":{"205":1}}],["declaratively",{"2":{"3":1}}],["declarative",{"2":{"2":1,"53":1,"61":1}}],["www",{"2":{"399":1,"429":2}}],["worry",{"2":{"391":1}}],["worldwide",{"2":{"366":1}}],["working",{"2":{"417":1}}],["works",{"0":{"87":1},"2":{"281":1}}],["workspace",{"2":{"13":1,"31":1,"237":2}}],["workflow",{"0":{"185":1,"187":1},"2":{"20":1,"21":1,"58":1,"59":1,"60":1,"72":1,"91":1,"102":8,"118":1,"187":1,"205":1}}],["workflows",{"0":{"184":1},"1":{"185":1,"186":1,"187":1,"188":1},"2":{"4":1,"53":1,"102":1}}],["work",{"2":{"2":1,"58":1,"401":2}}],["wraps",{"2":{"87":1,"88":1}}],["wrapped",{"2":{"150":1}}],["wrapper",{"0":{"78":1,"82":1,"85":1,"86":1,"88":1,"90":1,"186":1},"1":{"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"74":1,"75":1,"76":1,"78":3,"82":7,"85":3,"86":1,"87":1,"88":1,"90":2,"91":1,"92":3,"93":3}}],["wrapping",{"0":{"92":1},"2":{"85":1}}],["wrap",{"2":{"72":1,"73":1,"74":1,"75":1,"82":3,"186":1,"399":1}}],["written",{"2":{"133":1}}],["writing",{"2":{"31":2,"399":1,"405":1}}],["write",{"2":{"25":1,"125":1,"209":1,"230":1,"321":1,"419":1}}],["warranties",{"2":{"399":1}}],["warning",{"2":{"290":1,"292":2,"304":2,"382":1,"416":1,"445":1}}],["warnings",{"2":{"133":1,"298":2,"312":1}}],["was",{"2":{"275":1}}],["wait",{"2":{"90":1,"236":1}}],["waiting",{"2":{"29":1,"139":1,"401":1,"426":1,"445":1}}],["wanted",{"2":{"401":2}}],["want",{"2":{"56":1,"61":1,"91":2,"150":1,"169":1,"285":1,"286":1,"297":1,"399":1}}],["ways",{"2":{"25":1}}],["walkthrough",{"2":{"281":1}}],["walk",{"2":{"6":1,"21":1,"394":1}}],["wechat",{"2":{"429":1}}],["well",{"2":{"398":1,"436":1,"438":1}}],["weatheragentexecutor",{"2":{"373":1}}],["weather",{"2":{"81":2,"82":2,"84":3,"97":1,"101":2,"111":2,"150":1,"152":2,"153":1,"154":1,"185":3,"186":3,"200":3,"202":1,"204":1,"263":1,"266":2,"268":4,"337":2,"345":2,"360":7,"366":12,"367":4,"373":3}}],["web",{"2":{"77":2,"81":2,"361":4,"399":3,"404":1,"429":1,"438":1}}],["website",{"2":{"51":1,"429":1}}],["websites",{"2":{"31":1}}],["were",{"2":{"38":1,"112":1,"274":1}}],["we",{"2":{"7":1,"13":1,"15":1,"36":1,"61":1,"69":1,"396":1,"398":1,"406":1,"422":1,"426":2,"443":1,"445":1}}],["window",{"2":{"418":1,"445":1}}],["windows",{"2":{"191":1,"445":8}}],["wizards",{"2":{"53":1}}],["wizard",{"2":{"29":2,"55":1,"62":1,"97":1}}],["will",{"0":{"170":1},"1":{"171":1,"172":1},"2":{"6":1,"21":1,"24":2,"25":2,"28":2,"29":4,"42":1,"79":1,"84":1,"85":1,"93":1,"104":1,"105":3,"126":2,"133":1,"150":1,"168":1,"169":1,"171":1,"172":1,"175":3,"216":1,"226":1,"230":1,"258":1,"378":1,"394":1,"396":1,"401":2,"404":1,"406":1,"408":1,"412":1,"414":3,"416":1,"417":1,"421":2,"422":1,"424":1,"425":1,"426":1,"429":1,"431":1,"432":1,"434":1,"435":1,"444":1}}],["within",{"2":{"346":1,"353":1,"362":1,"406":1}}],["without",{"2":{"53":1,"86":1,"98":1,"106":1,"150":1,"264":1,"378":1,"399":1}}],["with",{"0":{"9":1,"13":1,"154":1,"155":1,"422":1,"432":1},"1":{"10":1,"11":1,"12":1},"2":{"1":1,"2":2,"7":1,"15":1,"17":1,"29":1,"31":1,"36":2,"42":1,"44":1,"55":2,"60":2,"61":1,"66":1,"67":1,"71":1,"81":1,"82":1,"84":2,"85":1,"92":1,"97":1,"101":1,"102":1,"117":1,"128":1,"131":1,"150":2,"157":1,"168":1,"175":1,"183":1,"203":1,"210":1,"217":2,"235":1,"275":1,"282":1,"283":2,"289":1,"314":1,"316":1,"319":1,"352":1,"361":2,"388":1,"391":1,"392":1,"393":2,"395":1,"398":1,"399":4,"400":1,"401":1,"403":1,"404":2,"406":2,"408":1,"411":1,"414":3,"415":1,"417":1,"418":1,"419":1,"422":2,"427":1,"429":3,"432":2,"436":1,"438":1,"439":1,"440":1,"442":2,"443":1,"445":4}}],["why",{"0":{"147":1},"2":{"401":2}}],["which",{"0":{"91":1},"2":{"203":1,"215":1,"231":1,"414":1,"417":1,"429":1}}],["while",{"2":{"3":1,"393":1,"439":1}}],["what",{"0":{"88":1,"170":1,"389":1},"1":{"171":1,"172":1},"2":{"77":1,"93":1,"196":1,"202":1,"203":1,"204":2,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"426":1,"429":2,"435":1}}],["whether",{"2":{"39":1,"42":1,"44":1,"47":2,"49":1,"52":1,"71":1,"158":1,"209":1,"290":2,"306":1,"426":1}}],["when",{"0":{"91":1},"2":{"33":1,"35":1,"36":1,"39":1,"46":1,"82":1,"104":2,"105":3,"114":1,"121":1,"126":2,"133":1,"150":1,"189":1,"209":1,"226":1,"258":1,"288":1,"290":1,"296":1,"299":1,"301":1,"304":1,"310":1,"313":1,"391":2,"414":1,"423":2,"439":1,"440":1}}],["where",{"2":{"2":1,"4":1,"79":1,"208":1,"228":1,"242":1}}],["gadk",{"2":{"331":1}}],["gateway",{"2":{"323":1,"392":1,"436":1,"440":1}}],["gathering",{"2":{"31":1}}],["gain",{"2":{"133":1}}],["g++",{"2":{"124":1,"125":1,"132":1}}],["gcc",{"2":{"124":2,"125":1,"132":2}}],["grows",{"2":{"439":1}}],["greeting",{"2":{"150":1}}],["great",{"2":{"84":1,"156":1,"385":1}}],["gradually",{"2":{"429":1}}],["grade",{"0":{"392":1},"2":{"1":1,"59":1,"60":1}}],["grained",{"2":{"392":1}}],["graceful",{"2":{"333":1}}],["graph",{"2":{"322":1}}],["grant",{"2":{"50":1}}],["gives",{"2":{"202":1}}],["give",{"2":{"82":1,"415":1,"417":1}}],["gitignore",{"2":{"262":2,"311":1}}],["git",{"2":{"15":3,"262":1}}],["github",{"0":{"15":1},"2":{"15":1,"33":1}}],["g",{"2":{"76":1,"107":1,"222":1,"230":1,"254":1,"421":1,"423":1,"439":1}}],["gt",{"2":{"72":1,"118":3,"251":2,"353":1}}],["governable",{"2":{"436":2}}],["governance",{"2":{"436":1}}],["governing",{"2":{"399":1}}],["going",{"2":{"156":1,"268":1}}],["good",{"2":{"91":2,"266":1,"382":1,"386":1}}],["google",{"2":{"90":1,"331":1,"373":1,"399":3,"443":1,"445":2}}],["go",{"2":{"29":1,"67":1,"72":1,"91":1,"203":4,"205":1,"206":1,"207":4,"249":1,"251":1,"267":4,"391":1,"445":11}}],["golang",{"0":{"67":1,"267":1},"2":{"2":1,"21":1,"29":1,"67":1,"84":1,"125":1,"132":2,"205":2,"206":3,"249":1,"251":2,"267":3}}],["global",{"0":{"18":1,"107":1,"114":1,"255":1},"1":{"256":1,"257":1,"258":1,"259":1},"2":{"18":6,"69":8,"94":2,"95":2,"107":7,"114":17,"118":8,"192":4,"197":2,"209":2,"255":1,"258":2,"259":2,"274":1}}],["guided",{"2":{"94":1,"118":1}}],["guides",{"2":{"73":1,"81":1,"97":1,"418":1}}],["guide",{"0":{"33":1,"340":1,"394":1,"403":1,"418":1,"427":1},"1":{"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"395":1,"396":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1},"2":{"6":1,"20":2,"21":1,"27":1,"29":1,"33":1,"53":1,"195":1,"339":1,"394":1,"402":1,"404":1,"417":1}}],["guarantees",{"2":{"2":1}}],["genai",{"2":{"399":1}}],["general",{"0":{"101":1},"2":{"29":1,"61":1,"112":1,"292":1,"304":2}}],["generator",{"2":{"399":1}}],["generation",{"2":{"90":1,"322":1}}],["generating",{"2":{"4":1,"128":1,"129":1}}],["generates",{"2":{"87":1,"229":1,"398":1}}],["generated",{"2":{"28":1,"76":1,"84":1,"85":1,"88":1,"92":1,"93":2,"114":1,"126":4,"133":1,"139":1,"209":1,"216":1,"222":1,"237":1,"247":1,"285":1,"294":1,"299":1,"399":2,"402":1,"405":1}}],["generate",{"2":{"4":1,"29":2,"39":1,"78":1,"82":1,"87":1,"362":1,"417":1,"438":1}}],["geographic",{"2":{"228":1,"242":1,"385":1}}],["getenv",{"2":{"422":1,"432":1,"445":4}}],["getlogger",{"2":{"347":1,"382":1,"399":1,"422":1,"432":1,"445":1}}],["gets",{"2":{"321":2,"322":1}}],["getting",{"0":{"26":1,"51":1},"1":{"27":1,"28":1,"29":1},"2":{"84":1}}],["get",{"0":{"5":1},"2":{"24":2,"72":1,"124":2,"132":2,"141":1,"180":1,"181":1,"182":1,"183":1,"321":2,"322":1,"337":2,"345":5,"354":4,"360":2,"361":1,"366":2,"367":2,"373":3,"379":3,"380":1,"383":1,"384":1,"399":1,"416":2}}],["korean",{"2":{"429":1}}],["km",{"2":{"385":1}}],["kingdee",{"2":{"429":1}}],["kind",{"2":{"399":1}}],["kilometers",{"2":{"385":1}}],["kickstart",{"2":{"2":1}}],["kubernetes",{"2":{"317":1,"348":1,"354":2}}],["k",{"2":{"181":4}}],["kwargs",{"2":{"150":1,"371":1,"372":1,"377":1}}],["kb",{"2":{"104":2,"181":1,"183":1}}],["kernel",{"2":{"416":1}}],["keeps",{"2":{"297":1}}],["keep",{"2":{"29":1,"91":1,"264":1,"297":1,"310":1,"311":1}}],["keyerror",{"2":{"347":1}}],["keywords=query",{"2":{"363":1}}],["keywords",{"2":{"363":3}}],["keyword",{"0":{"226":1}}],["key>",{"2":{"23":2,"25":3,"262":1,"423":1}}],["keys",{"0":{"23":1},"2":{"23":1,"25":1,"29":1,"102":1,"118":1,"217":1}}],["key=your",{"2":{"400":2,"411":2}}],["key=sk",{"2":{"114":1}}],["key=shared",{"2":{"102":2}}],["key=ak",{"2":{"114":1}}],["key=new",{"2":{"110":1}}],["key=value",{"2":{"107":1,"116":2}}],["key=xxxxx",{"2":{"97":1,"98":1,"111":1,"116":2}}],["key=",{"2":{"18":2,"19":2,"23":2,"25":3,"69":4,"192":2,"338":2,"421":1,"445":2}}],["key",{"0":{"2":1,"24":1,"53":1,"155":1,"329":1},"1":{"330":1,"331":1,"332":1,"333":1,"334":1},"2":{"18":2,"19":2,"24":6,"25":1,"29":2,"38":2,"44":1,"47":3,"61":2,"69":4,"102":1,"104":1,"107":4,"114":2,"116":2,"150":1,"155":1,"157":1,"212":1,"217":3,"224":3,"226":1,"234":1,"235":4,"237":2,"239":3,"247":1,"257":2,"262":2,"263":1,"266":1,"267":1,"268":2,"269":1,"297":1,"399":1,"422":3,"423":1,"432":3,"436":1,"438":1,"440":3,"442":1,"445":5}}],["knowledgebase=knowledgebase",{"2":{"432":1}}],["knowledgebase",{"2":{"432":6}}],["knowledge",{"0":{"181":1,"427":1,"429":1,"430":1,"432":1},"1":{"431":1},"2":{"2":1,"3":1,"4":1,"32":2,"56":2,"63":2,"104":4,"179":1,"181":17,"183":2,"322":11,"427":5,"428":3,"429":12,"430":2,"431":1,"432":4,"435":1}}],["md",{"2":{"429":2,"435":1}}],["msg",{"2":{"416":1}}],["mtime",{"2":{"302":1}}],["might",{"2":{"399":1}}],["migration",{"2":{"276":1}}],["mirror",{"2":{"396":1,"443":1}}],["minimal",{"0":{"269":1},"2":{"269":2,"393":1}}],["minute",{"2":{"182":2,"426":1}}],["minutes",{"2":{"29":1,"43":2,"62":1,"128":1,"129":1,"139":1,"414":1}}],["missing",{"0":{"273":1},"2":{"133":1,"232":1,"233":1,"347":2,"389":1}}],["mistakes",{"2":{"118":1}}],["misleading",{"2":{"105":1}}],["mixed",{"2":{"102":1}}],["mkdir",{"2":{"62":1,"306":1}}],["myexecutor",{"2":{"378":1}}],["mytaskstore",{"2":{"377":1}}],["myagentexecutor",{"2":{"371":1}}],["myagent",{"2":{"98":1,"99":1}}],["myapp",{"2":{"29":1}}],["my",{"2":{"61":1,"62":5,"76":1,"78":1,"81":3,"82":5,"84":3,"85":6,"89":3,"92":4,"93":2,"97":3,"101":1,"103":2,"114":1,"118":1,"124":1,"128":1,"129":1,"139":1,"162":1,"163":2,"180":4,"181":1,"182":3,"183":4,"186":1,"190":1,"198":2,"200":2,"212":1,"222":1,"230":1,"231":1,"235":1,"257":3,"271":1,"290":1,"301":1,"303":1,"311":1,"338":1,"425":1,"426":1,"445":1}}],["mounts",{"2":{"219":2}}],["monitoring",{"2":{"218":1,"312":1,"326":1,"389":1,"391":2}}],["monitor",{"2":{"72":1,"389":1}}],["most",{"2":{"55":1,"235":1,"317":1,"341":1,"445":1}}],["more",{"0":{"63":1},"2":{"32":1,"195":1,"248":1}}],["modalities=none",{"2":{"445":1}}],["modifications",{"2":{"406":1,"422":1,"432":1}}],["modified",{"2":{"93":2,"183":1}}],["modifying",{"2":{"105":1}}],["modify",{"2":{"84":1,"85":1,"93":2,"98":1,"132":3,"311":1}}],["mod",{"2":{"29":1,"67":1,"207":2,"267":1}}],["mode=",{"2":{"445":1}}],["mode=streamingmode",{"2":{"399":1}}],["mode=public",{"2":{"105":1}}],["mode>",{"2":{"275":1}}],["modes",{"0":{"57":1,"65":1,"74":1,"96":1},"1":{"58":1,"59":1,"60":1,"97":1,"98":1,"99":1},"2":{"53":1,"94":1,"97":1,"102":2,"198":2,"199":1,"210":1,"275":1}}],["model=",{"2":{"89":1}}],["models",{"2":{"24":1}}],["model",{"0":{"24":1,"47":1},"2":{"24":6,"25":5,"29":5,"44":1,"47":5,"57":1,"61":1,"77":3,"81":1,"97":1,"102":2,"111":1,"116":3,"212":1,"217":2,"224":4,"235":5,"239":4,"262":3,"263":3,"266":1,"267":1,"268":2,"269":1,"318":1,"356":1,"379":2,"399":4,"422":7,"432":9,"445":4}}],["mode",{"0":{"25":1,"58":1,"59":1,"60":1,"68":1,"69":1,"77":1,"78":1,"81":1,"82":1,"84":1,"85":1,"86":1,"97":1,"98":1,"99":1,"103":1,"128":1,"129":1,"138":1,"139":1,"162":1,"163":1,"171":1,"172":1,"185":1,"186":1,"191":1,"192":1,"240":1,"288":1},"1":{"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"15":1,"25":3,"29":1,"61":2,"72":1,"74":2,"75":2,"76":2,"82":2,"84":1,"85":1,"86":1,"90":1,"91":2,"97":1,"101":1,"102":4,"105":4,"106":1,"116":1,"118":4,"133":2,"141":2,"150":1,"164":2,"198":1,"208":2,"225":1,"235":1,"241":2,"244":1,"245":1,"246":1,"269":2,"275":1,"440":1}}],["module",{"0":{"328":1},"2":{"89":1}}],["modules",{"0":{"325":1},"1":{"326":1,"327":1},"2":{"2":1,"3":1,"315":1}}],["modular",{"2":{"2":1,"315":1}}],["mcptoolset",{"2":{"445":3}}],["mcpservers",{"2":{"444":1}}],["mcp",{"0":{"356":1,"436":1,"437":1,"438":1,"439":1,"441":1,"444":1},"1":{"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"437":1,"438":2,"439":2,"440":2,"442":1,"443":1,"444":1,"445":1},"2":{"32":1,"104":6,"183":3,"318":4,"323":3,"356":2,"357":1,"360":2,"361":1,"362":1,"363":1,"364":1,"366":2,"367":3,"385":1,"393":1,"436":3,"437":3,"438":5,"439":1,"440":4,"442":2,"443":2,"444":4,"445":13}}],["much",{"2":{"221":1}}],["mutually",{"2":{"157":1}}],["musl",{"2":{"124":1,"132":1}}],["must",{"2":{"25":2,"36":1,"89":6,"90":1,"101":1,"117":2,"149":1,"203":1,"215":1,"230":1,"313":1,"346":1,"353":1,"359":1,"360":1,"362":1,"375":2,"380":1,"422":1,"432":1}}],["multiple",{"2":{"2":2,"4":1,"21":1,"24":1,"53":1,"91":1,"304":1,"316":1,"367":1,"391":1,"392":1,"408":1,"414":1,"421":1,"423":1,"439":1}}],["multi",{"0":{"188":1,"261":1,"367":1},"2":{"2":2,"4":1,"31":1,"53":1,"77":1,"84":1,"125":1,"132":1,"249":1,"251":1,"389":2,"393":1,"399":1,"418":1,"429":2}}],["m",{"2":{"15":1,"115":2,"180":4,"285":1,"313":1,"396":1,"443":1}}],["mechanism",{"0":{"414":1}}],["me",{"2":{"401":2,"402":1,"415":1,"417":1}}],["message=new",{"2":{"399":1}}],["messages=payload",{"2":{"383":1,"386":2}}],["messages=prompt",{"2":{"92":1,"337":1,"345":1,"347":1,"366":1,"407":1,"422":1,"432":1,"445":1}}],["messages=user",{"2":{"374":1}}],["messages=query",{"2":{"367":3}}],["messages",{"2":{"292":3,"374":1}}],["message",{"0":{"152":1},"2":{"149":2,"150":3,"157":1,"374":2,"399":2,"416":1}}],["mem0ai==0",{"2":{"422":1}}],["mem0",{"2":{"180":1,"321":1,"421":5,"422":4,"423":5}}],["members",{"2":{"114":1,"118":1,"311":1}}],["mem",{"2":{"104":2,"183":1,"421":1,"422":2}}],["memory=long",{"2":{"422":1}}],["memory>",{"2":{"421":1}}],["memorybase",{"2":{"321":1}}],["memory",{"0":{"180":1,"221":1,"418":1,"420":1,"421":1,"422":1,"426":1,"431":1},"1":{"421":1},"2":{"2":1,"3":1,"32":2,"56":2,"63":2,"104":5,"179":1,"180":20,"183":1,"212":2,"221":1,"266":1,"321":15,"338":7,"378":1,"380":1,"399":1,"418":4,"419":6,"420":2,"421":5,"422":11,"423":4,"426":3,"431":2,"445":13}}],["merged",{"2":{"217":1,"235":1}}],["merge",{"2":{"102":1}}],["metrics",{"2":{"235":1,"332":1,"389":1}}],["method",{"0":{"9":1,"13":1,"14":1},"1":{"10":1,"11":1,"12":1,"15":1},"2":{"187":2,"375":2,"445":10}}],["methods",{"0":{"8":1},"1":{"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1},"2":{"304":1,"380":2}}],["metadata",{"2":{"3":1,"126":3,"133":2,"327":1,"416":1}}],["meet",{"2":{"2":1,"89":1,"393":1}}],["malicious",{"2":{"389":1}}],["maximizing",{"2":{"391":1}}],["maximum",{"2":{"236":1}}],["max",{"2":{"363":3,"445":1}}],["mapping",{"2":{"251":1}}],["mappings",{"2":{"212":1,"218":1}}],["maps",{"2":{"218":2}}],["match",{"2":{"215":1,"439":1}}],["mature",{"2":{"82":1,"392":1}}],["major",{"2":{"204":1}}],["master",{"2":{"70":1}}],["mac",{"2":{"191":1}}],["machine",{"2":{"58":1,"128":1,"138":1,"208":3,"238":1}}],["macos",{"2":{"7":1}}],["mainly",{"2":{"437":1}}],["mainstream",{"2":{"393":1,"418":1,"427":1,"429":1}}],["maintained",{"2":{"422":1,"432":1}}],["maintaining",{"2":{"414":1}}],["maintainability",{"2":{"334":1}}],["maintenance",{"2":{"82":1,"389":1}}],["main",{"0":{"54":1,"100":1},"1":{"55":1,"56":1,"101":1,"102":1,"103":1,"104":1,"105":1},"2":{"89":1,"92":1,"203":2,"267":1,"269":1,"281":1,"317":1,"321":1,"322":1,"323":1,"324":1,"337":1,"342":1,"345":1,"373":1,"399":1,"401":1,"407":1,"417":1,"422":1,"432":1,"445":1}}],["many",{"0":{"308":1},"2":{"308":1}}],["manual",{"2":{"98":1,"389":1}}],["manually",{"2":{"25":2,"29":2,"78":1,"171":1,"172":1,"220":1,"222":1,"237":1,"247":1,"302":1,"306":1}}],["managing",{"2":{"61":1,"179":1,"321":1,"322":1,"323":1,"324":1,"389":1}}],["manages",{"2":{"232":1,"234":1,"321":1,"323":1,"324":1}}],["managed",{"0":{"222":1,"237":1,"247":1},"2":{"126":1,"222":1,"237":1,"247":1,"388":1,"389":1}}],["manage",{"2":{"13":1,"32":1,"53":1,"54":1,"56":4,"63":1,"66":1,"67":1,"72":1,"118":1,"126":1,"180":1,"181":1,"182":1,"183":1,"226":1,"245":1,"327":1,"396":1}}],["manager",{"2":{"7":1,"65":1,"410":1}}],["management",{"0":{"114":1,"126":1,"188":1,"261":1,"300":1,"327":1},"1":{"301":1,"302":1,"303":1},"2":{"2":1,"24":1,"52":1,"71":1,"133":1,"179":1,"182":3,"183":1,"312":1,"313":1,"324":1,"326":1,"389":1,"391":2,"399":1,"414":1,"429":2,"443":1}}],["manner",{"2":{"61":1}}],["may",{"2":{"19":1,"33":1,"36":1,"38":1,"43":2,"150":1,"157":1,"399":2}}],["make",{"2":{"2":1,"24":1,"93":1,"263":1,"389":1,"391":1,"406":1,"422":1,"432":1,"442":1}}],["rpalbxxxxxxxxxxxxxxo2pq",{"2":{"444":1}}],["risks",{"2":{"389":1,"392":1}}],["rich",{"2":{"2":2,"179":1}}],["rm",{"2":{"302":1}}],["rates",{"2":{"436":1}}],["rather",{"2":{"353":1,"388":1}}],["range",{"2":{"416":6}}],["random",{"2":{"415":1,"416":11,"417":1}}],["raise",{"2":{"383":1,"422":1,"432":1}}],["rag",{"2":{"322":1}}],["rapid",{"2":{"266":1}}],["rapidly",{"2":{"52":1,"314":1,"340":1}}],["raw",{"2":{"150":4}}],["rule",{"2":{"438":1}}],["rules",{"2":{"92":1,"102":1,"117":1,"202":1,"203":1,"204":1,"389":1}}],["runconfig",{"2":{"399":1}}],["runner=runner",{"2":{"371":1,"373":1,"374":1,"378":1}}],["runner",{"2":{"88":2,"92":4,"337":4,"345":4,"347":1,"366":4,"367":3,"372":2,"373":3,"374":1,"375":2,"383":1,"386":6,"399":6,"401":28,"407":4,"416":3,"422":6,"432":4,"445":10}}],["running",{"0":{"191":1},"2":{"28":1,"31":1,"35":1,"39":1,"46":1,"68":1,"84":1,"85":1,"133":1,"138":1,"141":2,"142":1,"158":1,"162":3,"163":1,"164":2,"169":1,"191":1,"194":2,"283":1,"355":3,"391":1,"399":1,"401":2,"416":1,"422":2,"432":2,"445":13}}],["runs",{"2":{"28":1,"123":1,"203":1,"228":1,"242":1,"252":1,"392":1}}],["runtimes",{"2":{"105":1,"183":1}}],["runtime",{"0":{"43":1,"44":1,"104":1,"105":1,"183":1,"210":1,"217":1,"234":3,"235":1,"245":3,"246":1,"316":1,"388":1,"389":1},"1":{"317":1,"318":1,"319":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":1,"396":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1},"2":{"3":1,"25":4,"29":7,"43":1,"44":2,"46":1,"55":1,"56":2,"59":1,"60":2,"61":1,"62":1,"63":2,"72":2,"98":1,"102":5,"104":5,"105":10,"114":1,"118":1,"125":1,"132":1,"139":5,"141":2,"156":1,"163":3,"164":1,"172":1,"173":2,"179":1,"183":23,"196":1,"198":1,"200":1,"202":1,"206":1,"208":1,"210":2,"212":1,"217":2,"224":6,"226":4,"234":5,"235":3,"237":6,"239":6,"245":2,"246":2,"247":5,"249":2,"251":3,"262":1,"263":1,"266":2,"267":2,"268":6,"269":1,"275":4,"276":6,"278":1,"279":3,"282":1,"324":4,"328":1,"388":1,"389":1,"391":1,"392":1,"393":1,"396":2,"399":1,"403":1,"417":1,"422":1,"423":2,"424":1,"432":2,"433":1,"434":1,"440":2}}],["run",{"0":{"112":1,"445":1},"2":{"2":1,"15":1,"16":1,"20":1,"25":1,"29":3,"35":2,"39":1,"58":1,"77":1,"81":1,"92":3,"97":4,"106":1,"112":2,"118":1,"125":1,"203":1,"208":2,"211":1,"223":1,"238":2,"264":1,"283":1,"285":1,"286":1,"287":1,"288":1,"295":1,"296":1,"297":1,"298":1,"307":1,"313":1,"330":1,"337":3,"343":1,"345":2,"347":2,"366":1,"367":3,"373":2,"374":1,"382":1,"383":2,"384":1,"386":4,"391":1,"399":6,"401":1,"404":1,"406":2,"407":6,"408":1,"412":1,"416":8,"417":1,"422":4,"424":1,"432":4,"434":1,"445":6}}],["rotation",{"2":{"440":1}}],["round",{"2":{"422":1}}],["routing",{"2":{"323":2}}],["routes",{"2":{"317":1}}],["role=",{"2":{"399":1}}],["role>",{"2":{"183":3}}],["role",{"0":{"234":1,"245":1},"2":{"50":1,"77":1,"183":3,"224":2,"226":2,"234":2,"239":2,"268":1}}],["root",{"2":{"42":2,"123":1,"133":1,"252":1,"301":1,"311":1,"417":1,"445":1}}],["r",{"2":{"29":1,"139":1,"156":1,"163":2,"173":1,"183":6}}],["reorganize",{"2":{"435":1}}],["rebuild",{"2":{"187":1}}],["retention",{"2":{"418":1}}],["retrieve",{"2":{"419":1,"428":1,"435":1}}],["retrieval",{"2":{"321":1,"322":1,"399":1,"429":1,"439":2}}],["retry",{"2":{"193":1,"326":1,"333":1}}],["retained",{"2":{"171":1,"172":1,"173":1,"175":2}}],["return",{"2":{"90":2,"92":2,"330":1,"337":2,"344":1,"345":2,"346":2,"347":3,"350":1,"351":1,"352":2,"353":1,"355":1,"359":2,"360":2,"361":1,"362":2,"363":1,"366":1,"367":3,"374":1,"379":2,"382":3,"383":1,"386":2,"399":2,"407":2,"416":15,"422":2,"432":2,"445":2}}],["returns",{"2":{"47":1,"350":1,"360":1,"361":1,"363":1,"366":1,"374":1,"385":1}}],["reminder",{"2":{"311":1}}],["removing",{"2":{"133":1}}],["remove",{"2":{"126":2}}],["remain",{"2":{"93":1}}],["refined",{"2":{"440":1}}],["refinement",{"2":{"436":1}}],["refer",{"2":{"313":1,"339":1,"396":1,"417":1}}],["reference",{"0":{"71":1,"196":1,"277":1},"1":{"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":2,"279":2,"280":2,"281":1},"2":{"56":1,"61":1,"70":2,"313":1,"401":1,"443":1}}],["refresh",{"2":{"121":1,"131":1}}],["regularly",{"0":{"264":1}}],["regeneration",{"2":{"126":1}}],["regenerate",{"0":{"253":1},"2":{"121":3,"126":1,"131":3,"249":2,"253":3,"280":2}}],["register",{"2":{"373":1}}],["registered",{"2":{"354":1}}],["registers",{"2":{"318":1,"319":2,"323":1,"357":1,"370":1,"376":1}}],["registry",{"2":{"41":2,"59":1,"60":1,"129":1,"224":1,"231":1,"237":1,"239":1,"244":1,"257":1}}],["registration",{"2":{"23":1}}],["region=cn",{"2":{"416":1,"431":1}}],["region",{"0":{"228":1,"242":1},"2":{"29":2,"61":1,"103":2,"107":4,"111":1,"114":2,"209":1,"224":2,"228":2,"237":4,"239":2,"242":1,"257":2,"263":2,"267":1,"268":1,"269":1,"279":2,"416":1,"445":1}}],["recreation",{"2":{"399":1}}],["recreate",{"2":{"105":1}}],["receive",{"2":{"164":1}}],["reconfigure",{"2":{"273":1}}],["recording",{"2":{"310":1}}],["records",{"0":{"295":1},"2":{"296":1,"298":1,"304":1,"419":1,"428":1}}],["recorded",{"2":{"283":1}}],["record",{"2":{"24":1,"130":1,"291":1,"297":1,"298":1,"312":1,"405":1,"429":1}}],["recommendations",{"0":{"312":1},"2":{"310":1,"429":1}}],["recommend",{"2":{"7":1,"13":1,"36":1,"61":1,"69":1,"396":1,"398":1,"406":1,"422":1,"426":1,"429":1}}],["recommended",{"0":{"13":1,"18":1,"97":1,"310":1},"2":{"7":1,"10":1,"13":1,"19":1,"29":1,"36":1,"66":1,"97":1,"169":1,"174":1,"187":2,"192":1,"202":1,"208":1,"209":1,"229":2,"230":1,"262":1,"268":1,"276":1,"302":1,"311":1,"346":1,"359":1,"362":1,"380":1,"432":1}}],["review",{"2":{"84":1,"85":1,"297":1}}],["rewriting",{"2":{"82":1,"86":1}}],["reuse",{"2":{"74":1,"259":1,"414":1}}],["redundancy",{"2":{"439":1}}],["reducing",{"2":{"439":1}}],["reduces",{"2":{"312":1,"323":1,"436":1}}],["reduce",{"2":{"53":1,"228":1}}],["redistaskstore",{"2":{"379":1}}],["redis",{"2":{"352":6,"379":11,"380":1}}],["redact",{"2":{"51":1}}],["redeployed",{"2":{"275":1}}],["redeploying",{"2":{"44":1}}],["redeploy",{"2":{"43":1,"173":1,"175":3,"187":1,"275":1}}],["replace",{"2":{"400":1,"411":1}}],["reproduction",{"2":{"51":1}}],["repo",{"0":{"233":1,"244":1},"2":{"15":1,"103":1,"224":2,"239":2,"244":2,"268":1,"276":2,"279":1}}],["repository",{"0":{"15":1},"2":{"29":4,"103":1,"202":1,"233":2,"279":1}}],["report",{"2":{"81":1}}],["reporter",{"2":{"4":1}}],["reports",{"2":{"4":2,"31":1,"35":1,"36":1,"39":1,"42":1,"46":1,"49":1,"50":1,"429":1}}],["re",{"2":{"38":1,"39":1,"52":1}}],["reinstall",{"2":{"36":2}}],["reliability",{"2":{"436":1}}],["reliable",{"2":{"59":1}}],["relative",{"2":{"123":1,"133":1,"252":1}}],["related",{"2":{"25":1,"55":1,"72":1,"114":1,"234":1,"237":4,"241":1,"366":1}}],["releases",{"2":{"440":1}}],["release",{"2":{"72":2,"172":1,"183":2}}],["releasing",{"2":{"29":1,"43":1,"55":1,"164":1,"166":1}}],["relevant",{"2":{"50":1,"51":1,"429":1}}],["reload",{"2":{"35":1}}],["reasonable",{"2":{"368":2}}],["reasoning",{"2":{"150":5}}],["reasons",{"2":{"19":1}}],["realtime",{"2":{"445":1}}],["real",{"2":{"90":1,"286":1,"311":1,"389":1,"391":2,"429":1}}],["reads",{"2":{"426":1}}],["readiness",{"2":{"317":2,"354":2}}],["reading",{"2":{"145":1}}],["read",{"2":{"51":1,"230":1,"321":1,"339":1,"387":1,"426":1}}],["ready",{"0":{"333":1},"2":{"29":2,"43":1,"46":1,"91":1,"139":2,"163":2,"164":2,"181":1,"401":1}}],["requiring",{"2":{"393":1}}],["requires",{"2":{"105":2}}],["require",{"2":{"60":1,"157":1,"241":1,"418":1}}],["requirements",{"0":{"7":1,"64":1,"65":1,"89":1},"1":{"65":1,"66":1,"67":1,"68":1,"69":1},"2":{"15":1,"28":1,"29":1,"42":1,"66":1,"84":1,"85":1,"89":2,"90":1,"92":1,"93":1,"97":1,"101":1,"124":1,"193":1,"200":1,"207":3,"398":1,"402":1,"417":2,"422":1,"445":1}}],["required",{"0":{"25":1,"202":1,"203":1,"208":1,"273":1},"2":{"3":1,"38":2,"49":1,"50":1,"59":1,"78":1,"87":1,"88":1,"105":1,"117":1,"150":1,"199":1,"200":2,"235":2,"240":2,"273":2,"278":1,"347":2,"362":1,"380":1,"399":1,"400":1,"411":2,"422":1}}],["requestid",{"2":{"416":1}}],["requestcontext",{"2":{"374":2}}],["requests",{"2":{"134":1,"164":1,"342":1,"408":2,"414":2}}],["request",{"0":{"153":1},"2":{"29":1,"88":2,"148":1,"150":3,"326":2,"327":2,"333":1,"344":4,"374":1,"383":8,"386":1,"401":1,"415":1,"445":3}}],["resumption=none",{"2":{"445":1}}],["results=query",{"2":{"363":1}}],["results",{"2":{"363":7,"374":1,"399":1,"422":1}}],["result",{"0":{"130":1},"2":{"90":1,"304":1,"344":1,"345":1,"355":2,"359":1,"360":2,"363":1,"366":1,"374":1,"382":2,"416":2,"445":1}}],["respond",{"2":{"429":1}}],["responsibility",{"2":{"368":1}}],["responsible",{"2":{"88":1}}],["responsemetadata",{"2":{"416":1}}],["responses",{"2":{"90":1}}],["response",{"2":{"31":1,"88":1,"90":1,"92":2,"150":1,"156":1,"330":1,"337":2,"338":2,"344":1,"345":2,"346":1,"347":2,"353":1,"361":3,"366":2,"374":3,"383":2,"407":2,"416":1,"422":4,"432":4,"445":5}}],["reset",{"2":{"306":1}}],["research",{"2":{"31":1}}],["researcher",{"2":{"4":1}}],["restrict",{"2":{"331":1}}],["rest",{"2":{"99":1}}],["restarting",{"2":{"164":2}}],["restart",{"0":{"220":1},"2":{"35":1,"212":2,"220":5}}],["resource",{"0":{"50":1,"104":1,"421":1},"2":{"183":1,"221":1,"226":1,"419":2,"428":1}}],["resources",{"0":{"431":1},"2":{"29":1,"43":2,"50":1,"55":1,"62":1,"71":1,"72":3,"104":2,"166":1,"172":1,"173":2,"179":1,"183":1,"221":1,"252":1,"324":1,"389":1,"391":1,"421":2,"431":1}}],["resolve",{"2":{"33":1,"51":1}}],["render",{"0":{"274":1},"2":{"29":1}}],["rendered",{"2":{"29":1,"225":1,"274":1}}],["ecs",{"2":{"445":19}}],["ecosystem",{"2":{"436":1}}],["echo",{"2":{"38":1,"124":1,"274":2,"306":1}}],["evolution",{"2":{"418":1}}],["evalue",{"2":{"416":1}}],["ever",{"2":{"389":1}}],["every",{"2":{"386":1}}],["everything",{"2":{"291":1,"401":1}}],["eventqueue",{"2":{"374":2}}],["events",{"2":{"150":1,"374":2,"399":1,"419":1}}],["event",{"2":{"150":2,"374":5,"375":2,"399":8,"401":28,"416":1,"421":2,"423":3,"445":1}}],["even",{"2":{"121":1,"253":1}}],["else",{"2":{"360":1}}],["elastic",{"2":{"2":1,"391":1}}],["either",{"2":{"149":1,"399":1}}],["eino",{"2":{"84":2}}],["equivalent",{"2":{"142":1,"152":1}}],["estimated",{"2":{"128":1,"129":1,"138":1,"139":1}}],["especially",{"2":{"44":1,"77":1}}],["egress",{"2":{"105":1}}],["email",{"2":{"429":1}}],["emails",{"2":{"4":1}}],["empty",{"2":{"104":1,"114":1,"116":2,"117":1,"224":1,"233":1,"244":1,"258":1,"278":1,"279":1,"306":1}}],["earth",{"2":{"385":1}}],["easily",{"2":{"393":1}}],["easier",{"2":{"194":1,"263":1,"312":1,"313":1}}],["ease",{"2":{"84":1,"85":1}}],["easy",{"2":{"2":1,"53":1,"58":1,"362":1,"391":1,"427":1,"436":1}}],["each",{"2":{"56":1,"70":1,"71":1,"195":1,"196":1,"197":1,"225":1,"229":1,"281":1,"319":1,"327":1,"368":1,"392":1,"414":1,"422":1}}],["efficiency",{"2":{"53":1,"73":1,"118":1}}],["efficiently",{"2":{"71":1,"391":1}}],["efficient",{"2":{"52":1,"388":1,"429":1}}],["effectively",{"2":{"392":1}}],["effective",{"2":{"105":2}}],["effect",{"0":{"38":1,"275":1},"2":{"25":1,"102":1,"105":2,"290":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1,"429":1}}],["errors",{"2":{"42":1,"44":1,"117":1,"189":1,"193":2,"291":1,"292":1,"296":1,"298":2,"312":1}}],["error",{"0":{"39":1,"347":1,"382":1},"2":{"42":1,"44":1,"47":1,"51":1,"105":1,"164":4,"190":1,"191":1,"192":1,"271":1,"272":1,"273":1,"274":1,"290":1,"292":2,"333":1,"346":1,"347":4,"352":1,"362":1,"382":4,"383":1,"399":5}}],["edition",{"2":{"445":8}}],["edit",{"2":{"29":1,"93":1,"429":1}}],["editable",{"2":{"15":1}}],["ep",{"2":{"24":1,"224":1,"235":2,"239":1,"263":1,"268":1}}],["e",{"2":{"15":1,"25":7,"76":1,"102":4,"110":1,"111":2,"115":1,"222":1,"230":1,"254":1,"347":6,"352":3,"382":5,"383":2,"399":3,"421":1,"423":1,"439":1,"445":11}}],["exclude",{"2":{"399":1}}],["exclusive",{"2":{"157":1}}],["exc",{"2":{"382":1}}],["except",{"2":{"347":2,"352":1,"382":2,"383":1,"399":2}}],["exceptions",{"2":{"346":1,"362":1,"422":1,"432":1}}],["exception",{"2":{"44":1,"347":1,"352":1,"382":1,"383":1,"399":2}}],["excellent",{"2":{"71":1}}],["exceeds",{"2":{"41":1}}],["exceeded",{"2":{"41":1}}],["exit",{"2":{"117":1}}],["exists",{"2":{"105":1,"121":1,"253":1}}],["existing",{"0":{"186":1},"2":{"36":1,"41":1,"72":2,"73":1,"74":1,"75":1,"78":2,"82":1,"85":1,"86":1,"105":1,"116":1,"186":2,"190":1,"230":2,"231":2,"429":1,"438":1,"442":2}}],["exhausted",{"2":{"47":2}}],["external",{"2":{"180":2,"181":1}}],["extensions",{"2":{"123":1,"125":1,"132":1,"252":1}}],["extension",{"2":{"2":1}}],["extensible",{"2":{"2":1}}],["extraction",{"2":{"426":1}}],["extract",{"2":{"345":1,"361":1,"374":1}}],["extra",{"2":{"38":1,"93":1,"389":1,"445":5}}],["expire",{"2":{"445":2}}],["expired",{"2":{"49":1}}],["express",{"2":{"399":1}}],["explicit",{"2":{"258":1}}],["explicitly",{"2":{"93":1,"209":1,"299":1,"422":1}}],["explanation",{"0":{"408":1}}],["explanations",{"2":{"61":1}}],["explains",{"2":{"196":1,"204":1}}],["explore",{"0":{"63":1},"2":{"32":1}}],["experiencing",{"2":{"21":1}}],["experience",{"2":{"5":1,"20":1,"52":1,"118":1,"436":1}}],["exposing",{"2":{"439":1}}],["exposure",{"2":{"18":1,"439":1}}],["exporting",{"2":{"25":1}}],["export",{"2":{"19":2,"23":1,"38":1,"192":2,"194":1,"209":1,"285":1,"286":1,"287":2,"288":3,"291":3,"295":1,"296":3,"297":5,"298":2,"303":2,"304":2,"307":2,"308":2,"310":5,"312":4,"313":8,"400":2,"411":3,"431":2,"445":2}}],["examples",{"0":{"80":1,"108":1,"131":1,"132":1,"140":1,"146":1,"151":1,"165":1,"174":1,"265":1,"269":1,"419":1},"1":{"81":1,"82":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"132":1,"152":1,"153":1,"154":1,"155":1,"266":1,"267":1,"268":1,"269":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"426":1},"2":{"102":1,"104":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"214":1,"225":1,"229":1,"339":1,"396":1}}],["example",{"0":{"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"124":1,"152":1,"153":1,"154":1,"155":1,"161":1,"200":1,"212":1,"224":1,"239":1,"249":1,"257":1,"345":1,"347":1,"351":1,"352":1,"360":1,"361":1,"363":1,"366":1,"367":1,"373":1,"374":1,"379":1,"406":1,"415":1,"416":1,"428":1},"1":{"162":1,"163":1,"407":1,"408":1,"429":1,"430":1,"431":1,"432":1,"433":1,"434":1,"435":1},"2":{"5":1,"29":1,"35":1,"77":1,"78":1,"81":6,"82":6,"91":1,"92":1,"97":1,"98":1,"101":1,"102":1,"103":1,"105":1,"107":1,"111":1,"112":1,"124":2,"125":1,"126":1,"131":4,"132":3,"140":2,"146":2,"150":5,"165":2,"174":3,"197":1,"210":1,"225":1,"267":1,"276":1,"283":1,"290":1,"291":1,"304":1,"311":2,"385":1,"387":1,"402":1,"417":1,"419":1,"422":1,"429":2,"432":1,"443":1,"445":2}}],["executor",{"0":{"370":1,"374":1},"1":{"371":1,"372":1,"373":1,"374":1,"375":1},"2":{"319":2,"370":1,"371":1,"373":5,"374":2,"378":1}}],["executors",{"2":{"283":4}}],["executing",{"2":{"129":1}}],["execution",{"0":{"145":1,"156":1,"173":1,"416":1},"2":{"3":3,"81":1,"282":1,"292":1,"296":1,"345":1,"347":1,"359":1,"368":2,"370":1,"374":2,"388":1,"401":2,"403":1,"404":1,"406":2,"408":1,"414":1,"415":1,"416":3,"422":1,"445":1}}],["executable",{"2":{"35":3}}],["executed",{"2":{"416":1,"417":1}}],["execute",{"2":{"4":1,"133":1,"194":2,"352":1,"374":3,"375":2,"399":1,"406":1,"425":1,"435":1,"445":1}}],["etc",{"2":{"2":1,"31":2,"32":1,"53":1,"72":1,"89":2,"118":2,"123":1,"125":1,"130":1,"380":1}}],["enhancing",{"2":{"427":1}}],["enhanced",{"2":{"235":1}}],["ename",{"2":{"416":1}}],["enables",{"2":{"404":4}}],["enabled=true",{"2":{"285":1,"287":1,"288":1,"295":1,"296":1,"297":1,"298":1,"301":1,"310":1,"311":1,"312":1,"313":3}}],["enabled",{"2":{"24":1,"105":2,"290":2,"299":1,"301":1,"306":2,"313":2,"442":1,"445":2}}],["enable",{"0":{"285":1,"286":1,"287":1},"2":{"23":1,"105":4,"183":2,"217":1,"235":1,"266":1,"283":2,"285":1,"286":1,"287":1,"288":2,"295":2,"296":2,"307":1,"310":3,"311":2,"312":1,"313":3,"445":1}}],["enabling",{"2":{"2":2,"3":1,"364":1,"391":1,"418":1,"427":1}}],["ensuring",{"2":{"392":1}}],["ensures",{"2":{"147":1,"229":1,"399":1}}],["ensure",{"2":{"27":1,"38":1,"68":1,"133":2,"157":1,"193":1,"268":1,"272":1,"299":1,"306":1,"395":2,"402":1,"417":3}}],["english",{"2":{"360":1,"429":1}}],["engine",{"2":{"68":1,"209":1,"352":4,"399":1,"420":1,"422":4,"429":1,"430":1,"432":4}}],["engineering",{"2":{"3":1,"436":1}}],["encrypted",{"2":{"445":2}}],["encapsulated",{"2":{"346":1,"439":1}}],["encapsulates",{"2":{"318":1,"364":1}}],["encapsulate",{"2":{"318":1}}],["encapsulating",{"2":{"316":1,"356":1}}],["encountering",{"2":{"296":1}}],["encounter",{"2":{"33":1,"189":1}}],["ending",{"2":{"385":2}}],["end",{"2":{"70":2,"72":2,"101":1,"117":1,"203":1,"281":2}}],["endpoint=",{"2":{"445":1}}],["endpoint=https",{"2":{"102":1,"111":1}}],["endpoints",{"0":{"354":1},"2":{"102":1,"333":1,"341":1,"354":1}}],["endpoint",{"2":{"24":6,"25":2,"29":3,"46":2,"47":1,"55":1,"72":1,"163":1,"209":1,"224":1,"235":2,"237":1,"239":1,"247":1,"262":1,"268":1,"276":2,"317":1,"326":1,"416":2,"444":2,"445":3}}],["enough",{"2":{"50":1}}],["entire",{"2":{"364":1,"402":1}}],["entering",{"2":{"84":1}}],["enter",{"2":{"29":2,"116":7,"150":1,"186":1,"262":1,"438":1}}],["enterprise",{"0":{"392":1},"2":{"1":1,"429":1,"438":1}}],["entrypoint",{"0":{"342":1},"1":{"343":1,"344":1,"345":1,"346":1,"347":1},"2":{"88":1,"92":1,"93":1,"317":1,"330":1,"337":1,"343":1,"345":1,"347":1,"382":1,"383":1,"384":1,"386":2,"399":1,"407":1,"422":1,"432":1,"445":1}}],["entry",{"0":{"203":1},"2":{"28":1,"29":2,"61":1,"84":1,"85":1,"92":2,"97":1,"98":2,"101":2,"110":2,"111":1,"112":2,"115":1,"117":2,"118":2,"124":1,"198":1,"200":2,"203":6,"263":1,"266":1,"267":1,"268":1,"269":2,"278":2,"317":1,"342":1,"345":1,"417":1,"436":2}}],["env",{"2":{"183":1,"200":1,"210":1,"212":1,"266":1,"268":1,"275":1,"299":1,"311":3}}],["envs",{"0":{"210":1,"217":1,"235":1,"246":1},"2":{"25":3,"61":1,"98":1,"102":5,"198":1,"200":1,"210":2,"212":1,"217":2,"224":1,"235":3,"239":1,"262":2,"263":1,"266":2,"267":1,"268":2,"269":1,"275":4,"278":1,"279":1,"423":2,"433":1}}],["environments",{"2":{"13":1,"118":1,"188":1,"261":1,"324":1,"380":1,"389":1,"403":1,"414":1}}],["environment",{"0":{"7":1,"19":1,"38":1,"64":1,"66":1,"67":1,"102":1,"116":1,"188":1,"261":1,"275":1,"289":1,"297":1,"298":1,"396":1,"400":1,"402":1,"411":1,"423":1,"433":1,"443":1,"445":1},"1":{"65":1,"66":1,"67":1,"68":1,"69":1,"290":1,"291":1},"2":{"3":2,"7":1,"13":3,"15":3,"19":1,"23":1,"24":1,"25":3,"27":1,"29":2,"35":1,"36":4,"38":4,"44":1,"53":1,"55":1,"59":1,"72":2,"97":1,"102":4,"107":1,"110":1,"116":2,"118":3,"140":2,"146":1,"165":1,"174":1,"188":2,"192":1,"197":1,"198":1,"209":2,"210":2,"217":2,"224":1,"235":1,"239":1,"246":2,"274":1,"278":1,"279":1,"283":2,"289":1,"290":1,"291":1,"299":1,"304":2,"306":1,"310":1,"313":1,"324":1,"333":1,"388":1,"389":2,"391":2,"392":1,"394":2,"396":2,"406":2,"408":1,"411":1,"412":1,"416":1,"421":2,"422":3,"431":1,"432":3,"443":2,"445":1}}],["f",{"2":{"78":1,"82":2,"93":1,"338":1,"347":4,"352":2,"360":2,"379":3,"382":3,"383":3,"399":1,"422":2,"432":2,"445":3}}],["further",{"2":{"445":1}}],["future",{"2":{"440":1}}],["functions",{"2":{"321":1,"322":1,"323":1,"324":1,"354":1,"356":1,"382":1,"385":1,"386":1}}],["function",{"0":{"343":1,"349":1,"358":1,"365":1,"371":1,"377":1},"2":{"89":1,"317":2,"318":1,"342":1,"345":1,"346":2,"348":1,"350":1,"353":2,"357":1,"359":1,"362":1,"368":1,"416":1,"445":1}}],["functionality",{"0":{"426":1},"2":{"148":1,"185":1,"186":1,"404":1,"418":1,"419":1}}],["functional",{"2":{"72":1}}],["fully",{"0":{"299":1},"2":{"53":1,"59":1,"126":1,"274":1,"289":1,"299":1}}],["full",{"0":{"265":1},"1":{"266":1,"267":1,"268":1,"269":1},"2":{"2":1,"5":1,"20":1,"21":1,"52":1,"71":1,"90":1,"98":1,"118":1,"222":2,"237":2,"247":4,"296":1,"297":1,"334":1,"439":1}}],["float",{"2":{"385":4}}],["flow",{"0":{"145":1},"2":{"97":1,"292":1}}],["flows",{"2":{"4":1}}],["flag",{"2":{"105":1,"253":1,"254":1}}],["flags",{"2":{"102":1,"118":1,"150":1}}],["flexibility",{"2":{"60":1}}],["flexible",{"2":{"57":1,"94":1,"282":1,"313":1}}],["ff20ce223",{"2":{"42":1}}],["face",{"2":{"418":1}}],["fatal",{"2":{"292":1}}],["fall",{"2":{"258":1}}],["false",{"2":{"121":1,"183":1,"249":1,"253":1,"280":1,"290":4,"416":9}}],["faq",{"0":{"93":1,"189":1,"270":1},"1":{"190":1,"191":1,"192":1,"193":1,"194":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1},"2":{"51":1,"76":1,"429":1}}],["failed",{"0":{"41":1,"42":1,"46":1,"47":1,"49":1,"193":1,"274":1},"2":{"42":1,"44":1,"164":2,"193":1,"292":1,"347":1,"352":1,"383":1,"416":1}}],["failures",{"2":{"117":1,"220":1,"292":1,"362":1}}],["failure",{"2":{"39":1,"42":1,"46":1,"47":1,"220":1}}],["fails",{"2":{"38":1,"42":1,"78":1}}],["fast",{"0":{"98":1},"2":{"3":1,"58":2,"72":1,"82":1,"94":1,"147":1,"240":1}}],["frontend",{"2":{"440":1}}],["from",{"0":{"14":1,"15":1,"240":1,"388":1,"394":1,"410":1},"1":{"15":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2},"2":{"5":1,"20":1,"21":1,"24":1,"53":1,"57":1,"70":1,"73":1,"74":2,"75":2,"76":1,"78":2,"82":5,"88":1,"89":1,"91":1,"92":3,"150":2,"185":1,"186":1,"217":1,"221":1,"259":2,"337":2,"338":1,"342":1,"345":2,"352":1,"363":1,"366":1,"373":4,"374":3,"375":1,"379":2,"380":1,"391":1,"393":1,"394":1,"398":2,"399":7,"402":1,"406":1,"407":2,"410":1,"411":1,"416":2,"419":1,"422":5,"426":2,"428":1,"432":5,"435":2,"439":1,"442":1,"445":4}}],["frequently",{"2":{"429":1}}],["free",{"2":{"33":1,"445":1}}],["frameworks",{"2":{"331":2,"393":1,"418":1}}],["framework",{"0":{"316":1,"331":1,"393":1},"1":{"317":1,"318":1,"319":1},"2":{"84":1,"317":1,"318":1,"319":1,"328":1,"341":1,"393":1,"422":2,"427":1,"432":2,"445":1}}],["feishu",{"2":{"429":1}}],["fetching",{"2":{"445":1}}],["fetch",{"2":{"361":2}}],["fewer",{"2":{"292":1}}],["few",{"0":{"308":1},"2":{"62":1,"308":1,"445":1}}],["feel",{"2":{"33":1,"445":1}}],["feature",{"2":{"18":1,"86":1,"90":1,"355":1}}],["features",{"0":{"63":1,"329":1,"437":1},"1":{"330":1,"331":1,"332":1,"333":1,"334":1,"438":1,"439":1,"440":1},"2":{"11":1,"57":1,"429":1}}],["fix",{"2":{"271":1,"273":1,"274":1,"275":1,"306":1,"307":1}}],["fixed",{"2":{"229":1,"346":1}}],["fixes",{"2":{"11":1}}],["fine",{"2":{"392":1}}],["financial",{"2":{"202":1}}],["finally",{"2":{"422":1,"432":1}}],["final",{"2":{"150":1,"406":1}}],["finish",{"2":{"116":3}}],["find",{"2":{"33":1,"35":2,"42":1,"302":1,"445":1}}],["filter",{"2":{"363":1}}],["filters=query",{"2":{"363":1}}],["filters",{"2":{"363":2}}],["filtering",{"2":{"180":1,"181":1,"182":1,"183":1}}],["fill",{"2":{"114":1,"262":2,"273":1}}],["file=$home",{"2":{"303":1}}],["file=",{"2":{"297":1,"298":1,"303":1,"311":1,"312":1}}],["filename",{"2":{"76":1}}],["file>",{"2":{"75":1}}],["files",{"2":{"19":1,"28":1,"35":1,"51":1,"84":2,"85":2,"87":1,"261":1,"294":2,"299":2,"302":1,"404":1,"428":1}}],["file",{"0":{"39":1,"61":1,"89":1,"190":1,"196":1,"198":1,"207":1,"271":1,"285":1,"287":1,"300":1,"301":1,"306":1},"1":{"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"279":1,"280":1,"281":1,"301":1,"302":1,"303":1},"2":{"2":1,"3":2,"28":1,"29":3,"39":2,"42":1,"53":1,"61":1,"74":1,"75":1,"78":2,"82":1,"85":3,"86":1,"87":5,"88":2,"89":3,"92":1,"93":5,"94":1,"97":1,"101":3,"106":1,"107":2,"114":1,"121":3,"124":1,"126":2,"130":1,"131":3,"133":1,"136":3,"140":1,"144":3,"146":1,"150":3,"160":3,"165":1,"168":3,"173":1,"174":1,"175":1,"186":1,"188":4,"190":2,"194":1,"196":1,"197":1,"198":1,"200":3,"203":3,"207":5,"261":2,"262":1,"264":1,"267":1,"271":1,"278":3,"283":1,"285":4,"287":2,"288":2,"290":6,"291":5,"295":3,"296":3,"297":4,"298":4,"299":1,"301":2,"304":1,"306":4,"310":3,"311":4,"312":3,"313":9,"399":1,"404":1,"406":1,"417":2,"422":1,"423":1,"424":1,"432":1,"433":1,"434":1}}],["fit",{"2":{"53":1}}],["firewall",{"2":{"46":1}}],["first",{"0":{"97":1,"109":1},"2":{"20":1,"23":1,"29":1,"31":1,"32":1,"43":2,"62":6,"81":1,"105":1,"118":1,"150":1,"194":1,"313":2,"346":1,"361":1,"414":1,"426":1}}],["fields",{"0":{"123":1,"201":1,"213":1,"222":1,"227":1,"237":1,"241":1,"247":1,"250":1,"273":1,"278":1,"279":1,"280":1},"1":{"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"242":1,"243":1,"244":1,"245":1,"246":1,"251":1,"252":1,"253":1,"254":1},"2":{"104":1,"107":1,"114":2,"117":1,"183":1,"222":1,"237":1,"247":1,"259":1,"273":1,"344":1}}],["field",{"0":{"110":1,"276":1,"277":1},"1":{"278":1,"279":1,"280":1},"2":{"35":1,"107":2,"114":1,"150":1,"196":1,"222":1,"226":1,"237":4,"247":1,"274":1,"276":4,"278":1,"279":1,"280":1,"347":2}}],["found",{"0":{"35":1,"190":1,"271":1},"2":{"35":1,"93":1,"190":1,"271":1,"360":1}}],["follows",{"2":{"72":1,"428":1}}],["followed",{"2":{"27":1}}],["follow",{"2":{"20":1,"70":1,"195":1,"281":1,"417":1}}],["following",{"2":{"16":1,"25":1,"29":2,"31":1,"89":1,"114":1,"122":1,"152":1,"222":1,"237":1,"247":1,"283":1,"315":1,"354":1,"396":1,"401":1,"402":1,"404":1,"406":2,"411":1,"412":1,"415":1,"419":1,"422":3,"423":3,"425":1,"429":1,"431":1,"432":3,"433":1,"435":1}}],["focuses",{"2":{"312":1}}],["focusing",{"2":{"292":1,"298":1}}],["focus",{"2":{"3":1,"82":1,"314":1,"330":1,"368":1,"388":1,"404":1,"436":1}}],["forwarding",{"2":{"438":1}}],["force",{"2":{"106":1,"121":2,"126":1,"131":2,"168":2,"169":1,"174":2,"249":1,"253":1,"280":1}}],["forming",{"2":{"436":1}}],["formula",{"2":{"385":1}}],["form",{"2":{"90":1,"123":1,"249":1}}],["formats",{"2":{"88":1}}],["formatted",{"2":{"39":1}}],["format",{"0":{"39":1,"272":1},"2":{"29":1,"39":1,"72":1,"105":1,"107":1,"117":1,"150":3,"272":1,"399":1}}],["for",{"0":{"19":1,"25":1,"89":1,"97":1,"98":1,"116":1,"389":1,"431":1},"2":{"1":1,"10":1,"13":2,"14":1,"19":2,"24":2,"28":3,"29":3,"35":1,"42":1,"43":1,"49":1,"50":1,"52":1,"55":1,"56":1,"58":1,"59":1,"60":2,"67":1,"69":2,"70":1,"71":2,"72":3,"74":1,"76":1,"82":1,"84":1,"88":1,"91":2,"94":1,"103":1,"105":3,"107":1,"118":6,"119":1,"123":1,"133":1,"139":1,"150":6,"156":1,"168":1,"177":2,"179":1,"187":2,"192":1,"196":1,"197":1,"198":2,"202":2,"203":2,"204":3,"205":1,"207":3,"208":1,"209":2,"210":1,"211":1,"223":1,"225":1,"229":1,"230":1,"236":1,"237":2,"240":1,"249":1,"261":1,"263":2,"266":3,"267":1,"268":2,"272":1,"276":1,"291":1,"294":1,"296":2,"297":2,"311":2,"313":3,"314":1,"317":2,"320":1,"321":2,"322":1,"323":1,"324":1,"326":1,"327":1,"339":2,"340":2,"342":1,"348":1,"357":1,"359":1,"360":1,"362":1,"366":1,"374":1,"376":1,"380":1,"383":1,"385":1,"389":1,"393":2,"396":1,"399":2,"401":3,"405":1,"416":6,"418":2,"420":1,"421":2,"422":3,"426":1,"427":2,"429":5,"430":1,"431":1,"432":1,"438":2,"439":1,"440":2,"442":1,"443":1,"444":1,"445":2}}],["oauth",{"2":{"438":1,"440":1}}],["oauth2",{"2":{"436":1,"440":2}}],["os",{"2":{"422":2,"432":2,"445":10}}],["occur",{"2":{"422":1,"432":1}}],["occurred",{"2":{"164":1,"382":1}}],["ok",{"2":{"202":2,"350":1,"352":1,"401":1,"416":2}}],["older",{"2":{"133":1,"302":1}}],["old",{"0":{"302":1},"2":{"112":2,"126":1,"138":1}}],["omitted",{"2":{"216":1}}],["omit",{"2":{"104":1}}],["overall",{"2":{"387":1}}],["over",{"2":{"302":1}}],["overseas",{"2":{"209":1}}],["override",{"2":{"114":2,"118":1,"209":1,"210":1,"217":2,"375":1}}],["overrides",{"2":{"102":1}}],["overview",{"0":{"52":1,"72":1,"197":1,"314":1,"399":1},"1":{"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1},"2":{"281":1,"387":1}}],["object",{"2":{"78":1,"87":1,"88":1,"89":2,"107":1,"129":1,"224":1,"230":1,"237":3,"363":1,"445":1}}],["observability",{"0":{"332":1},"2":{"59":1,"235":4,"268":4,"328":1}}],["obtained",{"2":{"24":1,"411":2,"422":1,"432":1,"445":2}}],["obtaining",{"0":{"421":1,"431":1},"2":{"23":1}}],["obtain",{"0":{"23":1,"24":1},"2":{"23":1,"25":1,"72":1,"395":1,"399":1,"421":1,"431":1,"444":1}}],["other",{"2":{"32":1,"35":1,"87":1,"158":1,"235":1,"319":1,"344":2,"372":1,"380":1,"393":1,"422":1,"429":2,"445":1}}],["otherwise",{"2":{"25":1,"422":1,"432":1}}],["optimal",{"2":{"439":1}}],["optimized",{"0":{"391":1}}],["optimization",{"0":{"386":1}}],["options",{"0":{"77":1,"78":1,"79":1,"106":1,"107":1,"176":1},"1":{"177":1,"178":1},"2":{"61":1,"70":1,"71":1,"72":1,"75":2,"95":2,"120":1,"135":1,"143":1,"149":1,"150":1,"159":1,"167":1,"176":1,"205":1,"208":1,"209":1,"220":1,"228":1,"399":1}}],["option",{"2":{"25":2,"77":1,"78":1,"79":1,"106":1,"107":1,"117":1,"149":1,"150":1,"229":3,"262":3,"264":3,"310":2}}],["optionally",{"2":{"310":1}}],["optional",{"0":{"24":1,"204":1,"205":1,"206":1,"207":1,"209":1,"210":1},"2":{"29":3,"55":1,"62":1,"69":2,"76":1,"150":1,"186":1,"198":2,"200":1,"212":1,"235":1,"311":2,"319":1,"363":2,"374":1,"380":1}}],["opentelemetry",{"2":{"235":3,"268":3,"332":1}}],["open",{"2":{"191":1,"401":1,"422":1,"432":1}}],["operate",{"2":{"107":1,"404":1}}],["operational",{"2":{"292":1,"295":1,"389":1}}],["operation",{"2":{"50":1,"104":1,"166":1,"169":2,"193":1,"418":1,"445":1}}],["operations",{"0":{"391":1},"2":{"2":1,"180":1,"181":1,"182":1,"292":1,"321":1,"353":1,"355":1,"388":1,"403":1}}],["operating",{"2":{"1":1,"7":1,"404":1}}],["ough",{"2":{"401":1}}],["outbound",{"2":{"440":1}}],["out",{"2":{"156":1,"391":1}}],["outputs",{"2":{"150":1,"416":1}}],["output",{"0":{"83":1,"84":1,"85":1,"156":1,"161":1,"173":1,"307":1},"1":{"84":1,"85":1,"162":1,"163":1},"2":{"2":1,"21":1,"28":1,"29":1,"31":1,"51":1,"62":1,"81":1,"84":2,"85":1,"90":2,"112":1,"114":1,"150":2,"283":2,"288":1,"294":2,"298":1,"299":1,"312":1,"401":29,"416":3,"444":1,"445":2}}],["our",{"2":{"20":1,"429":2}}],["org",{"2":{"399":1}}],["organizes",{"2":{"232":1}}],["order",{"2":{"118":1,"346":1}}],["original",{"2":{"92":1,"93":2}}],["or",{"0":{"308":1},"2":{"7":2,"19":1,"24":2,"29":4,"35":3,"36":1,"38":3,"41":1,"43":1,"44":1,"46":3,"47":1,"49":3,"50":1,"52":1,"55":1,"62":1,"65":1,"68":1,"71":1,"72":4,"78":1,"104":3,"105":3,"117":1,"123":1,"124":1,"149":1,"150":1,"178":1,"192":2,"203":1,"209":1,"226":1,"258":1,"271":1,"274":1,"276":1,"296":1,"299":1,"302":1,"303":1,"306":1,"310":1,"313":1,"321":1,"350":1,"375":1,"389":3,"396":1,"399":4,"402":1,"417":1,"438":1,"439":2,"440":1,"442":1,"443":1,"445":2}}],["onboarding",{"2":{"393":1}}],["only",{"2":{"15":1,"76":1,"93":1,"98":1,"102":3,"105":5,"117":1,"125":1,"183":1,"198":3,"202":1,"228":1,"291":1,"292":1,"298":2,"308":1,"310":1,"312":1,"330":1,"386":1,"391":1,"439":1}}],["online",{"2":{"2":1,"24":1,"158":1}}],["on",{"2":{"3":1,"23":1,"24":2,"32":1,"58":1,"59":1,"71":1,"77":1,"82":1,"84":1,"107":1,"116":1,"124":1,"126":1,"127":1,"128":1,"129":1,"137":1,"138":1,"139":1,"203":1,"211":1,"215":2,"220":2,"223":1,"238":2,"251":1,"283":2,"292":1,"298":1,"311":1,"312":1,"313":2,"314":1,"318":1,"319":1,"330":1,"368":1,"385":1,"386":1,"388":1,"389":1,"391":1,"392":1,"399":1,"401":4,"404":2,"412":1,"421":1,"422":1,"427":1,"429":2,"431":1,"432":1,"436":1,"442":1,"444":1,"445":1}}],["ones",{"2":{"217":1}}],["one",{"2":{"2":1,"25":1,"29":2,"53":2,"55":1,"57":1,"62":1,"72":1,"97":1,"142":1,"146":1,"147":1,"185":1,"186":1,"187":1,"393":2,"403":1,"422":1,"427":1,"445":1}}],["once",{"2":{"2":1,"90":2,"313":1,"386":1,"401":1,"412":1}}],["often",{"2":{"429":1}}],["offers",{"2":{"427":1}}],["offering",{"2":{"418":1}}],["off",{"2":{"168":1}}],["offline",{"2":{"58":1,"72":1}}],["official",{"0":{"15":1,"410":1},"2":{"51":2}}],["of",{"0":{"262":1,"302":1},"2":{"2":1,"3":2,"4":1,"18":1,"25":1,"27":1,"28":1,"32":1,"35":1,"41":2,"52":1,"54":1,"57":2,"60":1,"61":2,"71":2,"77":2,"78":1,"98":1,"107":1,"147":1,"177":1,"194":1,"204":1,"314":1,"315":1,"320":1,"321":3,"322":1,"323":1,"331":1,"339":1,"340":2,"366":1,"389":1,"391":1,"399":3,"414":2,"421":1,"422":3,"427":1,"432":1,"439":2}}],["ll",{"2":{"443":1}}],["llm",{"2":{"24":1,"25":1,"357":1,"359":1,"362":2,"439":2,"445":1}}],["ls",{"2":{"306":1}}],["lssf",{"2":{"13":1}}],["ltd",{"2":{"399":1}}],["lt",{"2":{"72":1,"251":2}}],["len",{"2":{"363":1}}],["left",{"2":{"114":1}}],["legacy",{"0":{"276":1},"2":{"103":1,"276":3}}],["lets",{"2":{"86":1}}],["letters",{"2":{"76":1,"117":1,"202":1}}],["leverage",{"2":{"82":1}}],["level=warning",{"2":{"298":1,"304":1,"308":1,"312":1}}],["level=info",{"2":{"297":1,"304":1,"307":1,"310":1,"311":1}}],["level=error",{"2":{"291":1,"313":1}}],["level=debug",{"2":{"194":1,"288":1,"291":1,"296":1,"297":1,"308":1,"310":1,"313":2}}],["levels",{"0":{"292":1},"2":{"291":1,"292":1,"313":2}}],["level",{"2":{"36":1,"53":1,"89":1,"95":1,"97":1,"102":10,"116":1,"118":3,"194":1,"197":3,"198":1,"200":2,"210":5,"212":1,"217":4,"235":3,"246":1,"266":1,"268":1,"275":1,"278":1,"279":1,"285":1,"288":1,"290":2,"291":4,"292":2,"295":1,"304":4,"307":2,"308":1,"311":1,"313":1,"438":1}}],["leaks",{"2":{"313":1}}],["leakage",{"2":{"19":1,"389":1}}],["learning",{"2":{"53":1,"418":1}}],["learn",{"2":{"5":1,"91":1,"281":2,"404":1}}],["litellm",{"2":{"445":1}}],["licenses",{"2":{"399":1}}],["license",{"2":{"399":8}}],["licensed",{"2":{"399":1}}],["lightweight",{"2":{"125":1,"353":1}}],["libxslt1",{"2":{"132":1}}],["libxml2",{"2":{"132":1}}],["libpq",{"2":{"124":1,"132":1}}],["library",{"2":{"36":1}}],["liveness",{"2":{"317":1,"354":2}}],["live",{"2":{"72":1,"91":1,"268":1,"445":1}}],["line",{"2":{"51":1,"52":1,"98":1,"99":1,"104":1,"105":1,"116":2,"150":2}}],["linux",{"2":{"7":1,"191":1,"249":1,"254":2}}],["limits",{"2":{"221":2,"266":1,"439":2}}],["limitations",{"2":{"399":1,"418":1}}],["limitation",{"2":{"105":1}}],["limit",{"0":{"221":2},"2":{"41":1,"180":1,"212":4,"221":4,"266":2}}],["like",{"2":{"29":1,"32":2,"42":1,"53":1,"404":2,"406":1,"411":1,"422":1,"432":1}}],["listen",{"2":{"401":1,"412":1}}],["listens",{"2":{"215":2}}],["lists",{"2":{"321":1,"322":1}}],["list",{"2":{"28":3,"63":10,"77":1,"92":1,"116":2,"177":1,"180":3,"181":3,"182":4,"183":3,"207":1,"321":1,"322":1,"363":3}}],["lifecycle",{"2":{"2":1,"52":1,"71":1,"182":1,"391":1,"414":1}}],["law",{"2":{"399":1}}],["lack",{"2":{"389":1}}],["latitude",{"2":{"385":2}}],["lat2",{"2":{"385":2}}],["lat1",{"2":{"385":2}}],["latency",{"2":{"228":1,"439":1}}],["latest",{"2":{"11":1,"61":1,"103":1,"128":1,"129":1,"163":1,"212":1,"214":2,"222":1,"229":3,"249":1,"251":4,"267":1,"367":1}}],["later",{"2":{"7":1,"24":1,"65":1,"297":1,"382":1}}],["layer",{"2":{"328":3}}],["la",{"2":{"306":1}}],["langchain",{"2":{"150":1,"331":1}}],["languages",{"2":{"408":1,"429":1}}],["language",{"0":{"205":1,"206":1},"2":{"2":1,"24":1,"29":1,"61":1,"84":1,"85":1,"101":2,"124":2,"198":1,"200":4,"205":3,"206":7,"251":1,"266":2,"267":2,"268":2,"276":1,"278":4,"399":1,"401":1,"415":1,"416":2,"429":2,"435":1}}],["launch",{"0":{"142":1,"147":1,"208":1,"211":1,"223":1,"238":1},"1":{"143":1,"144":1,"145":1,"146":1,"147":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1},"2":{"29":3,"39":1,"53":1,"55":1,"61":2,"62":1,"72":2,"84":1,"85":1,"98":1,"101":1,"104":1,"105":1,"111":1,"115":2,"117":1,"118":1,"124":1,"127":1,"137":1,"143":1,"145":1,"146":4,"185":1,"186":1,"187":1,"188":2,"194":1,"198":4,"200":3,"208":2,"259":1,"261":2,"263":2,"266":2,"267":2,"268":2,"269":3,"275":1,"278":2,"283":1,"291":1,"297":1,"402":1,"417":1,"423":2,"424":1,"433":1,"434":1}}],["launched",{"2":{"1":1,"29":1,"145":1}}],["largely",{"2":{"241":1}}],["large",{"2":{"24":1,"323":1,"391":1,"439":1}}],["look",{"2":{"406":1,"422":1,"432":1}}],["lookup",{"2":{"313":1}}],["lon2",{"2":{"385":2}}],["lon1",{"2":{"385":2}}],["longtermmemory",{"2":{"422":3}}],["longitude",{"2":{"385":2}}],["longer",{"2":{"43":1,"126":1}}],["long",{"0":{"422":1},"2":{"43":1,"82":1,"90":1,"321":1,"338":1,"355":4,"418":1,"419":2,"422":9,"423":2,"426":1,"445":1}}],["low",{"2":{"304":1,"436":2,"440":1}}],["lower",{"2":{"266":1,"360":1}}],["lowers",{"2":{"1":1,"436":1}}],["lowest",{"2":{"209":1,"258":1}}],["loading",{"2":{"283":1}}],["lost",{"2":{"175":1}}],["logger",{"2":{"347":3,"352":1,"382":3,"383":3,"399":5,"422":3,"432":3,"445":3}}],["logging",{"0":{"282":1,"285":1,"286":1,"287":1,"383":1},"1":{"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1},"2":{"282":1,"283":2,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"295":2,"301":1,"306":2,"307":2,"311":3,"312":1,"313":3,"326":1,"332":1,"347":2,"382":2,"389":1,"391":1,"399":3,"422":2,"432":2,"445":2}}],["log",{"0":{"292":1,"295":1,"300":1,"301":1,"303":1,"306":1,"307":1,"416":1},"1":{"301":1,"302":1,"303":1},"2":{"42":1,"47":1,"194":2,"200":1,"210":2,"217":2,"219":1,"235":2,"266":1,"268":1,"283":2,"285":2,"286":1,"287":1,"288":2,"290":7,"291":8,"292":1,"294":3,"296":3,"297":8,"298":5,"299":3,"301":3,"302":3,"303":4,"304":4,"307":4,"308":3,"310":4,"311":6,"312":6,"313":8,"401":1,"444":1}}],["logs",{"0":{"302":1,"308":1},"2":{"42":2,"44":1,"51":5,"182":2,"194":1,"219":2,"235":1,"266":1,"283":3,"285":2,"286":2,"288":1,"290":3,"295":2,"296":2,"297":1,"299":1,"301":6,"302":3,"303":1,"306":2,"308":2,"310":2,"311":2,"313":2,"383":1,"389":1,"391":1,"401":1,"416":1}}],["logic",{"2":{"3":1,"72":1,"82":1,"89":1,"314":1,"330":2,"355":1,"363":1,"370":1,"374":1,"375":1,"382":1,"385":1,"388":1,"399":1,"436":1}}],["locate",{"2":{"35":1,"194":1,"391":1}}],["locations",{"2":{"442":1}}],["location",{"0":{"256":1,"301":1},"2":{"35":2,"104":1,"121":1,"136":1,"144":1,"150":1,"153":1,"160":1,"168":1,"197":1,"208":2,"228":1,"240":1,"242":1,"303":1,"401":1,"415":1,"445":1}}],["localhost",{"2":{"31":1,"138":1,"141":1,"162":1,"352":1,"379":1,"401":1,"415":1,"445":1}}],["locally",{"0":{"128":1,"397":1,"401":1,"412":1},"1":{"398":1,"399":1,"400":1,"401":1},"2":{"25":1,"52":1,"60":1,"72":1,"91":1,"97":2,"141":1,"208":1,"238":1,"244":1,"247":1,"395":1}}],["local",{"0":{"25":2,"58":2,"68":2,"128":1,"138":2,"162":1,"171":1,"191":1,"211":1,"266":1,"388":1,"394":1,"409":1,"443":1},"1":{"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1},"2":{"2":1,"13":1,"25":3,"42":1,"51":1,"53":1,"55":1,"58":3,"59":1,"60":3,"97":1,"101":1,"102":1,"117":1,"124":1,"128":1,"133":1,"138":2,"141":1,"164":1,"198":2,"208":5,"211":1,"212":1,"240":2,"241":1,"261":1,"262":2,"266":2,"269":2,"278":1,"393":1,"394":1,"401":2,"402":2,"415":1,"416":1,"417":1,"445":3}}],["c1m2",{"2":{"445":11}}],["cfc=false",{"2":{"445":1}}],["ctrl+c",{"2":{"401":1,"445":1}}],["c05d49af",{"2":{"262":1}}],["cp",{"2":{"237":3}}],["cpu",{"0":{"221":1},"2":{"212":2,"221":2,"254":1,"266":1,"445":10}}],["cmd",{"2":{"203":1}}],["certs",{"2":{"132":1,"249":1}}],["certificates",{"2":{"125":3}}],["c",{"2":{"106":1,"125":1,"132":1,"252":1,"399":1}}],["circle",{"2":{"385":1}}],["city",{"2":{"337":2,"345":2,"360":10,"366":2,"367":1,"373":2}}],["cities",{"2":{"204":1,"366":1}}],["ci",{"0":{"98":1,"115":1,"297":1},"2":{"72":1,"115":3,"118":1,"297":3}}],["chinese",{"2":{"429":1,"445":8}}],["china",{"2":{"209":1}}],["choice",{"2":{"416":3}}],["choosing",{"2":{"205":1}}],["choose",{"2":{"29":1,"62":1,"81":1,"97":1,"209":1,"228":1,"310":1}}],["chosen",{"2":{"127":1,"251":1,"275":1}}],["checking",{"2":{"334":1}}],["checklist",{"2":{"272":1}}],["checks",{"0":{"352":1},"2":{"141":1}}],["checksum",{"2":{"126":1}}],["check",{"2":{"39":1,"42":2,"43":1,"44":2,"46":2,"47":2,"49":1,"50":1,"51":2,"62":1,"157":1,"185":1,"186":1,"193":3,"194":3,"274":2,"275":1,"306":2,"317":2,"333":1,"339":1,"348":1,"350":1,"351":1,"352":4,"353":1,"354":2,"367":1,"387":1,"445":1}}],["channels",{"2":{"429":1}}],["channel",{"2":{"429":1}}],["changed",{"2":{"121":1}}],["change",{"2":{"104":1,"105":1,"230":1,"426":1}}],["changes",{"2":{"35":1,"106":1,"112":3,"126":2,"131":1,"133":1,"147":1,"187":1,"429":1}}],["challenges",{"2":{"389":1}}],["chaotic",{"2":{"389":1}}],["characters",{"2":{"272":1,"361":1}}],["chat",{"2":{"81":1,"82":2,"90":1}}],["chapter",{"2":{"31":1,"418":1}}],["crm",{"2":{"429":1}}],["crms",{"2":{"429":1}}],["critical",{"2":{"292":2}}],["crud",{"2":{"181":1}}],["cross",{"2":{"102":1,"249":1,"254":1,"392":1,"418":1,"436":1}}],["cr",{"0":{"41":1,"231":1,"232":1,"233":1,"244":3},"2":{"29":6,"41":2,"103":9,"107":5,"114":5,"118":2,"129":1,"163":1,"172":1,"224":6,"225":2,"226":2,"231":4,"232":1,"233":1,"237":2,"239":6,"244":3,"247":2,"251":4,"257":2,"259":5,"267":2,"268":4,"274":1,"276":7,"279":6}}],["creation",{"0":{"41":1},"2":{"81":1,"321":1,"414":1,"444":1,"445":10}}],["creating",{"0":{"405":1,"420":1,"429":1},"1":{"421":1},"2":{"31":1,"73":1,"84":1,"88":1,"105":1,"129":1,"389":1,"411":1}}],["createruntime",{"2":{"105":1}}],["createregistry",{"2":{"41":1}}],["creates",{"2":{"87":1,"104":1,"114":1,"139":1,"321":1,"324":1,"398":1}}],["created",{"0":{"306":1},"2":{"29":1,"79":1,"84":1,"85":1,"89":1,"114":1,"139":1,"162":1,"163":1,"232":1,"233":1,"386":2,"406":1,"422":1,"432":1,"445":1}}],["create",{"0":{"337":1,"397":1,"444":1},"1":{"398":1,"399":1,"400":1,"401":1},"2":{"4":1,"15":1,"23":1,"24":2,"28":1,"29":2,"36":1,"72":1,"74":1,"75":1,"81":3,"91":1,"107":1,"114":1,"132":2,"180":3,"182":4,"183":7,"185":1,"224":2,"226":6,"230":2,"231":2,"232":1,"233":1,"234":1,"244":1,"261":1,"262":1,"271":2,"306":1,"311":1,"321":1,"338":2,"352":2,"366":1,"367":1,"373":2,"396":1,"398":1,"399":1,"404":1,"405":2,"406":1,"414":1,"419":1,"420":1,"422":1,"428":1,"429":1,"432":1,"444":3,"445":2}}],["credential",{"0":{"25":1},"2":{"19":1,"209":1,"326":1,"440":1}}],["credentials",{"0":{"192":1},"2":{"17":1,"18":3,"25":5,"69":3,"114":2,"133":1,"197":1,"235":1,"257":1,"263":1,"274":1,"400":3,"411":1,"440":2}}],["cn",{"2":{"29":5,"61":1,"103":1,"107":2,"111":1,"114":2,"139":1,"156":1,"163":2,"224":1,"228":2,"235":1,"239":1,"242":1,"251":3,"257":2,"263":1,"267":1,"268":2,"269":1,"279":1,"416":3,"444":1,"445":13}}],["cd",{"0":{"98":1,"115":1,"297":1},"2":{"15":1,"28":1,"62":1,"72":1,"115":1,"118":1,"185":1,"186":1,"396":1,"443":1}}],["curve",{"2":{"53":1}}],["currently",{"2":{"183":1,"228":1,"429":1,"445":1}}],["current",{"0":{"113":1},"2":{"28":1,"38":1,"79":1,"102":3,"106":1,"116":1,"150":1,"165":1,"190":1,"225":1,"230":1,"254":1,"280":1,"374":1}}],["curl",{"2":{"13":1,"401":1,"415":1}}],["customagentexecutor",{"2":{"374":1}}],["customizing",{"2":{"122":1}}],["customize",{"2":{"81":1,"126":1,"248":1,"289":1,"375":1}}],["customization",{"0":{"122":1},"1":{"123":1,"124":1,"125":1,"126":1},"2":{"2":1,"14":1,"124":1,"133":1,"198":1}}],["customer",{"2":{"77":2,"202":1,"204":1,"429":8,"432":1}}],["custom",{"0":{"132":1,"153":1,"303":1,"374":1,"379":1},"2":{"24":1,"29":1,"60":1,"78":1,"81":1,"82":1,"89":1,"93":1,"123":2,"124":1,"150":2,"203":1,"248":1,"249":1,"251":1,"252":2,"303":1,"311":1,"331":1,"344":2,"374":1}}],["caching",{"2":{"445":2}}],["cache",{"2":{"124":1,"132":1}}],["cache=",{"2":{"102":1}}],["card=get",{"2":{"373":1}}],["card",{"2":{"373":3}}],["calculate",{"2":{"385":4}}],["calendar",{"2":{"367":3}}],["calls=100",{"2":{"445":1}}],["calls",{"2":{"150":2,"403":1,"445":1}}],["call",{"0":{"435":1},"2":{"24":1,"25":1,"105":1,"156":1,"362":1,"416":2,"422":1,"435":1,"439":1,"445":2}}],["calling",{"2":{"4":1,"156":2,"157":1,"410":1,"445":1}}],["capability",{"2":{"368":1,"415":1,"438":1}}],["capabilities",{"0":{"404":1,"432":1},"2":{"60":1,"235":1,"281":1,"326":1,"403":1,"406":1,"418":1,"422":2,"427":1,"432":2,"436":2,"438":1}}],["capable",{"2":{"366":1}}],["cat",{"2":{"194":1,"264":1,"274":1,"275":1,"285":1,"313":1}}],["caution",{"2":{"168":1}}],["causes",{"2":{"193":1,"274":1,"275":1,"306":1,"307":1}}],["cause",{"2":{"19":1,"35":1,"36":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"46":1,"47":1,"49":1,"50":1,"190":1,"191":1,"192":1}}],["ca",{"2":{"125":2}}],["case",{"2":{"121":1}}],["cases",{"0":{"125":1,"259":1},"2":{"72":1,"89":1,"102":1,"252":1,"292":1,"322":1}}],["cannot",{"2":{"25":1,"33":1,"38":1,"51":1,"93":1,"117":1,"150":2,"169":1,"175":1,"183":1,"429":1}}],["can",{"2":{"4":1,"15":1,"19":1,"20":1,"24":2,"25":1,"28":1,"29":3,"32":1,"62":1,"76":1,"89":2,"93":2,"104":1,"105":1,"114":1,"117":1,"118":1,"171":1,"172":1,"173":1,"175":2,"216":1,"221":1,"238":1,"259":1,"286":1,"289":1,"319":1,"393":1,"396":1,"402":2,"410":1,"412":1,"417":2,"422":1,"426":1,"429":1,"432":1,"442":1,"443":2}}],["class",{"2":{"326":1,"363":1,"371":1,"373":1,"374":1,"377":1,"378":1,"379":1}}],["clearly",{"2":{"368":1}}],["clear",{"2":{"53":1,"82":1,"104":2,"116":2,"202":1,"368":1}}],["cleanup",{"0":{"302":1}}],["cleaned",{"2":{"173":1}}],["cleaning",{"2":{"44":1}}],["clean",{"2":{"36":2,"62":1,"72":1,"294":1,"295":1,"298":1,"302":1,"310":1}}],["closest",{"2":{"228":1,"263":1}}],["clone",{"2":{"15":2}}],["cloudy",{"2":{"360":1}}],["cloud",{"0":{"59":2,"69":2,"103":1,"104":1,"105":1,"129":2,"139":2,"155":1,"163":1,"172":1,"192":2,"209":1,"223":1,"240":1,"279":1,"388":1,"394":1},"1":{"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2},"2":{"1":1,"2":3,"3":1,"24":1,"25":2,"29":4,"53":1,"55":1,"59":2,"60":4,"61":2,"62":1,"69":2,"71":1,"72":2,"95":2,"97":3,"98":2,"101":4,"104":1,"105":1,"111":1,"115":1,"117":1,"129":1,"133":1,"139":1,"141":2,"150":2,"157":1,"164":1,"172":1,"193":1,"198":3,"200":1,"202":1,"208":7,"209":5,"224":1,"225":1,"230":1,"234":1,"236":1,"238":2,"239":1,"240":3,"241":1,"242":1,"244":1,"245":2,"246":2,"251":1,"259":1,"261":1,"263":3,"268":2,"269":4,"283":2,"391":1,"392":1,"393":1,"402":1,"423":2,"433":1}}],["clientsession",{"2":{"361":1}}],["clients",{"0":{"320":1},"1":{"321":1,"322":1,"323":1,"324":1},"2":{"326":1,"328":1,"339":1,"429":1,"439":1}}],["client",{"2":{"90":1,"314":1,"320":1,"321":1,"322":1,"323":1,"324":1,"328":1,"338":4,"352":2,"379":4,"439":1,"440":3,"445":3}}],["cli",{"0":{"52":1,"71":1},"1":{"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1},"2":{"2":1,"3":1,"16":1,"17":1,"27":1,"29":2,"52":1,"54":1,"57":1,"70":1,"71":3,"72":1,"178":1,"179":1,"222":1,"226":1,"230":1,"237":1,"247":1,"253":1,"254":1,"276":1,"281":1,"282":1,"398":2,"406":1,"422":1,"432":1}}],["click",{"2":{"2":1,"29":1,"146":1,"185":1,"186":1,"187":1,"393":2,"427":1}}],["co",{"2":{"399":1}}],["cost",{"2":{"391":1,"436":1}}],["costs",{"0":{"391":1},"2":{"391":1,"436":1}}],["coordinates",{"2":{"385":1}}],["count",{"2":{"363":2,"416":2}}],["copies",{"2":{"87":1,"93":1}}],["copyright",{"2":{"399":1}}],["copy",{"2":{"87":1,"311":1,"399":1}}],["collects",{"2":{"332":1}}],["collection=customer",{"2":{"431":1}}],["collection=",{"2":{"421":1}}],["collection",{"2":{"180":7,"321":8,"338":2,"389":1,"421":1,"422":5,"423":2,"432":4,"433":2}}],["collections",{"2":{"56":1,"63":1,"180":2,"321":3,"439":1}}],["collaborate",{"2":{"4":1}}],["collaboration",{"0":{"311":1,"367":1},"2":{"2":2,"77":1,"114":1,"118":1,"364":1,"369":1}}],["corresponding",{"2":{"226":1,"414":1}}],["correct",{"2":{"42":1,"44":1,"46":1,"47":1,"49":1,"193":1,"194":1,"306":1}}],["correctly",{"2":{"39":1,"402":1,"426":1}}],["cores",{"2":{"445":20}}],["core",{"0":{"55":1,"76":1,"315":1,"390":1,"404":1},"1":{"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"391":1,"392":1,"393":1},"2":{"2":1,"3":1,"24":1,"28":1,"57":1,"61":1,"71":1,"72":1,"196":1,"221":1,"317":1,"318":1,"319":1,"396":1,"399":1,"403":1,"429":1,"436":1,"445":10}}],["coding",{"2":{"31":1,"262":1}}],["codes",{"2":{"440":1}}],["code=import",{"2":{"416":1}}],["code",{"0":{"399":1,"406":1,"407":1,"408":1},"1":{"407":1,"408":1},"2":{"3":1,"28":1,"44":1,"58":1,"59":1,"60":1,"72":3,"73":1,"74":1,"77":1,"81":2,"82":1,"86":1,"91":4,"93":1,"119":1,"129":1,"147":1,"187":1,"193":2,"203":1,"215":1,"230":1,"237":3,"240":2,"316":1,"334":1,"384":1,"387":1,"391":1,"399":2,"402":2,"403":1,"404":4,"405":1,"406":7,"407":4,"408":2,"414":1,"415":1,"416":12,"417":2,"421":1,"422":1,"431":1,"432":1,"445":2}}],["comes",{"2":{"282":1}}],["combining",{"2":{"439":1}}],["combination",{"2":{"94":1}}],["combined",{"2":{"436":1}}],["combines",{"2":{"60":1}}],["combine",{"2":{"53":1}}],["communication",{"2":{"369":1,"393":1}}],["communicate",{"2":{"319":1}}],["comments",{"0":{"263":1}}],["comment",{"2":{"126":1}}],["committing",{"2":{"311":1}}],["commit",{"2":{"115":1,"262":3}}],["comma",{"2":{"77":1,"421":1,"423":1}}],["commands",{"0":{"54":1,"55":1,"56":1,"179":1},"1":{"55":1,"56":1,"180":1,"181":1,"182":1,"183":1},"2":{"19":1,"32":1,"53":1,"54":1,"71":1,"116":2,"176":1,"177":1,"179":1,"281":1,"283":1,"402":1,"417":1}}],["command",{"0":{"35":1,"71":1,"72":1},"1":{"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1},"2":{"16":1,"28":1,"29":4,"31":1,"35":2,"51":1,"52":2,"53":1,"55":3,"56":3,"61":1,"62":1,"70":2,"71":1,"72":3,"82":1,"84":1,"85":1,"98":1,"99":1,"104":1,"105":1,"133":1,"147":1,"150":1,"177":2,"209":1,"264":1,"281":1,"282":1,"285":1,"286":1,"287":1,"288":1,"292":1,"295":1,"296":1,"298":1,"307":1,"398":1,"401":1,"412":1,"415":1,"417":1,"425":1}}],["commonly",{"2":{"55":1,"317":1,"341":1}}],["common",{"0":{"79":1,"176":1,"184":1,"199":1,"278":1,"293":1},"1":{"177":1,"178":1,"185":1,"186":1,"187":1,"188":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1},"2":{"29":1,"33":1,"61":1,"77":1,"89":1,"198":1,"204":1,"209":1,"210":1,"217":2,"235":1,"251":1,"275":2,"429":1}}],["com",{"2":{"15":1,"29":4,"102":1,"111":1,"129":1,"139":1,"156":1,"163":3,"235":1,"251":4,"268":1,"416":2,"421":1,"429":3,"444":1,"445":1}}],["compression=none",{"2":{"445":1}}],["composition",{"2":{"364":1}}],["components",{"2":{"2":1}}],["computation",{"2":{"355":1}}],["compliance",{"2":{"399":1}}],["comply",{"2":{"314":1,"316":1}}],["completing",{"2":{"6":1,"32":1,"402":1,"417":1}}],["completed",{"2":{"124":1,"145":2,"283":1,"383":1,"402":1}}],["completes",{"2":{"29":1,"72":1}}],["complete",{"0":{"111":1,"124":1,"185":1,"345":1,"407":1},"2":{"1":1,"2":1,"3":1,"4":1,"23":1,"27":1,"29":3,"70":1,"71":1,"82":1,"91":1,"150":1,"185":1,"333":1,"339":1,"384":1,"387":1,"394":1,"401":1,"426":1,"445":1}}],["complexity",{"2":{"323":1}}],["complex",{"0":{"363":1},"2":{"1":1,"2":1,"3":1,"4":2,"89":1,"391":1,"418":1}}],["compile",{"2":{"125":1,"251":1,"252":1}}],["compiling",{"2":{"123":1}}],["company",{"2":{"429":2}}],["compact",{"2":{"150":1}}],["compatibility",{"2":{"103":1}}],["compatible",{"2":{"42":1,"393":1}}],["comparison",{"0":{"90":1}}],["covering",{"2":{"2":1}}],["condenses",{"2":{"439":1}}],["condition",{"2":{"360":3}}],["conditions",{"2":{"360":1,"363":1,"399":1}}],["conn",{"2":{"180":1,"181":1,"352":2}}],["connectivity",{"2":{"46":1}}],["connection",{"0":{"421":1,"431":1},"2":{"46":1,"180":1,"181":1,"193":1,"321":3,"322":2,"352":2,"421":1,"424":1,"431":1,"434":1,"445":1}}],["connect",{"2":{"38":1,"181":1,"352":1}}],["conversion",{"2":{"438":1}}],["conversation",{"2":{"399":1,"419":1,"422":2}}],["converts",{"2":{"88":1}}],["convenient",{"2":{"320":1}}],["convenience",{"2":{"116":1,"427":1}}],["consisting",{"2":{"315":1}}],["consistency",{"2":{"59":1,"147":1}}],["consistent",{"2":{"52":1}}],["consuming",{"2":{"221":1,"353":1,"386":1}}],["constraints",{"2":{"76":1,"117":1}}],["console=false",{"2":{"312":1}}],["console=true",{"2":{"286":1,"287":1,"288":1,"291":1,"296":1,"297":1,"307":1,"310":2,"311":1,"313":2}}],["console",{"0":{"286":1,"287":1,"307":1},"2":{"23":1,"44":1,"51":1,"283":1,"286":3,"287":1,"288":1,"290":3,"291":5,"294":1,"295":1,"296":2,"297":3,"298":1,"299":2,"304":4,"307":3,"310":3,"311":1,"312":1,"313":4,"401":1,"404":1,"405":2,"411":2,"416":1,"420":1,"429":1,"430":1,"444":1}}],["congratulations",{"2":{"31":1,"32":1}}],["continuity",{"2":{"399":1,"414":1}}],["continue",{"2":{"169":1}}],["continuous",{"2":{"2":1,"3":1,"418":1}}],["contextvars",{"2":{"327":1}}],["context",{"0":{"327":1},"2":{"150":1,"318":1,"327":1,"328":1,"344":1,"356":1,"374":6,"392":1,"414":1,"416":1,"418":3,"429":1,"439":1,"445":1}}],["content",{"0":{"153":1},"2":{"149":2,"150":5,"157":1,"361":6,"374":1,"399":2,"401":1,"415":1,"429":3,"445":1}}],["contamination",{"2":{"392":1}}],["contact",{"2":{"33":1,"41":1,"49":1,"50":1,"51":2,"313":1,"429":1}}],["contains",{"2":{"78":1,"93":1,"180":1,"196":1}}],["contain",{"2":{"36":1,"76":1,"89":1,"117":1,"150":1}}],["container",{"0":{"216":1},"2":{"25":1,"29":1,"58":1,"138":5,"141":1,"162":2,"171":2,"203":1,"212":2,"216":2,"217":1,"218":3,"219":2,"220":1,"221":1,"222":2,"224":1,"231":1,"239":1,"244":1,"257":1,"392":1}}],["containing",{"2":{"19":1,"114":1,"262":1,"272":1,"344":2,"360":1,"361":1,"363":1,"374":1,"385":1,"398":1}}],["controllable",{"2":{"438":1}}],["control",{"0":{"106":1},"2":{"23":1,"53":1,"60":1,"291":1,"313":2,"321":2,"392":1}}],["confusing",{"2":{"275":1}}],["confirmation",{"0":{"169":1},"2":{"168":2,"169":1}}],["confirm",{"2":{"35":1,"38":1,"42":1,"44":1,"46":2,"47":2,"49":2,"50":1,"169":1,"275":1}}],["config=none",{"2":{"445":2}}],["config=runconfig",{"2":{"399":1}}],["config",{"0":{"94":1,"266":1,"267":1,"268":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1},"2":{"18":5,"25":5,"28":1,"29":2,"39":1,"41":1,"53":1,"55":1,"61":1,"62":1,"69":6,"72":1,"84":1,"85":1,"90":1,"92":1,"94":1,"95":3,"97":1,"98":3,"99":1,"102":3,"104":4,"105":2,"106":1,"107":8,"109":1,"110":3,"111":1,"112":3,"113":1,"114":14,"115":1,"118":14,"121":2,"126":1,"131":4,"133":1,"136":2,"140":1,"144":2,"145":1,"146":1,"150":2,"160":2,"165":1,"168":2,"174":1,"175":1,"185":1,"186":1,"188":4,"190":1,"192":4,"197":8,"198":3,"209":7,"255":1,"256":1,"258":5,"259":4,"261":3,"262":5,"263":1,"264":4,"271":2,"273":1,"274":3,"275":2,"276":1,"338":2,"399":1,"402":1,"417":1,"445":4}}],["configuring",{"2":{"71":1,"389":1,"412":1}}],["configures",{"2":{"324":1}}],["configured",{"0":{"192":1},"2":{"20":1,"105":1,"116":1,"137":1,"274":1,"402":1,"416":1,"417":3,"438":1}}],["configure",{"0":{"29":1,"400":1,"411":1,"443":1},"2":{"17":1,"24":1,"25":6,"41":1,"55":1,"62":1,"69":1,"72":1,"84":1,"85":1,"87":1,"94":1,"98":1,"125":1,"185":1,"186":1,"209":1,"400":2,"402":1,"404":1,"406":1,"411":1,"417":1,"422":1,"432":1}}],["configurations",{"2":{"391":1}}],["configuration=",{"2":{"338":2}}],["configuration",{"0":{"17":1,"18":1,"25":1,"37":1,"39":1,"61":1,"96":1,"101":1,"102":1,"105":1,"107":1,"109":1,"111":1,"112":1,"113":1,"114":1,"117":1,"123":1,"190":1,"196":1,"197":1,"255":1,"264":1,"269":1,"271":1,"277":1,"289":1,"290":1,"291":1,"294":1,"304":1,"310":1,"396":1,"423":1,"433":1},"1":{"18":1,"19":1,"38":1,"39":1,"97":1,"98":1,"99":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1,"256":2,"257":2,"258":2,"259":2,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":2,"279":2,"280":2,"281":1,"290":1,"291":1},"2":{"2":1,"6":1,"18":3,"19":1,"27":1,"28":1,"29":5,"35":2,"39":2,"44":1,"46":1,"47":2,"49":1,"50":1,"51":1,"53":2,"61":5,"69":2,"70":2,"72":1,"94":3,"95":2,"98":2,"102":3,"105":2,"106":2,"107":3,"114":9,"116":1,"117":1,"118":1,"121":2,"125":1,"126":2,"130":1,"131":1,"133":1,"136":1,"144":1,"147":1,"150":1,"160":1,"168":1,"173":1,"183":1,"190":2,"194":2,"195":2,"196":2,"197":1,"198":2,"199":1,"210":1,"217":1,"235":1,"255":1,"259":1,"262":1,"267":1,"271":1,"283":1,"294":1,"297":1,"299":1,"304":1,"310":1,"311":3,"312":1,"313":1,"321":2,"326":3,"344":1,"372":1,"389":1,"394":1,"405":1,"411":1,"423":3,"427":1,"433":1,"445":1}}],["conflicts",{"0":{"36":1},"2":{"7":1,"36":2,"389":1}}],["concurrency",{"2":{"391":1,"408":1}}],["concerned",{"2":{"389":1}}],["concepts",{"2":{"281":1}}],["concept",{"0":{"3":1},"2":{"3":1}}],["concise",{"2":{"2":1,"314":1,"340":1}}],["turn",{"2":{"283":1,"313":1,"399":1,"418":1}}],["tutorial",{"2":{"70":1,"195":1}}],["ttl",{"2":{"182":6}}],["ts",{"2":{"104":2,"183":1}}],["tmp",{"2":{"102":1,"290":1,"303":1}}],["typing",{"2":{"363":1,"384":1}}],["typically",{"2":{"297":1}}],["typical",{"0":{"259":1},"2":{"90":1,"252":1,"292":1}}],["typo",{"2":{"275":1}}],["type=memory",{"2":{"421":1}}],["type>",{"2":{"182":1}}],["types",{"2":{"61":1,"104":1,"105":1,"180":2,"181":2,"198":3,"200":1,"212":1,"224":1,"239":1,"259":1,"263":1,"266":1,"267":1,"268":1,"269":1,"275":1,"340":1,"379":1,"399":1,"423":2,"433":1}}],["type",{"0":{"90":1,"208":1,"211":1,"223":1,"238":1,"334":1,"384":1},"1":{"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1},"2":{"61":1,"78":3,"82":3,"84":1,"85":1,"92":1,"98":1,"101":1,"111":1,"115":1,"117":1,"124":1,"127":1,"137":1,"180":2,"181":1,"182":2,"183":3,"198":1,"200":2,"208":3,"263":1,"266":1,"267":1,"268":1,"269":2,"278":2,"283":1,"334":2,"359":2,"362":3,"374":1,"384":1,"399":1,"401":1,"415":1,"416":1,"421":3,"423":2,"431":1,"445":14}}],["t",{"2":{"77":1,"81":1,"182":9,"189":1,"262":3,"299":1,"416":1,"422":1,"432":1}}],["tidy",{"2":{"294":1,"295":1}}],["time=$",{"2":{"115":1}}],["time",{"0":{"97":1,"109":1},"2":{"43":1,"90":1,"105":1,"118":1,"128":1,"129":1,"138":1,"139":1,"147":1,"222":2,"236":1,"237":2,"247":1,"286":1,"302":1,"311":1,"353":1,"386":1,"389":2,"391":2,"429":1,"445":10}}],["timeout",{"0":{"43":1,"236":1},"2":{"46":1,"236":1,"326":1,"353":1,"368":2}}],["timestamp",{"2":{"29":2,"130":1,"222":2,"224":1,"225":3,"229":4,"237":2,"239":1,"243":1,"247":1,"267":1,"268":2,"272":1,"279":1}}],["tips",{"0":{"194":1}}],["tip",{"2":{"29":2,"103":1,"133":1,"173":1,"183":1,"228":1,"276":1,"442":1}}],["txt",{"2":{"28":2,"29":1,"42":1,"66":1,"84":1,"85":1,"92":1,"93":1,"97":1,"101":1,"124":1,"193":1,"200":1,"207":3,"398":1,"402":1,"417":2,"422":1}}],["tabs",{"2":{"272":1}}],["targeting",{"2":{"438":1}}],["target",{"2":{"72":1,"79":1,"93":1,"121":1,"137":1,"249":1,"254":1,"280":1}}],["taking",{"0":{"38":1,"275":1},"2":{"429":1}}],["takes",{"2":{"29":1,"43":2,"105":2,"290":1}}],["take",{"2":{"25":1,"72":1,"102":1}}],["tags",{"2":{"72":1,"183":1}}],["tag",{"0":{"214":1,"229":1,"243":1},"2":{"29":1,"61":1,"98":2,"103":2,"110":2,"111":1,"112":2,"115":2,"118":1,"130":1,"212":2,"214":1,"224":2,"225":2,"229":5,"239":2,"243":1,"266":1,"267":1,"268":1,"279":2}}],["taskstore",{"2":{"377":1,"379":2,"380":2}}],["tasks",{"2":{"3":1,"4":2,"317":1,"355":2,"379":1,"418":1,"440":1}}],["task",{"0":{"355":1,"376":1,"379":1},"1":{"377":1,"378":1,"379":1,"380":1},"2":{"2":1,"129":1,"317":1,"319":2,"355":3,"376":2,"377":1,"378":1,"379":28,"380":3}}],["trae",{"2":{"439":1}}],["transcription=audiotranscriptionconfig",{"2":{"445":2}}],["transformation",{"2":{"440":1}}],["transfer",{"2":{"429":1}}],["transition",{"2":{"208":1}}],["traffic",{"2":{"391":2}}],["tracer",{"2":{"416":1}}],["traceback",{"2":{"416":1}}],["traces",{"2":{"332":1}}],["trace",{"2":{"295":1,"344":1,"416":1}}],["tracking",{"2":{"292":1,"383":1}}],["track",{"2":{"282":1,"391":1}}],["tracing",{"2":{"235":1,"311":1,"327":1}}],["true",{"2":{"105":1,"217":1,"235":1,"266":1,"290":2,"306":1,"391":1,"399":1,"416":7,"445":2}}],["try",{"2":{"25":1,"43":1,"44":1,"264":1,"347":1,"352":1,"382":2,"383":1,"399":1}}],["troubleshooting",{"0":{"33":1,"305":1},"1":{"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"306":1,"307":1,"308":1},"2":{"20":2,"195":2,"292":1,"313":1,"389":1}}],["two",{"2":{"25":1,"102":1,"147":1,"197":1,"385":2,"438":1,"439":2}}],["teaching",{"2":{"422":1}}],["teams",{"2":{"436":1}}],["teammates",{"2":{"204":1,"259":1,"263":1}}],["teamwork",{"2":{"82":1}}],["team",{"0":{"311":1},"2":{"31":1,"107":3,"114":4,"118":3,"257":3,"259":7,"311":1,"422":1,"432":1}}],["tells",{"2":{"426":1}}],["tell",{"2":{"401":2,"402":1}}],["telemetry",{"2":{"328":1}}],["term",{"0":{"422":1},"2":{"82":1,"321":2,"338":2,"399":1,"418":1,"419":2,"422":10,"423":2,"426":1,"445":2}}],["terminal",{"2":{"35":2,"401":1,"403":1,"404":2}}],["terminus",{"2":{"24":1}}],["text2025",{"2":{"445":1}}],["text=prompt",{"2":{"399":1}}],["text",{"2":{"31":1,"150":1,"204":1,"361":1,"416":1}}],["test123",{"2":{"150":1}}],["test",{"2":{"31":2,"62":1,"72":1,"147":1,"148":1,"185":1,"186":1,"187":4,"188":3,"261":1,"401":3,"415":2,"416":1,"445":2}}],["testing",{"2":{"21":1,"55":1,"71":1,"261":1,"402":1,"417":1}}],["temperature",{"2":{"360":4}}],["temporarily",{"2":{"310":1}}],["temporary",{"2":{"19":1,"192":1,"209":1}}],["templated",{"2":{"53":1}}],["template",{"0":{"77":1,"81":1,"84":1,"185":1,"225":1,"274":1},"2":{"21":1,"28":8,"62":6,"74":1,"75":2,"76":1,"77":3,"81":6,"82":1,"84":5,"85":1,"91":1,"107":1,"114":2,"185":1,"205":1,"224":1,"225":1,"239":1,"243":1,"262":2,"272":1,"274":1,"398":2,"399":1,"402":1,"406":2,"422":3,"428":1,"432":3}}],["templates",{"2":{"2":2,"21":1,"28":3,"32":1,"53":1,"55":1,"63":2,"74":1,"82":1,"84":1}}],["tedious",{"2":{"3":1,"388":1}}],["technology",{"2":{"399":1,"429":1}}],["technologies",{"2":{"392":1}}],["technical",{"2":{"51":1,"313":1,"429":1}}],["tech",{"2":{"2":1,"429":1}}],["too",{"0":{"308":2},"2":{"221":1,"307":1,"308":2}}],["toolid",{"2":{"416":1}}],["toolkit",{"2":{"283":4,"314":1}}],["tools=tools",{"2":{"399":1}}],["tools=",{"2":{"337":1,"345":1,"366":1,"367":3,"373":1,"386":2,"407":1,"445":1}}],["toolsets",{"0":{"439":1},"2":{"437":1}}],["toolset",{"2":{"104":4,"183":2,"445":4}}],["tools",{"0":{"182":1,"403":1},"1":{"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1},"2":{"32":2,"56":2,"63":2,"77":3,"81":1,"179":1,"182":13,"318":1,"323":1,"337":2,"345":2,"356":1,"366":2,"373":2,"399":4,"403":1,"404":2,"405":1,"406":1,"407":2,"410":1,"416":1,"438":1,"439":6,"445":3}}],["tool",{"0":{"357":1,"361":1,"364":1,"405":1,"414":1},"1":{"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"365":1,"366":1,"367":1,"368":1},"2":{"2":1,"52":1,"71":1,"104":6,"182":10,"183":3,"318":4,"323":2,"357":1,"358":2,"359":4,"360":1,"361":1,"362":4,"363":1,"364":1,"365":2,"366":1,"367":3,"385":1,"403":1,"405":3,"406":4,"407":1,"408":1,"411":4,"412":1,"414":1,"416":3,"417":3,"436":4,"438":1,"439":5,"445":3}}],["toolchain",{"2":{"1":1,"2":1,"125":1}}],["today",{"2":{"150":1,"152":2,"156":1,"186":1,"301":1}}],["token",{"2":{"90":2,"436":1,"445":1}}],["tos",{"0":{"230":1},"2":{"29":1,"103":2,"107":6,"114":2,"118":1,"224":2,"225":1,"226":1,"230":3,"237":6,"240":1,"241":1,"257":2,"259":3,"268":2}}],["together",{"2":{"2":1}}],["to",{"0":{"91":1,"274":1,"295":1,"388":1,"394":1,"402":1,"417":1,"425":1,"435":1},"1":{"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":2,"396":2,"397":2,"398":2,"399":2,"400":2,"401":2,"402":2},"2":{"1":1,"2":4,"3":2,"4":1,"5":3,"7":1,"13":1,"15":1,"16":1,"17":2,"18":1,"19":2,"20":2,"21":1,"23":2,"24":2,"25":6,"27":1,"29":11,"31":2,"32":2,"33":2,"35":6,"36":2,"38":1,"39":2,"41":2,"42":2,"43":1,"46":1,"47":2,"49":1,"50":2,"51":2,"52":1,"53":2,"54":1,"55":1,"57":3,"58":1,"60":2,"62":1,"66":1,"70":2,"71":2,"72":2,"74":1,"75":1,"77":1,"78":2,"81":1,"82":1,"84":3,"85":3,"86":1,"91":3,"92":1,"93":1,"94":1,"102":1,"104":4,"105":4,"116":7,"118":1,"121":1,"122":1,"123":1,"126":3,"129":1,"133":4,"134":1,"138":1,"139":2,"140":2,"142":1,"146":1,"148":2,"150":2,"152":1,"164":1,"169":3,"173":1,"182":1,"183":1,"185":1,"194":1,"195":1,"203":1,"207":1,"208":2,"209":3,"216":1,"218":2,"221":2,"222":1,"228":2,"230":2,"237":1,"244":1,"245":1,"246":1,"247":1,"251":1,"252":1,"258":2,"259":2,"262":1,"263":2,"264":1,"268":1,"275":1,"276":1,"281":1,"282":1,"283":1,"285":2,"286":1,"288":2,"290":3,"291":1,"294":2,"295":2,"298":1,"299":1,"302":1,"303":2,"304":3,"306":2,"307":1,"310":2,"311":3,"313":2,"314":1,"318":1,"319":2,"327":1,"330":2,"339":1,"346":2,"353":1,"354":1,"355":1,"356":1,"359":2,"362":4,"366":1,"369":2,"375":1,"384":1,"385":1,"387":2,"388":2,"389":2,"391":4,"393":2,"394":2,"396":3,"398":3,"399":3,"400":1,"401":4,"402":3,"404":6,"405":1,"406":6,"408":2,"411":1,"412":1,"414":1,"415":2,"417":6,"419":3,"421":2,"422":13,"423":2,"424":1,"425":2,"426":3,"428":1,"429":7,"431":1,"432":11,"433":1,"435":2,"436":3,"438":3,"439":3,"440":1,"442":1,"443":1,"444":2,"445":3}}],["third",{"2":{"438":1}}],["thinking",{"2":{"374":2}}],["this",{"2":{"3":1,"6":1,"15":1,"18":1,"19":1,"21":1,"24":1,"29":2,"33":1,"35":2,"60":1,"61":1,"71":1,"105":3,"126":2,"150":1,"166":1,"169":1,"196":1,"203":1,"238":1,"262":1,"340":1,"355":1,"362":1,"394":1,"398":1,"399":1,"404":2,"406":1,"412":1,"417":1,"418":1,"422":1,"425":1,"432":1}}],["than",{"2":{"302":1,"353":1,"388":1}}],["that",{"2":{"4":2,"16":1,"36":1,"60":1,"78":1,"86":1,"87":1,"104":1,"233":1,"314":1,"316":1,"319":1,"410":1,"422":1,"426":1,"432":1,"436":1,"438":1,"442":1}}],["threads",{"2":{"445":10}}],["three",{"0":{"57":1,"96":1,"394":1},"1":{"58":1,"59":1,"60":1,"97":1,"98":1,"99":1,"395":1,"396":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1},"2":{"53":1,"94":1,"198":2}}],["through",{"2":{"1":1,"2":1,"6":1,"21":1,"29":1,"53":2,"73":1,"104":1,"321":1,"375":2,"393":1,"394":1,"399":2,"402":1,"412":1,"417":1,"418":1,"420":1,"429":3,"430":1,"436":1,"439":1,"440":1}}],["their",{"2":{"311":1,"445":1}}],["they",{"2":{"217":1,"235":1,"418":1}}],["these",{"2":{"176":1,"389":1}}],["there",{"2":{"38":1,"43":1,"272":1,"391":1}}],["them",{"2":{"23":2,"24":1,"25":1,"222":1,"237":1,"238":1,"247":1,"276":1,"283":1,"302":1,"414":1}}],["then",{"2":{"23":1,"43":1,"60":1,"90":1,"142":1,"150":1,"194":1,"238":1,"259":1}}],["the",{"0":{"15":1,"30":1,"31":1,"88":1,"89":1,"129":1,"226":1,"412":1,"413":1,"424":1,"430":1,"434":1},"1":{"31":1,"414":1,"415":1,"416":1,"431":1},"2":{"1":2,"2":3,"3":4,"5":1,"6":1,"11":1,"13":2,"15":1,"16":3,"17":1,"20":2,"21":2,"23":3,"24":8,"25":11,"27":2,"28":6,"29":12,"31":4,"35":13,"36":1,"38":2,"41":3,"42":2,"43":2,"44":3,"46":1,"47":4,"49":3,"50":6,"51":3,"52":2,"53":1,"54":1,"55":4,"57":1,"59":1,"60":3,"61":3,"62":4,"68":1,"69":2,"71":4,"72":3,"76":1,"77":5,"78":3,"79":1,"81":1,"82":1,"84":4,"85":1,"86":1,"87":4,"88":5,"89":3,"90":1,"91":2,"93":12,"95":1,"97":3,"98":1,"99":2,"102":3,"103":1,"104":3,"105":6,"106":1,"107":3,"114":1,"118":1,"121":3,"122":2,"123":3,"125":2,"126":2,"127":1,"130":1,"133":5,"134":2,"136":1,"137":2,"138":1,"141":1,"144":1,"147":1,"149":1,"150":4,"152":3,"158":1,"160":1,"166":1,"168":1,"169":1,"185":1,"186":1,"195":1,"196":1,"198":2,"202":2,"203":2,"204":3,"205":3,"206":1,"207":1,"209":1,"210":2,"215":3,"216":1,"217":3,"219":1,"221":1,"222":2,"226":2,"228":3,"230":2,"233":2,"234":1,"235":2,"237":4,"238":2,"240":1,"241":1,"242":2,"244":1,"245":1,"246":1,"247":2,"248":1,"252":1,"259":4,"262":1,"264":2,"275":1,"276":2,"281":1,"283":1,"285":1,"286":2,"290":1,"291":1,"292":3,"297":2,"301":2,"304":2,"306":1,"308":1,"311":1,"313":1,"314":1,"315":1,"317":4,"318":1,"319":1,"320":1,"331":2,"339":3,"340":1,"341":1,"342":3,"346":1,"348":1,"354":1,"362":1,"364":1,"368":1,"370":1,"375":2,"385":4,"387":5,"391":2,"393":1,"394":1,"396":2,"398":1,"399":10,"400":1,"401":8,"402":7,"403":1,"404":2,"405":3,"406":7,"407":1,"408":2,"410":3,"411":5,"412":5,"414":4,"415":3,"416":3,"417":16,"419":2,"420":1,"421":2,"422":18,"423":5,"424":2,"425":2,"426":9,"427":2,"428":3,"429":15,"430":2,"431":3,"432":17,"433":1,"434":2,"435":4,"436":1,"438":2,"439":5,"440":1,"442":1,"444":4,"445":2}}],["swagger",{"2":{"438":1,"442":2}}],["switches",{"2":{"251":1}}],["switch",{"2":{"188":1}}],["s123",{"2":{"426":1}}],["sqlalchemy",{"2":{"352":1}}],["slower",{"2":{"240":1}}],["slim",{"2":{"123":1,"198":1,"249":1,"251":2,"268":1}}],["sz",{"2":{"115":1}}],["salesforce",{"2":{"429":1}}],["sandbox",{"0":{"405":1},"2":{"403":2,"404":5,"405":2,"406":2,"408":1,"411":2,"414":3,"415":1}}],["safely",{"2":{"404":1,"406":1}}],["safeguards",{"2":{"392":1}}],["safe",{"2":{"174":1}}],["safety",{"0":{"169":1,"334":1}}],["saved",{"2":{"112":1,"130":1,"275":1,"295":1,"424":1,"426":1,"434":1}}],["save",{"0":{"295":1},"2":{"112":1,"285":1,"290":1,"303":2,"379":2,"380":1,"407":1,"422":4,"445":2}}],["savings",{"2":{"391":1}}],["saving",{"2":{"106":1,"147":1}}],["same",{"2":{"91":1,"102":1,"147":1,"210":1,"217":1,"241":1,"244":1,"245":1,"246":1,"259":1,"391":1,"408":2,"414":2}}],["samples",{"2":{"339":1,"387":1}}],["sample",{"2":{"31":1,"401":1,"425":1}}],["sse",{"2":{"90":1,"150":1,"399":6}}],["smart",{"2":{"53":1,"76":1}}],["split",{"2":{"313":1}}],["space",{"2":{"272":1}}],["spaces",{"2":{"38":1,"272":1}}],["speech",{"2":{"445":1}}],["speed",{"2":{"118":1,"240":1,"396":1,"443":1}}],["spend",{"2":{"389":1}}],["spent",{"2":{"389":1}}],["special",{"2":{"114":2,"272":1}}],["specializing",{"2":{"31":1,"429":1}}],["specifies",{"2":{"203":1,"206":1}}],["specified",{"2":{"55":1,"81":1,"82":1,"174":1,"380":1}}],["specifically",{"2":{"366":1}}],["specific",{"0":{"12":1},"2":{"12":1,"31":1,"61":1,"102":1,"118":1,"177":1,"183":1,"198":1,"275":1,"303":1,"331":1,"368":1,"399":1,"414":1,"438":1}}],["specifying",{"2":{"378":1}}],["specify",{"2":{"13":1,"25":1,"28":1,"29":2,"62":1,"77":1,"78":1,"82":2,"89":1,"93":1,"99":1,"106":1,"121":2,"125":2,"131":1,"136":1,"144":1,"150":3,"160":1,"168":1,"182":1,"183":1,"396":1,"443":1}}],["sd4fc6lpoh486npgcaav0",{"2":{"444":1}}],["sd4fe31poh486npgcaqq0",{"2":{"29":1}}],["sd4fe31poh486",{"2":{"29":2}}],["sdk",{"0":{"314":1},"1":{"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1},"2":{"10":1,"11":1,"12":1,"13":1,"15":4,"35":2,"36":4,"65":1,"314":2,"315":1,"321":1,"328":1,"331":1,"336":1,"338":1,"340":1,"387":1,"393":1,"396":1,"402":1,"417":1,"443":1}}],["skills",{"2":{"401":2}}],["skip",{"2":{"168":1,"169":1,"417":1}}],["sk",{"0":{"23":1,"49":1},"2":{"17":1,"23":1,"25":1,"49":3,"69":1,"107":1,"133":1,"192":1,"274":1,"338":1,"400":2,"411":2,"416":2}}],["syntax",{"0":{"75":1},"2":{"193":1,"408":1}}],["synchronous",{"2":{"353":1}}],["sync",{"2":{"15":1,"362":1}}],["symptom",{"2":{"35":1,"36":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"46":1,"47":1,"49":1,"50":1}}],["systematically",{"2":{"389":1}}],["systemctl",{"2":{"191":1}}],["system",{"0":{"197":1,"282":1},"1":{"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1},"2":{"7":2,"35":2,"36":1,"77":3,"89":1,"93":1,"123":1,"124":1,"125":1,"132":1,"252":1,"254":1,"282":1,"313":1,"399":1,"404":2,"414":1,"429":5}}],["systems",{"2":{"2":1,"4":2,"322":1,"389":1,"391":1,"429":1}}],["southeast",{"2":{"251":1}}],["source",{"0":{"14":1,"410":1},"1":{"15":1},"2":{"13":1,"15":2,"35":1,"36":1,"58":1,"59":1,"60":1,"76":1,"87":1,"126":1,"230":1,"241":1,"396":2,"422":1,"432":1,"443":2,"445":2}}],["so",{"2":{"105":1}}],["some",{"2":{"99":1}}],["solve",{"0":{"389":1}}],["solving",{"2":{"31":1}}],["solutions",{"2":{"51":1,"189":1,"193":1,"195":1,"429":1}}],["solution",{"2":{"1":1,"33":1,"35":1,"36":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"46":1,"47":1,"49":1,"50":1,"190":1,"191":1,"192":1}}],["software",{"2":{"31":1,"399":1}}],["shutdown",{"2":{"333":1}}],["shanghai",{"2":{"360":1}}],["sha256",{"2":{"126":1}}],["sharing",{"2":{"107":1}}],["shares",{"2":{"114":1}}],["shared",{"2":{"97":1,"102":2,"105":4,"114":1,"116":1,"118":1,"197":1,"198":2,"200":1,"210":1,"255":1,"259":5,"275":1,"436":1}}],["share",{"2":{"91":1,"94":1,"259":1,"408":1,"414":1}}],["shape",{"2":{"77":1}}],["short",{"2":{"90":1,"321":1,"338":1,"399":1,"445":1}}],["shorthand",{"2":{"81":1,"82":1}}],["should",{"2":{"35":1,"133":1,"306":1,"311":2,"353":1,"368":2,"382":1,"406":1,"422":1,"432":1}}],["shows",{"2":{"296":1,"297":1,"304":1}}],["shown",{"2":{"28":1,"399":1}}],["show",{"0":{"113":1},"2":{"18":1,"35":2,"90":1,"106":2,"112":1,"113":1,"114":2,"116":1,"117":1,"150":2,"180":1,"181":1,"182":2,"291":1,"308":1}}],["shell",{"2":{"18":1,"19":1,"25":1,"35":1,"38":1}}],["sh",{"2":{"13":3,"123":1,"124":2,"125":1,"132":6,"198":1,"203":2,"249":2,"252":2}}],["side",{"2":{"440":1}}],["silent",{"0":{"299":1},"2":{"299":1}}],["silicon",{"2":{"254":1}}],["single",{"0":{"110":1},"2":{"53":1,"114":1,"368":1}}],["significant",{"2":{"389":1}}],["significantly",{"2":{"1":1,"73":1}}],["signature",{"0":{"343":1,"349":1,"358":1,"365":1,"371":1,"377":1},"2":{"353":1}}],["signaturedoesnotmatch",{"2":{"49":1}}],["site",{"2":{"35":1}}],["simplified",{"0":{"391":1},"2":{"72":1}}],["simplify",{"2":{"52":1,"71":1,"330":1}}],["simplest",{"0":{"152":1}}],["simple",{"0":{"337":1,"341":1},"1":{"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1},"2":{"5":1,"21":1,"28":3,"29":2,"31":1,"76":1,"82":1,"202":1,"251":2,"269":1,"398":1,"399":2,"401":1,"407":1,"412":1,"417":2,"422":3,"432":1,"445":1}}],["similar",{"2":{"31":1,"84":1,"85":1,"421":2,"431":1,"444":1}}],["scheduling",{"2":{"389":1,"414":1}}],["schedule",{"2":{"367":1,"391":1}}],["schema",{"2":{"362":1}}],["scenario",{"0":{"294":1,"295":1,"296":1,"297":1,"298":1,"299":1},"2":{"114":1,"125":1,"393":1}}],["scenarios",{"0":{"4":1,"293":1},"1":{"294":1,"295":1,"296":1,"297":1,"298":1,"299":1},"2":{"14":1,"53":1,"60":1,"67":1,"90":1,"91":2,"313":1,"389":1,"438":2,"439":2}}],["script",{"0":{"252":1},"2":{"123":4,"124":3,"125":4,"132":3,"133":1,"198":1,"203":1,"249":3,"252":4,"280":2}}],["scripts",{"0":{"98":1},"2":{"123":1,"124":2,"125":1,"132":5,"133":2,"198":1,"248":1,"249":2,"252":1}}],["scratch",{"2":{"53":1,"70":1,"73":1,"74":1,"91":1,"422":1,"432":1}}],["scalable",{"2":{"388":1}}],["scale",{"2":{"52":1,"391":3,"438":1}}],["scaling",{"2":{"2":1,"389":1,"391":1}}],["science",{"2":{"31":1}}],["semantic",{"2":{"419":1,"436":1,"439":1}}],["semantics",{"2":{"104":1}}],["self",{"2":{"374":2,"379":8,"429":1}}],["selecting",{"2":{"439":1}}],["selects",{"2":{"137":1,"208":1,"228":1,"231":1,"242":1,"439":1}}],["selected",{"2":{"84":1,"280":1}}],["select",{"2":{"24":2,"28":1,"77":1,"84":1,"352":1}}],["sess456",{"2":{"154":1}}],["sessionid",{"2":{"416":1}}],["sessions",{"2":{"56":1,"182":2,"389":1,"391":1,"408":1}}],["session",{"2":{"31":2,"38":1,"92":3,"150":1,"154":1,"182":18,"327":1,"337":3,"344":2,"345":3,"361":2,"392":1,"399":17,"401":6,"407":3,"408":2,"414":7,"415":4,"416":5,"418":1,"422":8,"425":2,"426":2,"432":5,"436":1,"438":1,"445":11}}],["seamless",{"2":{"399":1,"429":1}}],["seamlessly",{"2":{"2":1,"53":1}}],["searchquery",{"2":{"363":2}}],["search",{"2":{"77":2,"81":1,"363":6,"399":3,"436":2,"439":3}}],["seeing",{"2":{"292":1}}],["seed",{"2":{"24":1,"81":1,"89":1,"432":1}}],["see",{"2":{"20":1,"29":1,"31":1,"56":1,"61":1,"84":1,"85":1,"283":1,"286":1,"292":1,"399":1,"421":2,"426":1,"431":1,"435":1,"442":1,"444":1}}],["send",{"0":{"152":1},"2":{"148":1,"150":1,"374":1,"375":1}}],["sending",{"2":{"4":1,"152":1,"374":1}}],["sent",{"2":{"104":1,"399":1}}],["sensitive",{"2":{"18":1,"19":1,"51":1,"262":1,"294":2,"310":1,"311":1}}],["second",{"2":{"346":1,"353":1}}],["seconds",{"2":{"138":1,"236":1}}],["sections",{"2":{"198":2}}],["section",{"2":{"122":1,"313":1,"417":1,"422":1,"432":1}}],["secure",{"0":{"262":1},"2":{"59":1,"69":1,"192":1,"388":1,"408":1}}],["securely",{"2":{"18":2}}],["security",{"0":{"392":1,"440":1},"2":{"19":1,"230":1,"313":1,"389":1}}],["secrets",{"0":{"262":1},"2":{"262":1}}],["secretkey=",{"2":{"192":1}}],["secretkey",{"2":{"192":3,"274":1,"395":1,"442":1}}],["secret",{"2":{"18":2,"19":2,"23":2,"25":2,"38":1,"69":4,"107":2,"114":2,"192":1,"224":1,"226":1,"234":1,"239":1,"257":1,"262":1,"338":1,"400":1,"411":1,"425":1,"426":1}}],["setlevel",{"2":{"399":1}}],["sets",{"2":{"207":1,"215":1}}],["setting",{"2":{"105":1}}],["settings",{"2":{"29":3,"46":1,"198":3,"224":3,"234":1,"235":2,"239":2,"240":1,"241":1,"244":1,"245":1,"257":2,"259":1,"268":4}}],["setup",{"0":{"97":1},"2":{"53":1,"105":1,"118":1,"123":1,"124":2,"132":2,"198":1,"249":1,"252":1,"389":1,"443":1}}],["set",{"0":{"445":1},"2":{"18":3,"19":1,"23":1,"25":2,"38":1,"54":1,"69":8,"71":1,"72":1,"77":1,"95":1,"104":2,"105":1,"107":2,"114":7,"118":2,"133":1,"182":2,"192":4,"194":1,"209":1,"222":1,"230":1,"235":1,"237":1,"247":1,"258":1,"259":1,"297":1,"299":1,"304":2,"307":2,"311":1,"314":1,"340":1,"368":1,"379":1,"417":1,"422":2,"432":2,"438":1,"439":1}}],["separation",{"2":{"3":1}}],["separately",{"2":{"125":1,"150":1,"194":1,"291":1}}],["separated",{"2":{"77":1,"91":1}}],["separate",{"2":{"3":1,"261":1,"389":1,"421":1,"423":1}}],["servers",{"2":{"391":1,"440":2}}],["serverless",{"0":{"391":1},"2":{"388":1,"389":1}}],["server",{"2":{"150":1,"203":2,"268":1,"374":3,"379":1,"399":1,"401":1,"438":2,"440":1,"445":10}}],["serve",{"2":{"134":1,"362":1}}],["service=agentkit",{"2":{"416":1}}],["service",{"0":{"56":1,"179":1,"320":1,"401":1,"412":1,"424":1,"434":1},"1":{"180":1,"181":1,"182":1,"183":1,"321":1,"322":1,"323":1,"324":1},"2":{"23":1,"24":1,"29":1,"49":1,"68":1,"72":3,"179":1,"191":1,"209":1,"228":1,"235":1,"242":1,"268":1,"321":1,"322":1,"328":1,"339":1,"341":1,"352":1,"391":1,"395":1,"399":4,"400":1,"401":2,"412":1,"416":1,"422":1,"429":9,"432":1,"438":1,"442":1,"444":3,"445":1}}],["services",{"0":{"338":1,"438":1},"2":{"3":1,"4":1,"32":2,"63":1,"209":1,"316":1,"318":1,"320":1,"323":1,"352":1,"356":1,"437":1,"438":1,"439":1,"442":2,"445":1}}],["series",{"2":{"3":1,"4":1}}],["s",{"2":{"3":1,"18":1,"24":1,"35":1,"106":1,"150":1,"152":2,"158":2,"182":4,"185":1,"186":1,"230":1,"301":3,"302":1,"344":1,"366":1,"368":1,"370":1,"374":1,"385":1,"391":1,"399":2,"401":1,"402":1,"415":2,"416":1,"429":1,"432":1}}],["stdout",{"2":{"416":1}}],["storage",{"0":{"378":1,"379":1},"2":{"129":1,"224":1,"230":1,"237":3,"319":1,"376":1,"378":1,"379":1,"380":3}}],["stored",{"2":{"255":1,"301":1}}],["stores",{"2":{"18":1,"230":1,"231":1,"233":1,"240":1}}],["store",{"0":{"376":1,"420":1,"426":1},"1":{"377":1,"378":1,"379":1,"380":1,"421":1},"2":{"18":1,"244":1,"319":1,"377":1,"378":1,"379":2,"418":1,"420":1,"422":2,"426":2}}],["stopped",{"2":{"164":2,"173":1,"212":1,"220":3}}],["stopping",{"2":{"138":1}}],["stop",{"2":{"55":1,"72":1,"133":1,"166":1,"171":1}}],["still",{"2":{"43":1,"276":1}}],["step",{"0":{"27":1,"28":1,"29":1,"394":1,"396":1,"397":1,"402":1,"443":1,"444":1,"445":1},"1":{"395":1,"396":1,"397":1,"398":2,"399":2,"400":2,"401":2,"402":1},"2":{"97":2,"142":1,"145":2,"187":2,"194":2,"417":1,"445":2}}],["steps",{"0":{"20":1,"32":1,"70":1,"195":1,"281":1,"339":1,"387":1},"2":{"29":1,"51":1,"53":1,"84":1,"85":1,"185":1,"296":1,"417":1,"419":1,"428":1}}],["strictly",{"2":{"392":1}}],["strip",{"2":{"360":1}}],["strings",{"2":{"272":1}}],["string",{"2":{"104":1,"123":1,"249":1,"251":1,"346":1}}],["strategy",{"2":{"127":1,"283":1}}],["str",{"2":{"92":2,"330":1,"337":2,"343":1,"344":5,"345":1,"347":2,"349":1,"350":1,"351":1,"352":2,"353":1,"355":1,"358":1,"360":3,"361":1,"363":1,"365":2,"366":2,"367":6,"374":1,"379":3,"382":2,"383":1,"384":6,"386":2,"399":2,"407":2,"422":2,"432":2,"445":2}}],["structured",{"2":{"362":1,"398":1}}],["structure",{"0":{"92":1,"198":1},"2":{"82":1,"398":1}}],["strong",{"2":{"71":1}}],["strongly",{"2":{"7":1,"36":1,"61":1,"398":1}}],["streamablehttpconnectionparams",{"2":{"445":1}}],["streamable",{"2":{"399":1}}],["streams",{"2":{"399":1}}],["stream",{"2":{"28":1,"62":1,"77":1,"78":2,"81":3,"82":2,"84":2,"90":1,"399":2,"416":1}}],["streamingmode",{"2":{"399":1,"445":1}}],["streaming",{"2":{"2":1,"21":1,"28":1,"62":1,"78":1,"81":2,"82":1,"84":1,"90":2,"150":3,"398":1,"399":2,"445":1}}],["stay",{"2":{"310":1}}],["stays",{"2":{"43":1,"298":1}}],["stage",{"2":{"125":1,"132":1,"249":3,"251":1}}],["stages",{"2":{"57":1}}],["standards",{"2":{"314":1,"316":1}}],["standard",{"2":{"72":1,"78":1,"90":1,"93":1,"317":2,"341":1,"356":1}}],["standardized",{"2":{"1":1,"2":1,"403":2}}],["stability",{"2":{"60":1}}],["stable",{"0":{"10":1}}],["statistics",{"2":{"429":1}}],["states",{"2":{"375":1,"376":1}}],["state",{"2":{"43":1}}],["status",{"0":{"44":1,"158":1,"164":1},"1":{"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1},"2":{"29":2,"43":2,"44":1,"46":2,"55":2,"62":2,"72":3,"138":1,"141":1,"157":1,"158":1,"159":1,"162":2,"163":2,"164":2,"165":4,"181":1,"185":2,"186":2,"194":2,"282":1,"283":3,"286":1,"294":1,"299":1,"304":1,"307":1,"324":1,"350":1,"354":1,"361":2,"391":1,"416":1,"445":10}}],["starts",{"2":{"138":1,"412":1}}],["starting",{"0":{"424":1,"434":1},"2":{"53":1,"74":1,"91":1,"128":1,"129":1,"138":2,"139":1,"145":3,"173":1,"385":2,"395":1,"400":1,"411":1}}],["startup",{"2":{"44":1,"203":2,"401":2,"445":2}}],["start",{"0":{"21":1,"62":1,"284":1,"335":1,"401":1,"403":1,"412":1,"418":1,"441":1},"1":{"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"63":1,"285":1,"286":1,"287":1,"288":1,"336":1,"337":1,"338":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"442":1,"443":1,"444":1,"445":1},"2":{"5":1,"20":3,"70":1,"72":1,"73":1,"82":2,"134":1,"191":1,"195":1,"203":1,"281":1,"398":1,"401":1,"402":1,"412":1,"417":2,"445":1}}],["started",{"0":{"5":1,"26":1},"1":{"27":1,"28":1,"29":1},"2":{"84":1,"191":1,"401":1,"445":1}}],["stack",{"2":{"2":1,"105":1}}],["summaries",{"2":{"422":1}}],["summary",{"0":{"313":1},"2":{"421":1}}],["surface",{"2":{"385":1}}],["sure",{"2":{"24":1,"51":1,"93":1,"169":1,"442":1}}],["submit",{"2":{"429":1}}],["subsequent",{"2":{"405":1}}],["subclasses",{"2":{"375":1}}],["subnet",{"2":{"105":4,"183":2}}],["sudo",{"2":{"191":1}}],["sunny",{"2":{"156":1,"360":1}}],["suitable",{"0":{"98":1},"2":{"60":1,"67":1,"74":1,"268":1,"294":1,"317":1,"438":1,"439":1,"440":1}}],["success",{"2":{"416":1}}],["successful",{"2":{"29":1,"31":1,"138":1,"156":1,"401":1,"416":1}}],["successfully",{"2":{"16":1,"29":2,"31":1,"84":1,"85":1,"145":1,"173":1,"383":1,"402":1,"412":1,"416":2,"426":1,"435":1}}],["succeeded",{"2":{"128":1,"129":1}}],["such",{"2":{"2":1,"3":2,"4":2,"19":1,"24":2,"53":1,"76":1,"77":2,"89":1,"210":1,"217":1,"429":1}}],["supported",{"2":{"89":1,"94":1,"104":1,"107":1,"180":1,"181":1,"206":2,"224":1,"228":1,"239":1,"243":1,"362":1}}],["support",{"2":{"2":1,"51":2,"71":1,"77":2,"82":1,"90":1,"94":1,"103":1,"105":1,"176":1,"202":1,"204":1,"313":1,"332":1,"333":1,"393":3,"398":1,"408":1,"414":1,"429":7,"431":1,"442":1,"445":1}}],["supports",{"2":{"2":3,"21":1,"24":1,"53":1,"58":1,"66":1,"67":1,"73":1,"102":1,"107":1,"116":1,"122":1,"180":1,"181":1,"182":1,"183":2,"225":1,"248":1,"276":1,"292":1,"331":1,"362":1,"410":1,"429":3,"438":2,"439":1}}],["supporting",{"2":{"2":1,"84":1,"180":1,"181":1,"183":1,"355":1,"369":1,"403":1,"408":1}}],["bit",{"2":{"445":12}}],["billing",{"2":{"445":10}}],["binding",{"2":{"104":2,"183":1}}],["bindings",{"0":{"104":1},"2":{"104":2}}],["bind",{"2":{"104":6}}],["bin",{"2":{"13":1,"15":2,"35":4,"36":1,"124":1,"132":2,"396":1,"443":1}}],["blobs",{"2":{"445":1}}],["block",{"2":{"230":1}}],["bringing",{"2":{"438":1}}],["briefly",{"2":{"204":1}}],["browser",{"2":{"403":1,"404":1}}],["broad",{"2":{"393":1}}],["brand",{"2":{"72":1}}],["box",{"2":{"391":1}}],["boundaries",{"2":{"368":1}}],["body",{"2":{"344":1,"445":2}}],["bookworm",{"2":{"251":2}}],["bootstrap",{"2":{"53":1,"73":1,"398":1}}],["bot",{"2":{"82":5,"101":1,"111":1,"202":1,"429":1}}],["both",{"0":{"287":1},"2":{"21":1,"72":1,"73":1,"105":6,"149":1,"287":1,"296":1,"310":1,"362":1}}],["bots",{"2":{"4":1}}],["bearer",{"2":{"444":1,"445":1}}],["below",{"2":{"283":1,"399":1,"443":1,"445":1}}],["belong",{"2":{"230":1}}],["between",{"2":{"188":1,"369":1,"385":2,"414":1,"415":1,"416":7,"417":1}}],["better",{"2":{"90":1,"334":1}}],["behavior",{"0":{"283":1},"2":{"77":1,"226":1,"289":1,"296":1,"299":1}}],["best",{"0":{"118":1,"260":1,"309":1,"381":1},"1":{"261":1,"262":1,"263":1,"264":1,"310":1,"311":1,"312":1,"382":1,"383":1,"384":1,"385":1,"386":1},"2":{"59":1,"71":1,"82":1,"208":1,"211":1,"223":1,"240":1,"340":1}}],["benefits",{"2":{"58":1,"59":1,"60":1,"312":1}}],["beijing",{"2":{"29":5,"61":1,"103":1,"107":2,"111":1,"114":2,"139":1,"156":1,"163":2,"224":1,"228":3,"235":1,"239":1,"242":1,"251":3,"257":2,"263":2,"267":1,"268":2,"269":1,"279":1,"360":1,"399":1,"416":4,"431":1,"444":1,"445":13}}],["begin",{"2":{"27":1,"442":1}}],["be",{"0":{"170":1},"1":{"171":1,"172":1},"2":{"24":1,"25":1,"28":2,"29":4,"31":1,"35":1,"42":1,"43":3,"51":1,"79":1,"89":4,"93":3,"104":1,"117":2,"126":1,"133":2,"139":1,"150":4,"169":2,"171":2,"172":2,"175":4,"183":1,"216":2,"306":1,"311":1,"313":1,"346":1,"353":1,"360":1,"378":1,"406":1,"414":1,"424":1,"429":1,"434":1,"442":1}}],["because",{"2":{"19":1,"25":1,"35":1,"241":1,"401":2}}],["before",{"2":{"17":1,"27":1,"118":1,"157":1,"301":1,"395":1,"400":1,"405":1,"411":1,"422":1,"426":1,"432":1,"442":1}}],["been",{"2":{"16":1,"35":1,"38":1,"47":1,"49":1,"114":1}}],["burden",{"2":{"389":1}}],["bucket=team",{"2":{"114":1,"118":1}}],["bucket",{"0":{"230":1},"2":{"103":3,"107":2,"114":2,"118":1,"224":2,"225":2,"226":2,"230":8,"257":2,"259":5,"268":1}}],["but",{"2":{"89":1,"105":1,"112":1,"133":1,"149":1,"241":1,"276":1,"291":1}}],["business",{"2":{"3":1,"314":1,"330":2,"382":1,"388":1,"436":1}}],["build+deploy",{"2":{"187":1}}],["builder",{"2":{"125":1,"132":1,"249":2,"251":1,"267":1}}],["builds",{"2":{"107":2,"114":1,"122":1,"125":1,"230":1,"237":1,"241":1,"249":1,"254":1,"257":1}}],["build",{"0":{"42":1,"119":1,"122":1,"127":1,"128":1,"129":1,"130":1,"132":1,"193":1,"236":1,"248":1,"252":1,"280":1},"1":{"120":1,"121":1,"122":1,"123":2,"124":2,"125":2,"126":2,"127":1,"128":2,"129":2,"130":1,"131":1,"132":1,"133":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1},"2":{"4":2,"15":1,"29":3,"32":1,"42":1,"53":1,"55":3,"58":2,"59":2,"60":4,"70":1,"71":1,"72":3,"84":2,"85":2,"92":1,"97":3,"120":1,"121":1,"122":1,"123":6,"124":5,"125":3,"127":1,"128":3,"129":5,"130":1,"131":5,"132":13,"133":5,"142":2,"145":3,"147":1,"177":1,"187":1,"193":2,"194":3,"198":5,"205":1,"207":1,"208":3,"209":1,"211":1,"222":3,"223":1,"225":2,"229":1,"236":2,"237":5,"238":2,"240":3,"247":2,"248":2,"249":6,"251":2,"252":3,"264":1,"267":1,"268":1,"280":2,"287":1,"288":1,"296":1,"297":3,"319":1,"356":1,"369":1,"406":1,"422":2,"432":2}}],["building",{"0":{"422":1,"432":1},"2":{"1":1,"2":1,"3":1,"20":1,"128":1,"264":1,"314":1,"340":1}}],["builtin",{"2":{"399":1,"407":1}}],["built",{"0":{"403":1},"1":{"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1},"2":{"2":1,"24":1,"29":1,"53":1,"55":1,"59":1,"72":1,"74":1,"134":1,"244":1,"247":1,"282":1,"332":1,"391":1,"399":1,"403":1,"404":1,"405":1,"406":1,"410":1,"434":1,"436":1}}],["bakery",{"2":{"401":2}}],["bad",{"2":{"262":1,"386":1}}],["backbone",{"2":{"436":1}}],["backends",{"2":{"438":2}}],["backend=",{"2":{"432":1}}],["backend=backend",{"2":{"422":1}}],["backend",{"2":{"422":5,"423":2,"429":1,"432":1,"442":1,"444":1}}],["backed",{"2":{"126":1,"133":1}}],["back",{"2":{"133":1,"258":1}}],["backups",{"2":{"126":1,"133":1}}],["backward",{"2":{"103":1}}],["balances",{"2":{"60":1}}],["basis",{"2":{"399":1}}],["basic",{"0":{"65":1,"290":1,"351":1,"360":1,"373":1},"2":{"2":1,"6":1,"21":2,"28":4,"62":2,"77":3,"78":1,"81":6,"82":2,"84":7,"85":2,"89":1,"90":1,"92":1,"185":1,"354":1,"399":1,"406":1,"422":1,"432":1}}],["bashcurl",{"2":{"401":1,"415":1,"445":1}}],["bashpython",{"2":{"401":1,"412":1}}],["bashpip",{"2":{"10":1,"11":1,"12":1,"36":1,"336":1,"410":1}}],["bashecho",{"2":{"38":1}}],["bashexport",{"2":{"19":1,"23":1,"35":1,"298":1,"431":1,"445":1}}],["bashuv",{"2":{"36":1,"396":1,"443":1}}],["bash✅",{"2":{"29":1}}],["bashmkdir",{"2":{"28":1,"396":1,"443":1}}],["bashrc",{"2":{"19":1,"35":2,"310":1}}],["bashagentkit",{"2":{"16":1,"29":2,"31":1,"93":1,"97":1,"99":1,"105":1,"109":1,"111":1,"113":1,"114":1,"118":4,"120":1,"132":3,"135":1,"143":1,"149":1,"152":1,"153":1,"154":1,"155":1,"159":1,"167":1,"169":1,"178":1,"261":1,"262":1,"271":1,"273":1,"402":1,"417":1}}],["bash",{"2":{"13":1,"15":2,"18":1,"25":2,"28":1,"62":1,"63":1,"69":1,"75":1,"81":1,"82":1,"95":1,"98":2,"102":1,"104":1,"110":1,"112":1,"114":3,"115":1,"118":1,"124":2,"131":1,"132":3,"140":1,"146":1,"165":1,"174":1,"177":1,"180":1,"181":1,"182":1,"183":1,"185":1,"186":1,"187":1,"188":1,"190":1,"192":1,"194":4,"209":2,"261":1,"262":1,"264":1,"274":1,"275":1,"283":1,"285":1,"286":1,"287":1,"288":1,"291":1,"294":1,"295":1,"296":1,"297":1,"299":1,"302":1,"303":1,"304":1,"306":1,"307":1,"308":1,"310":1,"311":1,"312":1,"313":1,"398":1,"400":1,"411":1}}],["basemodel",{"2":{"363":2}}],["baseagentkitclient",{"0":{"326":1},"2":{"328":1}}],["basego",{"2":{"251":2}}],["based",{"2":{"84":1,"126":1,"127":1,"137":1,"251":1,"311":1,"313":1,"318":1,"319":1,"379":1,"391":1,"392":1,"414":1,"422":1,"429":2,"432":1}}],["bases",{"2":{"56":1,"63":1,"181":2,"322":3,"427":3}}],["base",{"0":{"251":1,"429":1,"430":1,"432":1},"1":{"431":1},"2":{"3":1,"4":1,"123":4,"124":1,"125":2,"132":3,"181":5,"198":2,"199":1,"209":2,"235":1,"248":1,"249":2,"251":8,"267":1,"268":2,"280":2,"322":6,"326":1,"338":1,"421":1,"423":1,"427":1,"428":3,"429":9,"430":1,"432":3,"435":1,"445":1}}],["barrier",{"2":{"1":1,"436":2}}],["bytepluses",{"2":{"251":1}}],["byteplus",{"2":{"69":8,"95":2,"98":1,"101":1,"209":5,"251":1}}],["by",{"2":{"1":1,"31":1,"35":2,"84":1,"88":1,"90":1,"92":1,"97":2,"102":1,"118":1,"126":2,"133":1,"150":2,"169":1,"187":1,"194":1,"198":1,"199":1,"200":1,"205":1,"210":1,"222":1,"235":1,"237":1,"247":1,"275":1,"283":1,"295":1,"307":1,"310":1,"311":1,"313":2,"321":2,"389":1,"399":3,"404":1,"406":1,"417":1,"421":1,"422":1,"423":1,"432":1}}],["irreversible",{"2":{"166":1,"175":1}}],["ignore",{"2":{"92":1,"399":1}}],["iam",{"2":{"50":1,"224":1,"226":1,"234":1,"239":1}}],["i",{"2":{"31":2,"93":2,"106":1,"416":6,"445":10}}],["id`",{"2":{"183":1}}],["ids",{"2":{"105":1,"183":1}}],["id=local",{"2":{"416":1}}],["id=",{"2":{"416":1,"425":2,"445":1}}],["id=t",{"2":{"411":1,"416":1}}],["id=session",{"2":{"92":1,"337":1,"345":1,"399":3,"407":1,"422":2,"432":1,"445":1}}],["id=user",{"2":{"92":1,"337":1,"345":1,"399":3,"407":1,"422":2,"432":1,"445":1}}],["ide",{"2":{"334":1,"393":1}}],["identify",{"2":{"408":1}}],["identifier",{"2":{"401":2,"415":2}}],["identifies",{"2":{"87":1}}],["identity",{"2":{"327":1,"392":1}}],["ideal",{"2":{"58":1}}],["id>",{"2":{"25":1,"180":5,"181":5,"182":13,"183":6,"262":1}}],["id",{"2":{"24":2,"29":2,"31":2,"47":1,"84":3,"92":6,"104":13,"105":5,"130":1,"150":3,"154":2,"156":1,"162":1,"163":2,"180":1,"181":1,"183":8,"222":4,"225":4,"226":2,"235":1,"237":4,"247":4,"276":2,"297":1,"327":1,"337":6,"338":2,"344":6,"345":6,"355":1,"379":5,"383":5,"384":2,"399":14,"401":6,"405":1,"406":2,"407":6,"408":2,"411":2,"414":3,"415":4,"416":4,"422":13,"426":3,"432":11,"445":35}}],["if",{"2":{"15":1,"16":1,"20":1,"24":1,"25":2,"29":1,"31":2,"33":1,"36":1,"43":1,"51":1,"78":1,"92":1,"93":1,"105":3,"121":1,"126":1,"190":2,"193":2,"194":2,"230":1,"232":1,"233":1,"253":1,"276":1,"283":1,"285":1,"286":1,"313":1,"337":1,"360":1,"373":1,"379":1,"380":1,"399":2,"407":1,"416":15,"417":1,"422":3,"429":1,"432":2,"445":2}}],["immediately",{"2":{"147":1,"398":1,"429":1}}],["implied",{"2":{"399":1}}],["implementation",{"2":{"385":1}}],["implement",{"2":{"363":1,"375":1,"380":2,"419":1}}],["implemented",{"2":{"321":1,"355":1}}],["implements",{"2":{"88":1}}],["implementing",{"2":{"3":1,"314":1,"418":1}}],["improves",{"2":{"436":1}}],["improve",{"2":{"384":1}}],["improving",{"2":{"53":1,"73":1,"439":1}}],["import",{"2":{"89":1,"92":4,"330":1,"337":3,"338":2,"345":3,"352":1,"360":1,"363":2,"366":2,"373":5,"374":3,"379":3,"384":1,"399":9,"407":3,"416":2,"422":5,"427":1,"430":1,"432":5,"445":4}}],["importing",{"0":{"430":1},"1":{"431":1},"2":{"88":1}}],["imports",{"2":{"87":1,"88":1}}],["important",{"0":{"102":1,"175":1},"2":{"77":1,"149":1,"235":1,"291":1,"308":1,"312":1,"400":1,"411":1}}],["images",{"2":{"173":1,"175":1,"231":1,"232":1,"238":1,"248":1,"251":1}}],["image",{"0":{"42":1,"214":1,"229":1,"243":1,"251":1},"2":{"3":1,"29":5,"55":2,"59":1,"60":2,"61":1,"72":4,"98":2,"103":2,"110":2,"111":1,"112":2,"115":1,"118":1,"119":1,"122":1,"123":5,"124":1,"125":3,"128":3,"129":1,"130":4,"132":3,"134":1,"145":1,"163":1,"171":1,"172":1,"175":1,"198":1,"202":2,"209":2,"212":2,"214":2,"222":4,"224":2,"229":4,"233":1,"237":4,"239":2,"243":2,"244":1,"247":6,"249":4,"251":3,"266":1,"267":2,"268":2,"279":2,"280":2,"403":1,"445":20}}],["inbound",{"2":{"440":2}}],["inevitably",{"2":{"422":1,"432":1}}],["inmemorytaskstore",{"2":{"378":1}}],["inherit",{"2":{"375":2,"380":2}}],["inherited",{"2":{"102":1}}],["input",{"0":{"116":1},"2":{"98":1,"99":1,"344":2,"345":1,"359":1,"374":3,"382":2,"422":1,"432":1,"445":3}}],["investigate",{"2":{"288":1}}],["invalid",{"0":{"272":1},"2":{"272":1,"382":2}}],["invalidaccesskeyid",{"2":{"49":1}}],["invocation",{"0":{"45":1,"47":1,"414":1,"415":1},"1":{"46":1,"47":1},"2":{"31":1,"72":1,"317":1,"342":1,"357":1,"401":1,"402":1,"416":1,"417":1,"426":1}}],["invoking",{"2":{"31":1,"426":1}}],["invoketool",{"2":{"416":1}}],["invoke",{"0":{"31":1,"46":1,"148":1,"215":1,"401":1,"413":1,"425":1},"1":{"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"414":1,"415":1,"416":1},"2":{"31":3,"46":1,"55":1,"62":1,"72":2,"149":1,"150":4,"152":1,"153":1,"154":1,"155":1,"177":1,"185":1,"186":1,"187":2,"188":2,"212":1,"266":1,"317":1,"345":1,"401":2,"402":3,"404":1,"412":1,"414":1,"415":1,"416":2,"417":3,"425":3,"426":1,"435":1,"445":1}}],["individual",{"2":{"440":1}}],["indicating",{"2":{"47":1}}],["indicate",{"2":{"38":1}}],["indicated",{"2":{"35":1}}],["index=collection",{"2":{"432":1}}],["index=index",{"2":{"422":1}}],["index",{"2":{"396":1,"421":1,"422":2,"443":1}}],["independently",{"2":{"313":1}}],["independent",{"2":{"197":1,"392":1,"414":1}}],["indent",{"2":{"150":1}}],["indentation",{"2":{"39":1,"272":1}}],["incur",{"2":{"391":1}}],["incident",{"2":{"296":1}}],["increasingly",{"2":{"418":1}}],["increase",{"2":{"41":1}}],["incrementally",{"2":{"150":1}}],["incremental",{"2":{"98":1}}],["incorrect",{"2":{"38":1,"46":1,"47":1,"49":1}}],["incompatible",{"0":{"276":1},"2":{"36":1}}],["include",{"2":{"399":1}}],["includes",{"2":{"2":1,"11":1,"126":1,"130":1,"202":1,"402":1,"437":1}}],["including",{"0":{"352":1},"2":{"2":1,"21":1,"158":1,"182":1,"327":1,"352":1,"403":1,"408":1}}],["inspect",{"2":{"264":1}}],["instruction=",{"2":{"422":1,"432":1,"445":1}}],["instruction=system",{"2":{"399":1}}],["instruction",{"2":{"399":2}}],["instructions",{"2":{"396":1,"404":1}}],["instead",{"2":{"107":1,"147":1,"194":1,"206":1,"445":1}}],["instances",{"2":{"41":1,"56":1,"63":1,"72":1,"183":1,"324":1,"391":1,"414":1,"436":1,"445":4}}],["instance",{"0":{"231":1,"244":1,"414":1},"2":{"29":1,"41":1,"55":1,"78":1,"103":3,"107":3,"114":4,"118":1,"166":1,"171":1,"172":1,"224":2,"225":2,"226":2,"231":5,"234":1,"237":1,"239":2,"244":2,"245":1,"247":1,"257":2,"259":3,"267":1,"268":1,"274":1,"276":3,"279":2,"372":1,"375":1,"405":2,"406":1,"408":1,"414":3,"415":1,"445":31}}],["installed",{"2":{"16":1,"20":1,"35":1,"65":1,"133":1,"395":1,"442":1}}],["installation",{"0":{"8":1,"16":1,"34":1,"336":1},"1":{"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"35":1,"36":1},"2":{"16":1,"27":1,"42":2,"389":1,"396":3,"443":2}}],["installing",{"2":{"6":1,"7":1,"36":1,"123":1,"207":1,"418":1}}],["install",{"0":{"6":1,"9":1,"12":1,"13":1,"14":1,"15":1,"27":1,"410":1},"1":{"7":1,"8":1,"9":1,"10":2,"11":2,"12":2,"13":1,"14":1,"15":2,"16":1,"17":1,"18":1,"19":1,"20":1},"2":{"5":2,"10":1,"11":1,"12":2,"13":4,"15":5,"27":1,"35":3,"36":2,"124":2,"125":4,"132":5,"249":1,"252":2,"336":1,"396":1,"410":2,"443":5}}],["insufficient",{"2":{"41":1,"43":2,"49":1,"50":1,"274":1,"306":1}}],["inside",{"2":{"25":1,"89":1}}],["injects",{"2":{"25":1}}],["inject",{"2":{"24":1,"25":1}}],["introduction",{"2":{"429":1}}],["introduces",{"2":{"71":1}}],["int",{"2":{"358":1,"363":1,"416":3}}],["intuitive",{"2":{"54":1}}],["into",{"2":{"20":1,"25":1,"53":1,"55":1,"70":1,"72":1,"74":1,"82":1,"87":1,"93":1,"119":1,"130":1,"195":1,"217":1,"219":1,"313":1,"316":1,"438":1,"439":1}}],["intended",{"2":{"33":1}}],["intent",{"2":{"4":1}}],["intelligence",{"2":{"24":1}}],["intelligent",{"2":{"1":1,"4":2,"77":1,"323":1,"414":1,"429":6}}],["interface",{"2":{"418":1}}],["interfaces",{"2":{"2":1,"88":2,"314":1,"320":1,"403":1,"427":1,"438":1}}],["interference",{"2":{"414":1}}],["intermediate",{"2":{"374":2,"375":1}}],["internet",{"2":{"105":4}}],["internalendpoint",{"2":{"416":1}}],["internal",{"2":{"29":1,"44":1}}],["interrupt",{"2":{"29":1}}],["interaction",{"2":{"422":1}}],["interactions",{"2":{"418":1}}],["interacting",{"2":{"71":1}}],["interactivity",{"2":{"53":1,"90":1}}],["interactively",{"2":{"72":2,"99":1,"262":1}}],["interactive",{"0":{"97":1,"98":1,"109":1,"111":1,"116":1},"2":{"29":1,"42":1,"53":1,"55":1,"62":1,"81":1,"94":2,"97":1,"99":1,"106":2,"116":1,"118":3,"209":1,"262":1}}],["interact",{"2":{"17":1,"55":1,"404":1}}],["integrating",{"2":{"406":1}}],["integration",{"0":{"115":1,"393":1},"2":{"2":1,"3":1,"72":1,"322":1,"323":1,"392":1,"399":1,"403":1,"421":1,"427":1,"429":1,"431":1}}],["integrate",{"2":{"32":1,"404":1,"429":1,"436":1}}],["integrated",{"2":{"4":1,"393":1}}],["integrates",{"2":{"2":1,"403":1,"418":1}}],["info=true",{"2":{"382":1}}],["info",{"2":{"183":1,"200":1,"210":1,"235":1,"268":1,"283":4,"285":1,"290":2,"291":2,"292":1,"295":1,"304":3,"321":1,"322":1,"360":3,"383":2,"399":2,"401":6,"416":1,"422":2,"432":2,"445":12}}],["information",{"0":{"421":1,"431":1},"2":{"18":1,"19":1,"24":1,"31":1,"42":1,"51":1,"72":1,"130":1,"158":1,"178":1,"180":1,"181":1,"288":1,"292":2,"294":2,"297":2,"308":2,"310":1,"311":1,"313":1,"321":2,"322":1,"327":2,"344":1,"350":1,"360":2,"362":1,"366":1,"385":1,"421":1,"422":1,"424":1,"426":2,"431":1,"434":1,"435":1}}],["inference",{"0":{"24":1},"2":{"24":5}}],["infrastructure",{"0":{"325":1},"1":{"326":1,"327":1},"2":{"1":1,"328":2,"388":1,"391":1}}],["initiate",{"0":{"435":1},"2":{"435":1}}],["initializing",{"2":{"29":1,"71":1,"114":1}}],["initialized",{"2":{"84":1,"85":1}}],["initialize",{"0":{"28":1,"398":1},"2":{"13":1,"18":1,"28":1,"55":1,"62":1,"69":1,"72":1,"107":1,"114":1,"338":1,"352":1,"417":1}}],["initialization",{"2":{"2":1,"386":1}}],["init",{"0":{"73":1},"1":{"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1},"2":{"13":1,"18":1,"28":5,"55":1,"62":3,"63":1,"69":1,"72":1,"73":1,"75":2,"81":6,"82":6,"93":1,"107":1,"114":3,"118":2,"185":1,"186":1,"190":1,"192":1,"271":1,"379":1,"398":2,"417":1,"445":1}}],["in",{"0":{"129":1,"403":1},"1":{"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1},"2":{"2":1,"7":1,"18":2,"24":1,"25":4,"28":1,"29":3,"31":2,"35":1,"36":1,"38":2,"41":1,"42":3,"43":1,"44":1,"47":1,"52":1,"53":1,"55":1,"59":1,"61":1,"62":2,"70":1,"72":1,"74":1,"76":2,"77":1,"78":1,"81":1,"89":1,"93":1,"97":2,"102":1,"104":1,"114":3,"115":1,"116":1,"118":1,"119":1,"125":2,"141":1,"142":1,"150":3,"152":2,"172":1,"185":1,"190":1,"209":1,"215":1,"238":1,"247":1,"255":1,"258":1,"259":1,"262":2,"268":1,"282":1,"286":3,"290":1,"291":1,"297":3,"298":1,"301":1,"311":2,"332":1,"339":1,"360":2,"378":1,"380":1,"386":1,"387":1,"389":2,"391":2,"392":1,"399":6,"402":1,"403":2,"404":2,"405":3,"406":1,"410":1,"411":1,"416":8,"417":4,"422":4,"426":1,"429":2,"432":3,"434":1,"444":1,"445":5}}],["items",{"2":{"326":1}}],["item",{"2":{"112":1,"195":1,"240":1}}],["iterating",{"2":{"71":1}}],["iteration",{"0":{"187":1},"2":{"58":1,"72":1,"147":1,"266":1}}],["its",{"2":{"57":1,"77":1,"234":1,"375":1,"399":1,"401":2}}],["it",{"0":{"87":1},"2":{"1":1,"19":1,"24":1,"29":1,"38":1,"39":1,"41":1,"43":1,"46":1,"60":1,"61":1,"71":1,"73":1,"82":1,"89":1,"93":1,"121":1,"126":1,"158":1,"196":1,"202":1,"203":1,"204":1,"205":1,"206":1,"207":1,"208":1,"209":2,"210":1,"221":1,"230":1,"294":1,"302":1,"310":1,"331":1,"391":1,"399":2,"401":2,"412":1,"414":1,"427":1,"432":1,"436":2,"440":1}}],["isolating",{"2":{"392":1}}],["isolation",{"0":{"392":1},"2":{"389":1,"392":1,"414":1}}],["isolated",{"2":{"225":2}}],["issue",{"2":{"51":1,"288":1}}],["issues",{"0":{"34":1,"37":1,"40":1,"45":1,"48":1,"296":1},"1":{"35":1,"36":1,"38":1,"39":1,"41":1,"42":1,"43":1,"44":1,"46":1,"47":1,"49":1,"50":1},"2":{"20":1,"33":2,"39":1,"46":1,"193":3,"194":1,"282":1,"292":1,"298":1,"311":1,"312":1,"313":1,"391":1}}],["is",{"2":{"1":1,"3":1,"16":2,"19":1,"29":5,"31":1,"33":1,"35":1,"39":1,"41":1,"43":1,"44":2,"46":2,"47":2,"49":1,"52":1,"57":1,"61":1,"68":1,"71":1,"86":1,"88":1,"89":2,"91":2,"93":1,"94":1,"105":2,"114":1,"117":1,"123":1,"126":2,"127":1,"133":3,"138":1,"139":1,"156":1,"157":1,"166":1,"168":1,"193":1,"194":2,"196":1,"197":1,"206":1,"209":1,"226":1,"228":1,"238":1,"241":1,"255":1,"258":1,"272":1,"273":1,"276":1,"290":1,"299":1,"301":1,"304":1,"306":2,"307":2,"314":1,"341":1,"346":3,"355":1,"356":1,"369":1,"380":2,"385":1,"388":1,"399":3,"401":1,"406":1,"410":1,"411":1,"416":8,"417":1,"422":3,"423":2,"425":1,"426":2,"429":3,"432":4,"436":1,"444":2,"445":2}}],["a4",{"2":{"429":1}}],["a3",{"2":{"429":1}}],["a2",{"2":{"429":1}}],["a2aagentexecutor",{"2":{"371":1,"373":2,"378":1}}],["a2a",{"0":{"369":1},"1":{"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1},"2":{"2":2,"21":1,"32":1,"62":2,"77":1,"84":6,"319":1,"369":1,"373":7,"374":4,"376":1,"378":2,"379":3,"393":1}}],["a1",{"2":{"429":1}}],["aware",{"2":{"418":1}}],["await",{"2":{"92":1,"337":1,"345":1,"347":1,"355":1,"361":1,"366":1,"367":3,"374":2,"382":1,"383":1,"386":2,"399":2,"407":1,"408":1,"422":2,"432":1,"445":1}}],["audio=false",{"2":{"445":1}}],["audio",{"2":{"445":2}}],["augmented",{"2":{"322":1}}],["auth",{"2":{"445":4}}],["authorization",{"2":{"440":1,"444":2,"445":1}}],["authentication",{"0":{"17":1,"49":1,"440":1},"1":{"18":1,"19":1},"2":{"38":1,"150":1,"234":1,"326":1,"392":1,"436":2,"438":1,"440":3}}],["autocomplete",{"2":{"334":1}}],["auto",{"0":{"126":1,"222":1,"226":1,"237":1,"247":1},"2":{"59":1,"76":1,"78":1,"82":1,"89":1,"121":2,"126":3,"133":1,"187":1,"209":1,"224":8,"226":7,"230":4,"231":4,"232":1,"233":1,"234":5,"239":4,"244":2,"258":1,"259":3,"267":1,"268":5,"278":1,"279":2,"280":1,"445":1}}],["automate",{"2":{"71":1}}],["automated",{"0":{"332":1},"2":{"4":1,"391":1,"429":1}}],["automatic",{"0":{"302":1},"2":{"29":1,"133":1,"141":2,"313":1,"414":1,"429":1,"436":1,"439":1}}],["automatically",{"2":{"3":1,"24":1,"25":3,"29":2,"42":1,"72":1,"87":1,"88":1,"114":1,"117":1,"118":2,"123":1,"126":3,"127":1,"129":1,"130":1,"133":1,"137":1,"142":1,"150":2,"216":1,"225":1,"226":1,"232":1,"233":1,"251":2,"258":1,"295":1,"332":1,"346":1,"354":1,"391":2,"398":1,"399":1,"414":2,"424":1,"425":1,"429":1,"434":1,"438":1,"445":1}}],["automation",{"2":{"4":1,"118":1,"403":1}}],["aaaaaaaa",{"2":{"105":2,"183":1}}],["affiliates",{"2":{"399":1}}],["affective",{"2":{"445":1}}],["affects",{"2":{"209":2}}],["affect",{"2":{"105":1,"299":1}}],["after",{"0":{"92":1,"141":1},"2":{"16":1,"23":1,"28":2,"29":2,"43":1,"84":1,"85":1,"131":1,"147":1,"150":1,"175":1,"187":1,"222":2,"272":1,"401":1,"402":2,"406":1,"411":1,"412":1,"414":1,"416":1,"417":2,"422":2,"429":1,"432":1,"444":1}}],["at",{"2":{"52":1,"89":1,"114":1,"118":1,"163":1,"210":1,"235":1,"295":1,"399":1,"401":2,"438":1,"445":3}}],["attributes",{"2":{"81":1}}],["attach",{"2":{"51":1}}],["attention",{"2":{"39":1,"42":1}}],["amd64",{"2":{"249":1,"254":1}}],["am",{"2":{"31":1}}],["amp",{"0":{"440":1},"2":{"4":2,"208":1,"240":1,"322":1,"395":1,"442":1}}],["abcd",{"2":{"262":1}}],["abc123",{"2":{"139":1,"162":1,"163":1}}],["abnormal",{"0":{"44":1},"2":{"296":1}}],["absolute",{"2":{"35":1}}],["about",{"2":{"29":1,"389":1,"391":1}}],["above",{"2":{"25":1,"51":1,"410":1}}],["able",{"2":{"25":1,"35":1,"406":1}}],["arbitrary",{"2":{"422":1}}],["args=",{"2":{"416":1,"445":1}}],["args",{"2":{"360":1,"361":1,"363":1,"366":1,"374":1,"385":1,"399":1}}],["arguments",{"2":{"72":1,"95":1}}],["arch",{"2":{"280":1}}],["archive",{"2":{"29":1,"230":1,"241":1}}],["architecture",{"0":{"3":1,"315":1,"391":1},"1":{"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1},"2":{"121":1,"197":1,"254":2,"387":1}}],["arm",{"2":{"254":1}}],["arm64",{"2":{"254":1}}],["artifacts=false",{"2":{"445":1}}],["artifact",{"2":{"183":8}}],["articles",{"2":{"31":1}}],["are",{"0":{"276":1},"2":{"36":1,"38":2,"42":2,"71":1,"77":1,"94":1,"102":1,"104":1,"114":1,"126":1,"133":1,"157":1,"169":1,"173":1,"189":1,"217":1,"222":1,"235":2,"237":1,"247":1,"274":1,"301":1,"304":1,"306":1,"354":1,"389":1,"391":1,"402":1,"417":3,"422":2,"428":1,"432":1,"445":3}}],["ark",{"2":{"24":3,"25":1,"29":2,"47":2,"77":1,"235":2,"263":1,"399":1,"422":3,"432":3,"442":1,"445":4}}],["akltxxxxxxxx",{"2":{"257":1}}],["ak",{"0":{"23":1,"49":1},"2":{"17":1,"23":1,"25":1,"49":3,"69":1,"107":1,"133":1,"150":1,"192":1,"274":1,"338":1,"400":2,"411":2,"416":2}}],["achieves",{"2":{"399":1}}],["achieve",{"2":{"393":1}}],["achieving",{"2":{"391":1}}],["action",{"2":{"416":1}}],["activation",{"2":{"23":1}}],["activated",{"2":{"395":1}}],["activate",{"2":{"13":2,"15":4,"36":1,"396":2,"443":1}}],["actual",{"2":{"321":1,"400":1,"411":1}}],["across",{"2":{"94":1,"102":2,"107":1,"118":1,"197":1,"209":1,"255":1}}],["accuracy",{"2":{"439":1}}],["accumulate",{"2":{"302":1}}],["accidentally",{"2":{"310":1}}],["according",{"2":{"251":1,"432":2}}],["account",{"2":{"23":1,"41":1,"50":2,"69":1,"225":6,"226":2,"230":1,"395":1,"442":1}}],["accelerate",{"2":{"52":1}}],["accept",{"2":{"29":1,"350":1}}],["accessing",{"2":{"320":1,"440":4}}],["accessible",{"2":{"133":1,"141":2,"442":1}}],["accesskey=",{"2":{"192":1}}],["accesskey",{"2":{"192":3,"274":1,"395":2,"442":2}}],["accessdenied",{"2":{"50":1}}],["access",{"0":{"23":1,"50":1},"2":{"17":1,"18":3,"19":2,"23":4,"25":5,"38":1,"47":1,"49":1,"69":7,"72":1,"81":1,"105":7,"107":2,"114":2,"133":1,"138":1,"139":1,"158":1,"162":1,"163":1,"183":1,"192":1,"237":1,"247":1,"257":1,"263":1,"338":1,"389":1,"391":1,"392":3,"400":3,"411":2,"422":1,"429":1,"432":1,"436":2,"438":1}}],["alternative",{"2":{"440":1}}],["alias=true",{"2":{"399":1}}],["aliases",{"2":{"103":1,"276":1}}],["alerting",{"2":{"389":1}}],["always",{"2":{"220":2}}],["alpine",{"2":{"123":2,"124":2,"125":2,"132":6,"249":2,"251":3,"267":2}}],["already",{"2":{"36":1,"82":1,"91":1,"93":1,"105":1,"121":1,"253":1,"402":1,"417":1,"438":1}}],["allowing",{"2":{"314":1,"388":1,"398":1,"436":1,"438":1}}],["allows",{"2":{"3":1}}],["all",{"0":{"65":1},"2":{"28":1,"53":1,"61":2,"70":1,"97":1,"102":3,"116":1,"117":1,"176":1,"177":1,"180":1,"181":1,"183":2,"196":1,"198":2,"199":1,"200":1,"210":1,"275":1,"326":1,"352":1,"362":1,"382":1,"385":1,"389":1,"402":2,"403":1,"417":2,"445":2}}],["also",{"2":{"15":1,"24":1,"28":1,"29":1,"89":1,"103":1,"297":1,"440":1}}],["adopts",{"2":{"315":1,"440":1}}],["adjust",{"2":{"308":1,"311":1}}],["admin",{"2":{"114":1,"118":1}}],["administrators",{"2":{"429":2}}],["administrator",{"2":{"41":1,"49":1,"50":1}}],["adk",{"2":{"90":1,"321":1,"331":2,"373":1,"399":2,"443":1,"445":2}}],["advanced",{"0":{"291":1,"352":1},"2":{"81":1}}],["advantages",{"0":{"2":1,"53":1,"390":1},"1":{"391":1,"392":1,"393":1}}],["adaptation",{"2":{"393":1}}],["adapt",{"2":{"57":1}}],["additional",{"2":{"150":1,"252":1,"399":1}}],["adds",{"2":{"150":1,"322":1}}],["addresses",{"2":{"389":1}}],["address",{"2":{"46":1,"156":1,"412":1}}],["added",{"2":{"35":1,"116":1,"429":1}}],["add",{"0":{"263":1},"2":{"13":2,"19":1,"35":2,"93":2,"110":1,"116":1,"122":1,"124":1,"132":1,"180":2,"181":2,"310":1,"322":1,"383":1,"385":1,"396":2,"406":1,"422":2,"423":3,"428":1,"429":2,"432":1,"433":1}}],["available",{"0":{"354":1},"2":{"16":1,"28":2,"63":1,"84":1,"94":1,"116":1}}],["availability",{"2":{"2":1,"128":1,"445":11}}],["avoiding",{"2":{"18":1}}],["avoid",{"2":{"7":1,"36":1,"82":1,"118":1,"310":1,"311":1,"313":1,"353":2,"362":1,"386":1}}],["apache",{"2":{"399":2}}],["ap",{"2":{"251":1}}],["apmplus",{"2":{"235":4,"268":4}}],["apk",{"2":{"124":1,"132":1}}],["apt",{"2":{"124":2,"132":2}}],["apiconfig",{"2":{"338":2}}],["apikey",{"0":{"234":1,"245":1},"2":{"150":1,"155":1,"224":1,"226":1,"234":1,"237":1,"239":1,"247":1,"268":1,"444":2,"445":2}}],["apigateway",{"2":{"29":3,"139":1,"156":1,"163":2,"444":1}}],["api",{"0":{"24":1,"155":1},"2":{"24":6,"25":3,"29":2,"44":1,"47":3,"61":2,"97":1,"98":1,"102":4,"104":1,"111":2,"116":3,"118":1,"150":1,"155":1,"157":1,"212":1,"217":4,"224":3,"226":1,"234":1,"235":5,"237":1,"239":3,"247":1,"262":3,"263":1,"266":1,"267":1,"268":2,"269":1,"326":1,"339":1,"399":1,"402":1,"403":1,"417":1,"421":1,"422":3,"423":2,"432":3,"436":1,"438":1,"440":3,"442":2,"445":5}}],["apis",{"2":{"4":1,"429":1}}],["append",{"2":{"399":1}}],["approximately",{"2":{"426":1}}],["appropriate",{"2":{"307":1,"383":1}}],["approaches",{"2":{"262":1}}],["approach",{"2":{"69":1}}],["app│",{"2":{"84":2}}],["apple",{"2":{"254":1}}],["applies",{"2":{"102":1,"209":1}}],["applicable",{"0":{"4":1},"2":{"399":1,"438":1,"439":1}}],["application",{"0":{"316":1},"1":{"317":1,"318":1,"319":1},"2":{"2":2,"3":3,"28":1,"44":1,"52":1,"53":1,"55":1,"61":1,"70":1,"94":1,"101":1,"145":1,"237":1,"247":1,"316":1,"317":1,"318":1,"319":1,"328":1,"330":1,"341":1,"373":2,"387":1,"393":1,"401":3,"402":2,"415":1,"417":4,"445":3}}],["applications",{"2":{"1":1,"31":1,"54":1,"71":1,"314":1,"317":1,"322":1,"340":1,"369":1,"440":1}}],["applying",{"2":{"118":1}}],["apply",{"2":{"35":1,"401":2}}],["app",{"0":{"342":1,"348":1,"355":1,"357":1,"364":1,"370":1,"376":1},"1":{"343":1,"344":1,"345":1,"346":1,"347":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"365":1,"366":1,"367":1,"368":1,"371":1,"372":1,"373":1,"374":1,"375":1,"377":1,"378":1,"379":1,"380":1},"2":{"3":1,"21":1,"28":2,"29":6,"32":1,"61":1,"62":2,"72":2,"84":13,"88":2,"92":4,"93":2,"97":2,"101":1,"102":4,"116":1,"118":1,"185":1,"186":1,"198":1,"200":1,"203":1,"210":3,"212":1,"215":1,"217":1,"219":2,"263":1,"266":2,"268":1,"278":1,"317":3,"318":2,"319":2,"330":2,"337":4,"343":1,"345":2,"347":1,"349":1,"351":1,"352":1,"355":1,"358":1,"360":2,"361":1,"363":1,"365":1,"366":2,"367":3,"371":1,"373":3,"374":1,"377":1,"378":2,"379":1,"382":1,"383":1,"384":1,"385":1,"386":2,"399":9,"407":4,"422":8,"429":1,"432":6,"445":6}}],["apps",{"2":{"2":1,"21":1,"29":1,"92":1,"328":1,"330":1,"337":1,"345":1,"360":1,"373":1,"399":1,"407":1,"422":1,"432":1,"445":1}}],["agreed",{"2":{"399":1}}],["again",{"2":{"382":1,"426":1}}],["agnostic",{"0":{"331":1,"393":1}}],["agile",{"2":{"3":1}}],["aggregation",{"2":{"2":1,"323":1}}],["agentexecutor",{"2":{"374":2,"375":2}}],["agent=root",{"2":{"445":1}}],["agent=calendar",{"2":{"367":1}}],["agent=news",{"2":{"367":1}}],["agent=weather",{"2":{"366":1,"367":1}}],["agent=agent",{"2":{"92":1,"337":1,"345":1,"373":2,"386":2,"399":1,"407":1,"422":1,"432":1}}],["agent$",{"2":{"31":1}}],["agents",{"2":{"1":1,"2":1,"4":2,"32":1,"81":1,"82":2,"84":1,"85":1,"259":1,"319":1,"321":1,"322":1,"367":1,"369":1,"389":1,"391":1,"399":2,"403":1,"404":4,"418":2,"422":1,"427":1,"432":1,"438":1,"440":1}}],["agent",{"0":{"30":1,"31":1,"89":1,"186":1,"202":1,"337":1,"341":1,"356":1,"364":1,"367":1,"369":1,"370":1,"397":1,"398":1,"399":1,"406":1,"412":1,"413":1,"422":1,"432":1,"445":1},"1":{"31":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":2,"366":2,"367":2,"368":2,"370":1,"371":2,"372":2,"373":2,"374":2,"375":2,"376":1,"377":1,"378":1,"379":1,"380":1,"398":1,"399":1,"400":1,"401":1,"407":1,"408":1,"414":1,"415":1,"416":1},"2":{"1":2,"2":3,"3":1,"4":1,"20":1,"21":2,"24":4,"25":4,"28":7,"29":7,"31":3,"32":1,"47":1,"52":1,"54":1,"55":5,"61":2,"62":7,"70":1,"71":3,"72":8,"73":1,"74":1,"75":3,"76":4,"77":7,"78":8,"81":10,"82":20,"84":14,"85":13,"86":1,"87":4,"88":3,"89":17,"90":1,"91":5,"92":6,"93":7,"94":1,"97":4,"98":3,"99":1,"101":3,"103":1,"110":1,"111":2,"112":3,"114":1,"115":2,"117":2,"118":4,"119":1,"124":2,"128":1,"129":1,"130":1,"134":1,"139":1,"145":2,"148":1,"156":2,"157":1,"158":1,"162":1,"163":2,"166":1,"169":1,"173":1,"185":2,"186":5,"190":1,"194":1,"196":1,"197":1,"198":3,"200":5,"202":5,"203":1,"204":3,"212":2,"215":1,"216":1,"217":1,"222":1,"224":3,"233":1,"235":6,"239":2,"244":1,"262":3,"263":4,"266":4,"267":5,"268":7,"269":6,"271":1,"273":1,"278":2,"279":1,"290":1,"301":1,"303":2,"311":1,"314":2,"317":3,"318":2,"319":4,"324":1,"331":1,"337":3,"340":1,"342":1,"344":1,"345":5,"347":1,"364":2,"365":2,"366":8,"367":12,"368":3,"369":2,"370":2,"371":1,"372":1,"373":11,"374":7,"378":1,"386":4,"388":2,"389":2,"391":2,"392":1,"393":1,"394":1,"398":2,"399":11,"400":1,"401":4,"402":2,"404":1,"406":4,"407":5,"411":1,"412":3,"415":1,"416":1,"417":4,"420":1,"422":15,"425":1,"426":2,"429":2,"430":1,"432":14,"435":1,"440":3,"445":17}}],["agentkitfullaccess",{"2":{"395":1,"442":1}}],["agentkitagentserverapp",{"2":{"328":1}}],["agentkita2aapp",{"0":{"319":1},"2":{"328":1,"369":1,"373":2,"378":1}}],["agentkitruntime",{"0":{"324":1},"2":{"328":1}}],["agentkitknowledge",{"0":{"322":1},"2":{"328":1}}],["agentkitmcp",{"0":{"323":1},"2":{"328":1}}],["agentkitmcpapp",{"0":{"318":1},"2":{"328":1,"356":1,"360":2,"366":1}}],["agentkitmemory",{"0":{"321":1},"2":{"328":1,"338":2}}],["agentkitsimpleapp",{"0":{"317":1},"2":{"92":2,"328":1,"330":2,"337":2,"341":1,"345":2,"399":4,"407":2,"422":2,"432":2,"445":2}}],["agentkit",{"0":{"0":1,"6":1,"27":1,"35":1,"52":1,"61":1,"73":1,"94":1,"119":1,"134":1,"142":1,"148":1,"158":1,"166":1,"180":1,"181":1,"182":1,"183":1,"314":1,"388":1,"389":1,"403":1,"418":1,"427":1,"436":1,"437":1,"441":1,"444":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"143":1,"144":1,"145":1,"146":1,"147":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":1,"396":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"437":1,"438":2,"439":2,"440":2,"442":1,"443":1,"444":1,"445":1},"2":{"1":1,"2":2,"3":5,"5":2,"6":1,"7":1,"10":1,"11":1,"12":1,"13":2,"15":5,"16":2,"17":2,"18":6,"20":1,"21":2,"23":1,"24":2,"25":4,"27":2,"28":6,"29":6,"31":4,"32":3,"33":1,"35":4,"36":5,"38":1,"39":3,"41":1,"43":2,"44":2,"46":2,"49":1,"51":1,"52":2,"53":3,"54":1,"55":9,"56":8,"57":1,"59":1,"60":1,"61":3,"62":8,"63":5,"65":1,"69":6,"70":1,"71":4,"72":2,"73":1,"74":2,"75":2,"76":1,"81":6,"82":7,"84":3,"85":6,"86":1,"87":1,"88":1,"91":1,"92":4,"94":1,"95":3,"98":3,"102":4,"103":2,"104":5,"105":4,"106":1,"107":6,"110":3,"112":1,"114":13,"115":2,"118":5,"121":1,"122":2,"126":6,"129":1,"131":4,"132":3,"133":1,"136":1,"140":2,"144":1,"145":1,"146":2,"150":5,"157":1,"160":1,"163":1,"165":2,"168":1,"174":3,"175":2,"177":3,"178":1,"179":1,"180":10,"181":9,"182":12,"183":11,"185":5,"186":6,"187":5,"188":8,"190":3,"192":3,"194":5,"196":1,"197":3,"209":5,"224":1,"225":2,"226":2,"232":1,"237":1,"239":1,"244":1,"251":5,"255":1,"256":1,"257":1,"258":2,"259":2,"261":6,"262":3,"264":3,"267":1,"271":1,"274":1,"275":2,"279":1,"282":1,"283":6,"285":4,"286":2,"287":3,"288":4,"290":6,"291":6,"292":1,"294":2,"295":3,"296":4,"297":7,"298":5,"299":3,"301":7,"302":4,"303":4,"304":5,"306":3,"307":3,"308":2,"310":6,"311":5,"312":5,"313":11,"314":2,"315":1,"320":1,"328":1,"330":1,"336":1,"337":1,"338":2,"340":1,"345":1,"360":1,"373":1,"387":1,"388":1,"389":1,"393":1,"395":1,"396":3,"398":3,"399":2,"402":3,"405":1,"406":2,"407":1,"411":2,"416":2,"417":6,"418":1,"419":1,"420":1,"422":3,"423":1,"424":2,"425":3,"426":2,"427":2,"430":1,"432":3,"433":1,"434":2,"435":1,"436":1,"437":1,"438":1,"440":1,"442":1,"443":3,"444":1,"445":1}}],["assets",{"2":{"438":1}}],["association",{"2":{"427":1}}],["associate",{"2":{"183":1,"415":1}}],["assigns",{"2":{"216":1}}],["assignment",{"2":{"89":1}}],["assign",{"2":{"49":1}}],["assistant",{"2":{"31":1,"81":2,"101":1,"111":1,"204":1,"366":2,"367":6,"422":1}}],["asked",{"2":{"169":1,"429":1}}],["ask",{"2":{"168":1,"230":1,"445":1}}],["asynchronous",{"2":{"317":1,"355":1,"408":1}}],["async",{"0":{"355":1,"361":1},"2":{"92":1,"317":1,"330":1,"337":1,"343":1,"345":1,"346":2,"347":1,"353":1,"355":2,"361":3,"362":2,"365":1,"366":1,"367":3,"368":2,"374":1,"379":3,"382":1,"383":1,"384":1,"386":2,"399":3,"407":1,"408":1,"422":1,"432":1,"445":1}}],["astral",{"2":{"13":1}}],["as",{"0":{"364":1},"1":{"365":1,"366":1,"367":1,"368":1},"2":{"2":1,"3":2,"4":2,"19":1,"23":1,"24":2,"29":1,"53":1,"69":1,"76":1,"77":2,"89":1,"91":1,"93":1,"150":1,"210":1,"217":1,"241":1,"244":1,"245":1,"246":1,"283":1,"310":1,"311":1,"318":4,"346":1,"347":2,"352":2,"356":1,"357":1,"359":1,"361":2,"362":1,"364":1,"365":1,"366":1,"367":3,"382":2,"383":1,"391":2,"399":4,"407":1,"422":1,"428":1,"429":2,"432":1,"436":2,"439":1,"440":1,"443":1,"445":12}}],["a",{"0":{"12":1,"24":1,"28":1,"110":1,"337":1,"364":1,"405":1,"420":1,"429":1,"435":1},"1":{"365":1,"366":1,"367":1,"368":1,"421":1},"2":{"1":2,"2":2,"3":1,"4":4,"5":1,"7":1,"12":1,"21":1,"23":1,"24":6,"28":3,"29":4,"33":1,"36":2,"42":1,"43":1,"52":2,"53":1,"54":1,"55":4,"59":1,"60":2,"61":1,"62":3,"69":1,"70":1,"71":2,"72":6,"73":1,"74":2,"75":1,"76":1,"77":2,"78":1,"81":3,"82":5,"84":2,"85":1,"86":1,"87":2,"88":1,"89":4,"91":2,"93":4,"94":1,"104":6,"105":3,"107":3,"114":3,"116":2,"118":1,"119":1,"125":3,"126":1,"139":1,"141":1,"148":2,"177":1,"197":1,"202":2,"204":1,"216":2,"221":1,"226":1,"229":2,"230":1,"236":1,"241":1,"252":1,"253":1,"258":1,"262":1,"267":1,"268":1,"271":1,"272":1,"282":1,"285":2,"286":1,"287":1,"288":1,"290":1,"291":1,"295":1,"296":1,"297":1,"298":2,"303":2,"304":1,"307":1,"311":1,"314":2,"315":1,"318":2,"321":2,"322":3,"323":1,"340":1,"357":1,"365":1,"366":2,"367":3,"368":2,"388":2,"389":1,"391":1,"394":1,"395":1,"396":1,"398":3,"399":2,"401":4,"402":1,"404":1,"405":2,"406":2,"408":1,"414":2,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"422":3,"428":1,"429":5,"432":2,"435":1,"436":2,"440":1,"442":1,"443":1,"445":13}}],["aiohttp",{"2":{"361":2}}],["ai",{"2":{"1":1,"31":1,"84":1,"85":1,"401":2,"418":1}}],["anonymous",{"2":{"345":1,"384":1}}],["another",{"2":{"230":1,"401":1}}],["annotation",{"0":{"340":1},"1":{"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1},"2":{"339":1}}],["annotations",{"0":{"341":1,"356":1,"369":1,"384":1},"1":{"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"348":1,"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1},"2":{"334":1,"340":2,"359":1,"362":2,"384":1}}],["answers",{"2":{"429":1}}],["answer",{"2":{"150":2,"422":1,"429":1,"432":2,"435":1}}],["anytime",{"2":{"173":1,"175":1}}],["any",{"2":{"31":1,"150":1,"177":1,"204":1,"262":1,"299":1,"350":1,"384":2,"399":1}}],["anywhere",{"2":{"2":1}}],["analytics",{"2":{"429":1}}],["analyst",{"2":{"4":1}}],["analysis",{"2":{"4":2,"31":1,"296":1,"297":1,"445":1}}],["analyzer",{"2":{"202":1}}],["analyzes",{"2":{"87":1}}],["analyze",{"2":{"4":1,"445":1}}],["and",{"0":{"29":1,"287":1,"397":1,"401":1,"445":1},"1":{"398":1,"399":1,"400":1,"401":1},"2":{"1":3,"2":10,"3":7,"4":2,"6":1,"11":1,"13":1,"14":1,"15":1,"20":2,"21":5,"23":3,"24":4,"25":3,"27":1,"28":2,"29":6,"31":1,"32":3,"33":1,"35":1,"36":2,"42":2,"43":1,"44":1,"49":1,"51":1,"52":3,"53":3,"55":3,"56":1,"58":2,"59":2,"70":1,"71":4,"72":4,"73":1,"76":1,"77":1,"81":1,"82":5,"84":2,"85":2,"87":3,"88":1,"90":1,"91":4,"93":3,"94":1,"97":2,"99":1,"105":3,"114":1,"117":3,"118":1,"121":1,"125":1,"126":2,"133":2,"134":1,"147":1,"150":1,"157":1,"158":1,"166":1,"168":1,"173":1,"177":1,"179":1,"180":2,"181":1,"182":3,"183":4,"188":1,"193":1,"202":2,"205":1,"208":2,"209":1,"211":2,"217":1,"222":1,"223":1,"230":1,"232":1,"234":1,"237":1,"238":3,"247":1,"248":1,"251":1,"255":1,"259":1,"266":1,"273":1,"281":1,"282":1,"287":1,"288":1,"290":1,"291":1,"294":1,"295":1,"296":1,"297":1,"298":2,"310":1,"311":1,"312":2,"313":2,"314":1,"321":3,"323":3,"324":2,"326":3,"340":1,"344":1,"348":1,"355":1,"360":1,"362":2,"363":1,"364":1,"369":1,"374":1,"380":1,"388":1,"389":6,"391":5,"392":4,"393":1,"394":1,"395":1,"396":1,"398":1,"399":4,"400":1,"401":1,"402":3,"403":3,"404":3,"408":1,"410":1,"412":1,"415":1,"416":1,"417":5,"418":6,"422":4,"426":1,"427":2,"429":9,"432":2,"435":1,"436":8,"437":1,"438":5,"439":3,"440":4,"444":1,"445":1}}],["an",{"0":{"422":1,"432":1},"2":{"1":1,"2":1,"3":1,"29":1,"31":1,"41":1,"47":1,"55":1,"61":1,"70":1,"72":5,"74":1,"75":1,"78":1,"81":1,"82":1,"86":1,"89":1,"94":1,"104":1,"110":1,"116":1,"123":1,"125":1,"132":1,"186":1,"230":1,"231":1,"267":1,"281":1,"288":1,"307":1,"318":4,"319":2,"357":1,"364":1,"366":1,"368":1,"370":1,"382":1,"392":1,"399":2,"406":1,"422":2,"432":2,"436":1,"443":1,"444":1,"445":1}}],["p66l",{"2":{"444":1}}],["philosophy",{"2":{"321":1}}],["phase",{"2":{"208":1}}],["p",{"2":{"150":1,"306":1,"416":9}}],["ping",{"0":{"348":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1},"2":{"88":1,"92":2,"93":1,"317":2,"337":2,"349":2,"351":2,"352":3,"353":1,"354":1,"399":2,"407":2,"422":2,"432":2,"445":2}}],["pipelines",{"2":{"115":1}}],["pipeline",{"2":{"29":1,"42":3,"129":1,"237":5,"240":1}}],["pip",{"0":{"9":1},"1":{"10":1,"11":1,"12":1},"2":{"7":1,"15":3,"35":3,"36":3,"65":1,"410":1,"443":3}}],["put",{"2":{"209":1,"374":1}}],["publicly",{"2":{"141":1,"442":1}}],["public",{"2":{"105":7,"183":1,"230":1,"251":2}}],["publish",{"2":{"72":1}}],["purpose",{"2":{"71":1,"197":1,"204":1,"214":1,"215":1,"216":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"236":1,"242":1,"243":1,"252":1,"253":1,"254":1,"359":1,"362":1}}],["push",{"2":{"60":1}}],["per",{"2":{"445":10}}],["period",{"2":{"414":1}}],["periodically",{"2":{"302":1}}],["persistence",{"2":{"436":1,"438":1}}],["persistent",{"2":{"380":2}}],["persisted",{"2":{"104":1}}],["persisting",{"2":{"376":1}}],["personnel",{"2":{"429":1}}],["personalized",{"2":{"418":1,"422":1}}],["personalization",{"2":{"418":1}}],["personal",{"2":{"311":1}}],["person",{"2":{"230":1}}],["permanently",{"2":{"175":1}}],["permission",{"0":{"48":1},"1":{"49":1,"50":1},"2":{"193":1,"389":1,"442":1}}],["permissions",{"2":{"25":1,"47":1,"49":3,"50":4,"133":1,"193":1,"274":1,"306":2,"392":1,"395":1,"399":1}}],["performing",{"2":{"353":1,"386":1}}],["performs",{"2":{"321":1}}],["performance",{"0":{"386":1},"2":{"67":1,"429":1}}],["perform",{"2":{"50":1,"363":1}}],["policies",{"2":{"419":1}}],["policy",{"0":{"220":1},"2":{"210":1,"212":3,"217":1,"220":1,"235":1,"246":1,"275":1,"279":1}}],["potential",{"2":{"292":1}}],["postpaid",{"2":{"445":10}}],["post",{"2":{"296":1,"401":1,"416":1}}],["postgresql",{"2":{"124":1,"132":1,"352":1}}],["possible",{"2":{"193":1,"274":1,"275":1,"306":1,"307":1}}],["positioning",{"0":{"1":1},"2":{"436":1}}],["port=6379",{"2":{"352":1}}],["port=8000",{"2":{"92":1,"337":1,"373":1,"399":1,"407":1,"422":1,"432":1,"445":1}}],["ports",{"0":{"218":1},"2":{"162":1,"212":1,"218":2,"266":1}}],["port",{"0":{"215":1},"2":{"141":1,"212":3,"215":3,"218":4,"266":1}}],["portable",{"2":{"53":1,"72":1}}],["pong",{"2":{"92":1,"337":1,"350":1,"351":1,"399":1,"407":1,"422":1,"432":1,"445":1}}],["powerful",{"2":{"32":1,"52":1,"86":1}}],["points",{"2":{"92":1,"385":1,"391":1}}],["point",{"0":{"203":1},"2":{"28":1,"61":1,"84":1,"85":1,"91":1,"92":2,"97":1,"98":2,"101":1,"110":2,"111":1,"112":2,"115":1,"117":2,"118":2,"124":1,"198":1,"200":1,"203":5,"263":1,"266":1,"267":1,"268":1,"269":2,"278":1,"417":2,"436":1}}],["pypi",{"2":{"410":1}}],["pydantic",{"2":{"363":1}}],["py",{"2":{"28":1,"29":1,"61":1,"78":1,"82":6,"84":2,"85":5,"89":1,"92":2,"93":1,"97":1,"98":2,"101":2,"110":1,"111":1,"112":3,"115":1,"117":1,"118":2,"124":1,"186":1,"198":1,"200":1,"203":3,"251":2,"263":1,"266":1,"268":1,"269":2,"301":1,"398":1,"399":1,"401":29,"407":1,"412":1,"416":9,"417":2,"445":12}}],["pythonimport",{"2":{"347":1,"352":1,"361":1,"382":1,"445":1}}],["pythonfrom",{"2":{"330":1,"337":1,"338":1,"345":1,"360":1,"363":1,"366":1,"373":1,"374":1,"379":1,"384":1,"407":1}}],["python3",{"2":{"15":1,"396":1,"416":3,"443":1}}],["python==0",{"2":{"12":1}}],["python",{"0":{"66":1,"266":1},"2":{"2":1,"7":2,"10":1,"11":1,"13":4,"15":5,"21":1,"28":1,"29":2,"35":3,"36":6,"42":1,"65":1,"66":1,"78":1,"84":1,"85":1,"87":2,"89":2,"90":2,"92":1,"93":1,"97":1,"123":3,"124":3,"125":1,"132":1,"193":1,"198":2,"200":1,"203":1,"205":4,"206":5,"207":2,"249":2,"251":5,"266":1,"268":2,"276":2,"278":1,"314":1,"330":1,"334":1,"336":1,"343":1,"349":1,"351":1,"355":1,"358":1,"365":1,"367":1,"371":1,"377":1,"378":1,"383":1,"385":1,"386":1,"393":1,"395":1,"396":4,"399":1,"408":1,"410":4,"422":1,"432":1,"442":1,"443":3}}],["plugins",{"2":{"436":2}}],["placeholders",{"2":{"411":1}}],["placement",{"2":{"275":1}}],["plane",{"2":{"321":4}}],["planned",{"0":{"355":1},"2":{"317":1,"355":1,"440":1}}],["plan",{"2":{"25":1}}],["platform",{"0":{"56":1,"179":1,"254":1,"320":1,"338":1},"1":{"180":1,"181":1,"182":1,"183":1,"321":1,"322":1,"323":1,"324":1},"2":{"1":2,"2":1,"3":2,"17":1,"24":3,"32":2,"38":1,"44":1,"47":1,"51":1,"59":1,"60":1,"63":1,"71":1,"86":1,"105":1,"121":3,"139":1,"179":1,"208":3,"209":2,"225":2,"226":2,"249":3,"254":3,"280":2,"314":1,"316":1,"320":1,"328":1,"339":1,"342":1,"348":1,"387":1,"388":1,"389":1,"391":1,"402":3,"410":1,"417":3,"422":3,"427":1,"432":3}}],["please",{"2":{"23":1,"24":1,"29":2,"43":1,"51":1,"84":1,"382":1,"395":2,"396":1,"400":1,"423":1,"433":1}}],["password",{"2":{"426":2}}],["pass",{"2":{"343":1,"349":1,"358":1,"365":1,"371":1,"373":1,"375":1,"377":1,"378":1,"440":1}}],["passed",{"2":{"38":1,"104":1,"217":1,"246":1}}],["panic",{"2":{"189":1}}],["pagination",{"2":{"180":1,"181":1,"182":1,"183":1}}],["pages",{"2":{"404":1}}],["page",{"2":{"23":1,"24":2,"361":3,"421":1,"431":1}}],["payload",{"2":{"92":2,"149":1,"150":3,"153":1,"154":1,"157":1,"330":1,"337":2,"343":1,"344":1,"345":2,"346":1,"347":2,"382":2,"383":2,"384":2,"386":2,"399":2,"407":2,"422":2,"426":1,"432":2,"445":2}}],["pay",{"2":{"39":1,"42":1,"391":1,"445":11}}],["paths",{"2":{"438":1}}],["path=",{"2":{"35":1}}],["path",{"0":{"303":1},"2":{"35":7,"75":1,"78":1,"106":1,"121":1,"123":1,"133":1,"136":1,"144":1,"150":1,"160":1,"168":1,"207":1,"219":2,"237":1,"252":1,"290":1,"311":1,"312":1}}],["patient",{"2":{"29":2,"43":1}}],["patterns",{"2":{"316":1}}],["pattern",{"2":{"4":1,"440":1}}],["params=streamablehttpconnectionparams",{"2":{"445":1}}],["param2",{"2":{"358":1}}],["param1",{"2":{"358":1}}],["parameters",{"0":{"100":1,"101":1,"103":1},"1":{"101":1,"102":1,"103":1,"104":1,"105":1},"2":{"70":1,"71":1,"94":1,"97":1,"98":1,"99":1,"103":1,"177":1,"196":1,"217":1,"345":1,"350":2,"353":1,"359":2,"362":1,"372":1,"375":1}}],["parameter",{"0":{"76":1,"121":1,"136":1,"144":1,"150":1,"160":1,"168":1,"344":1,"350":1,"359":1,"363":1,"372":1},"2":{"28":1,"101":1,"102":1,"103":1,"150":1,"346":2,"396":1,"401":1,"415":1,"438":1}}],["party",{"2":{"438":1}}],["parts=",{"2":{"399":1}}],["part",{"2":{"98":1,"399":2}}],["particular",{"2":{"62":1}}],["parsing",{"2":{"39":1,"362":1}}],["parse",{"2":{"3":1,"87":1}}],["packages",{"2":{"7":1,"35":1,"36":1,"93":1}}],["package",{"2":{"7":1,"65":1,"72":1,"119":1,"237":2,"240":1,"402":1,"410":1,"417":1}}],["packaging",{"2":{"3":1,"129":1}}],["primarily",{"2":{"440":1}}],["primary",{"2":{"315":1}}],["primes",{"2":{"416":4}}],["prime",{"2":{"415":1,"416":13,"417":1}}],["principles",{"2":{"313":1}}],["print",{"2":{"338":1,"416":1}}],["prints",{"2":{"150":2}}],["printed",{"2":{"16":1}}],["priority",{"2":{"118":1,"304":1}}],["private",{"2":{"105":11,"183":2}}],["practices",{"0":{"118":1,"260":1,"309":1,"381":1},"1":{"261":1,"262":1,"263":1,"264":1,"310":1,"311":1,"312":1,"382":1,"383":1,"384":1,"385":1,"386":1},"2":{"71":1,"82":1,"340":1}}],["practice",{"2":{"59":1,"195":1,"262":1,"386":2}}],["pretty",{"2":{"150":1}}],["prerequisites",{"0":{"395":1,"405":1,"442":1},"2":{"133":2}}],["precedence",{"0":{"258":1,"304":1},"2":{"107":1,"118":1,"197":1,"209":1,"210":1,"304":1}}],["prefix",{"2":{"107":2,"114":1,"202":1,"237":2,"257":1}}],["preferences",{"2":{"422":1}}],["prefer",{"2":{"15":1}}],["previous",{"2":{"299":1,"422":1,"432":1}}],["preview",{"0":{"112":1},"2":{"106":1,"118":1}}],["preventing",{"2":{"221":1,"392":1}}],["prevent",{"2":{"105":1,"399":1}}],["preparing",{"2":{"129":1,"169":1}}],["prepared",{"2":{"444":1}}],["prepare",{"2":{"29":1,"72":1,"442":1}}],["preparation",{"0":{"22":1},"1":{"23":1,"24":1,"25":1},"2":{"3":1,"119":1}}],["present",{"2":{"304":1}}],["preset",{"2":{"24":1,"75":1}}],["press",{"2":{"29":2,"116":2,"401":1,"445":1}}],["pre",{"2":{"11":1,"436":1,"438":1}}],["prebuilt",{"2":{"2":1,"251":1}}],["proactivity=none",{"2":{"445":1}}],["properly",{"2":{"417":2}}],["problem",{"2":{"383":1}}],["problems",{"2":{"3":1,"31":1,"389":1}}],["probe",{"2":{"354":2}}],["probes",{"2":{"317":1,"348":1}}],["protected",{"2":{"392":1}}],["protecting",{"2":{"294":1}}],["protect",{"2":{"294":1,"311":1}}],["prototyping",{"2":{"52":1}}],["protocols",{"2":{"321":1,"393":1}}],["protocol",{"2":{"2":2,"21":1,"62":1,"84":1,"318":2,"319":1,"356":1,"393":1}}],["providing",{"2":{"88":1,"326":1,"341":1,"389":1,"438":1}}],["provided",{"2":{"105":1,"321":1,"416":1,"417":1,"445":2}}],["provider=byteplus",{"2":{"69":1,"209":1}}],["provider",{"0":{"209":1},"2":{"69":1,"95":2,"98":1,"101":3,"180":5,"181":4,"209":5,"251":1}}],["provide",{"2":{"24":2,"29":1,"51":1,"149":1,"334":1,"375":1,"388":1,"403":1,"429":1}}],["provides",{"2":{"1":1,"2":3,"21":1,"54":1,"71":2,"82":1,"179":1,"314":1,"316":1,"320":1,"333":1,"340":1,"404":1,"408":1,"418":1,"422":1,"427":1,"429":1,"432":1,"436":1,"440":1}}],["produce",{"2":{"133":1}}],["products",{"2":{"435":1}}],["production",{"0":{"268":1,"298":1,"312":1,"333":1,"402":1,"417":1},"2":{"3":1,"10":1,"52":1,"57":1,"59":2,"60":1,"82":1,"140":1,"146":1,"165":1,"185":1,"188":2,"208":2,"210":1,"223":1,"229":1,"240":1,"261":2,"263":1,"268":4,"298":2,"312":1,"333":1,"380":1,"394":1}}],["product",{"0":{"1":1},"2":{"429":2}}],["prod",{"2":{"82":1,"131":2,"140":1,"146":1,"165":1,"188":2,"207":1,"251":2,"261":2,"262":2,"268":2,"312":1}}],["pro",{"2":{"77":1,"445":2}}],["professional",{"2":{"77":1}}],["prompt",{"2":{"77":3,"92":2,"150":2,"152":1,"153":1,"154":1,"168":1,"337":2,"344":2,"345":2,"347":2,"365":1,"366":2,"383":1,"384":2,"386":2,"399":7,"401":3,"407":2,"415":2,"422":5,"426":1,"432":4,"445":5}}],["prompts",{"2":{"38":1,"42":1,"399":1}}],["proxy",{"2":{"46":1}}],["programming",{"2":{"29":1,"200":1,"205":1,"278":1,"408":1}}],["processing",{"2":{"383":1,"401":2,"408":1,"429":1}}],["process",{"0":{"127":1,"137":1},"1":{"128":1,"129":1,"138":1,"139":1},"2":{"5":1,"29":1,"60":1,"248":1,"355":2,"382":1,"394":1,"401":1,"402":1,"445":1}}],["project=default",{"2":{"431":1}}],["projects",{"2":{"53":1,"82":1,"91":1,"94":1,"107":1,"114":2,"123":1,"125":1,"186":1,"197":1,"207":2,"209":1,"249":1,"255":1}}],["project",{"0":{"28":1,"92":1,"267":1,"398":1},"2":{"2":2,"15":1,"28":2,"29":1,"36":1,"55":1,"61":1,"62":1,"71":1,"72":3,"73":1,"74":2,"75":2,"76":2,"77":1,"79":1,"82":3,"84":2,"85":2,"87":1,"92":1,"93":1,"95":2,"107":2,"115":1,"118":2,"123":1,"124":1,"129":1,"133":1,"185":1,"186":1,"190":2,"197":4,"198":1,"203":2,"205":3,"206":2,"207":2,"209":3,"249":1,"251":2,"252":1,"258":2,"259":1,"271":1,"301":2,"311":1,"398":4,"406":1,"417":2,"422":2,"432":2}}]],"serializationVersion":2}';export{t as default}; diff --git a/assets/chunks/@localSearchIndexroot.DRMEmN26.js b/assets/chunks/@localSearchIndexroot.DRMEmN26.js new file mode 100644 index 0000000..c07f8d4 --- /dev/null +++ b/assets/chunks/@localSearchIndexroot.DRMEmN26.js @@ -0,0 +1 @@ +const t='{"documentCount":454,"nextId":454,"documentIds":{"0":"/agentkit-sdk-python/README.html#agentkit-文档","1":"/agentkit-sdk-python/README.html#本地开发","2":"/agentkit-sdk-python/README.html#安装依赖","3":"/agentkit-sdk-python/README.html#启动开发服务器","4":"/agentkit-sdk-python/README.html#构建生产版本","5":"/agentkit-sdk-python/README.html#预览生产版本","6":"/agentkit-sdk-python/README.html#目录结构","7":"/agentkit-sdk-python/README.html#文档规范","8":"/agentkit-sdk-python/content/1.introduction/1.overview.html#agentkit","9":"/agentkit-sdk-python/content/1.introduction/1.overview.html#产品定位","10":"/agentkit-sdk-python/content/1.introduction/1.overview.html#核心优势","11":"/agentkit-sdk-python/content/1.introduction/1.overview.html#架构理念","12":"/agentkit-sdk-python/content/1.introduction/1.overview.html#适用场景","13":"/agentkit-sdk-python/content/1.introduction/1.overview.html#开始使用","14":"/agentkit-sdk-python/content/1.introduction/2.installation.html#安装-agentkit","15":"/agentkit-sdk-python/content/1.introduction/2.installation.html#环境要求","16":"/agentkit-sdk-python/content/1.introduction/2.installation.html#安装方法","17":"/agentkit-sdk-python/content/1.introduction/2.installation.html#方法一-pip-安装","18":"/agentkit-sdk-python/content/1.introduction/2.installation.html#稳定版本","19":"/agentkit-sdk-python/content/1.introduction/2.installation.html#开发版本","20":"/agentkit-sdk-python/content/1.introduction/2.installation.html#指定版本","21":"/agentkit-sdk-python/content/1.introduction/2.installation.html#方法二-uv-安装-推荐","22":"/agentkit-sdk-python/content/1.introduction/2.installation.html#方法三-源码安装","23":"/agentkit-sdk-python/content/1.introduction/2.installation.html#从官方github仓库安装","24":"/agentkit-sdk-python/content/1.introduction/2.installation.html#_3-验证安装","25":"/agentkit-sdk-python/content/1.introduction/2.installation.html#认证配置","26":"/agentkit-sdk-python/content/1.introduction/2.installation.html#推荐方式-使用全局配置","27":"/agentkit-sdk-python/content/1.introduction/2.installation.html#环境变量方式-开发调试","28":"/agentkit-sdk-python/content/1.introduction/2.installation.html#下一步","29":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#快速入门","30":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#准备工作","31":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#_1-获取火山引擎访问密钥-ak-sk","32":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#_2-获取模型推理-api-key-可选","33":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#_3-本地调试凭证配置-local-模式必读","34":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#开始使用","35":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#步骤-1-安装-agentkit","36":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#步骤-2-初始化项目","37":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#步骤-3-配置与部署","38":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#使用-agent","39":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#调用-agent","40":"/agentkit-sdk-python/content/1.introduction/3.quickstart.html#下一步","41":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#故障排除指南","42":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#安装问题","43":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_1-agentkit-命令未找到","44":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_2-依赖冲突","45":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#配置问题","46":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_1-环境变量未生效","47":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_2-配置文件格式错误","48":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#部署问题","49":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_1-cr-创建失败","50":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_2-镜像构建失败","51":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_3-runtime-部署超时","52":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_4-runtime-状态异常","53":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#调用问题","54":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_1-invoke-调用失败","55":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_2-模型调用失败","56":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#权限问题","57":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_1-ak-sk-认证失败","58":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#_2-资源访问被拒绝","59":"/agentkit-sdk-python/content/1.introduction/4.troubleshooting.html#获取帮助","60":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#agentkit-cli-概览","61":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#核心优势","62":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#主要命令","63":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#核心命令","64":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#平台服务命令","65":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#三种部署模式","66":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#_1-本地模式-local","67":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#_2-云端模式-cloud","68":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#_3-混合模式-hybrid","69":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#配置文件-agentkit-yaml","70":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#快速上手","71":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#探索更多功能","72":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#环境要求","73":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#✅-基础环境-所有模式","74":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#🐍-python-开发环境","75":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#🐹-golang-开发环境","76":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#🐳-本地开发-local-hybrid-模式","77":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#☁️-云端部署-cloud-hybrid-模式","78":"/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html#下一步","79":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#cli-命令详解","80":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#命令总览","81":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-init","82":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用模式","83":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#命令格式","84":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#核心参数","85":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#模板模式选项","86":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装模式选项","87":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#通用选项","88":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例","89":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#模板模式","90":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装模式","91":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#运行效果","92":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#模板模式输出","93":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装模式输出-🆕","94":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装模式详解-🆕","95":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#工作原理","96":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装器的作用","97":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agent-文件要求","98":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装器类型对比","99":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用场景","100":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#包装后的项目结构","101":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#常见问题","102":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-config","103":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法","104":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#三种配置模式","105":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🎯-交互式模式-默认-推荐首次配置","106":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#⚡-非交互式模式-快速更新-适合脚本-ci-cd","107":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🔀-混合模式","108":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#主要参数","109":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#通用配置参数","110":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#环境变量配置-重要⭐","111":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#cloud-hybrid-模式参数","112":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#runtime-关联资源-cloud-hybrid","113":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#runtime-网络配置-cloud-hybrid","114":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#控制选项","115":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#全局配置选项-🆕","116":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-1","117":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-1-首次配置-交互式","118":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-2-快速更新单个配置项","119":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-3-完整的非交互式配置","120":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-4-配置预览","121":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-5-查看当前配置","122":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-6-全局配置管理-🆕","123":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-7-ci-cd-集成","124":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#环境变量交互式输入","125":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#配置验证","126":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#最佳实践","127":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-build","128":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-1","129":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明","130":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#docker-构建自定义配置-🔧","131":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#配置参数","132":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#完整配置示例","133":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用场景-1","134":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#dockerfile-自动管理","135":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#构建过程","136":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🏠-local-模式-本地构建","137":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#☁️-cloud-模式-云端构建","138":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#构建结果","139":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-2","140":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#自定义构建示例","141":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#注意事项","142":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-deploy","143":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-2","144":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明-1","145":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#部署过程","146":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🏠-local-模式-本地部署","147":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#☁️-cloud-模式-云端部署","148":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-3","149":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#部署完成后","150":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-launch","151":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-3","152":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明-2","153":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#执行流程","154":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-4","155":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#为什么用-launch","156":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-invoke","157":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-4","158":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明-3","159":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-5","160":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-1-直接发送消息-最简单","161":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-2-自定义请求内容","162":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-3-带请求头","163":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#示例-4-云端部署-带-api-key","164":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#运行效果-1","165":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#注意事项-1","166":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-status","167":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-5","168":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明-4","169":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#输出示例","170":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🏠-local-模式","171":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#☁️-cloud-模式","172":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#状态说明","173":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-6","174":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-destroy","175":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用方法-6","176":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#参数说明-5","177":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#安全确认","178":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#会删除什么","179":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🏠-local-模式-1","180":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#☁️-cloud-模式-1","181":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#运行效果-2","182":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#使用示例-7","183":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#重要提示","184":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#通用选项-1","185":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#help-查看帮助","186":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#version-查看版本","187":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#平台服务命令","188":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-memory","189":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-knowledge","190":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-tools","191":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#agentkit-runtime","192":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#常用工作流","193":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#📝-完整开发流程-模板模式","194":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🔄-快速部署已有-agent-包装模式-🆕","195":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🔄-快速迭代流程","196":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#🌍-多环境管理","197":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#常见问题-1","198":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#❌-配置文件找不到","199":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#❌-docker-没有运行-local-模式","200":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#❌-云端凭证未配置-cloud-模式","201":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#❌-构建失败","202":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#💡-调试技巧","203":"/agentkit-sdk-python/content/2.agentkit-cli/2.commands.html#下一步","204":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置文件详解","205":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置系统概览","206":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#文件结构","207":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#common-配置","208":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例","209":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置项详解","210":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#agent-name-必填","211":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#entry-point-必填","212":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#description-可选","213":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#language-可选","214":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#language-version-可选","215":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#dependencies-file-可选","216":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#launch-type-必填","217":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cloud-provider-可选","218":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-envs-可选","219":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#local-模式配置","220":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例-1","221":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置项详解-1","222":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#image-tag","223":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#invoke-port","224":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#container-name","225":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-envs","226":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#ports","227":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#volumes","228":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#restart-policy","229":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#memory-limit-cpu-limit","230":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#自动管理的字段","231":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cloud-模式配置","232":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例-2","233":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#模板变量","234":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#auto-关键字","235":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置项详解-2","236":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#region","237":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#image-tag-1","238":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#tos-bucket","239":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cr-instance-name","240":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cr-namespace-name","241":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cr-repo-name","242":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-name-runtime-role-name-runtime-apikey-name","243":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-envs-1","244":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#build-timeout","245":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#自动管理的字段-1","246":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#hybrid-模式配置","247":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例-3","248":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#与-cloud-模式的区别","249":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置项详解-3","250":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#region-1","251":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#image-tag-2","252":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cr-instance-name-cr-namespace-name-cr-repo-name","253":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-name-runtime-role-name-runtime-apikey-name-1","254":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#runtime-envs-2","255":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#自动管理的字段-2","256":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#docker-build-配置","257":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例-4","258":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置项详解-4","259":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#base-image","260":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#build-script","261":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#regenerate-dockerfile","262":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#platform","263":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#全局配置","264":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置文件位置","265":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置示例-5","266":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置优先级","267":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#使用场景","268":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#最佳实践","269":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#🌍-多环境管理","270":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#🔐-安全管理敏感信息","271":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#📝-添加配置注释","272":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#✅-定期验证配置","273":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#完整示例","274":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#📱-本地开发配置-python","275":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#�-golang-项目配置","276":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#�-生产环境配置","277":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#🎯-最小配置示例","278":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#常见问题","279":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-配置文件找不到","280":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-yaml-格式错误","281":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-必填项缺失","282":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-模板变量渲染失败","283":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-环境变量不生效","284":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#❓-旧配置字段名不兼容","285":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#配置字段速查表","286":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#common-字段","287":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#cloud-hybrid-模式字段","288":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#docker-build-字段","289":"/agentkit-sdk-python/content/2.agentkit-cli/3.configurations.html#下一步","290":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志系统","291":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#默认行为","292":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#快速开始","293":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#开启文件日志","294":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#开启控制台日志","295":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#同时开启控制台和文件日志","296":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#调试模式","297":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#环境变量配置","298":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#基础配置","299":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#高级配置","300":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志级别说明","301":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#常用场景","302":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-1-正常使用-默认配置","303":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-1-1-需要保存日志记录","304":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-2-调试问题","305":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-3-ci-cd-环境","306":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-4-生产环境","307":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#场景-5-完全静默","308":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志文件管理","309":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志文件位置","310":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#自动清理旧日志","311":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#自定义日志路径","312":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#配置优先级","313":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#故障排查","314":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志文件没有创建","315":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#控制台没有日志输出","316":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#日志太多或太少","317":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#最佳实践","318":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#开发环境推荐配置","319":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#团队协作","320":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#生产部署建议","321":"/agentkit-sdk-python/content/2.agentkit-cli/4.logging.html#总结","322":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkit-sdk-概览","323":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#核心架构","324":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_1-runtime-应用框架","325":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitsimpleapp","326":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitmcpapp","327":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkita2aapp","328":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_2-platform-服务客户端","329":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitmemory","330":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitknowledge","331":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitmcp","332":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#agentkitruntime","333":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_3-基础设施模块","334":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#baseagentkitclient","335":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#context-管理","336":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#模块依赖关系","337":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#主要特性","338":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_1-装饰器驱动","339":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_2-框架无关","340":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_3-自动化的可观测性","341":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_4-生产就绪","342":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#_5-类型安全","343":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#快速开始","344":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#安装","345":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#创建一个简单的-agent","346":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#使用-platform-服务","347":"/agentkit-sdk-python/content/3.agentkit-sdk/1.overview.html#下一步","348":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注解使用指南","349":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#simple-agent-注解","350":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-entrypoint","351":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名","352":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#参数说明","353":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#完整示例","354":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项","355":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#错误处理示例","356":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-ping","357":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名-1","358":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#参数说明-1","359":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#基本示例","360":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#高级示例-包含依赖检查","361":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项-1","362":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#可用端点","363":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-async-task-规划中","364":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#mcp-agent-注解","365":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-tool","366":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名-2","367":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#参数说明-2","368":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#基本示例-1","369":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#异步工具示例","370":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项-2","371":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#复杂参数示例","372":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-agent-as-a-tool","373":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名-3","374":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#使用示例","375":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#多-agent-协作示例","376":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项-3","377":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#a2a-agent-注解","378":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-agent-executor","379":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名-4","380":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#参数说明-3","381":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#基本示例-2","382":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#自定义执行器示例","383":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项-4","384":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#app-task-store","385":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#函数签名-5","386":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#使用默认存储","387":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#自定义任务存储示例","388":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#注意事项-5","389":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#最佳实践","390":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#_1-错误处理","391":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#_2-日志记录","392":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#_3-类型注解","393":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#_4-文档字符串","394":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#_5-性能优化","395":"/agentkit-sdk-python/content/3.agentkit-sdk/2.annotation.html#下一步","396":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#agentkit-runtime-从本地到云端的-agent-部署利器","397":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#agentkit-runtime-为您解决什么","398":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#核心优势","399":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_1-serverless-架构-极致简化运维-优化成本","400":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_2-企业级安全隔离","401":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_3-框架无关的快速集成","402":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#三步上手-从本地开发到云端部署","403":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#前提条件","404":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#第-1-步-环境配置","405":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#第-2-步-创建并本地调试-agent","406":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_1-初始化-agent-项目","407":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_2-智能体代码概览","408":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_3-配置环境变量","409":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#_4-本地启动并调用服务","410":"/agentkit-sdk-python/content/4.runtime/1.runtime_quickstart.html#第-3-步-部署到生产环境","411":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#agentkit-built-in-tools-快速开始指南","412":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#核心能力","413":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#前置准备-创建沙箱工具","414":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#智能体代码示例","415":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#完整代码","416":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#代码说明","417":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#本地调试","418":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#_1-官方源安装veadk","419":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#_1-配置环境变量","420":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#_2-本地启动智能体服务","421":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#_3-调用智能体","422":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#工具实例调用机制","423":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#调用示例","424":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#执行日志示例","425":"/agentkit-sdk-python/content/5.tools/1.sandbox_quickstart.html#部署到生产环境","426":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#agentkit-memory-快速开始指南","427":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#使用示例","428":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#创建记忆库","429":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#获取记忆资源的连接信息","430":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#构建一个带长期记忆能力的智能体","431":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#环境配置","432":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#启动服务","433":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#如何发起调用","434":"/agentkit-sdk-python/content/6.memory/1.memory_quickstart.html#校验记忆库是否生效","435":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#agentkit-knowledge-快速开始指南","436":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#使用示例","437":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#创建知识库","438":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#导入知识库","439":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#获取记忆资源的连接信息","440":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#构建一个带知识库能力的智能体","441":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#环境配置","442":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#启动服务","443":"/agentkit-sdk-python/content/7.knowledge/1.knowledge_quickstart.html#如何发起调用","444":"/agentkit-sdk-python/content/8.mcp/1.overview.html#agentkit-mcp","445":"/agentkit-sdk-python/content/8.mcp/1.overview.html#agentkit-mcp-功能点","446":"/agentkit-sdk-python/content/8.mcp/1.overview.html#mcp-服务","447":"/agentkit-sdk-python/content/8.mcp/1.overview.html#mcp-工具集","448":"/agentkit-sdk-python/content/8.mcp/1.overview.html#认证与安全","449":"/agentkit-sdk-python/content/8.mcp/2.mcp_quickstart.html#agentkit-mcp-quick-start","450":"/agentkit-sdk-python/content/8.mcp/2.mcp_quickstart.html#环境要求","451":"/agentkit-sdk-python/content/8.mcp/2.mcp_quickstart.html#第一步-配置本地环境","452":"/agentkit-sdk-python/content/8.mcp/2.mcp_quickstart.html#第二步-创建-agentkit-mcp","453":"/agentkit-sdk-python/content/8.mcp/2.mcp_quickstart.html#第三步-设置环境环境变量-运行-agent"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[2,1,7],"1":[1,2,1],"2":[1,3,3],"3":[1,3,10],"4":[1,3,9],"5":[1,3,5],"6":[1,2,34],"7":[1,2,13],"8":[1,1,1],"9":[1,1,11],"10":[1,1,56],"11":[1,1,31],"12":[1,1,24],"13":[1,1,7],"14":[2,1,4],"15":[1,2,19],"16":[1,2,1],"17":[3,3,1],"18":[1,5,7],"19":[1,5,8],"20":[1,5,9],"21":[5,3,41],"22":[2,3,2],"23":[1,5,47],"24":[2,3,12],"25":[1,2,11],"26":[2,3,29],"27":[3,3,25],"28":[1,2,12],"29":[1,1,20],"30":[1,1,1],"31":[5,2,27],"32":[6,2,47],"33":[5,2,62],"34":[1,1,1],"35":[4,2,9],"36":[3,2,42],"37":[3,2,144],"38":[2,1,1],"39":[2,3,47],"40":[1,1,22],"41":[1,1,9],"42":[1,1,1],"43":[3,2,53],"44":[2,2,35],"45":[1,1,1],"46":[2,2,22],"47":[2,2,16],"48":[1,1,1],"49":[3,2,21],"50":[2,2,24],"51":[3,2,26],"52":[3,2,23],"53":[1,1,1],"54":[3,2,20],"55":[2,2,19],"56":[1,1,1],"57":[4,2,18],"58":[2,2,13],"59":[1,1,20],"60":[3,1,12],"61":[1,3,29],"62":[1,3,6],"63":[1,4,36],"64":[1,4,23],"65":[1,3,5],"66":[4,4,14],"67":[4,4,20],"68":[4,4,19],"69":[4,3,46],"70":[1,3,46],"71":[1,4,16],"72":[1,3,1],"73":[4,4,10],"74":[3,4,12],"75":[3,4,10],"76":[6,4,9],"77":[6,4,29],"78":[1,3,18],"79":[2,1,20],"80":[1,2,67],"81":[2,2,8],"82":[1,4,16],"83":[1,4,19],"84":[1,4,24],"85":[1,4,40],"86":[1,4,32],"87":[1,4,7],"88":[1,4,1],"89":[1,5,47],"90":[1,5,63],"91":[1,4,1],"92":[1,5,82],"93":[2,5,58],"94":[2,4,8],"95":[1,6,19],"96":[1,6,26],"97":[2,6,44],"98":[1,6,28],"99":[1,6,20],"100":[1,6,69],"101":[1,6,42],"102":[2,2,19],"103":[1,4,16],"104":[1,4,1],"105":[5,5,50],"106":[7,5,30],"107":[2,5,9],"108":[1,4,1],"109":[1,5,39],"110":[3,5,45],"111":[3,5,34],"112":[5,5,59],"113":[5,5,75],"114":[1,4,19],"115":[2,4,60],"116":[1,4,1],"117":[5,5,3],"118":[3,5,21],"119":[3,5,30],"120":[3,5,30],"121":[3,5,4],"122":[4,5,66],"123":[5,5,34],"124":[1,4,30],"125":[1,4,24],"126":[1,4,57],"127":[2,2,7],"128":[1,4,4],"129":[1,4,22],"130":[3,4,12],"131":[1,7,26],"132":[1,7,59],"133":[1,7,47],"134":[2,7,54],"135":[1,4,5],"136":[5,5,20],"137":[5,5,29],"138":[1,4,13],"139":[1,4,20],"140":[1,5,59],"141":[1,4,35],"142":[2,2,5],"143":[1,4,4],"144":[1,4,8],"145":[1,4,5],"146":[5,5,23],"147":[5,5,32],"148":[1,4,13],"149":[1,4,17],"150":[2,2,9],"151":[1,4,4],"152":[1,4,8],"153":[1,4,20],"154":[1,4,13],"155":[2,4,10],"156":[2,2,5],"157":[1,4,11],"158":[1,4,84],"159":[1,4,1],"160":[5,5,8],"161":[3,5,9],"162":[3,5,12],"163":[7,5,9],"164":[1,4,25],"165":[1,4,15],"166":[2,2,6],"167":[1,4,4],"168":[1,4,8],"169":[1,4,1],"170":[3,5,26],"171":[3,5,39],"172":[1,4,25],"173":[1,4,13],"174":[2,2,7],"175":[1,4,4],"176":[1,4,15],"177":[1,4,15],"178":[1,4,1],"179":[3,5,9],"180":[3,5,11],"181":[1,4,16],"182":[1,4,17],"183":[1,4,18],"184":[1,2,2],"185":[3,3,9],"186":[3,3,9],"187":[1,2,11],"188":[2,3,50],"189":[2,3,42],"190":[2,3,52],"191":[2,3,82],"192":[1,2,1],"193":[4,3,25],"194":[5,3,34],"195":[2,3,20],"196":[2,3,15],"197":[1,2,3],"198":[2,3,18],"199":[6,3,18],"200":[5,3,32],"201":[2,3,19],"202":[2,3,30],"203":[1,2,10],"204":[1,1,8],"205":[1,1,23],"206":[1,1,47],"207":[2,1,2],"208":[1,3,40],"209":[1,3,1],"210":[4,4,36],"211":[4,4,30],"212":[3,4,20],"213":[3,4,20],"214":[4,4,28],"215":[4,4,23],"216":[4,4,28],"217":[4,4,62],"218":[4,4,23],"219":[2,1,5],"220":[1,3,41],"221":[1,3,1],"222":[2,4,10],"223":[2,4,9],"224":[2,4,11],"225":[2,4,29],"226":[1,4,13],"227":[1,4,12],"228":[2,4,15],"229":[3,4,15],"230":[1,3,25],"231":[2,1,3],"232":[1,3,56],"233":[1,3,32],"234":[2,3,29],"235":[1,3,1],"236":[1,4,13],"237":[2,4,24],"238":[2,4,21],"239":[3,4,19],"240":[3,4,9],"241":[3,4,12],"242":[4,4,19],"243":[2,4,53],"244":[2,4,7],"245":[1,3,55],"246":[2,1,5],"247":[1,3,46],"248":[3,3,23],"249":[1,3,9],"250":[1,4,7],"251":[2,4,7],"252":[5,4,25],"253":[4,4,7],"254":[2,4,6],"255":[1,3,30],"256":[3,1,6],"257":[1,4,40],"258":[1,4,1],"259":[2,5,58],"260":[2,5,25],"261":[2,5,13],"262":[1,5,21],"263":[1,1,7],"264":[1,2,5],"265":[1,2,27],"266":[1,2,17],"267":[1,2,27],"268":[1,1,1],"269":[2,2,22],"270":[2,2,49],"271":[2,2,30],"272":[2,2,16],"273":[1,1,1],"274":[4,2,53],"275":[3,2,50],"276":[2,2,76],"277":[2,2,28],"278":[1,1,1],"279":[2,2,16],"280":[3,2,15],"281":[2,2,11],"282":[2,2,31],"283":[2,2,28],"284":[2,2,25],"285":[1,1,1],"286":[2,2,37],"287":[3,2,31],"288":[3,2,19],"289":[1,1,11],"290":[1,1,6],"291":[1,1,43],"292":[1,1,1],"293":[1,2,24],"294":[1,2,12],"295":[1,2,12],"296":[1,2,18],"297":[1,1,3],"298":[1,2,30],"299":[1,2,23],"300":[1,1,27],"301":[1,1,1],"302":[5,2,16],"303":[3,2,21],"304":[3,2,25],"305":[5,2,36],"306":[3,2,24],"307":[3,2,22],"308":[1,1,1],"309":[1,2,25],"310":[1,2,18],"311":[1,2,17],"312":[1,1,26],"313":[1,1,1],"314":[1,2,30],"315":[1,2,20],"316":[1,2,12],"317":[1,1,1],"318":[1,2,29],"319":[1,2,38],"320":[1,2,23],"321":[1,1,54],"322":[3,1,14],"323":[1,3,5],"324":[3,4,7],"325":[1,7,25],"326":[1,7,20],"327":[1,7,17],"328":[3,4,6],"329":[1,7,37],"330":[1,7,25],"331":[1,7,11],"332":[1,7,12],"333":[2,4,1],"334":[1,6,11],"335":[2,6,10],"336":[1,3,26],"337":[1,3,1],"338":[2,4,24],"339":[2,4,13],"340":[2,4,11],"341":[2,4,6],"342":[2,4,9],"343":[1,3,1],"344":[1,4,6],"345":[2,4,49],"346":[3,4,35],"347":[1,3,10],"348":[1,1,9],"349":[3,1,6],"350":[3,4,7],"351":[1,6,13],"352":[1,6,24],"353":[1,6,50],"354":[1,6,17],"355":[1,6,38],"356":[3,4,7],"357":[1,6,8],"358":[1,6,11],"359":[1,6,10],"360":[2,6,50],"361":[1,6,18],"362":[1,6,12],"363":[5,4,26],"364":[3,1,10],"365":[3,4,7],"366":[1,6,13],"367":[1,6,14],"368":[1,6,47],"369":[1,6,35],"370":[1,6,24],"371":[1,6,44],"372":[6,4,8],"373":[1,9,13],"374":[1,9,42],"375":[3,9,37],"376":[1,9,12],"377":[3,1,9],"378":[4,4,6],"379":[1,7,11],"380":[1,7,6],"381":[1,7,52],"382":[1,7,57],"383":[1,7,18],"384":[4,4,5],"385":[1,7,10],"386":[1,7,18],"387":[1,7,49],"388":[1,7,18],"389":[1,1,1],"390":[2,2,42],"391":[2,2,39],"392":[2,2,22],"393":[2,2,42],"394":[2,2,30],"395":[1,1,11],"396":[5,1,15],"397":[4,5,27],"398":[1,5,1],"399":[5,6,24],"400":[2,6,14],"401":[2,6,25],"402":[2,5,6],"403":[1,7,19],"404":[4,7,37],"405":[5,7,1],"406":[4,11,22],"407":[2,11,235],"408":[2,11,20],"409":[2,11,101],"410":[4,7,32],"411":[5,1,10],"412":[1,5,22],"413":[2,5,14],"414":[1,5,27],"415":[1,6,50],"416":[1,6,19],"417":[1,5,1],"418":[2,6,20],"419":[2,6,26],"420":[2,6,14],"421":[2,6,1],"422":[1,8,21],"423":[1,8,29],"424":[1,8,166],"425":[1,5,52],"426":[3,1,15],"427":[1,1,11],"428":[1,1,4],"429":[1,2,49],"430":[1,1,160],"431":[1,1,46],"432":[1,1,9],"433":[1,1,15],"434":[1,1,29],"435":[3,1,11],"436":[1,1,5],"437":[1,1,88],"438":[1,1,4],"439":[1,2,18],"440":[1,1,149],"441":[1,1,18],"442":[1,1,9],"443":[1,1,10],"444":[2,1,31],"445":[3,2,6],"446":[2,3,29],"447":[2,3,27],"448":[1,3,29],"449":[4,1,1],"450":[1,4,31],"451":[2,4,36],"452":[4,4,35],"453":[4,4,379]},"averageFieldLength":[1.936123348017622,3.548458149779736,23.81718061674008],"storedFields":{"0":{"title":"AgentKit 文档","titles":[]},"1":{"title":"本地开发","titles":["AgentKit 文档"]},"2":{"title":"安装依赖","titles":["AgentKit 文档","本地开发"]},"3":{"title":"启动开发服务器","titles":["AgentKit 文档","本地开发"]},"4":{"title":"构建生产版本","titles":["AgentKit 文档","本地开发"]},"5":{"title":"预览生产版本","titles":["AgentKit 文档","本地开发"]},"6":{"title":"目录结构","titles":["AgentKit 文档"]},"7":{"title":"文档规范","titles":["AgentKit 文档"]},"8":{"title":"AgentKit","titles":[]},"9":{"title":"产品定位","titles":["AgentKit"]},"10":{"title":"核心优势","titles":["AgentKit"]},"11":{"title":"架构理念","titles":["AgentKit"]},"12":{"title":"适用场景","titles":["AgentKit"]},"13":{"title":"开始使用","titles":["AgentKit"]},"14":{"title":"安装 AgentKit","titles":[]},"15":{"title":"环境要求","titles":["安装 AgentKit"]},"16":{"title":"安装方法","titles":["安装 AgentKit"]},"17":{"title":"方法一:pip 安装","titles":["安装 AgentKit","安装方法"]},"18":{"title":"稳定版本","titles":["安装 AgentKit","安装方法","方法一:pip 安装"]},"19":{"title":"开发版本","titles":["安装 AgentKit","安装方法","方法一:pip 安装"]},"20":{"title":"指定版本","titles":["安装 AgentKit","安装方法","方法一:pip 安装"]},"21":{"title":"方法二:uv 安装(推荐)","titles":["安装 AgentKit","安装方法"]},"22":{"title":"方法三:源码安装","titles":["安装 AgentKit","安装方法"]},"23":{"title":"从官方Github仓库安装","titles":["安装 AgentKit","安装方法","方法三:源码安装"]},"24":{"title":"3. 验证安装","titles":["安装 AgentKit","安装方法"]},"25":{"title":"认证配置","titles":["安装 AgentKit"]},"26":{"title":"推荐方式:使用全局配置","titles":["安装 AgentKit","认证配置"]},"27":{"title":"环境变量方式(开发调试)","titles":["安装 AgentKit","认证配置"]},"28":{"title":"下一步","titles":["安装 AgentKit"]},"29":{"title":"快速入门","titles":[]},"30":{"title":"准备工作","titles":["快速入门"]},"31":{"title":"1. 获取火山引擎访问密钥 (AK/SK)","titles":["快速入门","准备工作"]},"32":{"title":"2. 获取模型推理 API Key (可选)","titles":["快速入门","准备工作"]},"33":{"title":"3. 本地调试凭证配置 (Local 模式必读)","titles":["快速入门","准备工作"]},"34":{"title":"开始使用","titles":["快速入门"]},"35":{"title":"步骤 1: 安装 AgentKit","titles":["快速入门","开始使用"]},"36":{"title":"步骤 2: 初始化项目","titles":["快速入门","开始使用"]},"37":{"title":"步骤 3: 配置与部署","titles":["快速入门","开始使用"]},"38":{"title":"使用 Agent","titles":["快速入门"]},"39":{"title":"调用 Agent","titles":["快速入门","使用 Agent"]},"40":{"title":"下一步","titles":["快速入门"]},"41":{"title":"故障排除指南","titles":[]},"42":{"title":"安装问题","titles":["故障排除指南"]},"43":{"title":"1. agentkit 命令未找到","titles":["故障排除指南","安装问题"]},"44":{"title":"2. 依赖冲突","titles":["故障排除指南","安装问题"]},"45":{"title":"配置问题","titles":["故障排除指南"]},"46":{"title":"1. 环境变量未生效","titles":["故障排除指南","配置问题"]},"47":{"title":"2. 配置文件格式错误","titles":["故障排除指南","配置问题"]},"48":{"title":"部署问题","titles":["故障排除指南"]},"49":{"title":"1. CR 创建失败","titles":["故障排除指南","部署问题"]},"50":{"title":"2. 镜像构建失败","titles":["故障排除指南","部署问题"]},"51":{"title":"3. Runtime 部署超时","titles":["故障排除指南","部署问题"]},"52":{"title":"4. Runtime 状态异常","titles":["故障排除指南","部署问题"]},"53":{"title":"调用问题","titles":["故障排除指南"]},"54":{"title":"1. invoke 调用失败","titles":["故障排除指南","调用问题"]},"55":{"title":"2. 模型调用失败","titles":["故障排除指南","调用问题"]},"56":{"title":"权限问题","titles":["故障排除指南"]},"57":{"title":"1. AK/SK 认证失败","titles":["故障排除指南","权限问题"]},"58":{"title":"2. 资源访问被拒绝","titles":["故障排除指南","权限问题"]},"59":{"title":"获取帮助","titles":["故障排除指南"]},"60":{"title":"AgentKit CLI 概览","titles":[]},"61":{"title":"核心优势","titles":["AgentKit CLI 概览"]},"62":{"title":"主要命令","titles":["AgentKit CLI 概览"]},"63":{"title":"核心命令","titles":["AgentKit CLI 概览","主要命令"]},"64":{"title":"平台服务命令","titles":["AgentKit CLI 概览","主要命令"]},"65":{"title":"三种部署模式","titles":["AgentKit CLI 概览"]},"66":{"title":"1. 本地模式 (local)","titles":["AgentKit CLI 概览","三种部署模式"]},"67":{"title":"2. 云端模式 (cloud)","titles":["AgentKit CLI 概览","三种部署模式"]},"68":{"title":"3. 混合模式 (hybrid)","titles":["AgentKit CLI 概览","三种部署模式"]},"69":{"title":"配置文件 (agentkit.yaml)","titles":["AgentKit CLI 概览"]},"70":{"title":"快速上手","titles":["AgentKit CLI 概览"]},"71":{"title":"探索更多功能","titles":["AgentKit CLI 概览","快速上手"]},"72":{"title":"环境要求","titles":["AgentKit CLI 概览"]},"73":{"title":"✅ 基础环境(所有模式)","titles":["AgentKit CLI 概览","环境要求"]},"74":{"title":"🐍 Python 开发环境","titles":["AgentKit CLI 概览","环境要求"]},"75":{"title":"🐹 Golang 开发环境","titles":["AgentKit CLI 概览","环境要求"]},"76":{"title":"🐳 本地开发(Local/Hybrid 模式)","titles":["AgentKit CLI 概览","环境要求"]},"77":{"title":"☁️ 云端部署(Cloud/Hybrid 模式)","titles":["AgentKit CLI 概览","环境要求"]},"78":{"title":"下一步","titles":["AgentKit CLI 概览"]},"79":{"title":"CLI 命令详解","titles":[]},"80":{"title":"命令总览","titles":["CLI 命令详解"]},"81":{"title":"agentkit init","titles":["CLI 命令详解"]},"82":{"title":"使用模式","titles":["CLI 命令详解","agentkit init"]},"83":{"title":"命令格式","titles":["CLI 命令详解","agentkit init"]},"84":{"title":"核心参数","titles":["CLI 命令详解","agentkit init"]},"85":{"title":"模板模式选项","titles":["CLI 命令详解","agentkit init"]},"86":{"title":"包装模式选项","titles":["CLI 命令详解","agentkit init"]},"87":{"title":"通用选项","titles":["CLI 命令详解","agentkit init"]},"88":{"title":"使用示例","titles":["CLI 命令详解","agentkit init"]},"89":{"title":"模板模式","titles":["CLI 命令详解","agentkit init","使用示例"]},"90":{"title":"包装模式","titles":["CLI 命令详解","agentkit init","使用示例"]},"91":{"title":"运行效果","titles":["CLI 命令详解","agentkit init"]},"92":{"title":"模板模式输出","titles":["CLI 命令详解","agentkit init","运行效果"]},"93":{"title":"包装模式输出 🆕","titles":["CLI 命令详解","agentkit init","运行效果"]},"94":{"title":"包装模式详解 🆕","titles":["CLI 命令详解","agentkit init"]},"95":{"title":"工作原理","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"96":{"title":"包装器的作用","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"97":{"title":"Agent 文件要求","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"98":{"title":"包装器类型对比","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"99":{"title":"使用场景","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"100":{"title":"包装后的项目结构","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"101":{"title":"常见问题","titles":["CLI 命令详解","agentkit init","包装模式详解 🆕"]},"102":{"title":"agentkit config","titles":["CLI 命令详解"]},"103":{"title":"使用方法","titles":["CLI 命令详解","agentkit config"]},"104":{"title":"三种配置模式","titles":["CLI 命令详解","agentkit config"]},"105":{"title":"🎯 交互式模式(默认,推荐首次配置)","titles":["CLI 命令详解","agentkit config","三种配置模式"]},"106":{"title":"⚡ 非交互式模式(快速更新,适合脚本/CI/CD)","titles":["CLI 命令详解","agentkit config","三种配置模式"]},"107":{"title":"🔀 混合模式","titles":["CLI 命令详解","agentkit config","三种配置模式"]},"108":{"title":"主要参数","titles":["CLI 命令详解","agentkit config"]},"109":{"title":"通用配置参数","titles":["CLI 命令详解","agentkit config","主要参数"]},"110":{"title":"环境变量配置(重要⭐)","titles":["CLI 命令详解","agentkit config","主要参数"]},"111":{"title":"Cloud/Hybrid 模式参数","titles":["CLI 命令详解","agentkit config","主要参数"]},"112":{"title":"Runtime 关联资源(Cloud/Hybrid)","titles":["CLI 命令详解","agentkit config","主要参数"]},"113":{"title":"Runtime 网络配置(Cloud/Hybrid)","titles":["CLI 命令详解","agentkit config","主要参数"]},"114":{"title":"控制选项","titles":["CLI 命令详解","agentkit config"]},"115":{"title":"全局配置选项 🆕","titles":["CLI 命令详解","agentkit config"]},"116":{"title":"使用示例","titles":["CLI 命令详解","agentkit config"]},"117":{"title":"示例 1:首次配置(交互式)","titles":["CLI 命令详解","agentkit config","使用示例"]},"118":{"title":"示例 2:快速更新单个配置项","titles":["CLI 命令详解","agentkit config","使用示例"]},"119":{"title":"示例 3:完整的非交互式配置","titles":["CLI 命令详解","agentkit config","使用示例"]},"120":{"title":"示例 4:配置预览","titles":["CLI 命令详解","agentkit config","使用示例"]},"121":{"title":"示例 5:查看当前配置","titles":["CLI 命令详解","agentkit config","使用示例"]},"122":{"title":"示例 6:全局配置管理 🆕","titles":["CLI 命令详解","agentkit config","使用示例"]},"123":{"title":"示例 7:CI/CD 集成","titles":["CLI 命令详解","agentkit config","使用示例"]},"124":{"title":"环境变量交互式输入","titles":["CLI 命令详解","agentkit config"]},"125":{"title":"配置验证","titles":["CLI 命令详解","agentkit config"]},"126":{"title":"最佳实践","titles":["CLI 命令详解","agentkit config"]},"127":{"title":"agentkit build","titles":["CLI 命令详解"]},"128":{"title":"使用方法","titles":["CLI 命令详解","agentkit build"]},"129":{"title":"参数说明","titles":["CLI 命令详解","agentkit build"]},"130":{"title":"Docker 构建自定义配置 🔧","titles":["CLI 命令详解","agentkit build"]},"131":{"title":"配置参数","titles":["CLI 命令详解","agentkit build","Docker 构建自定义配置 🔧"]},"132":{"title":"完整配置示例","titles":["CLI 命令详解","agentkit build","Docker 构建自定义配置 🔧"]},"133":{"title":"使用场景","titles":["CLI 命令详解","agentkit build","Docker 构建自定义配置 🔧"]},"134":{"title":"Dockerfile 自动管理","titles":["CLI 命令详解","agentkit build","Docker 构建自定义配置 🔧"]},"135":{"title":"构建过程","titles":["CLI 命令详解","agentkit build"]},"136":{"title":"🏠 Local 模式(本地构建)","titles":["CLI 命令详解","agentkit build","构建过程"]},"137":{"title":"☁️ Cloud 模式(云端构建)","titles":["CLI 命令详解","agentkit build","构建过程"]},"138":{"title":"构建结果","titles":["CLI 命令详解","agentkit build"]},"139":{"title":"使用示例","titles":["CLI 命令详解","agentkit build"]},"140":{"title":"自定义构建示例","titles":["CLI 命令详解","agentkit build","使用示例"]},"141":{"title":"注意事项","titles":["CLI 命令详解","agentkit build"]},"142":{"title":"agentkit deploy","titles":["CLI 命令详解"]},"143":{"title":"使用方法","titles":["CLI 命令详解","agentkit deploy"]},"144":{"title":"参数说明","titles":["CLI 命令详解","agentkit deploy"]},"145":{"title":"部署过程","titles":["CLI 命令详解","agentkit deploy"]},"146":{"title":"🏠 Local 模式(本地部署)","titles":["CLI 命令详解","agentkit deploy","部署过程"]},"147":{"title":"☁️ Cloud 模式(云端部署)","titles":["CLI 命令详解","agentkit deploy","部署过程"]},"148":{"title":"使用示例","titles":["CLI 命令详解","agentkit deploy"]},"149":{"title":"部署完成后","titles":["CLI 命令详解","agentkit deploy"]},"150":{"title":"agentkit launch","titles":["CLI 命令详解"]},"151":{"title":"使用方法","titles":["CLI 命令详解","agentkit launch"]},"152":{"title":"参数说明","titles":["CLI 命令详解","agentkit launch"]},"153":{"title":"执行流程","titles":["CLI 命令详解","agentkit launch"]},"154":{"title":"使用示例","titles":["CLI 命令详解","agentkit launch"]},"155":{"title":"为什么用 launch","titles":["CLI 命令详解","agentkit launch"]},"156":{"title":"agentkit invoke","titles":["CLI 命令详解"]},"157":{"title":"使用方法","titles":["CLI 命令详解","agentkit invoke"]},"158":{"title":"参数说明","titles":["CLI 命令详解","agentkit invoke"]},"159":{"title":"使用示例","titles":["CLI 命令详解","agentkit invoke"]},"160":{"title":"示例 1:直接发送消息(最简单)","titles":["CLI 命令详解","agentkit invoke","使用示例"]},"161":{"title":"示例 2:自定义请求内容","titles":["CLI 命令详解","agentkit invoke","使用示例"]},"162":{"title":"示例 3:带请求头","titles":["CLI 命令详解","agentkit invoke","使用示例"]},"163":{"title":"示例 4:云端部署(带 API Key)","titles":["CLI 命令详解","agentkit invoke","使用示例"]},"164":{"title":"运行效果","titles":["CLI 命令详解","agentkit invoke"]},"165":{"title":"注意事项","titles":["CLI 命令详解","agentkit invoke"]},"166":{"title":"agentkit status","titles":["CLI 命令详解"]},"167":{"title":"使用方法","titles":["CLI 命令详解","agentkit status"]},"168":{"title":"参数说明","titles":["CLI 命令详解","agentkit status"]},"169":{"title":"输出示例","titles":["CLI 命令详解","agentkit status"]},"170":{"title":"🏠 Local 模式","titles":["CLI 命令详解","agentkit status","输出示例"]},"171":{"title":"☁️ Cloud 模式","titles":["CLI 命令详解","agentkit status","输出示例"]},"172":{"title":"状态说明","titles":["CLI 命令详解","agentkit status"]},"173":{"title":"使用示例","titles":["CLI 命令详解","agentkit status"]},"174":{"title":"agentkit destroy","titles":["CLI 命令详解"]},"175":{"title":"使用方法","titles":["CLI 命令详解","agentkit destroy"]},"176":{"title":"参数说明","titles":["CLI 命令详解","agentkit destroy"]},"177":{"title":"安全确认","titles":["CLI 命令详解","agentkit destroy"]},"178":{"title":"会删除什么","titles":["CLI 命令详解","agentkit destroy"]},"179":{"title":"🏠 Local 模式","titles":["CLI 命令详解","agentkit destroy","会删除什么"]},"180":{"title":"☁️ Cloud 模式","titles":["CLI 命令详解","agentkit destroy","会删除什么"]},"181":{"title":"运行效果","titles":["CLI 命令详解","agentkit destroy"]},"182":{"title":"使用示例","titles":["CLI 命令详解","agentkit destroy"]},"183":{"title":"重要提示","titles":["CLI 命令详解","agentkit destroy"]},"184":{"title":"通用选项","titles":["CLI 命令详解"]},"185":{"title":"--help 查看帮助","titles":["CLI 命令详解","通用选项"]},"186":{"title":"--version 查看版本","titles":["CLI 命令详解","通用选项"]},"187":{"title":"平台服务命令","titles":["CLI 命令详解"]},"188":{"title":"agentkit memory","titles":["CLI 命令详解","平台服务命令"]},"189":{"title":"agentkit knowledge","titles":["CLI 命令详解","平台服务命令"]},"190":{"title":"agentkit tools","titles":["CLI 命令详解","平台服务命令"]},"191":{"title":"agentkit runtime","titles":["CLI 命令详解","平台服务命令"]},"192":{"title":"常用工作流","titles":["CLI 命令详解"]},"193":{"title":"📝 完整开发流程(模板模式)","titles":["CLI 命令详解","常用工作流"]},"194":{"title":"🔄 快速部署已有 Agent(包装模式)🆕","titles":["CLI 命令详解","常用工作流"]},"195":{"title":"🔄 快速迭代流程","titles":["CLI 命令详解","常用工作流"]},"196":{"title":"🌍 多环境管理","titles":["CLI 命令详解","常用工作流"]},"197":{"title":"常见问题","titles":["CLI 命令详解"]},"198":{"title":"❌ 配置文件找不到","titles":["CLI 命令详解","常见问题"]},"199":{"title":"❌ Docker 没有运行(Local 模式)","titles":["CLI 命令详解","常见问题"]},"200":{"title":"❌ 云端凭证未配置(Cloud 模式)","titles":["CLI 命令详解","常见问题"]},"201":{"title":"❌ 构建失败","titles":["CLI 命令详解","常见问题"]},"202":{"title":"💡 调试技巧","titles":["CLI 命令详解","常见问题"]},"203":{"title":"下一步","titles":["CLI 命令详解"]},"204":{"title":"配置文件详解","titles":[]},"205":{"title":"配置系统概览","titles":["配置文件详解"]},"206":{"title":"文件结构","titles":["配置文件详解"]},"207":{"title":"common 配置","titles":["配置文件详解"]},"208":{"title":"配置示例","titles":["配置文件详解","common 配置"]},"209":{"title":"配置项详解","titles":["配置文件详解","common 配置"]},"210":{"title":"agent_name(必填)","titles":["配置文件详解","common 配置","配置项详解"]},"211":{"title":"entry_point(必填)","titles":["配置文件详解","common 配置","配置项详解"]},"212":{"title":"description(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"213":{"title":"language(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"214":{"title":"language_version(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"215":{"title":"dependencies_file(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"216":{"title":"launch_type(必填)","titles":["配置文件详解","common 配置","配置项详解"]},"217":{"title":"cloud_provider(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"218":{"title":"runtime_envs(可选)","titles":["配置文件详解","common 配置","配置项详解"]},"219":{"title":"Local 模式配置","titles":["配置文件详解"]},"220":{"title":"配置示例","titles":["配置文件详解","Local 模式配置"]},"221":{"title":"配置项详解","titles":["配置文件详解","Local 模式配置"]},"222":{"title":"image_tag","titles":["配置文件详解","Local 模式配置","配置项详解"]},"223":{"title":"invoke_port","titles":["配置文件详解","Local 模式配置","配置项详解"]},"224":{"title":"container_name","titles":["配置文件详解","Local 模式配置","配置项详解"]},"225":{"title":"runtime_envs","titles":["配置文件详解","Local 模式配置","配置项详解"]},"226":{"title":"ports","titles":["配置文件详解","Local 模式配置","配置项详解"]},"227":{"title":"volumes","titles":["配置文件详解","Local 模式配置","配置项详解"]},"228":{"title":"restart_policy","titles":["配置文件详解","Local 模式配置","配置项详解"]},"229":{"title":"memory_limit / cpu_limit","titles":["配置文件详解","Local 模式配置","配置项详解"]},"230":{"title":"自动管理的字段","titles":["配置文件详解","Local 模式配置"]},"231":{"title":"Cloud 模式配置","titles":["配置文件详解"]},"232":{"title":"配置示例","titles":["配置文件详解","Cloud 模式配置"]},"233":{"title":"模板变量","titles":["配置文件详解","Cloud 模式配置"]},"234":{"title":"Auto 关键字","titles":["配置文件详解","Cloud 模式配置"]},"235":{"title":"配置项详解","titles":["配置文件详解","Cloud 模式配置"]},"236":{"title":"region","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"237":{"title":"image_tag","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"238":{"title":"tos_bucket","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"239":{"title":"cr_instance_name","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"240":{"title":"cr_namespace_name","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"241":{"title":"cr_repo_name","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"242":{"title":"runtime_name / runtime_role_name / runtime_apikey_name","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"243":{"title":"runtime_envs","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"244":{"title":"build_timeout","titles":["配置文件详解","Cloud 模式配置","配置项详解"]},"245":{"title":"自动管理的字段","titles":["配置文件详解","Cloud 模式配置"]},"246":{"title":"Hybrid 模式配置","titles":["配置文件详解"]},"247":{"title":"配置示例","titles":["配置文件详解","Hybrid 模式配置"]},"248":{"title":"与 Cloud 模式的区别","titles":["配置文件详解","Hybrid 模式配置"]},"249":{"title":"配置项详解","titles":["配置文件详解","Hybrid 模式配置"]},"250":{"title":"region","titles":["配置文件详解","Hybrid 模式配置","配置项详解"]},"251":{"title":"image_tag","titles":["配置文件详解","Hybrid 模式配置","配置项详解"]},"252":{"title":"cr_instance_name / cr_namespace_name / cr_repo_name","titles":["配置文件详解","Hybrid 模式配置","配置项详解"]},"253":{"title":"runtime_name / runtime_role_name / runtime_apikey_name","titles":["配置文件详解","Hybrid 模式配置","配置项详解"]},"254":{"title":"runtime_envs","titles":["配置文件详解","Hybrid 模式配置","配置项详解"]},"255":{"title":"自动管理的字段","titles":["配置文件详解","Hybrid 模式配置"]},"256":{"title":"docker_build 配置","titles":["配置文件详解"]},"257":{"title":"配置示例","titles":["配置文件详解","docker_build 配置"]},"258":{"title":"配置项详解","titles":["配置文件详解","docker_build 配置"]},"259":{"title":"base_image","titles":["配置文件详解","docker_build 配置","配置项详解"]},"260":{"title":"build_script","titles":["配置文件详解","docker_build 配置","配置项详解"]},"261":{"title":"regenerate_dockerfile","titles":["配置文件详解","docker_build 配置","配置项详解"]},"262":{"title":"platform","titles":["配置文件详解","docker_build 配置","配置项详解"]},"263":{"title":"全局配置","titles":["配置文件详解"]},"264":{"title":"配置文件位置","titles":["配置文件详解","全局配置"]},"265":{"title":"配置示例","titles":["配置文件详解","全局配置"]},"266":{"title":"配置优先级","titles":["配置文件详解","全局配置"]},"267":{"title":"使用场景","titles":["配置文件详解","全局配置"]},"268":{"title":"最佳实践","titles":["配置文件详解"]},"269":{"title":"🌍 多环境管理","titles":["配置文件详解","最佳实践"]},"270":{"title":"🔐 安全管理敏感信息","titles":["配置文件详解","最佳实践"]},"271":{"title":"📝 添加配置注释","titles":["配置文件详解","最佳实践"]},"272":{"title":"✅ 定期验证配置","titles":["配置文件详解","最佳实践"]},"273":{"title":"完整示例","titles":["配置文件详解"]},"274":{"title":"📱 本地开发配置(Python)","titles":["配置文件详解","完整示例"]},"275":{"title":"� Golang 项目配置","titles":["配置文件详解","完整示例"]},"276":{"title":"� 生产环境配置","titles":["配置文件详解","完整示例"]},"277":{"title":"🎯 最小配置示例","titles":["配置文件详解","完整示例"]},"278":{"title":"常见问题","titles":["配置文件详解"]},"279":{"title":"❓ 配置文件找不到","titles":["配置文件详解","常见问题"]},"280":{"title":"❓ YAML 格式错误","titles":["配置文件详解","常见问题"]},"281":{"title":"❓ 必填项缺失","titles":["配置文件详解","常见问题"]},"282":{"title":"❓ 模板变量渲染失败","titles":["配置文件详解","常见问题"]},"283":{"title":"❓ 环境变量不生效","titles":["配置文件详解","常见问题"]},"284":{"title":"❓ 旧配置字段名不兼容","titles":["配置文件详解","常见问题"]},"285":{"title":"配置字段速查表","titles":["配置文件详解"]},"286":{"title":"common 字段","titles":["配置文件详解","配置字段速查表"]},"287":{"title":"Cloud/Hybrid 模式字段","titles":["配置文件详解","配置字段速查表"]},"288":{"title":"docker_build 字段","titles":["配置文件详解","配置字段速查表"]},"289":{"title":"下一步","titles":["配置文件详解"]},"290":{"title":"日志系统","titles":[]},"291":{"title":"默认行为","titles":["日志系统"]},"292":{"title":"快速开始","titles":["日志系统"]},"293":{"title":"开启文件日志","titles":["日志系统","快速开始"]},"294":{"title":"开启控制台日志","titles":["日志系统","快速开始"]},"295":{"title":"同时开启控制台和文件日志","titles":["日志系统","快速开始"]},"296":{"title":"调试模式","titles":["日志系统","快速开始"]},"297":{"title":"环境变量配置","titles":["日志系统"]},"298":{"title":"基础配置","titles":["日志系统","环境变量配置"]},"299":{"title":"高级配置","titles":["日志系统","环境变量配置"]},"300":{"title":"日志级别说明","titles":["日志系统"]},"301":{"title":"常用场景","titles":["日志系统"]},"302":{"title":"场景 1:正常使用(默认配置)","titles":["日志系统","常用场景"]},"303":{"title":"场景 1.1:需要保存日志记录","titles":["日志系统","常用场景"]},"304":{"title":"场景 2:调试问题","titles":["日志系统","常用场景"]},"305":{"title":"场景 3:CI/CD 环境","titles":["日志系统","常用场景"]},"306":{"title":"场景 4:生产环境","titles":["日志系统","常用场景"]},"307":{"title":"场景 5:完全静默","titles":["日志系统","常用场景"]},"308":{"title":"日志文件管理","titles":["日志系统"]},"309":{"title":"日志文件位置","titles":["日志系统","日志文件管理"]},"310":{"title":"自动清理旧日志","titles":["日志系统","日志文件管理"]},"311":{"title":"自定义日志路径","titles":["日志系统","日志文件管理"]},"312":{"title":"配置优先级","titles":["日志系统"]},"313":{"title":"故障排查","titles":["日志系统"]},"314":{"title":"日志文件没有创建","titles":["日志系统","故障排查"]},"315":{"title":"控制台没有日志输出","titles":["日志系统","故障排查"]},"316":{"title":"日志太多或太少","titles":["日志系统","故障排查"]},"317":{"title":"最佳实践","titles":["日志系统"]},"318":{"title":"开发环境推荐配置","titles":["日志系统","最佳实践"]},"319":{"title":"团队协作","titles":["日志系统","最佳实践"]},"320":{"title":"生产部署建议","titles":["日志系统","最佳实践"]},"321":{"title":"总结","titles":["日志系统"]},"322":{"title":"AgentKit SDK 概览","titles":[]},"323":{"title":"核心架构","titles":["AgentKit SDK 概览"]},"324":{"title":"1. Runtime 应用框架","titles":["AgentKit SDK 概览","核心架构"]},"325":{"title":"AgentkitSimpleApp","titles":["AgentKit SDK 概览","核心架构","1. Runtime 应用框架"]},"326":{"title":"AgentkitMCPApp","titles":["AgentKit SDK 概览","核心架构","1. Runtime 应用框架"]},"327":{"title":"AgentkitA2aApp","titles":["AgentKit SDK 概览","核心架构","1. Runtime 应用框架"]},"328":{"title":"2. Platform 服务客户端","titles":["AgentKit SDK 概览","核心架构"]},"329":{"title":"AgentkitMemory","titles":["AgentKit SDK 概览","核心架构","2. Platform 服务客户端"]},"330":{"title":"AgentkitKnowledge","titles":["AgentKit SDK 概览","核心架构","2. Platform 服务客户端"]},"331":{"title":"AgentkitMCP","titles":["AgentKit SDK 概览","核心架构","2. Platform 服务客户端"]},"332":{"title":"AgentkitRuntime","titles":["AgentKit SDK 概览","核心架构","2. Platform 服务客户端"]},"333":{"title":"3. 基础设施模块","titles":["AgentKit SDK 概览","核心架构"]},"334":{"title":"BaseAgentkitClient","titles":["AgentKit SDK 概览","核心架构","3. 基础设施模块"]},"335":{"title":"Context 管理","titles":["AgentKit SDK 概览","核心架构","3. 基础设施模块"]},"336":{"title":"模块依赖关系","titles":["AgentKit SDK 概览"]},"337":{"title":"主要特性","titles":["AgentKit SDK 概览"]},"338":{"title":"1. 装饰器驱动","titles":["AgentKit SDK 概览","主要特性"]},"339":{"title":"2. 框架无关","titles":["AgentKit SDK 概览","主要特性"]},"340":{"title":"3. 自动化的可观测性","titles":["AgentKit SDK 概览","主要特性"]},"341":{"title":"4. 生产就绪","titles":["AgentKit SDK 概览","主要特性"]},"342":{"title":"5. 类型安全","titles":["AgentKit SDK 概览","主要特性"]},"343":{"title":"快速开始","titles":["AgentKit SDK 概览"]},"344":{"title":"安装","titles":["AgentKit SDK 概览","快速开始"]},"345":{"title":"创建一个简单的 Agent","titles":["AgentKit SDK 概览","快速开始"]},"346":{"title":"使用 Platform 服务","titles":["AgentKit SDK 概览","快速开始"]},"347":{"title":"下一步","titles":["AgentKit SDK 概览"]},"348":{"title":"注解使用指南","titles":[]},"349":{"title":"Simple Agent 注解","titles":["注解使用指南"]},"350":{"title":"@app.entrypoint","titles":["注解使用指南","Simple Agent 注解"]},"351":{"title":"函数签名","titles":["注解使用指南","Simple Agent 注解","@app.entrypoint"]},"352":{"title":"参数说明","titles":["注解使用指南","Simple Agent 注解","@app.entrypoint"]},"353":{"title":"完整示例","titles":["注解使用指南","Simple Agent 注解","@app.entrypoint"]},"354":{"title":"注意事项","titles":["注解使用指南","Simple Agent 注解","@app.entrypoint"]},"355":{"title":"错误处理示例","titles":["注解使用指南","Simple Agent 注解","@app.entrypoint"]},"356":{"title":"@app.ping","titles":["注解使用指南","Simple Agent 注解"]},"357":{"title":"函数签名","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"358":{"title":"参数说明","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"359":{"title":"基本示例","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"360":{"title":"高级示例:包含依赖检查","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"361":{"title":"注意事项","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"362":{"title":"可用端点","titles":["注解使用指南","Simple Agent 注解","@app.ping"]},"363":{"title":"@app.async_task(规划中)","titles":["注解使用指南","Simple Agent 注解"]},"364":{"title":"MCP Agent 注解","titles":["注解使用指南"]},"365":{"title":"@app.tool","titles":["注解使用指南","MCP Agent 注解"]},"366":{"title":"函数签名","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"367":{"title":"参数说明","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"368":{"title":"基本示例","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"369":{"title":"异步工具示例","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"370":{"title":"注意事项","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"371":{"title":"复杂参数示例","titles":["注解使用指南","MCP Agent 注解","@app.tool"]},"372":{"title":"@app.agent_as_a_tool","titles":["注解使用指南","MCP Agent 注解"]},"373":{"title":"函数签名","titles":["注解使用指南","MCP Agent 注解","@app.agent_as_a_tool"]},"374":{"title":"使用示例","titles":["注解使用指南","MCP Agent 注解","@app.agent_as_a_tool"]},"375":{"title":"多 Agent 协作示例","titles":["注解使用指南","MCP Agent 注解","@app.agent_as_a_tool"]},"376":{"title":"注意事项","titles":["注解使用指南","MCP Agent 注解","@app.agent_as_a_tool"]},"377":{"title":"A2A Agent 注解","titles":["注解使用指南"]},"378":{"title":"@app.agent_executor","titles":["注解使用指南","A2A Agent 注解"]},"379":{"title":"函数签名","titles":["注解使用指南","A2A Agent 注解","@app.agent_executor"]},"380":{"title":"参数说明","titles":["注解使用指南","A2A Agent 注解","@app.agent_executor"]},"381":{"title":"基本示例","titles":["注解使用指南","A2A Agent 注解","@app.agent_executor"]},"382":{"title":"自定义执行器示例","titles":["注解使用指南","A2A Agent 注解","@app.agent_executor"]},"383":{"title":"注意事项","titles":["注解使用指南","A2A Agent 注解","@app.agent_executor"]},"384":{"title":"@app.task_store","titles":["注解使用指南","A2A Agent 注解"]},"385":{"title":"函数签名","titles":["注解使用指南","A2A Agent 注解","@app.task_store"]},"386":{"title":"使用默认存储","titles":["注解使用指南","A2A Agent 注解","@app.task_store"]},"387":{"title":"自定义任务存储示例","titles":["注解使用指南","A2A Agent 注解","@app.task_store"]},"388":{"title":"注意事项","titles":["注解使用指南","A2A Agent 注解","@app.task_store"]},"389":{"title":"最佳实践","titles":["注解使用指南"]},"390":{"title":"1. 错误处理","titles":["注解使用指南","最佳实践"]},"391":{"title":"2. 日志记录","titles":["注解使用指南","最佳实践"]},"392":{"title":"3. 类型注解","titles":["注解使用指南","最佳实践"]},"393":{"title":"4. 文档字符串","titles":["注解使用指南","最佳实践"]},"394":{"title":"5. 性能优化","titles":["注解使用指南","最佳实践"]},"395":{"title":"下一步","titles":["注解使用指南"]},"396":{"title":"AgentKit Runtime:从本地到云端的 Agent 部署利器","titles":[]},"397":{"title":"AgentKit Runtime 为您解决什么?","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器"]},"398":{"title":"核心优势","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器"]},"399":{"title":"1. Serverless 架构:极致简化运维,优化成本","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","核心优势"]},"400":{"title":"2. 企业级安全隔离","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","核心优势"]},"401":{"title":"3. 框架无关的快速集成","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","核心优势"]},"402":{"title":"三步上手:从本地开发到云端部署","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器"]},"403":{"title":"前提条件","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署"]},"404":{"title":"第 1 步:环境配置","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署"]},"405":{"title":"第 2 步:创建并本地调试 Agent","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署"]},"406":{"title":"1. 初始化 Agent 项目","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署","第 2 步:创建并本地调试 Agent"]},"407":{"title":"2. 智能体代码概览","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署","第 2 步:创建并本地调试 Agent"]},"408":{"title":"3. 配置环境变量","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署","第 2 步:创建并本地调试 Agent"]},"409":{"title":"4. 本地启动并调用服务","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署","第 2 步:创建并本地调试 Agent"]},"410":{"title":"第 3 步:部署到生产环境","titles":["AgentKit Runtime:从本地到云端的 Agent 部署利器","三步上手:从本地开发到云端部署"]},"411":{"title":"AgentKit Built-in Tools 快速开始指南","titles":[]},"412":{"title":"核心能力","titles":["AgentKit Built-in Tools 快速开始指南"]},"413":{"title":"前置准备:创建沙箱工具","titles":["AgentKit Built-in Tools 快速开始指南"]},"414":{"title":"智能体代码示例","titles":["AgentKit Built-in Tools 快速开始指南"]},"415":{"title":"完整代码","titles":["AgentKit Built-in Tools 快速开始指南","智能体代码示例"]},"416":{"title":"代码说明","titles":["AgentKit Built-in Tools 快速开始指南","智能体代码示例"]},"417":{"title":"本地调试","titles":["AgentKit Built-in Tools 快速开始指南"]},"418":{"title":"1. 官方源安装VeADK","titles":["AgentKit Built-in Tools 快速开始指南","本地调试"]},"419":{"title":"1. 配置环境变量","titles":["AgentKit Built-in Tools 快速开始指南","本地调试"]},"420":{"title":"2. 本地启动智能体服务","titles":["AgentKit Built-in Tools 快速开始指南","本地调试"]},"421":{"title":"3. 调用智能体","titles":["AgentKit Built-in Tools 快速开始指南","本地调试"]},"422":{"title":"工具实例调用机制","titles":["AgentKit Built-in Tools 快速开始指南","本地调试","3. 调用智能体"]},"423":{"title":"调用示例","titles":["AgentKit Built-in Tools 快速开始指南","本地调试","3. 调用智能体"]},"424":{"title":"执行日志示例","titles":["AgentKit Built-in Tools 快速开始指南","本地调试","3. 调用智能体"]},"425":{"title":"部署到生产环境","titles":["AgentKit Built-in Tools 快速开始指南"]},"426":{"title":"AgentKit Memory 快速开始指南","titles":[]},"427":{"title":"使用示例","titles":[]},"428":{"title":"创建记忆库","titles":["使用示例"]},"429":{"title":"获取记忆资源的连接信息","titles":["使用示例","创建记忆库"]},"430":{"title":"构建一个带长期记忆能力的智能体","titles":["使用示例"]},"431":{"title":"环境配置","titles":["使用示例"]},"432":{"title":"启动服务","titles":["使用示例"]},"433":{"title":"如何发起调用","titles":["使用示例"]},"434":{"title":"校验记忆库是否生效","titles":["使用示例"]},"435":{"title":"AgentKit Knowledge 快速开始指南","titles":[]},"436":{"title":"使用示例","titles":[]},"437":{"title":"创建知识库","titles":["使用示例"]},"438":{"title":"导入知识库","titles":["使用示例"]},"439":{"title":"获取记忆资源的连接信息","titles":["使用示例","导入知识库"]},"440":{"title":"构建一个带知识库能力的智能体","titles":["使用示例"]},"441":{"title":"环境配置","titles":["使用示例"]},"442":{"title":"启动服务","titles":["使用示例"]},"443":{"title":"如何发起调用","titles":["使用示例"]},"444":{"title":"AgentKit MCP","titles":[]},"445":{"title":"AgentKit MCP 功能点","titles":["AgentKit MCP"]},"446":{"title":"MCP 服务","titles":["AgentKit MCP","AgentKit MCP 功能点"]},"447":{"title":"MCP 工具集","titles":["AgentKit MCP","AgentKit MCP 功能点"]},"448":{"title":"认证与安全","titles":["AgentKit MCP","AgentKit MCP 功能点"]},"449":{"title":"AgentKit MCP Quick Start","titles":[]},"450":{"title":"环境要求","titles":["AgentKit MCP Quick Start"]},"451":{"title":"第一步:配置本地环境","titles":["AgentKit MCP Quick Start"]},"452":{"title":"第二步:创建 AgentKit MCP","titles":["AgentKit MCP Quick Start"]},"453":{"title":"第三步:设置环境环境变量,运行 Agent","titles":["AgentKit MCP Quick Start"]}},"dirtCount":0,"index":[["少数使用debian",{"2":{"453":1}}],["且大部分使用windows",{"2":{"453":1}}],["且开启该开关",{"2":{"113":1}}],["计费方式",{"2":{"453":10}}],["计算两个地理坐标之间的距离",{"2":{"393":1}}],["登录火山引擎",{"2":{"452":1}}],["登录方舟平台检查",{"2":{"55":1}}],["加快安装速度",{"2":{"451":1}}],["具体可以参考swagger",{"2":{"450":1}}],["细化到自然人授权码与客户端凭证",{"2":{"448":1}}],["作为低依赖的补充方案",{"2":{"448":1}}],["作用",{"2":{"205":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"222":1,"223":1,"224":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"244":1,"250":1,"251":1,"260":1,"261":1,"262":1}}],["暴露为",{"2":{"447":1}}],["组合多个",{"2":{"447":1}}],["组织和管理镜像",{"2":{"240":1}}],["两个工具",{"2":{"447":1}}],["两个封装工具",{"2":{"447":1}}],["两者不能同时使用",{"2":{"157":1}}],["随着工具数量膨胀或客户端存在工具上限",{"2":{"447":1}}],["随时可以用",{"2":{"183":1}}],["面向具体后端",{"2":{"446":1}}],["面向已具备",{"2":{"446":1}}],["能力集",{"2":{"446":1}}],["使历史资产快速纳入",{"2":{"446":1}}],["使用知识库来回答用户的问题",{"2":{"440":1}}],["使用不同知识库的便利性",{"2":{"435":1}}],["使用长期记忆来存储用户偏好",{"2":{"430":1}}],["使用以下",{"2":{"423":1}}],["使用模版生成的代码默认已经包含了所有必要的依赖",{"2":{"410":1}}],["使用模式",{"0":{"82":1}}],["使用完整的类型注解提高代码质量",{"2":{"392":1}}],["使用内存存储",{"2":{"388":1}}],["使用空格缩进",{"2":{"280":1}}],["使用方式",{"2":{"269":1}}],["使用方法",{"0":{"103":1,"128":1,"143":1,"151":1,"157":1,"167":1,"175":1}}],["使用已有实例",{"2":{"239":1}}],["使用已有存储桶",{"2":{"238":1}}],["使用时间戳确保唯一",{"2":{"276":1}}],["使用时间戳",{"2":{"237":1}}],["使用安全的全局配置",{"2":{"200":1}}],["使用默认存储",{"0":{"386":1}}],["使用默认配置",{"2":{"139":1}}],["使用默认值",{"2":{"37":1}}],["使用轻量级镜像",{"2":{"133":1}}],["使用场景",{"0":{"99":1,"133":1,"267":1},"2":{"110":1,"260":1,"330":1}}],["使用包装模式可以避免重写代码",{"2":{"90":1}}],["使用简写和指定",{"2":{"90":1}}],["使用简写",{"2":{"89":1}}],["使用示例",{"0":{"88":1,"116":1,"139":1,"148":1,"154":1,"159":1,"173":1,"182":1,"374":1,"427":1,"436":1},"1":{"89":1,"90":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"140":1,"160":1,"161":1,"162":1,"163":1,"428":1,"429":1,"430":1,"431":1,"432":1,"433":1,"434":1,"437":1,"438":1,"439":1,"440":1,"441":1,"442":1,"443":1},"2":{"110":1,"233":1,"299":1}}],["使用虚拟环境",{"2":{"44":1}}],["使用流式输出模板",{"2":{"36":1}}],["使用基础模板",{"2":{"36":1}}],["使用",{"0":{"38":1,"346":1},"1":{"39":1},"2":{"26":1,"39":1,"40":1,"51":1,"54":1,"75":1,"96":1,"101":1,"134":1,"140":1,"224":1,"232":1,"237":1,"241":1,"252":1,"259":1,"270":1,"335":1,"338":1,"354":1,"361":1,"383":1,"393":1,"406":1,"407":1,"409":1,"416":1}}],["使用全局配置中的",{"2":{"267":2}}],["使用全局配置",{"0":{"26":1}}],["使用相对路径引用图片",{"2":{"7":1}}],["转换为",{"2":{"446":1}}],["功能点",{"0":{"445":1},"1":{"446":1,"447":1,"448":1}}],["功能描述",{"2":{"63":1,"64":1,"80":1}}],["低成本",{"2":{"444":1}}],["易接入",{"2":{"444":1}}],["形成",{"2":{"444":1}}],["承载",{"2":{"444":1}}],["成本",{"2":{"444":1}}],["成功读取到知识库中的信息",{"2":{"443":1}}],["成功读取到记忆库中的信息",{"2":{"434":1}}],["成功",{"2":{"181":1}}],["减少",{"2":{"444":1}}],["减少不必要的输出",{"2":{"320":1}}],["金蝶",{"2":{"437":1}}],["zoho",{"2":{"437":1}}],["zshrc",{"2":{"27":1,"43":1,"318":1}}],["吗",{"2":{"437":1}}],["韩语等多语言支持",{"2":{"437":1}}],["英文",{"2":{"437":1}}],["飞书等渠道",{"2":{"437":1}}],["微信",{"2":{"437":1}}],["产品功能说明",{"2":{"437":1}}],["产品定位",{"0":{"9":1}}],["科技是一家专注于智能客服与知识管理的高科技公司",{"2":{"437":1}}],["待长期记忆抽取完成后",{"2":{"434":1}}],["校验记忆库是否生效",{"0":{"434":1}}],["链接信息将被自动保存在",{"2":{"432":1,"442":1}}],["链路追踪信息",{"2":{"335":1}}],["链路追踪",{"2":{"243":1,"340":1}}],["由火山引擎团队维护",{"2":{"430":1,"440":1}}],["由于本地环境无法自动注入云端凭证",{"2":{"33":1}}],["写入记忆资源",{"2":{"427":1}}],["写进",{"2":{"217":1}}],["跳过此步",{"2":{"425":1}}],["跳过确认",{"2":{"177":1}}],["跳过确认提示",{"2":{"176":1}}],["互不干扰",{"2":{"422":1}}],["隔离性",{"2":{"422":1}}],["超时后自动销毁",{"2":{"422":1}}],["沙箱工具",{"2":{"419":1}}],["官网",{"2":{"437":1}}],["官网faq",{"2":{"59":1}}],["官方源安装veadk",{"0":{"418":1}}],["语法支持高并发请求",{"2":{"416":1}}],["语言",{"2":{"275":2}}],["语言运行版本",{"2":{"214":1}}],["语言版本",{"2":{"208":1,"286":1}}],["记录生成的",{"2":{"413":1}}],["记忆库后端采用",{"2":{"430":1}}],["记忆服务客户端",{"2":{"329":1}}],["记忆集合",{"2":{"64":1,"188":1}}],["记忆模块等",{"2":{"11":1}}],["记忆",{"2":{"10":1}}],["像人一样操作操作系统控制台",{"2":{"412":1}}],["像人一样操作网页",{"2":{"412":1}}],["终端操作等核心能力",{"2":{"411":1}}],["终点经度",{"2":{"393":1}}],["终点纬度",{"2":{"393":1}}],["浏览器自动化",{"2":{"411":1}}],["至此",{"2":{"410":1}}],["jwrcwdayjj8xnlgalyzzcoqq",{"2":{"424":1}}],["javascript",{"2":{"416":1}}],["job",{"2":{"409":2}}],["json",{"2":{"6":1,"158":4,"160":2,"354":1,"387":2,"407":3,"409":1,"423":1,"452":1,"453":1}}],["js",{"2":{"6":1}}],["讲一个笑话",{"2":{"409":2,"410":1}}],["替换为您的真实凭证",{"2":{"408":1}}],["步",{"0":{"404":1,"405":1,"410":1},"1":{"406":1,"407":1,"408":1,"409":1}}],["步骤如下",{"2":{"427":1,"436":1}}],["步骤",{"0":{"35":1,"36":1,"37":1}}],["拥有",{"2":{"403":1}}],["前置准备",{"0":{"413":1}}],["前提条件",{"0":{"403":1}}],["前天的日志",{"2":{"309":1}}],["到最终将",{"2":{"402":1}}],["到云端",{"2":{"401":1}}],["广泛的框架支持",{"2":{"401":1}}],["严格隔离会话上下文与访问权限",{"2":{"400":1}}],["严重错误",{"2":{"300":1}}],["精细化权限控制",{"2":{"400":1}}],["受保护的环境中运行",{"2":{"400":1}}],["都在独立",{"2":{"400":1}}],["都能提供强大支持",{"2":{"79":1}}],["企业级安全隔离",{"0":{"400":1}}],["轻障碍接入",{"2":{"444":1}}],["轻松追踪",{"2":{"399":1}}],["轻量级检查",{"2":{"361":1}}],["统一入口",{"2":{"444":1}}],["统一运行时平台",{"2":{"399":1}}],["统一路径",{"2":{"320":1}}],["零基础设施管理",{"2":{"399":1}}],["极致简化运维",{"0":{"399":1}}],["极大提升了项目启动效率",{"2":{"81":1}}],["极大提升效率",{"2":{"61":1}}],["难以维护",{"2":{"397":1}}],["缺乏统一管理平台",{"2":{"397":1}}],["运维负担重",{"2":{"397":1}}],["运行中",{"2":{"453":10}}],["运行结果",{"2":{"453":1}}],["运行智能体",{"2":{"453":1}}],["运行记忆库支持提供跨会话",{"2":{"426":1}}],["运行过程中面临多轮任务日益复杂",{"2":{"426":1}}],["运行代码",{"2":{"412":1}}],["运行以下命令启动智能体",{"2":{"420":1}}],["运行以下命令启动",{"2":{"409":1}}],["运行环境",{"2":{"396":1}}],["运行应用",{"2":{"381":1}}],["运行构建",{"2":{"305":1}}],["运行命令",{"2":{"293":1,"294":1,"295":1,"296":1,"303":1,"304":1,"306":1,"315":1}}],["运行配置命令检查",{"2":{"272":1}}],["运行",{"0":{"453":1},"2":{"259":1,"353":1,"430":1,"432":1,"440":1,"442":1}}],["运行位置",{"2":{"216":1}}],["运行错误",{"2":{"172":1}}],["运行状态",{"2":{"170":1,"171":1,"399":1}}],["运行效果",{"0":{"91":1,"164":1,"181":1},"1":{"92":1,"93":1}}],["运行时产生费用",{"2":{"399":1}}],["运行时输入敏感信息",{"2":{"270":1}}],["运行时镜像",{"2":{"257":1}}],["运行时相关",{"2":{"245":1}}],["运行时需要的配置",{"2":{"243":1}}],["运行时自动使用全局配置",{"2":{"126":1}}],["运行时使用全局配置",{"2":{"122":1}}],["运行时实例",{"2":{"64":1,"191":1}}],["运行时环境和所需使用的平台服务",{"2":{"11":1}}],["运行和调试",{"2":{"33":1}}],["高效",{"2":{"396":1}}],["高级示例",{"0":{"360":1}}],["高级配置",{"0":{"299":1}}],["高级助理",{"2":{"89":1}}],["托管式的",{"2":{"396":1}}],["好的做法",{"2":{"394":1}}],["性能优化",{"0":{"394":1}}],["性能指标",{"2":{"340":1}}],["距离单位为公里",{"2":{"393":1}}],["度",{"2":{"393":4}}],["起点经度",{"2":{"393":1}}],["起点纬度",{"2":{"393":1}}],["起个名字",{"2":{"210":1}}],["公司简介",{"2":{"437":1}}],["公式计算地球表面两点间的大圆距离",{"2":{"393":1}}],["公网或双栈",{"2":{"113":1}}],["持久化存储",{"2":{"388":1}}],["持续集成和云端部署等一系列繁琐工作",{"2":{"11":1}}],["持续集成和高可用保障",{"2":{"10":1}}],["任务状态",{"2":{"384":1}}],["任意文字",{"2":{"212":1}}],["之间的通信和协作",{"2":{"377":1}}],["合理的超时",{"2":{"376":1}}],["合并",{"2":{"225":1,"243":1}}],["异步处理",{"2":{"416":1}}],["异步执行",{"2":{"376":1}}],["异步工具示例",{"0":{"369":1}}],["职责单一",{"2":{"376":1}}],["搜索结果列表",{"2":{"371":1}}],["搜索查询对象",{"2":{"371":1}}],["搜索文档",{"2":{"371":1}}],["截取前",{"2":{"369":1}}],["网关访问",{"2":{"448":1}}],["网关与工具治理中枢",{"2":{"444":1}}],["网页",{"2":{"369":1}}],["网络问题",{"2":{"201":1}}],["网络问题或",{"2":{"54":1}}],["网络配置",{"0":{"113":1},"2":{"397":1}}],["°c",{"2":{"368":1}}],["城市名称",{"2":{"368":1}}],["理解工具用途",{"2":{"367":1,"370":1}}],["函数参数",{"2":{"367":1}}],["函数签名必须为",{"2":{"361":1}}],["函数签名",{"0":{"351":1,"357":1,"366":1,"373":1,"379":1,"385":1}}],["暂未实现",{"2":{"363":1}}],["此功能正在规划中",{"2":{"363":1}}],["此操作不可恢复",{"2":{"177":1}}],["存活探针",{"2":{"362":1}}],["存储桶",{"2":{"267":1}}],["存储代码包",{"2":{"248":1}}],["存储代码压缩包",{"2":{"238":1}}],["存储相关",{"2":{"245":1}}],["存储镜像的仓库",{"2":{"241":1}}],["连接",{"2":{"360":1}}],["连接外部知识库",{"2":{"189":1}}],["健康状态",{"2":{"362":1}}],["健康状态信息",{"2":{"358":1}}],["健康检查接口",{"2":{"453":1}}],["健康检查函数会自动注册到以下端点",{"2":{"362":1}}],["健康检查函数不接收任何参数",{"2":{"358":1}}],["健康检查端点",{"2":{"341":1}}],["健康检查",{"2":{"325":1,"359":1,"360":1}}],["返回结构化数据",{"2":{"370":1}}],["返回结果",{"2":{"353":1}}],["返回字符串",{"2":{"354":1}}],["返回值会被自动封装为",{"2":{"354":1}}],["返回值",{"2":{"352":1,"358":1,"367":1}}],["返回错误",{"2":{"55":1}}],["阅读",{"2":{"347":1,"395":1}}],["参考runtime",{"2":{"425":1}}],["参考",{"2":{"347":1}}],["参数顺序固定",{"2":{"354":1}}],["参数说明",{"0":{"129":1,"144":1,"152":1,"158":1,"168":1,"176":1,"352":1,"358":1,"367":1,"380":1},"2":{"409":1,"423":1}}],["参数也支持旧的",{"2":{"111":1}}],["参数",{"2":{"103":1,"109":1,"110":1,"111":1,"261":1,"262":1}}],["参数明确指定",{"2":{"101":1}}],["参数指定镜像源以加快安装速度",{"2":{"404":1}}],["参数指定",{"2":{"97":1}}],["参数选项和最佳实践",{"2":{"79":1}}],["参数直接指定模板",{"2":{"36":1}}],["框架",{"2":{"339":1,"401":1,"430":1,"440":1,"453":1}}],["框架无关的快速集成",{"0":{"401":1}}],["框架无关",{"0":{"339":1}}],["业务逻辑",{"2":{"338":1,"390":1}}],["业务逻辑的实现",{"2":{"322":1}}],["装饰器简化应用开发",{"2":{"338":1}}],["装饰器驱动",{"0":{"338":1}}],["端点配置",{"2":{"334":1}}],["端口映射",{"2":{"220":1,"226":1}}],["端口",{"2":{"149":1}}],["知识图谱集成",{"2":{"330":1}}],["知识库后端采用",{"2":{"440":1}}],["知识库支持",{"2":{"437":1}}],["知识库内容多久更新一次",{"2":{"437":1}}],["知识库服务客户端",{"2":{"330":1}}],["知识库",{"2":{"10":1,"64":1,"189":1}}],["检索增强生成",{"2":{"330":1}}],["检查数据库连接",{"2":{"360":1}}],["检查目录权限",{"2":{"314":1}}],["检查是否禁用了文件日志",{"2":{"314":1}}],["检查是否有",{"2":{"57":1}}],["检查配置",{"2":{"283":1}}],["检查配置是否正确",{"2":{"202":1}}],["检查环境变量",{"2":{"282":1}}],["检查环境变量配置是否正确",{"2":{"52":1}}],["检查冒号后面有空格",{"2":{"280":1}}],["检查清单",{"2":{"280":1}}],["检查运行状态",{"2":{"202":1}}],["检查命令行输出",{"2":{"59":1}}],["检查接入点",{"2":{"55":1}}],["检查防火墙或代理设置",{"2":{"54":1}}],["检查网络连接",{"2":{"54":1,"201":1}}],["检查状态",{"2":{"51":1}}],["检查",{"2":{"47":1,"50":1,"58":1,"165":1,"201":2,"360":1}}],["列举知识库",{"2":{"330":1}}],["列举记忆库",{"2":{"329":1}}],["列出会话",{"2":{"190":1}}],["列出工具",{"2":{"190":1}}],["列出所有版本",{"2":{"191":1}}],["列出所有运行时",{"2":{"191":1}}],["列出所有知识库",{"2":{"189":1}}],["列出所有记忆集合",{"2":{"188":1}}],["注解",{"0":{"349":1,"364":1,"377":1},"1":{"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"388":1},"2":{"348":1}}],["注解使用指南",{"0":{"348":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"364":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"377":1,"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"388":1,"389":1,"390":1,"391":1,"392":1,"393":1,"394":1,"395":1}}],["注册执行器",{"2":{"381":1}}],["注册和管理",{"2":{"331":1}}],["注册任务存储",{"2":{"327":1,"384":1}}],["注册",{"2":{"327":1,"378":1}}],["注意事项",{"0":{"141":1,"165":1,"354":1,"361":1,"370":1,"376":1,"383":1,"388":1},"2":{"419":1}}],["注意脱敏",{"2":{"59":1}}],["注意缩进",{"2":{"47":1}}],["注意",{"2":{"27":1,"33":1,"214":1,"363":1}}],["封装为",{"2":{"326":1,"372":1}}],["规格为ecs",{"2":{"453":1}}],["规划中",{"0":{"363":1},"2":{"325":1}}],["规则",{"2":{"210":1,"211":1,"212":1}}],["采用模块化设计",{"2":{"323":1}}],["采用两级配置架构",{"2":{"205":1}}],["章节或联系技术支持",{"2":{"321":1}}],["灵活配置",{"2":{"321":1}}],["灵活组合",{"2":{"102":1}}],["总结",{"0":{"321":1}}],["总是重启",{"2":{"228":1}}],["聚焦重要问题",{"2":{"320":1}}],["聚焦问题",{"2":{"306":1}}],["手动扩缩容和故障排查而耗费大量精力",{"2":{"397":1}}],["手动创建目录",{"2":{"314":1}}],["手动指定",{"2":{"86":1}}],["故障排查",{"0":{"313":1},"1":{"314":1,"315":1,"316":1},"2":{"321":1}}],["故障排除指南",{"0":{"41":1},"1":{"42":1,"43":1,"44":1,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"57":1,"58":1,"59":1}}],["故障排除",{"2":{"28":1}}],["结合",{"2":{"444":1}}],["结果数量和过滤条件",{"2":{"371":1}}],["结果",{"2":{"312":1}}],["结尾",{"2":{"125":1,"211":1}}],["专门处理天气相关查询的",{"2":{"374":1}}],["专用环境变量",{"2":{"312":1}}],["专注于快速部署",{"2":{"90":1}}],["天气助手",{"2":{"374":1,"375":1}}],["天气查询结果",{"2":{"374":1}}],["天气查询",{"2":{"208":1,"212":1,"381":1}}],["天气查询助手",{"2":{"109":1,"119":1}}],["天前的日志",{"2":{"310":1}}],["昨天的日志",{"2":{"309":1}}],["干净整洁",{"2":{"302":1,"303":1}}],["效果",{"2":{"302":1,"303":1,"304":1,"305":1,"306":1,"307":1}}],["保持代码执行的上下文连续性",{"2":{"422":1}}],["保持干净",{"2":{"318":1}}],["保持清爽",{"2":{"306":1}}],["保持向后兼容",{"2":{"111":1}}],["保存任务",{"2":{"387":1}}],["保存到指定位置",{"2":{"311":1}}],["保存详细信息",{"2":{"305":1}}],["保存完整",{"2":{"304":1}}],["保护信息安全",{"2":{"302":2,"319":1}}],["错误处理示例",{"0":{"355":1}}],["错误处理",{"0":{"390":1},"2":{"341":1,"354":1,"370":1}}],["错误信息",{"2":{"300":1}}],["错误做法",{"2":{"270":1}}],["警告信息",{"2":{"300":1}}],["种日志级别",{"2":{"300":1}}],["遇到错误或异常行为时",{"2":{"304":1}}],["遇到错误不要慌",{"2":{"197":1}}],["遇到问题需要详细日志时",{"2":{"296":1}}],["见下文",{"2":{"291":1}}],["动手实践完整流程",{"2":{"289":1}}],["仍然支持旧字段名",{"2":{"284":1}}],["旧字段名",{"2":{"284":1}}],["旧配置字段名不兼容",{"0":{"284":1}}],["旧版本",{"2":{"141":1}}],["旧版本备份到",{"2":{"134":1}}],["混淆",{"2":{"283":1}}],["混合使用",{"2":{"110":1}}],["混合模式",{"0":{"68":1,"107":1}}],["混合部署和纯云端部署三种模式",{"2":{"61":1}}],["填写必填项",{"2":{"281":1}}],["填入团队共享的配置",{"2":{"122":1}}],["�",{"0":{"275":1,"276":1}}],["详细的文档字符串",{"2":{"370":1}}],["详细的调试信息",{"2":{"300":1}}],["详细日志",{"2":{"274":1}}],["详细信息",{"2":{"170":1,"171":1}}],["定期验证配置",{"0":{"272":1}}],["定义异步任务",{"2":{"325":1}}],["定义健康检查函数",{"2":{"325":1,"356":1}}],["定义所有部署模式共享的环境变量",{"2":{"218":1}}],["定义怎么办",{"2":{"101":1}}],["定义在函数内部",{"2":{"97":1}}],["定义的现有",{"2":{"86":1}}],["定义",{"2":{"85":1,"97":2,"99":1,"100":1,"325":1,"350":1,"354":1,"378":1}}],["定义文件部署到",{"2":{"94":1}}],["定义文件",{"2":{"83":1}}],["定义文件快速包装成可部署的",{"2":{"82":1}}],["定义默认的部署模式",{"2":{"69":1}}],["离用户最近",{"2":{"271":1}}],["北京区域",{"2":{"271":1}}],["硬编码",{"2":{"270":1}}],["架构",{"0":{"399":1},"2":{"262":3}}],["架构理念",{"0":{"11":1}}],["也重新生成",{"2":{"261":1}}],["也可以使用自定义命名",{"2":{"97":1}}],["也可以是模型id如",{"2":{"32":1}}],["也可以执行以下命令",{"2":{"23":1}}],["路径",{"2":{"260":1}}],["路径相对于项目根目录",{"2":{"131":1}}],["根据上下文推荐相关答案",{"2":{"437":1}}],["根据",{"2":{"410":1,"425":1}}],["根据实时流量从零自动扩展到大规模并发",{"2":{"399":1}}],["根据需要复制到",{"2":{"319":1}}],["根据需要选择",{"2":{"318":1}}],["根据需要通过环境变量开启日志功能",{"2":{"291":1}}],["根据语言自动选择",{"2":{"259":1}}],["根据配置的",{"2":{"135":1,"145":1}}],["跨平台构建",{"2":{"257":1,"262":1}}],["跨项目生效",{"2":{"217":1}}],["跨项目共享",{"2":{"205":1,"263":1}}],["因为本地构建不需要上传代码包",{"2":{"249":1}}],["因为这可能导致凭证泄露",{"2":{"27":1}}],["较慢",{"2":{"248":1}}],["快",{"2":{"248":1}}],["快速定位问题",{"2":{"399":1}}],["快速响应常见问题",{"2":{"437":1}}],["快速响应",{"2":{"361":1}}],["快速参考",{"2":{"321":1}}],["快速部署上线",{"2":{"194":1}}],["快速部署已有",{"0":{"194":1}}],["快速部署已有代码",{"2":{"80":1}}],["快速高效",{"2":{"126":1}}],["快速更新单个配置项",{"0":{"118":1}}],["快速更新",{"0":{"106":1},"2":{"102":1}}],["快速迭代流程",{"0":{"195":1}}],["快速迭代",{"2":{"80":1,"155":1}}],["快速上手",{"0":{"70":1},"1":{"71":1}}],["快速体验",{"2":{"29":1}}],["快速体验从开发到部署的全过程",{"2":{"13":1}}],["快速入门",{"0":{"29":1},"1":{"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1},"2":{"78":1}}],["快速开始指南",{"0":{"411":1,"426":1,"435":1},"1":{"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1}}],["快速开始",{"0":{"292":1,"343":1},"1":{"293":1,"294":1,"295":1,"296":1,"344":1,"345":1,"346":1},"2":{"13":1,"28":1,"203":1,"289":1,"410":1,"425":2}}],["快速构建集成知识库的智能问答服务",{"2":{"12":1}}],["快速生产级落地",{"2":{"11":1}}],["快速启动开发",{"2":{"10":1}}],["流水线",{"2":{"245":1}}],["流式调用时",{"2":{"158":1}}],["流式返回",{"2":{"98":1}}],["流式对话助手",{"2":{"89":1}}],["流式",{"2":{"86":1}}],["流式输出模板",{"2":{"70":1}}],["流式输出",{"2":{"10":1,"29":1}}],["其他自定义头部",{"2":{"352":1}}],["其他自定义字段",{"2":{"352":1}}],["其他配置参数",{"2":{"380":1}}],["其他配置",{"2":{"243":1}}],["其他参数交互式输入",{"2":{"107":1}}],["增加mem0ai==0",{"2":{"430":1}}],["增强功能",{"2":{"243":1}}],["增量打印该字段",{"2":{"158":1}}],["增量更新",{"2":{"106":1}}],["授权角色",{"2":{"242":1}}],["授权角色名",{"2":{"232":1,"247":1}}],["相同",{"2":{"422":1}}],["相对于项目根目录",{"2":{"260":1}}],["相关配置",{"2":{"242":1,"249":1}}],["相当于自动执行",{"2":{"150":1}}],["桶名",{"2":{"238":1}}],["固定版本",{"2":{"237":1}}],["降低上下文冗余与延迟",{"2":{"447":1}}],["降低接入门槛",{"2":{"444":1}}],["降低工具集成复杂度",{"2":{"331":1}}],["降低延迟",{"2":{"236":1}}],["降低学习成本",{"2":{"61":1}}],["行为",{"2":{"234":1}}],["关注潜在问题",{"2":{"300":1}}],["关闭控制台",{"2":{"320":1}}],["关闭",{"2":{"291":2}}],["关键字",{"0":{"234":1}}],["关联",{"2":{"112":4}}],["关联资源",{"0":{"112":1}}],["每核心线程数2",{"2":{"453":10}}],["每次请求都创建",{"2":{"394":1}}],["每次构建生成唯一标签",{"2":{"237":1}}],["每次构建唯一",{"2":{"233":1}}],["每个会话实例默认有效期为",{"2":{"422":1}}],["每个",{"2":{"205":1,"376":1}}],["空",{"2":{"232":1,"241":1,"252":1,"286":1,"287":1}}],["空行结束",{"2":{"124":1}}],["仓库名称",{"2":{"241":1}}],["仓库名",{"2":{"232":1,"247":1,"252":1,"287":1}}],["核",{"2":{"229":1}}],["核心数2",{"2":{"453":10}}],["核心定位",{"2":{"444":1}}],["核心能力",{"0":{"412":1}}],["核心代码如下",{"2":{"407":1}}],["核心装饰器",{"2":{"325":1,"326":1,"327":1}}],["核心架构",{"0":{"323":1},"1":{"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1}}],["核心参数",{"0":{"84":1}}],["核心应用场景",{"2":{"80":1}}],["核心命令",{"0":{"63":1}}],["核心优势",{"0":{"10":1,"61":1,"398":1},"1":{"399":1,"400":1,"401":1}}],["个",{"2":{"229":1,"447":1}}],["个变量",{"2":{"124":1}}],["防止占用过多",{"2":{"229":1}}],["除非手动停止",{"2":{"228":1}}],["失败时重启",{"2":{"228":1}}],["卷挂载",{"2":{"227":1}}],["映射到容器",{"2":{"226":1}}],["主入口函数",{"2":{"353":1}}],["主机路径",{"2":{"227":1}}],["主机",{"2":{"226":1}}],["主机端口",{"2":{"226":1}}],["主要包括",{"2":{"445":1}}],["主要包含以下模块",{"2":{"323":1}}],["主要有以下几步",{"2":{"425":1}}],["主要特性",{"0":{"337":1},"1":{"338":1,"339":1,"340":1,"341":1,"342":1}}],["主要功能",{"2":{"329":1,"330":1,"331":1,"332":1}}],["主要参数",{"0":{"108":1},"1":{"109":1,"110":1,"111":1,"112":1,"113":1}}],["主要命令",{"0":{"62":1},"1":{"63":1,"64":1}}],["覆盖",{"2":{"225":1}}],["覆盖全局配置",{"2":{"122":1}}],["传递给云端运行时的环境变量",{"2":{"254":1}}],["传递给容器的环境变量",{"2":{"225":1}}],["传递通用配置",{"2":{"218":1}}],["给我在50和100之间一个随机的质数",{"2":{"423":1,"425":1}}],["给容器起个名字",{"2":{"224":1}}],["给你的",{"2":{"210":1}}],["❗",{"2":{"223":1}}],["监控与日志缺失",{"2":{"397":1}}],["监控",{"2":{"243":1}}],["监控端口",{"2":{"226":1}}],["监控服务健康状况",{"2":{"80":1}}],["监听的端口",{"2":{"223":1}}],["区分不同版本",{"2":{"237":1}}],["区分不同版本的镜像",{"2":{"222":1,"251":1}}],["区域",{"2":{"115":1,"232":1}}],["策略级运行时环境变量",{"2":{"225":1,"243":1,"254":1}}],["策略级环境变量",{"2":{"220":1,"287":1}}],["策略级",{"2":{"218":1}}],["临时覆盖",{"2":{"217":1}}],["临时环境变量",{"2":{"200":1}}],["优化成本",{"0":{"399":1}}],["优雅关闭",{"2":{"341":1}}],["优点",{"2":{"320":1}}],["优先级更高",{"2":{"312":1}}],["优先级如下",{"2":{"312":1}}],["优先级",{"2":{"217":1,"218":1}}],["优势",{"2":{"66":1,"67":1,"68":1}}],["影响自动生成",{"2":{"217":1}}],["影响默认",{"2":{"217":1}}],["过渡阶段",{"2":{"216":1}}],["过程中可能遇到的常见问题",{"2":{"41":1}}],["决定",{"2":{"213":1}}],["客服邮箱",{"2":{"437":1}}],["客服助手",{"2":{"212":1}}],["客户端凭证",{"2":{"448":1}}],["客户端有工具上限的场景",{"2":{"447":1}}],["客户端",{"2":{"331":1}}],["客户端体验",{"2":{"98":1}}],["帮助",{"2":{"370":1}}],["帮助开发者专注于",{"2":{"322":1}}],["帮助你了解命令执行过程",{"2":{"290":1}}],["帮助团队成员理解用途",{"2":{"212":1}}],["帮助您高效利用",{"2":{"79":1}}],["帮助您快速启动项目",{"2":{"61":1}}],["简单描述",{"2":{"212":1}}],["简单清晰",{"2":{"210":1}}],["简化上线流程",{"2":{"80":1}}],["针对不同部署模式的特定配置",{"2":{"206":1}}],["三步上手",{"0":{"402":1},"1":{"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1}}],["三个部分",{"2":{"206":1}}],["三种配置模式",{"0":{"104":1},"1":{"105":1,"106":1,"107":1}}],["三种部署模式",{"0":{"65":1},"1":{"66":1,"67":1,"68":1}}],["位置",{"2":{"205":1}}],["问题排查",{"2":{"203":1,"300":1}}],["❓",{"0":{"279":1,"280":1,"281":1,"282":1,"283":1,"284":1},"2":{"203":1}}],["再发起调用",{"2":{"434":1}}],["再部署",{"2":{"202":1}}],["再执行",{"2":{"150":1}}],["打包代码",{"2":{"410":1,"425":1}}],["打包项目代码",{"2":{"137":1}}],["打开另一个终端",{"2":{"409":1}}],["打开",{"2":{"199":1}}],["没有重新部署",{"2":{"283":1}}],["没有设置火山引擎",{"2":{"200":1}}],["没有运行",{"0":{"199":1}}],["没有被禁用或过期",{"2":{"57":1}}],["进入项目目录",{"2":{"194":1}}],["进行虚拟环境管理",{"2":{"451":1}}],["进行无缝集成",{"2":{"437":1}}],["进行功能验证",{"2":{"80":1}}],["进行部署",{"2":{"68":1}}],["进行交互",{"2":{"63":1}}],["常用场景",{"0":{"301":1},"1":{"302":1,"303":1,"304":1,"305":1,"306":1,"307":1}}],["常用工作流",{"0":{"192":1},"1":{"193":1,"194":1,"195":1,"196":1}}],["常规操作信息",{"2":{"300":1}}],["常见问题",{"0":{"101":1,"197":1,"278":1},"1":{"198":1,"199":1,"200":1,"201":1,"202":1,"279":1,"280":1,"281":1,"282":1,"283":1,"284":1},"2":{"437":1}}],["发送中间事件",{"2":{"382":1}}],["发送测试请求",{"2":{"156":1}}],["发布新版本",{"2":{"191":1}}],["`ecs",{"2":{"453":1}}],["`memory",{"2":{"191":1}}],["`agentkit",{"2":{"191":1}}],["目前状态均为运行中",{"2":{"453":1}}],["目前支持",{"2":{"437":1}}],["目前仅支持北京区域",{"2":{"236":1}}],["目前仅支持更新",{"2":{"191":1}}],["目标",{"2":{"262":1}}],["目标平台",{"2":{"257":1,"288":1}}],["目录下的完整示例代码",{"2":{"395":1}}],["目录下的完整示例",{"2":{"347":1}}],["目录权限不足",{"2":{"314":1}}],["目录的绝对路径添加到您的",{"2":{"43":1}}],["目录中",{"2":{"43":1}}],["目录结构",{"0":{"6":1}}],["目录",{"2":{"4":1,"7":1}}],["信息越少",{"2":{"300":1}}],["信息",{"2":{"191":1,"304":1}}],["信息收集",{"2":{"39":1}}],["谨慎使用",{"2":{"176":1}}],["出现错误",{"2":{"172":1}}],["出于安全考虑",{"2":{"27":1}}],["⏸️",{"2":{"172":1}}],["温度",{"2":{"164":1}}],["正常使用",{"0":{"302":1}}],["正常运行中",{"2":{"172":1}}],["正确做法",{"2":{"270":1}}],["正确且有效",{"2":{"57":1}}],["正在思考",{"2":{"382":1}}],["正在部署",{"2":{"172":1}}],["正在调用",{"2":{"164":1}}],["带版本号",{"2":{"210":1}}],["带",{"0":{"163":1}}],["带请求头",{"0":{"162":1}}],["杭州今天天气晴",{"2":{"164":1}}],["杭州",{"2":{"161":1}}],["杭州天气怎么样",{"2":{"193":1}}],["杭州天气",{"2":{"161":1,"162":1}}],["今天的日志",{"2":{"309":1}}],["今天天气如何",{"2":{"194":1}}],["今天天气怎么样",{"2":{"158":1}}],["今天杭州天气如何",{"2":{"160":2}}],["最多",{"2":{"447":1}}],["最终",{"2":{"414":1,"430":1,"440":1}}],["最终以",{"2":{"407":1}}],["最大限度节省云成本",{"2":{"399":1}}],["最常用的应用框架",{"2":{"325":1}}],["最简配置",{"2":{"277":2}}],["最简单",{"0":{"160":1}}],["最小配置示例",{"0":{"277":1}}],["最低优先级",{"2":{"266":1}}],["最高优先级",{"2":{"266":1}}],["最重要的是模型",{"2":{"243":1}}],["最佳实践",{"0":{"126":1,"268":1,"317":1,"389":1},"1":{"269":1,"270":1,"271":1,"272":1,"318":1,"319":1,"320":1,"390":1,"391":1,"392":1,"393":1,"394":1},"2":{"90":1}}],["密钥名",{"2":{"232":1,"242":1,"247":1}}],["密钥",{"2":{"158":1,"234":1,"245":1,"255":1}}],["先构建",{"2":{"202":1}}],["先",{"2":{"158":1}}],["便于",{"2":{"370":1}}],["便于查找",{"2":{"321":1}}],["便于查看",{"2":{"305":1}}],["便于日志管理和监控",{"2":{"320":1}}],["便于问题追溯",{"2":{"319":1}}],["便于实时查看",{"2":{"319":1}}],["便于事后分析",{"2":{"304":1,"305":1}}],["便于追溯操作历史",{"2":{"303":1}}],["便于确认事件格式",{"2":{"158":1}}],["便于直接调试",{"2":{"66":1}}],["事件流返回结果",{"2":{"407":1}}],["事件队列",{"2":{"382":1}}],["事件",{"2":{"158":1}}],["逐条打印服务端推送的",{"2":{"158":1}}],["逐字显示",{"2":{"98":1}}],["消息内容和",{"2":{"165":1}}],["消息内容",{"2":{"157":1,"158":1}}],["向已部署的",{"2":{"156":1}}],["改完代码立即测试",{"2":{"155":1}}],["省时省力",{"2":{"155":1}}],["第三步中获取的apikey",{"2":{"453":1}}],["第三步中获取的endpoint",{"2":{"453":1}}],["第三步",{"0":{"453":1}}],["第",{"0":{"404":1,"405":1,"410":1},"1":{"406":1,"407":1,"408":1,"409":1}}],["第二个是",{"2":{"354":1}}],["第二步",{"0":{"452":1},"2":{"153":1}}],["第一步",{"0":{"451":1},"2":{"153":1}}],["第一个参数是",{"2":{"354":1}}],["第一个",{"2":{"39":1}}],["读取配置",{"2":{"153":1}}],["━━━",{"2":{"153":4}}],["━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",{"2":{"37":1}}],["获得一个公网可访问的",{"2":{"149":1}}],["获取到创建后的",{"2":{"452":1}}],["获取记忆资源的连接信息",{"0":{"429":1,"439":1}}],["获取记忆库详情",{"2":{"329":1}}],["获取任务",{"2":{"387":1}}],["获取网页内容",{"2":{"369":1}}],["获取城市天气信息",{"2":{"368":1}}],["获取知识库连接信息",{"2":{"330":1}}],["获取会话日志",{"2":{"190":1}}],["获取连接信息",{"2":{"188":1,"189":1,"329":1,"429":1,"439":1}}],["获取访问地址",{"2":{"80":1}}],["获取已部署",{"2":{"80":1}}],["获取帮助",{"0":{"59":1}}],["获取",{"2":{"32":1}}],["获取推理接入点",{"2":{"32":1}}],["获取模型推理",{"0":{"32":1}}],["获取后",{"2":{"31":1}}],["获取火山引擎访问密钥",{"0":{"31":1}}],["就绪探针",{"2":{"325":1,"362":1}}],["就绪",{"2":{"147":1,"172":1}}],["⏳",{"2":{"147":1}}],["秒内返回",{"2":{"361":1}}],["秒",{"2":{"146":1,"244":1}}],["容器重启策略",{"2":{"228":1}}],["容器路径",{"2":{"227":1}}],["容器端口",{"2":{"226":1}}],["容器启动时运行这个文件",{"2":{"211":1}}],["容器",{"2":{"179":1}}],["容器名称",{"2":{"170":1,"220":1,"224":1}}],["容器在本地运行",{"2":{"149":1}}],["容器正在运行",{"2":{"146":1}}],["容器镜像仓库",{"2":{"37":1}}],["停止",{"2":{"179":1,"181":1}}],["停止旧版本容器",{"2":{"146":1}}],["停止并删除",{"2":{"174":1}}],["停止并删除已部署的",{"2":{"80":1}}],["停止并销毁",{"2":{"63":1}}],["让团队可以专注在业务逻辑与体验打磨",{"2":{"444":1}}],["让团队成员更容易理解配置",{"2":{"271":1}}],["让agent上传",{"2":{"412":1}}],["让agent",{"2":{"412":2}}],["让agent安全地",{"2":{"412":1}}],["让您能立即开始开发",{"2":{"406":1}}],["让您能专注于",{"2":{"396":1}}],["让",{"2":{"142":1}}],["让你能够快速将已有的",{"2":{"94":1}}],["供",{"2":{"141":1,"365":1,"367":1}}],["元数据头后不再自动管理",{"2":{"141":1}}],["元数据头示例",{"2":{"134":1}}],["脚本会自动获得执行权限",{"2":{"141":1}}],["脚本会在构建过程中自动执行",{"2":{"131":1}}],["修改代码后的更新流程",{"2":{"195":1}}],["修改",{"2":{"140":3}}],["修改前先预览",{"2":{"126":1}}],["预制认证插件与自动搜索能力",{"2":{"444":1}}],["预置",{"2":{"259":1}}],["预计耗时",{"2":{"136":1,"137":1,"146":1,"147":1}}],["预览模式",{"2":{"114":1,"120":1}}],["预览生产版本",{"0":{"5":1}}],["删除任务",{"2":{"387":1}}],["删除记忆库",{"2":{"329":1}}],["删除记忆集合",{"2":{"188":1}}],["删除运行时",{"2":{"191":1}}],["删除和版本管理",{"2":{"191":1}}],["删除会话",{"2":{"190":1}}],["删除工具",{"2":{"190":1}}],["删除知识库",{"2":{"189":1,"330":1}}],["删除后无法撤销",{"2":{"183":1}}],["删除指定环境",{"2":{"182":1}}],["删除容器实例",{"2":{"179":1}}],["删除",{"2":{"141":1,"180":1,"181":1,"310":1}}],["删除元数据头后",{"2":{"134":1}}],["删除某个变量",{"2":{"124":1}}],["证书",{"2":{"133":1}}],["扩展",{"2":{"133":1,"140":1,"260":1}}],["场景下的权限冲突",{"2":{"397":1}}],["场景",{"0":{"302":1,"303":1,"304":1,"305":1,"306":1,"307":1},"2":{"133":1}}],["字符",{"2":{"369":1}}],["字符串包含特殊字符要加引号",{"2":{"280":1}}],["字符串",{"2":{"259":1}}],["字符串格式",{"2":{"131":1,"257":1}}],["字典",{"2":{"259":1}}],["字段",{"0":{"286":1,"288":1},"2":{"115":1,"230":1,"234":1,"245":4,"255":1,"286":1,"287":1,"288":1}}],["字段指示的安装路径",{"2":{"43":1}}],["即为",{"2":{"452":1}}],["即",{"2":{"425":1}}],["即可自动使用团队配置",{"2":{"267":1}}],["即可完成您的第一个",{"2":{"70":1}}],["即使",{"2":{"261":1}}],["即使已存在",{"2":{"129":1}}],["顺序",{"2":{"126":1}}],["避免工具调用失败",{"2":{"370":1}}],["避免执行耗时操作",{"2":{"361":1}}],["避免超时",{"2":{"361":1}}],["避免信息泄露",{"2":{"321":1}}],["避免提交个人配置",{"2":{"319":1}}],["避免敏感信息意外记录",{"2":{"318":1}}],["避免错误",{"2":{"126":1}}],["避免在装饰的函数中执行耗时初始化",{"2":{"394":1}}],["避免在",{"2":{"26":1}}],["日程助手",{"2":{"375":1}}],["日常修改用非交互式",{"2":{"126":1}}],["日志记录",{"0":{"391":1}}],["日志和监控",{"2":{"334":1}}],["日志配置示例",{"2":{"319":1}}],["日志太少",{"2":{"316":1}}],["日志太多",{"2":{"316":1}}],["日志太多或太少",{"0":{"316":1}}],["日志保存在项目根目录的",{"2":{"309":1}}],["日志文件没有创建",{"0":{"314":1}}],["日志文件会随时间增多",{"2":{"310":1}}],["日志文件位置",{"0":{"309":1}}],["日志文件管理",{"0":{"308":1},"1":{"309":1,"310":1,"311":1}}],["日志文件",{"2":{"304":1,"305":1,"306":1}}],["日志文件路径",{"2":{"298":1}}],["日志级别设置过高",{"2":{"315":1}}],["日志级别说明",{"0":{"300":1}}],["日志级别",{"2":{"298":1}}],["日志示例",{"2":{"291":1}}],["日志系统",{"0":{"290":1},"1":{"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1,"300":1,"301":1,"302":1,"303":1,"304":1,"305":1,"306":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1,"314":1,"315":1,"316":1,"317":1,"318":1,"319":1,"320":1,"321":1}}],["日志目录",{"2":{"227":1}}],["日志",{"2":{"59":1,"243":1,"303":1,"304":1,"305":1,"340":1}}],["日志会自动下载到您本地根目录下",{"2":{"50":1}}],["日志获取详细错误信息",{"2":{"50":1}}],["共配置",{"2":{"124":1}}],["输入",{"2":{"124":5}}],["输出推理内容",{"2":{"158":1}}],["输出紧凑的原始",{"2":{"158":1}}],["输出原始响应",{"2":{"158":1}}],["输出",{"2":{"122":1}}],["输出示例",{"0":{"169":1},"1":{"170":1,"171":1},"2":{"120":1}}],["团队共享配置",{"2":{"267":1}}],["团队成员根据需求自行调整",{"2":{"319":1}}],["团队成员可以共享相同的",{"2":{"267":1}}],["团队成员直接使用",{"2":{"126":1}}],["团队成员初始化项目时自动使用全局配置",{"2":{"122":1}}],["团队管理员设置",{"2":{"126":1}}],["团队管理员创建并分享全局配置",{"2":{"122":1}}],["团队协作",{"0":{"319":1}}],["团队协作使用全局配置",{"2":{"126":1}}],["团队协作场景",{"2":{"122":1}}],["团队开发的ai助手",{"2":{"39":1}}],["凭证",{"2":{"122":1,"243":1}}],["未保存任何更改",{"2":{"120":1}}],["┌───────────────┬──────────────┬──────────────┐",{"2":{"120":1}}],["┌────┬──────────────────────────┬──────────┬──────────────────────────────────┐",{"2":{"92":1}}],["变更项",{"2":{"120":1}}],["变量名拼写错误",{"2":{"283":1}}],["变量名可以是",{"2":{"97":1}}],["变量名",{"2":{"90":1,"97":1,"101":1}}],["变量",{"2":{"90":1,"105":1,"124":3,"233":1}}],["命名规范",{"2":{"125":1}}],["命名空间",{"2":{"115":1,"217":1,"232":1,"240":1,"247":1,"252":1,"287":1}}],["命令可以从模板创建一个结构完整的",{"2":{"406":1}}],["命令运行时无任何日志输出",{"2":{"291":1}}],["命令使用",{"2":{"141":1}}],["命令行配置示例",{"2":{"112":1,"113":1}}],["命令格式",{"0":{"83":1}}],["命令用于引导一个新的",{"2":{"81":1}}],["命令总览",{"0":{"80":1}}],["命令的参数和用法",{"2":{"78":1}}],["命令来管理此文件",{"2":{"69":1}}],["命令详解",{"0":{"79":1},"1":{"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1,"196":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1},"2":{"64":1,"78":1,"289":1}}],["命令都能提供一致且高效的开发体验",{"2":{"60":1}}],["命令时",{"2":{"43":1}}],["命令未找到",{"0":{"43":1}}],["命令测试智能体的代码执行能力",{"2":{"423":1}}],["命令测试",{"2":{"39":1}}],["命令即可一键部署",{"2":{"37":1}}],["命令",{"2":{"37":1,"63":1,"64":1,"80":1,"425":1}}],["命令一键完成应用的构建和云端部署",{"2":{"37":1}}],["命令执行后",{"2":{"36":1}}],["命令初始化您的",{"2":{"36":1}}],["命令添加到",{"2":{"27":1}}],["操作全局配置而非项目配置",{"2":{"115":1}}],["操作系统",{"2":{"15":1,"453":10}}],["显示关键信息",{"2":{"305":1}}],["显示详细的执行过程",{"2":{"304":1}}],["显示",{"2":{"186":1}}],["显示当前配置",{"2":{"114":1}}],["显示变更但不保存",{"2":{"114":1}}],["显著降低复杂智能体应用的开发部署门槛",{"2":{"9":1}}],["强制删除",{"2":{"176":1,"182":1}}],["强制重新生成",{"2":{"129":2,"134":1,"139":1,"257":1,"261":1,"288":1}}],["强制使用交互式模式",{"2":{"114":1}}],["强烈建议在项目中使用",{"2":{"44":1}}],["控制面",{"2":{"329":1}}],["控制面和数据面解耦",{"2":{"329":1}}],["控制选项",{"0":{"114":1}}],["控制台会输出详细的执行日志",{"2":{"409":1,"424":1}}],["控制台日志默认是关闭的",{"2":{"315":1}}],["控制台日志级别",{"2":{"299":1}}],["控制台没有日志输出",{"0":{"315":1}}],["控制台显示",{"2":{"312":1}}],["控制台",{"2":{"302":1,"303":1,"304":1,"305":1,"306":1,"307":1,"413":1,"452":1}}],["控制台只看重要的错误",{"2":{"299":1}}],["控制台和文件使用不同级别",{"2":{"321":1}}],["控制台和文件可独立控制",{"2":{"321":1}}],["控制台和文件",{"2":{"298":1}}],["控制台输出",{"2":{"291":1}}],["控制台查看详细日志",{"2":{"59":1}}],["控制台的日志",{"2":{"52":1}}],["看似配置但实际不生效",{"2":{"113":1}}],["若您还需要进一步分析或有其他操作需求",{"2":{"453":1}}],["若",{"2":{"113":1}}],["同一",{"2":{"416":1}}],["同步和异步均可",{"2":{"370":1}}],["同步函数",{"2":{"361":1}}],["同时提供",{"2":{"448":1}}],["同时兼容主流的",{"2":{"401":1}}],["同时保存完整记录",{"2":{"305":1}}],["同时开启控制台和文件日志",{"0":{"295":1},"2":{"295":1,"318":1}}],["同时开启公网与私网",{"2":{"113":1}}],["同时使用",{"2":{"158":1}}],["同名变量会覆盖",{"2":{"225":1}}],["同名变量",{"2":{"110":1}}],["取值说明",{"2":{"113":1}}],["取一个描述性的名称",{"2":{"90":1}}],["仅需少量适配即可快速接入",{"2":{"401":1}}],["仅在",{"2":{"399":1}}],["仅",{"2":{"133":1}}],["仅当",{"2":{"113":1}}],["仅当前模式",{"2":{"110":1}}],["仅当前部署模式使用",{"2":{"110":1}}],["仅私网访问",{"2":{"113":1}}],["仅公网访问",{"2":{"113":1}}],["仅对",{"2":{"113":1}}],["所属可用区为cn",{"2":{"453":1}}],["所属可用区",{"2":{"453":10}}],["所以该配置不会影响已有",{"2":{"113":1}}],["所有装饰的函数都应该有良好的错误处理",{"2":{"390":1}}],["所有参数必须有类型注解",{"2":{"370":1}}],["所有客户端的基类",{"2":{"334":1}}],["所有包含密钥的配置",{"2":{"270":1}}],["所有部署模式都需要的基础配置",{"2":{"207":1}}],["所有部署模式共享",{"2":{"110":1}}],["所有命令都支持这些选项",{"2":{"184":1}}],["所有配置都会自动验证",{"2":{"125":1}}],["所有配置通过一个",{"2":{"61":1}}],["所有模式通用",{"2":{"206":1}}],["所有模式共享",{"2":{"105":1,"110":1,"208":1,"283":1}}],["所有模式",{"0":{"73":1}}],["所有",{"2":{"7":1}}],["而非繁琐的底层运维",{"2":{"396":1}}],["而非",{"2":{"361":1}}],["而不是直接用",{"2":{"202":1}}],["而",{"2":{"113":1}}],["而将复杂的工程化问题交给",{"2":{"11":1}}],["限制容器使用的资源",{"2":{"229":1}}],["限制",{"2":{"113":1,"220":1,"229":2}}],["该模式专用",{"2":{"283":1}}],["该配置会在",{"2":{"113":1}}],["该命令会自动完成以下步骤",{"2":{"37":1}}],["该命令会使用",{"2":{"37":1}}],["私网",{"2":{"113":2}}],["表示清空",{"2":{"112":1}}],["表示不变更该绑定",{"2":{"112":1}}],["落盘位置",{"2":{"112":1}}],["绑定资源",{"2":{"112":1}}],["更好的代码可维护性",{"2":{"342":1}}],["更好的交互体验",{"2":{"98":1}}],["更多疑难问题解答",{"2":{"203":1}}],["更容易定位问题",{"2":{"202":1}}],["更友好的引导体验",{"2":{"126":1}}],["更新记忆库配置",{"2":{"329":1}}],["更新记忆集合",{"2":{"188":1}}],["更新运行时",{"2":{"191":1}}],["更新工具",{"2":{"190":1}}],["更新知识库",{"2":{"189":1}}],["更新后的描述",{"2":{"188":1,"189":1}}],["更新和删除记忆集合",{"2":{"188":1}}],["更新镜像标签",{"2":{"118":1}}],["更新入口文件",{"2":{"118":1}}],["更新",{"2":{"112":1,"133":1,"191":1}}],["把",{"2":{"112":1}}],["别名",{"2":{"111":1}}],["级覆盖应用级",{"2":{"110":1}}],["级环境变量只在当前模式下生效",{"2":{"110":1}}],["级别越高",{"2":{"300":1}}],["级别日志",{"2":{"296":1}}],["级别",{"2":{"110":1,"293":1,"300":1,"303":1}}],["继承",{"2":{"110":1,"383":1,"388":1}}],["重写",{"2":{"383":1}}],["重置为默认值",{"2":{"314":1}}],["重启策略",{"2":{"220":1}}],["重启中",{"2":{"172":1}}],["重试构建",{"2":{"201":1}}],["重要提示",{"0":{"183":1},"2":{"408":1}}],["重要",{"2":{"157":1}}],["重要⭐",{"0":{"110":1}}],["重新配置",{"2":{"281":1}}],["重新构建",{"2":{"195":1}}],["重新部署",{"2":{"183":2,"195":1,"283":1}}],["重新运行",{"2":{"47":1}}],["重新加载配置",{"2":{"43":1}}],["说明",{"2":{"109":1,"110":1,"111":1,"113":1,"114":1,"115":2,"230":1,"233":1,"245":4,"255":1,"286":1,"287":1,"288":1,"298":1,"299":1,"300":1,"418":1}}],["说明复现步骤",{"2":{"59":1}}],["部分部署tool",{"2":{"425":1}}],["部分参数通过命令行指定",{"2":{"107":1}}],["部署利器",{"0":{"396":1},"1":{"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1}}],["部署时自动渲染",{"2":{"233":1}}],["部署时间",{"2":{"230":1,"245":1}}],["部署后的容器",{"2":{"230":1}}],["部署失败",{"2":{"172":1}}],["部署",{"2":{"150":1}}],["部署成功",{"2":{"146":1}}],["部署成功会显示",{"2":{"37":1}}],["部署过程",{"0":{"145":1},"1":{"146":1,"147":1}}],["部署配置",{"2":{"100":1}}],["部署应用到",{"2":{"395":1}}],["部署应用",{"2":{"80":1,"153":1}}],["部署等多个步骤合而为一",{"2":{"61":1}}],["部署和运行模式",{"2":{"216":1}}],["部署和运维解决方案",{"2":{"9":1}}],["部署和管理的整个生命周期",{"2":{"79":1}}],["部署和管理全生命周期",{"2":{"60":1}}],["部署超时",{"0":{"51":1}}],["部署问题",{"0":{"48":1},"1":{"49":1,"50":1,"51":1,"52":1}}],["部署完成后",{"0":{"149":1},"2":{"410":1,"425":1}}],["部署完成",{"2":{"37":1,"153":1}}],["部署到生产环境的全过程",{"2":{"402":1}}],["部署到生产环境",{"0":{"410":1,"425":1},"2":{"148":1}}],["部署到默认环境",{"2":{"148":1}}],["部署到",{"2":{"37":1}}],["部署到测试的全流程",{"2":{"29":1}}],["部署模式",{"2":{"37":1,"105":1,"109":1,"208":1,"286":1}}],["⚡",{"0":{"106":1},"2":{"155":1}}],["名称",{"2":{"105":1,"115":1,"147":1,"208":1,"232":1,"242":1,"247":1,"286":1,"287":1}}],["🤖",{"2":{"105":1}}],["🎮",{"2":{"289":1}}],["🌍",{"0":{"196":1,"269":1}}],["🌐",{"2":{"146":1,"147":1,"164":1,"170":1,"171":1}}],["🏠",{"0":{"136":1,"146":1,"170":1,"179":1}}],["🎯",{"0":{"105":1,"277":1},"2":{"210":1,"211":1,"212":1,"213":1,"215":1,"217":1,"218":1,"321":1}}],["🆕",{"0":{"93":1,"94":1,"115":1,"122":1,"194":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1},"2":{"102":1,"103":1,"126":1}}],["新闻助手",{"2":{"375":1}}],["新字段名",{"2":{"284":1}}],["新描述",{"2":{"190":1,"191":1}}],["新值",{"2":{"120":1}}],["新增全局配置功能",{"2":{"102":1}}],["新用户",{"2":{"90":1}}],["全局配置存储在",{"2":{"263":1}}],["全局配置文件已创建",{"2":{"122":1}}],["全局配置管理",{"0":{"122":1}}],["全局配置选项",{"0":{"115":1}}],["全局配置",{"0":{"263":1},"1":{"264":1,"265":1,"266":1,"267":1},"2":{"103":1,"115":1,"126":1,"205":2,"217":2,"266":1}}],["全局配置支持",{"2":{"102":1}}],["全面的生命周期管理",{"2":{"10":1}}],["非交互命令写入",{"2":{"217":1}}],["非交互式模式",{"0":{"106":1}}],["非交互式",{"2":{"102":1}}],["非流式调用时",{"2":{"158":1}}],["非常适合快速开发和调试",{"2":{"66":1}}],["友好引导",{"2":{"102":1}}],["添加knowledgebase",{"2":{"440":1}}],["添加如下配置",{"2":{"431":2}}],["添加longtermmemory",{"2":{"430":1}}],["添加适当的日志以便追踪问题",{"2":{"391":1}}],["添加配置注释",{"0":{"271":1}}],["添加知识库",{"2":{"189":1,"330":1}}],["添加外部记忆集合",{"2":{"188":1}}],["添加变量",{"2":{"124":1}}],["添加环境变量",{"2":{"118":1}}],["添加你需要的依赖包",{"2":{"101":1}}],["添加到",{"2":{"43":1}}],["编译",{"2":{"133":1,"260":1}}],["编译扩展等",{"2":{"131":1}}],["编写构建脚本",{"2":{"133":1}}],["编辑生成的",{"2":{"101":1}}],["编程语言",{"2":{"37":1,"208":1,"213":1,"286":1}}],["原生支持",{"2":{"401":1}}],["原值",{"2":{"120":1}}],["原始",{"2":{"101":1}}],["原因",{"2":{"43":1,"44":1,"46":1,"47":1,"49":1,"50":1,"51":1,"52":1,"54":1,"55":1,"57":1,"58":1,"198":1,"199":1,"200":1}}],["但建议迁移到新名称",{"2":{"284":1}}],["但不需要",{"2":{"249":1}}],["但要注意保持",{"2":{"101":1}}],["但需要用",{"2":{"97":1}}],["找不到",{"2":{"101":1}}],["找到可执行文件",{"2":{"43":1}}],["找到",{"2":{"43":1}}],["q4",{"2":{"437":1}}],["q3",{"2":{"437":1}}],["q2",{"2":{"437":1}}],["q1",{"2":{"437":1}}],["quick",{"0":{"449":1},"1":{"450":1,"451":1,"452":1,"453":1}}],["quickstart",{"2":{"404":2,"451":2}}],["quit",{"2":{"409":1,"453":1}}],["questions",{"2":{"440":1}}],["queue",{"2":{"382":4,"383":1}}],["query",{"2":{"291":1,"371":2,"375":3}}],["querying",{"2":{"291":1}}],["quota",{"2":{"49":1}}],["quotaexceeded",{"2":{"49":1}}],["quot",{"2":{"10":2,"12":2,"85":10,"86":2,"109":2,"112":2,"133":4,"158":24,"280":2,"358":4,"433":4}}],["q",{"2":{"101":4}}],[">>>",{"2":{"393":1}}],[">",{"2":{"100":2,"115":3,"191":1,"205":3,"217":3,"338":1,"345":2,"351":1,"353":1,"355":1,"357":1,"359":1,"360":1,"363":1,"366":1,"368":1,"369":1,"371":1,"373":1,"374":1,"375":3,"382":1,"387":3,"390":1,"391":1,"392":1,"393":1,"394":2,"407":1,"415":2,"430":2,"440":2,"453":2}}],["类型的记忆资源",{"2":{"429":2,"439":1}}],["类型检查",{"2":{"342":1}}],["类型注解必需",{"2":{"370":1}}],["类型注解",{"0":{"392":1},"2":{"342":1}}],["类型安全",{"0":{"342":1}}],["类型",{"2":{"100":1,"188":1,"189":1,"367":1,"370":1}}],["含使用提示",{"2":{"100":1}}],["学习每个命令的用法",{"2":{"289":1}}],["学习",{"2":{"99":1}}],["想要保持",{"2":{"99":1}}],["想要了解所有配置项的详细说明",{"2":{"69":1}}],["想要了解每个命令的详细用法",{"2":{"64":1}}],["想快速部署",{"2":{"99":1}}],["需要确保",{"2":{"450":1}}],["需要有记忆能力来进行上下文保持与个性化定制",{"2":{"426":1}}],["需要配置以下环境变量",{"2":{"419":1}}],["需要此信息生成工具模式",{"2":{"370":1}}],["需要先开启文件日志",{"2":{"321":1}}],["需要调试时临时开启",{"2":{"318":1}}],["需要在控制台看到日志",{"2":{"305":1}}],["需要保存日志记录",{"0":{"303":1}}],["需要指定",{"2":{"190":1,"191":1}}],["需要",{"2":{"113":2,"248":1}}],["需要完整的示例代码作为起点",{"2":{"99":1}}],["需要支持流式输出",{"2":{"98":1}}],["需要直接赋值",{"2":{"97":1}}],["+7",{"2":{"310":1}}],["+",{"2":{"98":1,"123":1,"150":1,"216":1,"259":1,"293":1,"321":1,"424":3}}],["长时间运行的逻辑",{"2":{"363":1}}],["长时间处于",{"2":{"51":1}}],["长文本生成",{"2":{"98":1}}],["短响应",{"2":{"98":1}}],["特别是代码执行沙箱功能",{"2":{"412":1}}],["特别是模型",{"2":{"52":1}}],["特殊项目可以在",{"2":{"122":1}}],["特定环境配置",{"2":{"110":1}}],["特性",{"2":{"98":1}}],["❌",{"0":{"198":1,"199":1,"200":1,"201":1},"2":{"97":3,"172":3,"201":1,"270":1,"286":6,"394":1}}],["系统",{"2":{"437":1}}],["系统可以接入现有的",{"2":{"437":1}}],["系统性地解决了以上所有问题",{"2":{"397":1}}],["系统使用",{"2":{"132":1}}],["系统会自动将问题转接至人工客服",{"2":{"437":1}}],["系统会自动创建对应的沙箱会话实例",{"2":{"422":1}}],["系统会自动检测常见命名",{"2":{"97":1}}],["系统会一步步引导你填写各项参数",{"2":{"105":1}}],["系统只会复制你的文件到目标目录",{"2":{"101":1}}],["系统提示",{"2":{"43":1}}],["===",{"2":{"319":2}}],["============================================================================",{"2":{"134":3}}],["==",{"2":{"100":1,"345":1,"381":1,"407":1,"415":1,"424":9,"430":2,"440":1,"453":1}}],["=",{"2":{"97":1,"100":6,"232":2,"252":1,"338":1,"345":7,"346":3,"353":7,"355":3,"360":2,"363":1,"368":4,"369":1,"371":3,"374":4,"375":3,"381":3,"382":2,"386":1,"387":3,"390":2,"391":2,"392":2,"394":4,"407":18,"415":7,"424":8,"430":13,"440":11,"453":12}}],["响应方式",{"2":{"98":1}}],["响应",{"2":{"96":1,"164":1,"354":1}}],["接口定义json",{"2":{"450":1}}],["接口不变",{"2":{"101":1}}],["接口",{"2":{"96":1}}],["接下来您可以",{"2":{"40":1}}],["要求的",{"2":{"96":1}}],["导入知识库",{"0":{"438":1},"1":{"439":1}}],["导入你的",{"2":{"96":1,"100":1}}],["导入并包装你的",{"2":{"95":1}}],["复杂参数示例",{"0":{"371":1}}],["复杂数据分析",{"2":{"12":1}}],["复制源文件",{"2":{"95":1}}],["识别",{"2":{"95":1}}],["解绑语义说明",{"2":{"112":1}}],["解绑",{"2":{"112":2}}],["解析",{"2":{"95":1,"370":1}}],["解决方法",{"2":{"282":1,"283":1,"314":1,"315":1}}],["解决方案",{"2":{"43":1,"44":1,"46":1,"47":1,"49":1,"50":1,"51":1,"52":1,"54":1,"55":1,"57":1,"58":1}}],["解决",{"2":{"198":1,"199":1,"200":1,"279":1,"281":1}}],["解决代码问题等",{"2":{"39":1}}],["✓",{"2":{"92":4,"93":5}}],["基本示例",{"0":{"359":1,"368":1,"381":1}}],["基本要求",{"2":{"97":1}}],["基于知识库",{"2":{"437":1}}],["基于云厂商成熟的虚拟化和容器技术",{"2":{"400":1}}],["基于",{"2":{"326":1,"327":1,"387":1}}],["基于eino框架的a2a应用",{"2":{"92":1}}],["基础健康检查",{"2":{"362":1}}],["基础设施层",{"2":{"336":1}}],["基础设施模块",{"0":{"333":1},"1":{"334":1,"335":1}}],["基础配置",{"0":{"298":1},"2":{"206":1,"243":1,"276":1}}],["基础镜像",{"2":{"133":1,"140":1,"288":1}}],["基础agent应用",{"2":{"92":1}}],["基础环境",{"0":{"73":1}}],["✨",{"2":{"92":3,"93":3,"153":1}}],["有",{"2":{"450":1}}],["有效防止数据串扰和越权风险",{"2":{"400":1}}],["有助于长期维护和团队协作",{"2":{"90":1}}],["有什么具体需求",{"2":{"39":1}}],["明确命名",{"2":{"90":1}}],["利用包装模式",{"2":{"90":1}}],["它展示了如何基于",{"2":{"407":1}}],["它提供了简洁的项目结构",{"2":{"90":1}}],["它以声明式的方式定义了应用的所有配置",{"2":{"69":1}}],["完全静默",{"0":{"307":1}}],["完全自动化",{"2":{"126":1}}],["完整代码",{"0":{"415":1}}],["完整示例",{"0":{"273":1,"353":1},"1":{"274":1,"275":1,"276":1,"277":1}}],["完整镜像名",{"2":{"230":1,"255":1}}],["完整开发流程",{"0":{"193":1}}],["完整的",{"2":{"342":1}}],["完整的镜像",{"2":{"245":1}}],["完整的非交互式配置",{"0":{"119":1}}],["完整的包装命令",{"2":{"90":1}}],["完整配置示例",{"0":{"132":1},"2":{"106":1}}],["完成本地开发和测试后",{"2":{"410":1,"425":1}}],["完成配置后",{"2":{"37":1}}],["完成注册和开通",{"2":{"31":1}}],["9090",{"2":{"226":2}}],["9",{"2":{"90":1,"393":1,"453":1}}],["8192mb",{"2":{"453":10}}],["8080",{"2":{"226":2}}],["8000",{"2":{"146":1,"170":3,"220":3,"223":1,"226":2,"274":3,"381":1,"409":3,"420":1,"423":1,"429":1,"453":2}}],["8",{"2":{"90":1,"453":1}}],["属性",{"2":{"89":1}}],["自助知识库管理",{"2":{"437":1}}],["自定义任务存储示例",{"0":{"387":1}}],["自定义执行器示例",{"0":{"382":1}}],["自定义框架",{"2":{"339":1}}],["自定义日志路径",{"0":{"311":1},"2":{"319":1}}],["自定义启动脚本",{"2":{"211":1}}],["自定义请求内容",{"0":{"161":1}}],["自定义请求头",{"2":{"158":1}}],["自定义请求数据",{"2":{"158":1}}],["自定义构建示例",{"0":{"140":1}}],["自定义构建脚本",{"2":{"131":1,"257":1,"260":1}}],["自定义基础镜像",{"2":{"131":1,"259":1}}],["自定义",{"2":{"89":1,"256":1,"382":1}}],["自动搜索将",{"2":{"447":1}}],["自动问答",{"2":{"437":1}}],["自动补全",{"2":{"342":1}}],["自动收集",{"2":{"340":1}}],["自动化生命周期管理",{"2":{"399":1}}],["自动化的可观测性",{"0":{"340":1}}],["自动化工作流",{"2":{"12":1}}],["自动清理旧日志",{"0":{"310":1}}],["自动保存到",{"2":{"303":1}}],["自动保存到配置文件",{"2":{"138":1}}],["自动开启控制台和文件输出",{"2":{"296":1}}],["自动切换",{"2":{"259":1}}],["自动创建授权角色",{"2":{"234":1}}],["自动创建",{"2":{"232":1,"234":3,"238":2,"239":2,"240":1,"241":1,"242":1,"252":1,"422":1}}],["自动创建存储桶",{"2":{"232":1,"234":1}}],["自动构建+部署",{"2":{"195":1}}],["自动验证",{"2":{"149":1}}],["自动进行健康检查",{"2":{"149":1}}],["自动选择",{"2":{"288":1}}],["自动选择部署目标",{"2":{"145":1}}],["自动选择构建方式",{"2":{"135":1}}],["自动生成和管理",{"2":{"230":1,"245":1,"255":1}}],["自动生成",{"2":{"141":1,"224":1}}],["自动管理的字段",{"0":{"230":1,"245":1,"255":1}}],["自动管理",{"0":{"134":1},"2":{"321":1}}],["自动识别",{"2":{"129":1}}],["自动使用全局配置",{"2":{"126":1}}],["自动处理工具调用",{"2":{"453":1}}],["自动处理",{"2":{"96":1}}],["自动分析你的",{"2":{"95":1}}],["自动检测",{"2":{"90":1,"286":1}}],["自动完成构建和部署两个步骤",{"2":{"80":1}}],["引导您选择模板",{"2":{"89":1}}],["引导您完成配置",{"2":{"61":1}}],["当长期记忆后端为",{"2":{"431":2}}],["当多种配置方式同时存在时",{"2":{"312":1}}],["当开启文件日志后",{"2":{"309":1}}],["当项目配置为空或",{"2":{"266":1}}],["当配置值为",{"2":{"234":1}}],["当未显式配置",{"2":{"217":1}}],["当流式事件包含",{"2":{"158":1}}],["当前架构",{"2":{"288":1}}],["当前系统架构",{"2":{"262":1}}],["当前时间戳",{"2":{"233":1}}],["当前变量",{"2":{"124":1}}],["当前目录没有配置文件",{"2":{"198":1}}],["当前目录的",{"2":{"158":1}}],["当前目录",{"2":{"87":1}}],["当你运行包装模式命令后",{"2":{"93":1}}],["当你运行模板模式命令后",{"2":{"92":1}}],["当您已经拥有成熟的",{"2":{"90":1}}],["当自动检测失败时",{"2":{"86":1}}],["标准路由",{"2":{"325":1}}],["标准的",{"2":{"322":1,"324":1}}],["标准对话",{"2":{"98":1}}],["标准",{"2":{"86":1}}],["对",{"2":{"447":2}}],["对话历史",{"2":{"427":1}}],["对比项",{"2":{"248":1}}],["对外提供服务",{"2":{"142":1}}],["对象存储前缀",{"2":{"245":1}}],["对象存储桶",{"2":{"238":1}}],["对象存储配置",{"2":{"232":1}}],["对象前缀",{"2":{"115":1}}],["对象通过复杂的逻辑生成",{"2":{"97":1}}],["对象",{"2":{"96":1}}],["对象定义",{"2":{"95":1,"97":1}}],["对象在文件中的变量名",{"2":{"86":1}}],["对于",{"2":{"90":1,"429":2,"439":1}}],["对于临时开发调试",{"2":{"27":1}}],["必填项缺失",{"0":{"281":1}}],["必填项检查",{"2":{"125":1}}],["必填",{"0":{"210":1,"211":1,"216":1},"2":{"113":1,"208":2,"286":1}}],["必须通过参数传入",{"2":{"383":1}}],["必须继承自",{"2":{"383":1,"388":1}}],["必须为英文",{"2":{"368":1}}],["必须为当前账号名下的桶",{"2":{"238":1}}],["必须有类型注解",{"2":{"367":1}}],["必须配置",{"2":{"243":1}}],["必须与代码中的端口一致",{"2":{"223":1}}],["必须提供消息内容或",{"2":{"157":1}}],["必须",{"2":{"109":1}}],["必须在模块级别",{"2":{"97":1}}],["必须包含",{"2":{"97":1}}],["必须是异步函数",{"2":{"354":1}}],["必须是",{"2":{"97":1,"125":1,"211":1}}],["必须使用",{"2":{"33":1}}],["必需配置",{"2":{"419":2}}],["必需",{"2":{"86":1,"408":1}}],["你们有什么产品",{"2":{"443":1}}],["你需要做以下修改",{"2":{"414":1,"430":1,"440":1}}],["你可以完全自定义日志行为",{"2":{"297":1}}],["你可以通过",{"2":{"112":1,"113":1}}],["你可以根据需要自由修改",{"2":{"101":1}}],["你的secretkey",{"2":{"200":2}}],["你的accesskey",{"2":{"200":2}}],["你的消息",{"2":{"158":1}}],["你的原始",{"2":{"100":1}}],["你的",{"2":{"97":1}}],["你是一个专业的客服",{"2":{"85":1}}],["你好",{"2":{"39":3,"70":1,"158":3,"163":1}}],["塑造其角色和行为",{"2":{"85":1}}],["处理长时间运行的任务",{"2":{"363":1}}],["处理来自",{"2":{"350":1}}],["处理常见问题",{"2":{"212":1}}],["处理常见的用户问题",{"2":{"85":1}}],["处理请求",{"2":{"96":1}}],["处处运行",{"2":{"10":1}}],["示例值",{"2":{"233":1}}],["示例",{"0":{"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"160":1,"161":1,"162":1,"163":1},"2":{"85":1,"86":1,"89":6,"90":6,"109":1,"111":1,"115":1,"133":1,"139":4,"140":3,"148":2,"154":2,"158":5,"173":2,"182":3,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"218":1,"222":1,"237":1,"298":1,"312":1}}],["选一个",{"2":{"105":1}}],["选项2",{"2":{"318":1}}],["选项1",{"2":{"318":1}}],["选项之一",{"2":{"157":1}}],["选项约束",{"2":{"125":1}}],["选项",{"2":{"85":1,"86":1,"87":1,"103":2,"114":1,"115":1,"128":1,"143":1,"151":1,"157":1,"158":1,"167":1,"175":1,"213":1,"216":1,"217":1,"228":1}}],["选择云端服务运行的地理位置",{"2":{"250":1}}],["选择离用户最近的区域",{"2":{"236":1}}],["选择服务运行的地理位置",{"2":{"236":1}}],["选择平台服务使用",{"2":{"217":1}}],["选择在哪里构建和运行",{"2":{"216":1}}],["选择项目模板",{"2":{"85":1}}],["选择",{"2":{"37":1,"70":1}}],["选择模板",{"2":{"36":1}}],["选择或创建一个新的",{"2":{"32":1}}],["数据分析",{"2":{"437":1}}],["数据分析等",{"2":{"39":1}}],["数据泄露或恶意访问风险",{"2":{"397":1}}],["数据库等",{"2":{"388":1}}],["数据面",{"2":{"329":1}}],["数据目录",{"2":{"227":1}}],["数据将永久丢失",{"2":{"183":1}}],["数字",{"2":{"84":1,"125":1,"210":1}}],["只创建一次",{"2":{"394":1}}],["只开启控制台日志",{"2":{"318":1}}],["只记录警告和错误",{"2":{"306":1,"320":1}}],["只看重要信息",{"2":{"316":1}}],["只看致命错误",{"2":{"300":1}}],["只看失败的操作",{"2":{"300":1}}],["只能用字母",{"2":{"210":1}}],["只能选一个",{"2":{"165":1}}],["只能包含字母",{"2":{"84":1}}],["只修改部分配置",{"2":{"106":1}}],["只需几分钟",{"2":{"70":1}}],["约束",{"2":{"84":1}}],["为准备好的后端",{"2":{"452":1}}],["为企业客户提供高效",{"2":{"437":1}}],["为智能体导入知识库agentkit",{"2":{"438":1}}],["为智能体创建知识库vikingdb",{"2":{"437":1}}],["为智能体创建记忆库agentkit",{"2":{"428":1}}],["为智能体添加代码执行工具",{"2":{"414":1}}],["为不同的",{"2":{"397":1}}],["为不同环境创建独立配置文件",{"2":{"269":1}}],["为您解决什么",{"0":{"397":1}}],["为您的沙箱工具实例",{"2":{"414":1}}],["为您的项目和",{"2":{"90":1}}],["为您的",{"2":{"84":1}}],["为所有函数添加详细的文档字符串",{"2":{"393":1}}],["为什么用",{"0":{"155":1}}],["为部署做准备",{"2":{"127":1}}],["为",{"2":{"113":2,"426":1,"430":1,"440":1}}],["为开发者提供完整的",{"2":{"9":1}}],["释放云端资源",{"2":{"180":1}}],["释放云资源",{"2":{"80":1}}],["释放资源",{"2":{"174":1}}],["释放相关资源",{"2":{"63":1}}],["下文将以",{"2":{"451":1}}],["下载文件",{"2":{"412":1}}],["下载额外资源",{"2":{"260":1}}],["下划线",{"2":{"84":1,"125":1}}],["下线服务",{"2":{"80":1}}],["下一步",{"0":{"28":1,"40":1,"78":1,"203":1,"289":1,"347":1,"395":1}}],["逻辑时",{"2":{"90":1}}],["逻辑",{"2":{"80":1,"382":1}}],["调整日志级别",{"2":{"316":1}}],["调试等功能",{"2":{"430":1,"440":1}}],["调试问题",{"0":{"304":1}}],["调试问题和追踪运行状态",{"2":{"290":1}}],["调试模式",{"0":{"296":1}}],["调试技巧",{"0":{"202":1}}],["调试用",{"2":{"158":2}}],["调试开关等特定环境配置",{"2":{"126":1}}],["调试标志",{"2":{"110":1}}],["调试",{"2":{"80":1}}],["调用时",{"2":{"422":1}}],["调用示例",{"0":{"423":1},"2":{"410":1,"425":1}}],["调用智能体",{"0":{"421":1},"1":{"422":1,"423":1,"424":1},"2":{"410":1,"425":1}}],["调用应用",{"2":{"410":1,"425":1}}],["调用端点",{"2":{"325":1}}],["调用前确保",{"2":{"165":1}}],["调用成功后",{"2":{"409":1,"424":1}}],["调用成功",{"2":{"164":1}}],["调用地址",{"2":{"164":1}}],["调用失败",{"0":{"54":1}}],["调用问题",{"0":{"53":1},"1":{"54":1,"55":1}}],["调用",{"0":{"39":1},"2":{"12":1,"353":1,"365":1}}],["测试环境",{"2":{"269":1}}],["测试验证",{"2":{"195":2}}],["测试",{"2":{"195":2,"196":3}}],["测试功能",{"2":{"193":1,"194":1}}],["测试调用",{"2":{"80":1}}],["测试您的",{"2":{"70":1}}],["启动本地开发服务器",{"2":{"453":1}}],["启动服务",{"0":{"432":1,"442":1}}],["启动到生产环境",{"2":{"154":1}}],["启动新容器",{"2":{"146":1}}],["启动新",{"2":{"80":1}}],["启动开发服务器",{"0":{"3":1}}],["遵循标准的",{"2":{"80":1}}],["还是测试和迭代您的",{"2":{"79":1}}],["还是在生产环境中进行规模化部署",{"2":{"60":1}}],["交互流程示例",{"2":{"105":1}}],["交互式配置",{"2":{"270":1}}],["交互式模式",{"0":{"105":1}}],["交互式",{"0":{"117":1},"2":{"102":1}}],["交互式创建",{"2":{"89":1}}],["交互的核心工具",{"2":{"79":1}}],["交互之前",{"2":{"25":1}}],["跟随教程实践",{"2":{"203":1}}],["跟随端到端的教程",{"2":{"78":1}}],["跟随我们的快速开始指南",{"2":{"28":1}}],["掌握",{"2":{"78":1}}],["⚙️",{"2":{"78":1}}],["深度融合",{"2":{"401":1}}],["深度研究报告",{"2":{"39":1}}],["深入了解每个配置项",{"2":{"203":1}}],["深入了解每个",{"2":{"78":1}}],["☁️",{"0":{"77":1,"137":1,"147":1,"171":1,"180":1}}],["已存在",{"2":{"261":1}}],["已存在时",{"2":{"113":1}}],["已废弃",{"2":{"214":1}}],["已停止",{"2":{"172":1}}],["已部署",{"2":{"165":1}}],["已就绪",{"2":{"147":1}}],["已添加",{"2":{"124":1}}],["已有",{"2":{"99":1}}],["已安装并运行",{"2":{"141":1}}],["已安装",{"2":{"73":1}}],["已成功启动",{"2":{"153":1}}],["已成功运行",{"2":{"39":1}}],["已成功安装",{"2":{"24":1}}],["探索更多功能",{"0":{"71":1}}],["探索其他应用模板",{"2":{"40":1}}],["适合工具数量大",{"2":{"447":1}}],["适合工具规模可控与明确场景",{"2":{"446":1}}],["适合日常使用",{"2":{"302":1}}],["适合正式上线",{"2":{"276":1}}],["适合快速开发和调试",{"2":{"274":1}}],["适合快速入门",{"2":{"92":1}}],["适合生产环境",{"2":{"231":1}}],["适合开发调试阶段",{"2":{"246":1}}],["适合开发调试",{"2":{"219":1}}],["适合场景",{"2":{"216":1}}],["适合出行",{"2":{"164":1}}],["适合脚本",{"0":{"106":1}}],["适合使用模板模式的场景",{"2":{"99":1}}],["适合使用包装模式的场景",{"2":{"99":1}}],["适合从零开始的开发者",{"2":{"82":1}}],["适合需要自定义构建流程的场景",{"2":{"68":1}}],["适用于前端应用访问",{"2":{"448":1}}],["适用于标准的",{"2":{"325":1}}],["适用于所有部署模式",{"2":{"206":1}}],["适用于高性能场景",{"2":{"75":1}}],["适用于开发者和需要定制化场景",{"2":{"22":1}}],["适用于生产环境部署",{"2":{"18":1}}],["适用场景",{"0":{"12":1},"2":{"98":1,"129":1,"248":1,"300":1,"446":1,"447":1}}],["兼顾本地构建的灵活性和云端运行环境的稳定性",{"2":{"68":1}}],["安全与隔离挑战",{"2":{"397":1}}],["安全优先",{"2":{"321":1}}],["安全管理敏感信息",{"0":{"270":1}}],["安全说明",{"2":{"238":1}}],["安全删除",{"2":{"182":1}}],["安全确认",{"0":{"177":1}}],["安全可靠",{"2":{"67":1}}],["安装参考",{"2":{"451":1}}],["安装核心依赖",{"2":{"404":1}}],["安装指南请参考",{"2":{"404":1}}],["安装编译工具",{"2":{"133":1}}],["安装系统依赖",{"2":{"132":1,"133":1,"140":1,"260":1}}],["安装的可执行文件路径未被添加到系统的",{"2":{"43":1}}],["安装问题",{"0":{"42":1},"1":{"43":1,"44":1}}],["安装完成后",{"2":{"24":1}}],["安装特定版本",{"2":{"20":1}}],["安装方法",{"0":{"16":1},"1":{"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1}}],["安装",{"0":{"14":1,"17":1,"21":1,"35":1,"344":1},"1":{"15":1,"16":1,"17":1,"18":2,"19":2,"20":2,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1},"2":{"13":1,"35":1}}],["安装依赖",{"0":{"2":1},"2":{"451":1}}],["生命周期",{"2":{"422":1}}],["生产就绪",{"0":{"341":1}}],["生产部署建议",{"0":{"320":1}}],["生产配置不提交",{"2":{"270":1}}],["生产",{"2":{"269":1}}],["生产环境建议使用持久化存储",{"2":{"388":1}}],["生产环境只记录警告和错误到文件",{"2":{"306":1}}],["生产环境推荐开启",{"2":{"276":1}}],["生产环境的天气查询",{"2":{"276":1}}],["生产环境配置",{"0":{"276":1},"2":{"320":1}}],["生产环境使用云端部署",{"2":{"271":1}}],["生产环境",{"0":{"306":1},"2":{"196":1,"216":2,"248":1,"269":1}}],["生产环境间切换",{"2":{"196":1}}],["生产级",{"2":{"67":1,"68":1}}],["生效",{"2":{"113":1}}],["生成的包装器",{"2":{"100":1}}],["生成的包装器文件负责",{"2":{"96":1}}],["生成的包装器类型",{"2":{"86":1}}],["生成",{"2":{"95":1,"136":1,"137":1,"147":1}}],["生成包装器",{"2":{"95":1}}],["生成流式输出包装器",{"2":{"90":1}}],["生成配置",{"2":{"47":1}}],["生成报告",{"2":{"12":1}}],["上下文感知和个性化交互",{"2":{"426":1}}],["上下文窗口不足的问题",{"2":{"426":1}}],["上构建和运行",{"2":{"219":1}}],["上传+云端构建",{"2":{"248":1}}],["上传到对象存储",{"2":{"137":1}}],["上传至云端镜像仓库",{"2":{"68":1}}],["上线或更新",{"2":{"80":1}}],["上",{"2":{"67":1}}],["迭代速度快",{"2":{"66":1}}],["→",{"2":{"66":2,"67":3,"68":3}}],["源代码",{"2":{"66":1,"67":1,"68":1}}],["源码安装",{"0":{"22":1},"1":{"23":1}}],["工作原理",{"0":{"95":1}}],["工作流",{"2":{"66":1,"67":1,"68":1}}],["工具全集",{"2":{"447":1}}],["工具集",{"0":{"447":1},"2":{"445":1}}],["工具实例支持基于会话的智能调度管理",{"2":{"422":1}}],["工具实例调用机制",{"0":{"422":1}}],["工具的执行结果",{"2":{"367":1}}],["工具的输入参数",{"2":{"367":1}}],["工具聚合和智能路由",{"2":{"331":1}}],["工具会阻止上传并提示更换",{"2":{"238":1}}],["工具管理",{"2":{"190":1}}],["工具和",{"2":{"64":1,"190":1}}],["工具链",{"2":{"10":1}}],["工具",{"2":{"10":1,"326":2,"331":1,"364":1,"365":1,"372":1,"414":1,"416":1}}],["旨在为您提供一个安全",{"2":{"396":1}}],["旨在简化和自动化",{"2":{"79":1}}],["旨在简化和加速",{"2":{"60":1}}],["旨在适应从开发到生产的不同阶段",{"2":{"65":1}}],["平台轻松关联知识库",{"2":{"435":1}}],["平台部署",{"2":{"410":1,"425":1}}],["平台服务提供方",{"2":{"217":1}}],["平台服务命令",{"0":{"64":1,"187":1},"1":{"188":1,"189":1,"190":1,"191":1}}],["平台",{"2":{"94":1,"396":1,"410":1,"418":1,"425":1}}],["平台通过标准化的开发工具链和云原生基础设施",{"2":{"9":1}}],["用途",{"2":{"210":1,"211":1,"212":1,"213":1,"215":1,"217":1,"218":1}}],["用户的自然语言请求",{"2":{"409":1,"423":1}}],["用户的天气查询",{"2":{"374":1}}],["用户标识符",{"2":{"409":1,"423":1}}],["用户",{"2":{"352":1}}],["用户输入的提示词",{"2":{"352":1}}],["用户身份",{"2":{"335":1}}],["用户级配置",{"2":{"205":1}}],["用户也可手动指定",{"2":{"37":1}}],["用",{"2":{"158":2,"165":1,"287":1}}],["用于调用",{"2":{"453":1}}],["用于关联沙箱实例",{"2":{"423":1}}],["用于标识用户会话",{"2":{"416":1}}],["用于持久化",{"2":{"384":1}}],["用于发送中间结果",{"2":{"382":1}}],["用于构建",{"2":{"364":1,"377":1}}],["用于构建可互相通信的",{"2":{"327":1}}],["用于定义异步任务",{"2":{"363":1}}],["用于",{"2":{"356":1}}],["用于访问",{"2":{"328":1}}],["用于将工具封装为",{"2":{"326":1}}],["用于快速构建不同类型的",{"2":{"348":1}}],["用于快速构建符合",{"2":{"322":1}}],["用于快速测试",{"2":{"63":1}}],["用于存储本地构建的镜像",{"2":{"252":1}}],["用于云端构建",{"2":{"238":1}}],["用于管理和路由大量",{"2":{"331":1}}],["用于管理",{"2":{"187":1,"332":1}}],["用于身份验证",{"2":{"158":1}}],["用于安装系统依赖",{"2":{"131":1}}],["用于跨项目共享配置",{"2":{"115":1}}],["智能推荐",{"2":{"437":1}}],["智能的自动化客服解决方案",{"2":{"437":1}}],["智能体可以根据用户输入的问题",{"2":{"430":1,"440":1}}],["智能体代码示例",{"0":{"414":1},"1":{"415":1,"416":1}}],["智能体代码概览",{"0":{"407":1}}],["智能客服系统支持哪些语言",{"2":{"437":1}}],["智能客服系统",{"2":{"437":1}}],["智能客服知识库",{"2":{"437":1}}],["智能客服",{"2":{"85":1}}],["智能交互",{"2":{"61":1}}],["智能问答机器人",{"2":{"12":1}}],["一切就绪后",{"2":{"409":1}}],["一个开通了",{"2":{"450":1}}],["一个已开通",{"2":{"403":1}}],["一个命令代替两个",{"2":{"155":1}}],["一个具备联网和代码执行能力的",{"2":{"89":1}}],["一步完成",{"2":{"150":1}}],["一般不需要手动设置",{"2":{"129":1}}],["一次性返回完整结果",{"2":{"98":1}}],["一次定义",{"2":{"10":1}}],["一键更新",{"2":{"195":1}}],["一键部署",{"2":{"193":1,"194":1,"401":1}}],["一键部署到云端",{"2":{"70":1}}],["一键启动",{"2":{"80":1,"154":1}}],["一键完成构建和部署",{"2":{"63":1}}],["一键式操作",{"2":{"61":1}}],["满足不同应用场景的需求",{"2":{"401":1}}],["满足不同场景需求",{"2":{"61":1}}],["满足不同技术栈需求",{"2":{"10":1}}],["清空所有",{"2":{"124":1}}],["清晰的描述",{"2":{"376":1}}],["清晰",{"2":{"61":1}}],["清理资源",{"2":{"70":1,"80":1}}],["清理后重新部署",{"2":{"52":1}}],["清理环境重新安装",{"2":{"44":1}}],["声明式配置",{"2":{"61":1}}],["声明式应用定义",{"2":{"10":1}}],["无流量时资源自动缩减至零",{"2":{"399":1}}],["无参数",{"2":{"358":1,"361":1}}],["无参数运行",{"2":{"105":1}}],["无输出",{"2":{"306":1}}],["无日志文件生成",{"2":{"302":1,"307":1}}],["无日志输出",{"2":{"302":2,"307":1}}],["无",{"2":{"260":1,"288":1}}],["无特殊要求",{"2":{"98":1}}],["无论您是初始化新项目",{"2":{"79":1}}],["无论您是进行本地快速原型验证",{"2":{"60":1}}],["无需关心底层服务器和复杂的环境配置",{"2":{"399":1}}],["无需设置环境变量",{"2":{"307":1}}],["无需任何配置",{"2":{"302":1}}],["无需手动输入",{"2":{"106":1}}],["无需重写代码",{"2":{"94":1}}],["无需本地",{"2":{"67":1}}],["无需从零开始",{"2":{"61":1}}],["无缝支持本地开发",{"2":{"61":1}}],["无缝集成",{"2":{"10":1}}],["概览",{"0":{"60":1,"322":1},"1":{"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1},"2":{"289":1,"395":1}}],["附上相关配置文件",{"2":{"59":1}}],["联系我们",{"2":{"437":1}}],["联系火山引擎技术支持",{"2":{"59":1}}],["联系支持",{"2":{"59":1}}],["联系管理员授予必要权限",{"2":{"58":1}}],["联系管理员分配相关权限",{"2":{"57":1}}],["角色配置",{"2":{"58":1}}],["账号隔离的存储桶",{"2":{"233":1}}],["账号隔离的",{"2":{"233":1}}],["账号没有足够的权限执行操作",{"2":{"58":1}}],["账号配额不足",{"2":{"49":1}}],["认证模式的区分",{"2":{"448":1}}],["认证链路优先采用",{"2":{"448":1}}],["认证与安全",{"0":{"448":1}}],["认证在服务级别预制",{"2":{"446":1}}],["认证凭证管理",{"2":{"334":1}}],["认证失败",{"0":{"57":1}}],["认证配置",{"0":{"25":1},"1":{"26":1,"27":1}}],["权限不足",{"2":{"282":1}}],["权限问题",{"0":{"56":1},"1":{"57":1,"58":1},"2":{"201":1}}],["权限",{"2":{"55":1,"403":1,"450":1}}],["地址正确",{"2":{"54":1}}],["内建监控与日志",{"2":{"399":1}}],["内存",{"2":{"229":1,"453":10}}],["内存限制",{"2":{"220":1}}],["内置了会话管理逻辑",{"2":{"407":1}}],["内置了灵活的日志系统",{"2":{"290":1}}],["内置",{"2":{"340":1}}],["内置可观测性",{"2":{"67":1}}],["内置多种应用模板",{"2":{"61":1}}],["内置丰富的",{"2":{"10":1}}],["内部异常",{"2":{"52":1}}],["后续将逐步增加日语",{"2":{"437":1}}],["后续将通过环境变量model",{"2":{"32":1}}],["后续配置中会用到",{"2":{"413":1}}],["后",{"2":{"158":1}}],["后重新部署",{"2":{"51":1}}],["尝试构建",{"2":{"272":1}}],["尝试使用",{"2":{"52":1}}],["尝试",{"2":{"51":1}}],["状态说明",{"0":{"172":1}}],["状态为",{"2":{"52":1,"54":1}}],["状态异常",{"0":{"52":1}}],["状态",{"2":{"51":1,"149":1,"332":1,"453":10}}],["function",{"2":{"424":1,"453":1}}],["full",{"2":{"230":1,"245":1,"255":2}}],["fully",{"2":{"134":1,"282":1}}],["float",{"2":{"393":4}}],["fetching",{"2":{"453":1}}],["fetch",{"2":{"369":1}}],["f",{"2":{"86":1,"90":2,"101":1,"346":1,"355":4,"360":2,"368":2,"387":3,"390":3,"391":3,"407":1,"430":2,"440":2,"453":3}}],["failure",{"2":{"228":1}}],["failed",{"2":{"50":1,"52":1,"172":1,"355":1,"360":1,"391":1,"424":1}}],["false",{"2":{"129":1,"191":1,"257":1,"261":1,"288":1,"298":4,"424":9}}],["faq",{"2":{"84":1,"437":1}}],["filters=query",{"2":{"371":1}}],["filters",{"2":{"371":2}}],["file=$home",{"2":{"311":1}}],["file=",{"2":{"305":1,"306":1,"311":1,"319":1,"320":1}}],["file",{"0":{"215":1},"2":{"93":3,"109":1,"129":1,"132":1,"134":1,"139":2,"144":1,"148":1,"152":1,"154":1,"158":1,"168":1,"173":1,"176":1,"182":1,"196":4,"198":1,"208":1,"215":3,"269":2,"275":1,"279":1,"286":1,"293":1,"295":1,"296":1,"298":2,"299":2,"303":1,"304":1,"305":2,"306":2,"307":1,"309":1,"314":2,"318":2,"319":1,"320":2,"321":4,"407":1}}],["files",{"2":{"92":2,"93":2}}],["file>",{"2":{"83":1}}],["find",{"2":{"310":1,"453":1}}],["financial",{"2":{"210":1}}],["field",{"2":{"282":1,"355":2}}],["first",{"2":{"70":5,"89":1}}],["from",{"2":{"83":1,"86":2,"90":4,"97":1,"100":3,"194":1,"345":2,"346":1,"353":2,"360":1,"371":1,"374":1,"381":4,"382":2,"387":2,"407":7,"415":2,"424":2,"430":3,"440":3,"453":4}}],["ff20ce223",{"2":{"50":1}}],["following",{"2":{"430":1,"440":1}}],["found",{"2":{"43":1,"198":1,"279":1,"368":1}}],["format",{"2":{"280":1,"407":1}}],["force",{"2":{"176":1,"177":1,"182":1}}],["for",{"2":{"21":2,"368":1,"407":2,"409":3,"424":6,"430":2,"453":1}}],["实时更新",{"2":{"437":1}}],["实时输出",{"2":{"98":1}}],["实例9",{"2":{"453":1}}],["实例8",{"2":{"453":1}}],["实例7",{"2":{"453":1}}],["实例6",{"2":{"453":1}}],["实例5",{"2":{"453":1}}],["实例4",{"2":{"453":1}}],["实例3",{"2":{"453":1}}],["实例2",{"2":{"453":1}}],["实例规格",{"2":{"453":10}}],["实例id",{"2":{"453":10}}],["实例10",{"2":{"453":1}}],["实例1",{"2":{"453":1}}],["实例和",{"2":{"267":1}}],["实例名",{"2":{"232":1,"239":1,"247":1,"287":1}}],["实例名称",{"2":{"49":1,"115":1}}],["实例及相关资源",{"2":{"80":1}}],["实例",{"2":{"63":1,"174":1,"180":1,"233":1,"234":1,"239":1,"245":1,"252":1,"255":1,"332":1,"383":1,"399":1}}],["实例数量超出配额限制",{"2":{"49":1}}],["实现在",{"2":{"435":1}}],["实现长期记忆功能",{"2":{"427":1}}],["实现了与",{"2":{"407":1}}],["实现无人值守的弹性伸缩",{"2":{"399":1}}],["实现真正的",{"2":{"399":1}}],["实现逻辑",{"2":{"393":1}}],["实现必需方法",{"2":{"388":1}}],["实现搜索逻辑",{"2":{"371":1}}],["实现代码复用",{"2":{"82":1}}],["实现任务的分解",{"2":{"10":1}}],["实现",{"2":{"10":1,"96":1,"329":1,"372":1,"383":1,"388":1,"426":1}}],["oauth",{"2":{"446":1,"448":1}}],["oauth2",{"2":{"444":1,"448":2}}],["os",{"2":{"430":2,"440":2}}],["occur",{"2":{"430":1,"440":1}}],["occurred",{"2":{"390":1}}],["otherwise",{"2":{"430":1,"440":1}}],["outbound",{"2":{"448":1}}],["outputs",{"2":{"424":1}}],["output",{"2":{"409":28,"424":2,"453":2}}],["ough",{"2":{"409":1}}],["ok",{"2":{"358":1,"360":1,"409":1,"424":2}}],["obtain",{"2":{"407":1}}],["object",{"2":{"245":2,"453":1}}],["observability",{"2":{"243":3,"276":3}}],["optional",{"2":{"371":2}}],["options",{"2":{"80":1,"83":2,"407":1}}],["opentelemetry",{"2":{"243":3,"276":3,"340":1}}],["one",{"2":{"411":1,"430":1,"453":1}}],["on",{"2":{"228":1,"407":1,"409":3,"453":1}}],["only",{"2":{"23":1}}],["overseas",{"2":{"217":1}}],["org",{"2":{"407":1}}],["or",{"2":{"200":1,"407":4,"453":1}}],["old",{"2":{"120":1}}],["of",{"2":{"49":1,"407":2,"429":1,"430":2,"440":1}}],["格式错误",{"0":{"280":1}}],["格式指定",{"2":{"158":1}}],["格式指定完整的请求内容",{"2":{"158":1}}],["格式验证",{"2":{"125":1}}],["格式",{"2":{"80":1,"115":1,"226":1,"227":1}}],["格式是否正确",{"2":{"47":1}}],["格式如20251218154940",{"2":{"37":1}}],["确定要继续吗",{"2":{"177":1}}],["确保agentkit",{"2":{"425":1}}],["确保所有依赖都已正确配置在",{"2":{"410":1,"425":2}}],["确保多轮对话的连续性",{"2":{"407":1}}],["确保每个",{"2":{"400":1}}],["确保每次构建唯一",{"2":{"237":1}}],["确保环境变量正确",{"2":{"314":1}}],["确保之前的环境变量不影响",{"2":{"307":1}}],["确保配置文件始终有效",{"2":{"272":1}}],["确保有",{"2":{"201":1}}],["确保构建和部署使用同一配置",{"2":{"155":1}}],["确保网络能访问火山引擎",{"2":{"141":1}}],["确保",{"2":{"76":1,"141":1}}],["确保没有多余的空格或引号",{"2":{"46":1}}],["确认环境变量位置正确",{"2":{"283":1}}],["确认账号有相应资源的操作权限",{"2":{"58":1}}],["确认模型配额是否用尽",{"2":{"55":1}}],["确认方舟模型",{"2":{"55":1}}],["确认",{"2":{"54":2,"57":2}}],["确认应用代码没有启动时错误",{"2":{"52":1}}],["确认依赖版本是否兼容",{"2":{"50":1}}],["确认已设置必需的环境变量",{"2":{"46":1}}],["确认安装路径",{"2":{"43":1}}],["$agentkit",{"2":{"314":1}}],["$volc",{"2":{"282":2}}],["$volcengine",{"2":{"46":2}}],["$tag",{"2":{"126":1}}],["$project",{"2":{"126":1}}],["$path",{"2":{"43":1}}],["$",{"2":{"123":2,"293":1,"305":1,"321":1}}],["建议您等待约",{"2":{"434":1}}],["建议返回",{"2":{"367":1,"370":1}}],["建议在函数内部处理异常",{"2":{"354":1}}],["建议定期清理",{"2":{"310":1}}],["建议",{"2":{"236":1}}],["建议从",{"2":{"90":1}}],["建议先卸载再重新安装",{"2":{"44":1}}],["建议自动即可",{"2":{"37":1}}],["报告依赖版本冲突",{"2":{"44":1}}],["报告员",{"2":{"12":1}}],["时可能需要",{"2":{"158":1}}],["时生效",{"2":{"113":2}}],["时下发清空",{"2":{"112":1}}],["时自动透传到",{"2":{"112":1}}],["时提示连接失败或超时",{"2":{"54":1}}],["时提示配置文件解析失败",{"2":{"47":1}}],["时",{"2":{"44":1,"158":1,"217":1,"234":1,"266":1,"431":2}}],["时通过",{"2":{"33":2}}],["应专注于特定领域",{"2":{"376":1}}],["应在",{"2":{"361":1}}],["应该是",{"2":{"314":1}}],["应该能找到",{"2":{"43":1}}],["应用入口设置为您刚才已经调通的应用代码simple",{"2":{"425":1}}],["应用入口文件",{"2":{"37":1}}],["应用框架层",{"2":{"336":1}}],["应用框架",{"0":{"324":1},"1":{"325":1,"326":1,"327":1}}],["应用访问地址",{"2":{"245":1,"255":1}}],["应用端口",{"2":{"220":1}}],["应用级",{"2":{"110":2,"126":1}}],["应用级环境变量被所有",{"2":{"110":1}}],["应用级环境变量",{"2":{"105":1,"124":1,"206":1,"208":1,"218":1,"286":1}}],["应用构建为",{"2":{"63":1}}],["应用的参数",{"2":{"102":1}}],["应用的开发",{"2":{"60":1}}],["应用的入口文件",{"2":{"36":1}}],["应用描述信息",{"2":{"37":1}}],["应用描述",{"2":{"37":1,"105":1,"109":1}}],["应用名称",{"2":{"37":2}}],["应用",{"2":{"36":1,"39":1,"62":1,"78":1,"79":1,"322":1,"325":1,"330":1,"348":1,"377":1,"381":1}}],["应用执行",{"2":{"11":1}}],["应用定义",{"2":{"11":1}}],["这会自动生成一个包含",{"2":{"406":1}}],["这里有解决方案",{"2":{"197":1}}],["这是不可逆操作",{"2":{"174":1}}],["这通常是由于",{"2":{"43":1}}],["这种模式结合了本地控制和云端能力的优点",{"2":{"68":1}}],["这种方式将凭证安全地存储在",{"2":{"26":1}}],["这种分离的设计使得开发者可以专注于业务逻辑的实现",{"2":{"11":1}}],["现存的",{"2":{"450":1}}],["现存支持",{"2":{"450":1}}],["现在",{"2":{"409":1}}],["现在可以在控制台看到日志了",{"2":{"294":1}}],["现在您已经成功安装并配置了",{"2":{"28":1}}],["现象",{"2":{"43":1,"44":1,"46":1,"47":1,"49":1,"50":1,"51":1,"52":1,"54":1,"55":1,"57":1,"58":1}}],["集成代码页面",{"2":{"429":1,"439":1}}],["集成",{"0":{"123":1},"2":{"40":1,"80":1}}],["以上10个实例均为按量计费",{"2":{"453":1}}],["以语义检索选择最优工具",{"2":{"447":1}}],["以向量检索选择高匹配度工具",{"2":{"447":1}}],["以共享实例",{"2":{"444":1}}],["以下是您的ecs实例详情",{"2":{"453":1}}],["以下示例展示了如何使用",{"2":{"427":1,"430":1,"440":1}}],["以下示例将使用",{"2":{"404":1}}],["以下代码展示了如何使用",{"2":{"414":1}}],["以下字段由",{"2":{"230":1,"245":1,"255":1}}],["以便实时监控",{"2":{"397":1}}],["以及",{"2":{"448":1}}],["以及跨工具的语义搜索能力",{"2":{"444":1}}],["以及资源绑定字段",{"2":{"191":1}}],["以及软件开发",{"2":{"39":1}}],["以逗号分隔的工具列表",{"2":{"85":1}}],["以交互或非交互方式管理项目配置",{"2":{"80":1}}],["以避免与系统级的",{"2":{"44":1}}],["以避免与系统包产生冲突",{"2":{"15":1}}],["撰写多章节文章",{"2":{"39":1}}],["擅长数据科学",{"2":{"39":1}}],["我的运行时",{"2":{"191":1}}],["我的工具",{"2":{"190":1}}],["我的记忆集合",{"2":{"188":1}}],["我的天气查询",{"2":{"105":1}}],["我的",{"2":{"97":1}}],["我很乐意为你提供帮助",{"2":{"39":1}}],["我是由",{"2":{"39":1}}],["我们使用",{"2":{"453":1}}],["我们的系统支持通过",{"2":{"437":1}}],["我们的核心产品是",{"2":{"437":1}}],["我们需要更换session",{"2":{"434":1}}],["我们推荐您使用",{"2":{"430":1}}],["我们推荐您使用agentkit",{"2":{"414":1}}],["我们推荐使用",{"2":{"21":1,"404":1}}],["我们强烈推荐您使用",{"2":{"406":1}}],["我们强烈建议使用",{"2":{"69":1}}],["我们强烈建议在",{"2":{"15":1}}],["😄",{"2":{"409":2}}],["📁",{"2":{"321":1}}],["📊",{"2":{"321":1}}],["📱",{"0":{"274":1}}],["🗑️",{"2":{"177":1,"181":1}}],["📡",{"2":{"164":1}}],["💬",{"2":{"164":1}}],["🔒",{"2":{"155":1,"321":1}}],["🔨",{"2":{"136":1,"137":1,"153":2}}],["🔧",{"0":{"130":1},"1":{"131":1,"132":1,"133":1,"134":1},"2":{"321":1}}],["📋",{"2":{"124":1}}],["🗂️",{"2":{"122":1}}],["🔍",{"2":{"120":1}}],["🔀",{"0":{"107":1}}],["🔐",{"0":{"270":1},"2":{"105":1,"122":1,"124":1}}],["📦",{"2":{"105":1,"122":1}}],["📄",{"2":{"105":1}}],["🔄",{"0":{"194":1,"195":1},"2":{"93":1,"172":2}}],["🚀",{"2":{"78":1,"105":1,"146":1,"147":1,"153":2,"155":1,"203":1,"289":1}}],["📖",{"2":{"78":1,"203":1,"289":1}}],["🐳",{"0":{"76":1}}],["🐹",{"0":{"75":1}}],["🐍",{"0":{"74":1},"2":{"105":1}}],["📝",{"0":{"193":1,"271":1},"2":{"39":1,"105":1,"122":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"419":1}}],["💡",{"0":{"202":1},"2":{"37":1,"111":1,"112":1,"183":1,"191":1,"236":1,"284":1,"291":1}}],["haversine",{"2":{"393":1}}],["helper`",{"2":{"453":1}}],["helper",{"2":{"453":3}}],["helpful",{"2":{"430":1}}],["help",{"0":{"185":1},"2":{"185":3,"453":1}}],["heavy",{"2":{"363":1}}],["healthy",{"2":{"170":1,"360":1}}],["health",{"2":{"170":1,"325":1,"360":1,"362":1}}],["header",{"2":{"134":1,"409":3,"423":3,"453":3}}],["headers=",{"2":{"453":1}}],["headers",{"2":{"39":1,"100":3,"158":2,"162":1,"338":1,"345":3,"351":1,"352":1,"353":3,"354":1,"355":1,"390":1,"391":2,"392":2,"394":2,"407":3,"415":3,"430":3,"434":1,"440":3,"452":1,"453":5}}],["here",{"2":{"163":1,"407":1}}],["h",{"2":{"123":1,"158":1}}],["host=agentkit",{"2":{"424":1}}],["host=",{"2":{"100":1,"345":1,"360":1,"381":1,"407":1,"415":1,"430":1,"440":1,"453":1}}],["hybrid",{"0":{"68":1,"76":1,"77":1,"111":1,"112":1,"113":1,"246":1,"287":1},"1":{"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1},"2":{"105":1,"109":1,"112":1,"113":1,"125":1,"206":2,"216":3,"247":1,"248":1,"249":1,"269":1,"275":2}}],["httpurl",{"2":{"452":1}}],["httpurl即为",{"2":{"452":1}}],["https",{"2":{"21":1,"37":3,"429":1,"437":2,"452":1,"453":1}}],["http",{"2":{"3":1,"96":1,"146":1,"147":1,"158":1,"164":1,"170":1,"171":2,"243":1,"276":1,"324":1,"334":1,"349":1,"381":1,"401":1,"407":1,"409":4,"420":1,"423":1,"424":1,"446":3,"450":1,"452":2,"453":2}}],["恭喜您完成了第一个",{"2":{"40":1}}],["恭喜您",{"2":{"39":1}}],["分级控制",{"2":{"321":1}}],["分别控制控制台和文件的日志级别",{"2":{"299":1}}],["分别指定",{"2":{"133":1}}],["分开执行",{"2":{"202":1}}],["分步执行",{"2":{"195":1,"202":1}}],["分钟仍未就绪",{"2":{"51":1}}],["分钟",{"2":{"37":1,"51":1,"136":1,"137":1,"147":1,"422":1,"434":1}}],["分析下我的ecs实例",{"2":{"453":1}}],["分析师",{"2":{"12":1}}],["分析数据并生成可视化报告的数据分析",{"2":{"12":1}}],["▶",{"2":{"37":1}}],["02",{"2":{"453":1}}],["06",{"2":{"453":1}}],["05+08",{"2":{"453":2}}],["05",{"2":{"453":1}}],["0x7f8b4f24b9b0>",{"2":{"453":1}}],["0xabcd",{"2":{"433":1,"434":1}}],["04uyfx",{"2":{"429":1}}],["09",{"2":{"291":4,"453":7}}],["00",{"2":{"134":1,"170":2,"171":2,"453":11}}],["01",{"2":{"37":1,"134":1,"170":1,"171":1,"409":28}}],["0",{"2":{"37":1,"100":4,"106":3,"111":2,"118":1,"119":2,"120":3,"222":1,"237":4,"274":1,"345":4,"381":4,"404":1,"407":6,"409":10,"415":4,"420":4,"424":11,"430":5,"440":5,"451":1,"453":15}}],["✅",{"0":{"73":1,"272":1},"2":{"37":2,"39":1,"99":7,"122":1,"124":1,"125":4,"136":1,"137":1,"141":10,"146":1,"147":3,"149":6,"153":2,"164":2,"170":2,"171":2,"172":2,"179":2,"180":2,"181":3,"183":2,"210":1,"211":1,"212":1,"213":2,"214":3,"215":1,"216":1,"217":2,"270":1,"280":4,"286":2,"291":2,"302":2,"303":2,"304":2,"305":2,"306":2,"307":2,"394":1}}],["不好的做法",{"2":{"394":1}}],["不指定",{"2":{"386":1}}],["不限制使用特定的",{"2":{"339":1}}],["不同",{"2":{"422":1}}],["不同场景使用不同日志级别",{"2":{"321":1}}],["不同部署模式的特定配置",{"2":{"69":1}}],["不记录日志",{"2":{"291":1}}],["不显示日志",{"2":{"291":1}}],["不部署",{"2":{"272":1}}],["不要用",{"2":{"280":1}}],["不要这样",{"2":{"270":1}}],["不要中断进程",{"2":{"37":1}}],["不存在时自动创建",{"2":{"240":1,"241":1}}],["不需要任何日志时",{"2":{"307":1}}],["不需要",{"2":{"248":1}}],["不需要手动配置",{"2":{"230":1,"245":1,"255":1}}],["不需要加任何选项标记",{"2":{"158":1}}],["不重启",{"2":{"228":1}}],["不可恢复",{"2":{"183":1}}],["不推荐用于生产",{"2":{"237":1}}],["不推荐",{"2":{"177":1}}],["不做",{"2":{"158":1}}],["不能和消息内容同时使用",{"2":{"158":1}}],["不能和",{"2":{"158":1}}],["不再自动管理该文件",{"2":{"134":1}}],["不支持修改网络配置",{"2":{"191":1}}],["不支持修改",{"2":{"113":1}}],["不支持的情况",{"2":{"97":1}}],["不写某个",{"2":{"112":1}}],["不会修改原文件",{"2":{"101":1}}],["不会",{"2":{"101":1}}],["不兼容的库版本",{"2":{"44":1}}],["不建议将包含敏感信息的",{"2":{"27":1}}],["提升工具命中与可靠性",{"2":{"444":1}}],["提升",{"2":{"435":1}}],["提取输入参数",{"2":{"353":1}}],["提醒",{"2":{"319":1}}],["提交到",{"2":{"270":1}}],["提示模型访问失败",{"2":{"55":1}}],["提示依赖安装错误",{"2":{"50":1}}],["提示无法连接到",{"2":{"46":1}}],["提示",{"2":{"37":2,"57":1,"58":1,"111":1,"141":1,"181":1,"191":1,"284":1,"403":1}}],["提供访问域名与会话保持",{"2":{"446":1}}],["提供用户问题统计与客服绩效报告",{"2":{"437":1}}],["提供主流的知识库的一键配置导入能力",{"2":{"435":1}}],["提供统一的",{"2":{"444":1}}],["提供统一的记忆库使用接口并与主流框架进行对接",{"2":{"426":1}}],["提供统一的配置和",{"2":{"334":1}}],["提供安全的代码执行环境",{"2":{"416":1}}],["提供文件系统能力",{"2":{"412":1}}],["提供terminal",{"2":{"412":1}}],["提供browser",{"2":{"412":1}}],["提供code",{"2":{"412":1}}],["提供的all",{"2":{"411":1}}],["提供的内置模板创建项目",{"2":{"82":1}}],["提供开箱即用的实时监控和日志系统",{"2":{"399":1}}],["提供标准的",{"2":{"349":1}}],["提供完整的生产环境支持",{"2":{"341":1}}],["提供便捷的客户端接口",{"2":{"328":1}}],["提供了智能体的开发",{"2":{"430":1,"440":1}}],["提供了丰富的平台服务管理命令",{"2":{"187":1}}],["提供了一套简洁的装饰器",{"2":{"348":1}}],["提供了一套简洁的装饰器和客户端接口",{"2":{"322":1}}],["提供了一套完整的命令集",{"2":{"79":1}}],["提供了一系列直观的命令来管理您的",{"2":{"62":1}}],["提供部署接口",{"2":{"96":1}}],["提供",{"2":{"61":1,"329":1,"342":1,"383":1}}],["提供详细的错误信息和日志",{"2":{"59":1}}],["提供多种应用模式",{"2":{"324":1}}],["提供多种模板",{"2":{"29":1}}],["提供多种预置模板",{"2":{"10":1}}],["提供从项目初始化",{"2":{"10":1}}],["等占位符替换为您的实际配置值",{"2":{"419":1}}],["等多种编程语言",{"2":{"416":1}}],["等多种通信协议",{"2":{"401":1}}],["等方法",{"2":{"388":1}}],["等资源",{"2":{"187":1}}],["等同于发送以下",{"2":{"160":1}}],["等待",{"2":{"147":1}}],["等待后一次性显示",{"2":{"98":1}}],["等待runtime状态为ready",{"2":{"37":1}}],["等交互式向导",{"2":{"61":1}}],["等高级命令",{"2":{"61":1}}],["等命令管理平台服务",{"2":{"40":1}}],["等",{"2":{"40":2,"97":2,"133":1,"138":1}}],["等模块",{"2":{"10":1}}],["资源限制",{"2":{"229":1}}],["资源已清理完成",{"2":{"181":1}}],["资源访问被拒绝",{"0":{"58":1}}],["资源",{"2":{"37":1,"181":1}}],["准备销毁运行中的",{"2":{"177":1}}],["准备镜像仓库",{"2":{"137":1}}],["准备上线",{"2":{"99":1}}],["准备部署",{"2":{"80":1}}],["准备",{"2":{"37":1}}],["准备工作",{"0":{"30":1},"1":{"31":1,"32":1,"33":1}}],["渲染",{"2":{"37":1}}],["57",{"2":{"453":1}}],["578",{"2":{"424":1}}],["52785",{"2":{"424":1}}],["586",{"2":{"424":1}}],["54+08",{"2":{"453":2}}],["54",{"2":{"424":1}}],["50",{"2":{"409":10,"424":3,"447":1}}],["56",{"2":{"291":4,"424":1}}],["5678",{"2":{"270":1}}],["51",{"2":{"409":18}}],["512m",{"2":{"274":1}}],["5173",{"2":{"3":1}}],["5️⃣",{"2":{"193":1,"194":1}}],["5344",{"2":{"37":1}}],["5",{"0":{"121":1,"307":1,"342":1,"394":1},"2":{"37":1,"51":1,"70":1,"89":1,"105":1,"137":2,"140":1,"274":1,"300":1,"393":2,"424":3,"453":3}}],["默认使用火山方舟的豆包模型",{"2":{"407":1}}],["默认不输出日志",{"2":{"321":1}}],["默认不配置",{"2":{"318":1}}],["默认不开启文件日志",{"2":{"319":1}}],["默认不开启",{"2":{"176":1}}],["默认情况下",{"2":{"291":1}}],["默认行为",{"0":{"291":1},"2":{"307":1}}],["默认配置即为完全静默",{"2":{"307":1}}],["默认配置如下",{"2":{"291":1}}],["默认配置",{"0":{"302":1},"2":{"265":2}}],["默认的镜像仓库名",{"2":{"210":1}}],["默认会要求你确认操作",{"2":{"177":1}}],["默认会自动添加",{"2":{"158":1}}],["默认区域",{"2":{"115":1}}],["默认值",{"2":{"84":1,"87":1,"115":1,"126":1,"205":1,"217":1,"266":1,"286":1,"287":1,"288":1,"298":1,"299":1,"312":1}}],["默认值为",{"2":{"37":2}}],["默认",{"0":{"105":1},"2":{"37":4,"114":1,"129":3,"144":1,"152":1,"158":1,"168":1,"176":1,"188":1,"213":1,"214":1,"215":1,"217":1,"222":1,"223":1,"224":1,"228":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"244":1,"245":1,"250":1,"251":1,"259":3,"260":1,"261":1,"262":1,"293":1,"300":1,"303":1}}],["46+08",{"2":{"453":1}}],["44",{"2":{"453":1}}],["44+08",{"2":{"453":1}}],["49+08",{"2":{"453":1}}],["4核",{"2":{"453":10}}],["4567",{"2":{"437":1}}],["400",{"2":{"437":1}}],["48",{"2":{"424":1}}],["4317",{"2":{"243":1,"276":1}}],["4️⃣",{"2":{"193":1,"194":1}}],["4",{"0":{"52":1,"120":1,"163":1,"306":1,"341":1,"393":1,"409":1},"2":{"37":1,"70":1,"89":1,"92":1,"105":1,"137":1,"139":1,"202":1,"314":1,"321":1,"393":1,"437":1,"453":1}}],["入站认证",{"2":{"448":1}}],["入口文件必须以",{"2":{"125":1}}],["入口文件不能为空",{"2":{"125":1}}],["入口文件",{"2":{"37":1,"100":1,"105":1,"109":1,"208":1,"286":1}}],["入门指南",{"2":{"6":1}}],["回车结束",{"2":{"124":1}}],["回车",{"2":{"37":1}}],["按量计费",{"2":{"453":10}}],["按量付费",{"2":{"399":1}}],["按需启用",{"2":{"321":1}}],["按需开启",{"2":{"291":1}}],["按",{"2":{"37":1}}],["镜像id",{"2":{"453":10}}],["镜像相关",{"2":{"245":1}}],["镜像存储在哪个",{"2":{"239":1}}],["镜像版本标签",{"2":{"222":1,"237":1,"251":1}}],["镜像选择",{"2":{"217":1}}],["镜像的名字",{"2":{"210":1}}],["镜像不会被删除",{"2":{"183":1}}],["镜像保留",{"2":{"183":1}}],["镜像会保留",{"2":{"179":1,"180":1}}],["镜像信息",{"2":{"138":1}}],["镜像名称",{"2":{"138":1}}],["镜像",{"2":{"63":1,"80":1,"127":1,"131":1,"138":1,"259":1}}],["镜像仓库区域",{"2":{"245":1}}],["镜像仓库",{"2":{"37":1}}],["镜像仓库或传入模型密钥",{"2":{"37":1}}],["镜像标签等",{"2":{"80":1}}],["镜像标签",{"2":{"37":1,"111":1,"220":1,"232":1,"247":1,"287":1}}],["镜像构建过程",{"2":{"130":1}}],["镜像构建失败",{"0":{"50":1}}],["镜像构建",{"2":{"11":1}}],["项目多阶段构建",{"2":{"257":1}}],["项目为",{"2":{"215":2}}],["项目独立",{"2":{"205":1}}],["项目支持",{"2":{"133":1}}],["项目示例",{"2":{"132":1}}],["项目级配置",{"2":{"205":1}}],["项目级",{"2":{"103":1}}],["项目指定一个唯一的名称",{"2":{"84":1}}],["项目或包装现有代码",{"2":{"80":1}}],["项目",{"0":{"406":1},"2":{"63":1,"81":1,"82":1,"131":1,"211":2,"213":2,"214":2,"215":2,"257":1,"259":2,"406":1,"430":1,"440":1}}],["项目的核心",{"2":{"69":1}}],["项目的",{"2":{"36":1}}],["项目配置只需设置",{"2":{"267":1}}],["项目配置明确设置的值",{"2":{"266":1}}],["项目配置文件由三部分组成",{"2":{"206":1}}],["项目配置可以覆盖全局配置",{"2":{"126":1}}],["项目配置",{"0":{"275":1},"2":{"6":1,"103":1,"115":1,"126":1,"205":2,"217":3}}],["执行请求",{"2":{"453":1}}],["执行如下发起调用",{"2":{"433":1,"443":1}}],["执行日志示例",{"0":{"424":1},"2":{"409":1}}],["执行器",{"2":{"327":1,"378":1,"381":1,"382":1}}],["执行流程",{"0":{"153":1}}],["执行构建任务",{"2":{"137":1}}],["执行",{"2":{"37":1,"43":2,"47":1,"54":1,"382":2,"407":1}}],["执行后会显示可用模板列表",{"2":{"36":1}}],["执行以下命令验证",{"2":{"24":1}}],["创建时间",{"2":{"453":10}}],["创建了一个简单的智能体",{"2":{"453":1}}],["创建知识库",{"0":{"437":1}}],["创建知识库资源",{"2":{"436":1}}],["创建包含语义策略的记忆资源",{"2":{"427":1}}],["创建新的沙箱工具实例",{"2":{"413":1}}],["创建新项目",{"2":{"279":1}}],["创建沙箱工具",{"0":{"413":1}}],["创建并本地调试",{"0":{"405":1},"1":{"406":1,"407":1,"408":1,"409":1}}],["创建并激活虚拟环境",{"2":{"404":1}}],["创建多个专门的",{"2":{"375":1}}],["创建和管理",{"2":{"332":1}}],["创建记忆库",{"0":{"428":1},"1":{"429":1},"2":{"329":1,"346":1}}],["创建记忆集合",{"2":{"188":1}}],["创建配置",{"2":{"279":1}}],["创建配置模板",{"2":{"270":1}}],["创建项目",{"2":{"193":1}}],["创建项目压缩包并上传到",{"2":{"37":1}}],["创建运行时并开启私网访问",{"2":{"191":1}}],["创建运行时并关联资源",{"2":{"191":1}}],["创建运行时",{"2":{"191":1}}],["创建会话",{"2":{"190":1}}],["创建工具",{"2":{"190":1}}],["创建构建流水线",{"2":{"137":1}}],["创建全局配置模板",{"2":{"122":1}}],["创建全新的",{"2":{"80":1}}],["创建模板",{"2":{"115":1}}],["创建流式输出的",{"2":{"89":1}}],["创建失败",{"0":{"49":1}}],["创建一个专门的天气",{"2":{"374":1}}],["创建一个简单的",{"0":{"345":1}}],["创建一个新的",{"2":{"95":1}}],["创建一个干净的虚拟环境",{"2":{"44":1}}],["创建一个项目目录",{"2":{"36":1}}],["创建网站",{"2":{"39":1}}],["创建runtime成功",{"2":{"37":1}}],["创建",{"0":{"452":1},"2":{"37":1,"96":1,"112":1,"140":2,"147":1,"381":2,"452":1}}],["创建能够自动执行一系列任务",{"2":{"12":1}}],["初始化",{"0":{"406":1}}],["初始化依赖",{"2":{"360":1}}],["初始化客户端",{"2":{"346":1}}],["初始化一个新的",{"2":{"63":1}}],["初始化项目",{"0":{"36":1},"2":{"70":1,"80":1,"425":1}}],["初始化全局配置文件",{"2":{"115":1}}],["初始化全局配置",{"2":{"26":1,"77":1,"122":1}}],["指南",{"2":{"410":1,"425":1}}],["指南完成",{"2":{"35":1}}],["指标收集和告警规则",{"2":{"397":1}}],["指向包装器",{"2":{"100":1}}],["指定源",{"2":{"451":1}}],["指定应用监听哪个端口",{"2":{"223":1}}],["指定依赖文件位置",{"2":{"215":1}}],["指定语言版本",{"2":{"214":1}}],["指定项目使用的编程语言",{"2":{"213":1}}],["指定运行哪个文件",{"2":{"211":1}}],["指定",{"2":{"133":1}}],["指定目标平台架构",{"2":{"129":1}}],["指定配置文件",{"2":{"139":1}}],["指定配置文件位置",{"2":{"129":1,"144":1,"152":1,"158":1,"168":1,"176":1}}],["指定配置文件路径",{"2":{"114":1}}],["指定创建项目的目标目录",{"2":{"87":1}}],["指定包含",{"2":{"86":1}}],["指定火山引擎方舟平台上的模型名称",{"2":{"85":1}}],["指定部署区域",{"2":{"37":1}}],["指定版本",{"0":{"20":1}}],["会看到以下类似的输出",{"2":{"452":1}}],["会看到类似这样的输出",{"2":{"92":1,"93":1}}],["会怎么办",{"2":{"437":1}}],["会生成",{"2":{"425":1}}],["会使用内存存储",{"2":{"386":1}}],["会作为工具描述",{"2":{"367":1}}],["会与",{"2":{"225":1,"243":1}}],["会覆盖应用级同名变量",{"2":{"218":1}}],["会删除什么",{"0":{"178":1},"1":{"179":1,"180":1}}],["会要求确认",{"2":{"176":1}}],["会备份到",{"2":{"141":1}}],["会根据配置自动生成",{"2":{"134":1}}],["会报错以避免",{"2":{"113":1}}],["会走",{"2":{"113":1}}],["会在更新",{"2":{"112":1}}],["会话摘要等个性化交互信息",{"2":{"430":1}}],["会话复用",{"2":{"422":1}}],["会话标识符",{"2":{"409":1,"423":1}}],["会话管理",{"2":{"190":1}}],["会话",{"2":{"64":1,"190":1,"335":1,"352":1}}],["会话中重新",{"2":{"46":1}}],["会自动使用全局配置",{"2":{"266":1}}],["会自动创建或管理对应资源",{"2":{"234":1}}],["会自动包装成",{"2":{"158":1}}],["会自动生成cr实例名称",{"2":{"37":1}}],["会自动渲染为时间戳",{"2":{"37":1}}],["会自动注入相关凭证",{"2":{"33":1}}],["会尝试自动获取您的模型访问权限",{"2":{"33":1}}],["直接转发",{"2":{"446":1}}],["直接删除",{"2":{"176":1}}],["直接发送消息",{"0":{"160":1}}],["直接在命令后面输入要发送的文字",{"2":{"158":1}}],["直接在宿主机",{"2":{"33":1}}],["直接按回车结束输入",{"2":{"124":1}}],["直接使用",{"2":{"89":1,"302":1}}],["直接指定要使用的模型接入点和",{"2":{"33":1}}],["将模版文件添加到知识库",{"2":{"436":1}}],["将自动使用",{"2":{"433":1}}],["将对话结果保存到长期记忆库",{"2":{"430":1}}],["将事件",{"2":{"427":1}}],["将监听",{"2":{"420":1}}],["将代码保存为simple",{"2":{"415":1}}],["将代码的构建和部署完全托管在",{"2":{"67":1}}],["将整个",{"2":{"372":1}}],["将函数封装为标准的",{"2":{"364":1}}],["将函数注册为",{"2":{"326":1,"365":1}}],["将",{"2":{"326":1,"446":1}}],["将用户代码封装为符合",{"2":{"324":1}}],["将主机目录挂载到容器内",{"2":{"227":1}}],["将容器内部端口映射到主机端口",{"2":{"226":1}}],["将现有的",{"2":{"194":1}}],["将使用平台提供的共享公网出口访问公网",{"2":{"113":1}}],["将你的",{"2":{"95":1,"127":1}}],["将您已有的",{"2":{"82":1}}],["将您的",{"2":{"63":1,"80":1}}],["将已构建的镜像发布到目标运行环境",{"2":{"80":1}}],["将已构建的镜像部署到指定环境",{"2":{"63":1}}],["将构建好的镜像启动运行",{"2":{"142":1}}],["将构建",{"2":{"61":1}}],["将此",{"2":{"43":1}}],["将在当前目录生成模板代码和配置文件",{"2":{"36":1}}],["将在云端部署时自动为您注入一个内置的",{"2":{"32":1}}],["将其写入",{"2":{"33":1}}],["将无法调用大模型",{"2":{"33":1}}],["否则重启",{"2":{"228":1}}],["否则",{"2":{"33":1}}],["67",{"2":{"424":2}}],["652",{"2":{"424":1}}],["65",{"2":{"424":1}}],["6379",{"2":{"387":1}}],["64",{"2":{"262":1,"453":12}}],["6️⃣",{"2":{"194":1}}],["60807",{"2":{"409":1}}],["60",{"2":{"190":1}}],["6",{"0":{"122":1},"2":{"32":1,"37":1,"70":1,"89":2,"97":1,"105":1,"137":7,"140":1,"440":1,"453":1}}],["管理员提交后即可立即生效",{"2":{"437":1}}],["管理每个请求的上下文信息",{"2":{"335":1}}],["管理客户端",{"2":{"332":1}}],["管理记忆库的创建",{"2":{"329":1}}],["管理云端运行时实例",{"2":{"253":1}}],["管理云端运行时实例及其认证",{"2":{"242":1}}],["管理依赖",{"2":{"74":1,"75":1}}],["管理平台服务",{"2":{"71":1}}],["管理",{"0":{"335":1},"2":{"32":1,"64":4,"188":1,"189":1,"190":1,"191":1,"329":1,"330":1}}],["页面",{"2":{"32":2}}],["页面创建并获取访问密钥",{"2":{"31":1}}],["火山引擎访问凭证",{"2":{"419":1}}],["火山引擎凭证未配置",{"2":{"282":1}}],["火山引擎凭证",{"2":{"265":1}}],["火山引擎",{"2":{"115":2}}],["火山引擎区域",{"2":{"111":1,"236":1,"250":1,"287":1}}],["火山引擎账号",{"2":{"77":1,"233":1}}],["火山引擎官方文档",{"2":{"59":1}}],["火山引擎控制台",{"2":{"31":1}}],["火山方舟的模型访问凭证",{"2":{"271":1}}],["火山方舟接入点",{"2":{"243":1}}],["火山方舟",{"2":{"32":1,"243":1}}],["通用环境变量",{"2":{"312":1}}],["通用选项",{"0":{"87":1,"184":1},"1":{"185":1,"186":1}}],["通用配置参数",{"0":{"109":1}}],["通用配置",{"2":{"37":1,"69":1,"120":1,"206":1}}],["通常是异步函数",{"2":{"376":1}}],["通常返回",{"2":{"358":1}}],["通常无需手动配置上述环境变量",{"2":{"33":1}}],["通常需要调用大语言模型",{"2":{"32":1}}],["通过上传",{"2":{"446":1}}],["通过自然语言处理与知识库检索",{"2":{"437":1}}],["通过火山引擎控制台",{"2":{"428":1,"437":1,"438":1}}],["通过集成",{"2":{"414":1}}],["通过本指南",{"2":{"412":1}}],["通过agentkit",{"2":{"410":1,"425":1}}],["通过提供一个",{"2":{"397":1}}],["通过事件队列发送中间状态",{"2":{"383":1}}],["通过环境变量灵活开启",{"2":{"321":1}}],["通过环境变量",{"2":{"297":1}}],["通过命令行参数直接配置",{"2":{"106":1}}],["通过交互式向导",{"2":{"70":1}}],["通过交互式向导配置",{"2":{"63":1}}],["通过交互式向导生成配置",{"2":{"37":1}}],["通过",{"2":{"61":1,"284":1,"329":1,"401":1,"407":1}}],["通过一个简单的示例",{"2":{"13":1}}],["通过简洁的",{"2":{"10":1}}],["可继续向我提问",{"2":{"453":1}}],["可治理",{"2":{"444":1}}],["可治理的工具体系",{"2":{"444":1}}],["可扩展的",{"2":{"396":1}}],["可用端点",{"0":{"362":1}}],["可用命令",{"2":{"124":1}}],["可观测性",{"2":{"243":1,"276":1,"336":1}}],["可重新部署",{"2":{"183":1}}],["可随时重新部署",{"2":{"181":1}}],["可在",{"2":{"180":1}}],["可手动删除",{"2":{"179":1}}],["可接收请求",{"2":{"172":1}}],["可通过",{"2":{"149":1}}],["可正常访问",{"2":{"141":1}}],["可跨项目共享配置",{"2":{"102":1}}],["可移植且易于版本控制",{"2":{"61":1}}],["可能原因",{"2":{"282":1,"283":1,"314":1,"315":1}}],["可能原因和解决方案",{"2":{"201":1}}],["可能是资源不足",{"2":{"51":1}}],["可能未传入环境变量或传入了错误的环境变量名称",{"2":{"46":1}}],["可执行文件",{"2":{"43":1}}],["可直接按回车使用默认值",{"2":{"37":1}}],["可选装饰器",{"2":{"388":1}}],["可选配置",{"2":{"243":1}}],["可选参数",{"2":{"158":1}}],["可选择不同的模板",{"2":{"63":1}}],["可选",{"0":{"32":1,"212":1,"213":1,"214":1,"215":1,"217":1,"218":1},"2":{"37":3,"70":1,"77":2,"84":1,"194":1,"206":2,"208":1,"220":1,"236":1,"318":1,"319":2,"327":1,"382":1}}],["可以通过",{"2":{"451":1}}],["可以使用",{"2":{"451":1}}],["可以部署在",{"2":{"450":1}}],["可以查询全球城市的天气信息",{"2":{"374":1}}],["可以查阅故障排除指南",{"2":{"28":1}}],["可以留空",{"2":{"224":1}}],["可以",{"2":{"101":1,"210":2,"437":1}}],["可以修改生成的包装器吗",{"2":{"101":1}}],["可以手动编辑",{"2":{"37":1}}],["可以开始构建您的第一个",{"2":{"28":1}}],["xlarge",{"2":{"453":11}}],["xbyfcvc86wc26mbxz39vst12",{"2":{"453":1}}],["x86",{"2":{"262":1}}],["x",{"2":{"134":2,"453":4}}],["x26",{"2":{"36":2,"70":2,"132":2,"140":2}}],["x3c",{"2":{"31":2,"33":4,"83":1,"188":5,"189":5,"190":14,"191":14,"270":2,"283":1,"424":2,"429":1,"431":4,"441":1,"453":2}}],["xxxx",{"2":{"270":1}}],["xxxxxxx",{"2":{"429":1}}],["xxxxxxxx",{"2":{"113":2,"191":1,"265":1}}],["xxxxxx",{"2":{"147":1,"164":1,"171":2,"181":1,"429":1}}],["xxxxx",{"2":{"32":1}}],["xxx",{"2":{"7":1,"112":8,"137":1,"147":1,"164":1,"171":3,"191":4,"220":1,"232":2,"243":5,"247":2,"271":2,"274":1,"275":1,"276":3,"277":1}}],["请为您的",{"2":{"431":1,"441":1}}],["请将",{"2":{"419":1}}],["请将其设置为环境变量",{"2":{"31":1}}],["请务必将",{"2":{"408":1}}],["请确保您的",{"2":{"403":1}}],["请确保您已准备好",{"2":{"403":1}}],["请确保您已遵循",{"2":{"35":1}}],["请确保您已开通",{"2":{"32":1}}],["请参考",{"2":{"321":1}}],["请通过环境变量开启",{"2":{"291":1}}],["请更新为新名称",{"2":{"284":1}}],["请填写接入点",{"2":{"270":1}}],["请填写你的",{"2":{"270":1}}],["请填写相对于项目根目录的相对路径",{"2":{"141":1}}],["请使用",{"2":{"214":1}}],["请求上下文",{"2":{"382":1}}],["请求追踪",{"2":{"352":1}}],["请求体",{"2":{"352":1}}],["请求重试",{"2":{"341":1}}],["请求重试和超时",{"2":{"334":1}}],["请求元数据",{"2":{"335":1}}],["请求能力",{"2":{"334":1}}],["请求头",{"2":{"158":1,"352":1}}],["请求格式转换",{"2":{"96":1}}],["请销毁并重新创建",{"2":{"113":1}}],["请查阅",{"2":{"64":1,"69":1}}],["请",{"2":{"59":1}}],["请随时通过",{"2":{"41":1}}],["请耐心等待",{"2":{"37":2,"51":1}}],["请记录下您的",{"2":{"32":1}}],["请访问",{"2":{"31":1}}],["在首轮调用中",{"2":{"434":1}}],["在每一轮对话结束后显式调用runner",{"2":{"430":1}}],["在记忆详情",{"2":{"429":1,"439":1}}],["在项目根目录运行",{"2":{"425":1}}],["在项目根目录创建",{"2":{"319":1}}],["在50到100之间的随机质数为",{"2":{"424":1}}],["在模版创建完成后",{"2":{"414":1,"430":1,"440":1}}],["在启动智能体之前",{"2":{"419":1}}],["在启动",{"2":{"408":1}}],["在同一环境中高效运行和调度多个",{"2":{"399":1}}],["在函数内部处理异常",{"2":{"370":1}}],["在你的",{"2":{"318":1}}],["在你的电脑上启动容器",{"2":{"146":1}}],["在你的电脑上用",{"2":{"136":1}}],["在持续集成环境中",{"2":{"305":1}}],["在构建",{"2":{"233":1}}],["在开始编写代码之前",{"2":{"413":1}}],["在开始之前",{"2":{"35":1,"403":1}}],["在开发",{"2":{"196":1}}],["在云端运行",{"2":{"149":1}}],["在火山引擎上构建和运行",{"2":{"231":1}}],["在火山引擎上创建",{"2":{"147":1}}],["在火山引擎上自动构建",{"2":{"137":1}}],["在脚本中运行",{"2":{"133":1}}],["在脚本中安装",{"2":{"133":1}}],["在交互式模式中",{"2":{"124":1}}],["在ci",{"2":{"123":1}}],["在指定目录包装",{"2":{"90":1}}],["在指定目录创建",{"2":{"89":1}}],["在多",{"2":{"85":1}}],["在本地",{"2":{"219":1}}],["在本地开发调试好的",{"2":{"99":1}}],["在本地或云端直接调用",{"2":{"80":1}}],["在本地构建镜像",{"2":{"68":1}}],["在您的本地机器上完成构建和部署",{"2":{"66":1}}],["在根目录找到一个类似命名的文件pipeline",{"2":{"50":1}}],["在当前",{"2":{"46":1}}],["在安装",{"2":{"44":1}}],["在安装路径下的",{"2":{"43":1}}],["在终端中执行",{"2":{"43":1}}],["在线推理",{"2":{"32":1}}],["在方舟平台的",{"2":{"32":1}}],["在",{"2":{"31":1,"32":1,"33":4,"49":1,"112":1,"130":1,"260":1,"305":1}}],["在使用",{"2":{"25":1}}],["然后将其推送到云端",{"2":{"68":1}}],["然后",{"2":{"31":1}}],["服务端任务访问",{"2":{"448":1}}],["服务端点",{"2":{"349":1}}],["服务与第三方接口需要快速进入",{"2":{"446":1}}],["服务和服务的",{"2":{"450":1}}],["服务和",{"2":{"445":1}}],["服务热线",{"2":{"437":1}}],["服务启动成功后",{"2":{"420":1}}],["服务将监听",{"2":{"409":1}}],["服务之前",{"2":{"408":1}}],["服务的",{"2":{"452":1}}],["服务的工具集合",{"2":{"447":1}}],["服务的火山引擎账号",{"2":{"403":1}}],["服务的访问权限",{"2":{"57":1}}],["服务客户端的",{"2":{"347":1}}],["服务客户端层",{"2":{"336":1}}],["服务客户端",{"0":{"328":1},"1":{"329":1,"330":1,"331":1,"332":1}}],["服务未启动",{"2":{"199":1}}],["服务已启动",{"2":{"76":1}}],["服务区域",{"2":{"37":1,"245":1}}],["服务",{"0":{"346":1,"446":1},"2":{"31":1,"32":1,"40":1,"80":1,"324":1,"326":1,"331":1,"364":1,"409":1,"450":1,"452":2,"453":1}}],["首次使用某个",{"2":{"422":1}}],["首次配置用交互式",{"2":{"126":1}}],["首次配置",{"0":{"117":1}}],["首次创建",{"2":{"113":1}}],["首次部署通常需要",{"2":{"51":1}}],["首次部署耗时久",{"2":{"51":1}}],["首次部署大约需要",{"2":{"37":1}}],["首先",{"2":{"31":1}}],["首页",{"2":{"6":1}}],["从知识库中检索记忆记录",{"2":{"436":1}}],["从长期记忆中检索记忆记录",{"2":{"427":1}}],["从火山引擎控制台创建沙箱工具后获取",{"2":{"419":1}}],["从控制台获取",{"2":{"419":1}}],["从basic",{"2":{"414":1}}],["从模板创建项目",{"2":{"406":1}}],["从模板开始",{"2":{"90":1}}],["从本地开发到云端部署",{"0":{"402":1},"1":{"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1}}],["从本地到云端的",{"0":{"396":1},"1":{"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1}}],["从上下文提取输入",{"2":{"382":1}}],["从高到低",{"2":{"217":1,"312":1}}],["从零开始到上线的完整步骤",{"2":{"193":1}}],["从零开始创建新",{"2":{"99":1}}],["从零开始构建一个完整的",{"2":{"78":1}}],["从你的文件中导入",{"2":{"96":1}}],["从预设模板创建",{"2":{"83":1}}],["从",{"2":{"82":1,"418":1,"430":1,"440":1}}],["从开发",{"2":{"29":1}}],["从官方github仓库安装",{"0":{"23":1}}],["体验从开发到部署的全过程",{"2":{"28":1}}],["了解整体架构",{"2":{"395":1}}],["了解整体功能和特性",{"2":{"289":1}}],["了解命令执行过程",{"2":{"300":1}}],["了解如何安装",{"2":{"13":1}}],["了",{"2":{"28":1}}],["中文",{"2":{"437":1}}],["中添加",{"2":{"318":1}}],["中添加以下配置",{"2":{"130":1}}],["中的完整镜像",{"2":{"255":1}}],["中的日志级别",{"2":{"225":1}}],["中的依赖是否正确",{"2":{"50":1}}],["中手动删除",{"2":{"180":1}}],["中划线和点",{"2":{"125":1}}],["中覆盖全局配置",{"2":{"122":1}}],["中相关字段自动留空",{"2":{"122":1}}],["中配置为已有的",{"2":{"49":1}}],["中",{"2":{"27":1,"33":2,"319":1,"410":1,"425":2}}],["中安装",{"2":{"15":1}}],["⚠️",{"2":{"27":1,"113":1,"157":1,"165":3,"174":1,"177":1,"179":1,"180":1,"183":1,"214":1,"218":1}}],["您将看到",{"2":{"434":1,"443":1}}],["您将学会如何创建",{"2":{"412":1}}],["您保存了密码",{"2":{"434":1}}],["您无需从",{"2":{"430":1,"440":1}}],["您已成功完成了从本地开发到云端部署的全过程",{"2":{"410":1}}],["您是否需要花费额外成本来配置日志系统",{"2":{"397":1}}],["您是否担心多用户或多",{"2":{"397":1}}],["您是否曾为环境搭建",{"2":{"397":1}}],["您也可以使用",{"2":{"36":1}}],["您必须手动配置访问凭证",{"2":{"33":1}}],["您可以看到类似如下的环境变量",{"2":{"429":2,"439":1}}],["您可以直接使用",{"2":{"418":1}}],["您可以将智能体部署到",{"2":{"410":1,"425":1}}],["您可以通过该地址调用智能体",{"2":{"420":1}}],["您可以通过平台提供的",{"2":{"410":1,"425":1}}],["您可以通过",{"2":{"404":1}}],["您可以通过以下两种方式之一配置凭证",{"2":{"33":1}}],["您可以轻松实现从本地",{"2":{"401":1}}],["您可以注意交互界面的提示",{"2":{"50":1}}],["您可以使用",{"2":{"37":1}}],["您可以选择预置的推理接入点",{"2":{"32":1}}],["您可以设置环境变量",{"2":{"27":1}}],["您的代码文件应该如下",{"2":{"414":1,"430":1,"440":1}}],["您的智能体将能够在沙箱环境中安全地执行代码",{"2":{"414":1}}],["您的",{"2":{"32":1,"44":1}}],["您需要先在火山引擎控制台创建一个沙箱工具实例",{"2":{"413":1}}],["您需要配置火山引擎的访问凭证",{"2":{"408":1}}],["您需要配置访问凭证",{"2":{"25":1}}],["您需要一个火山引擎账号并开通",{"2":{"31":1}}],["环境配置",{"0":{"404":1,"431":1,"441":1}}],["环境一致性高",{"2":{"67":1}}],["环境中可能已存在与",{"2":{"44":1}}],["环境",{"0":{"305":1},"2":{"37":1,"67":1}}],["环境变量不生效",{"0":{"283":1}}],["环境变量优先级最高",{"2":{"126":1}}],["环境变量分级管理",{"2":{"126":1}}],["环境变量交互式输入",{"0":{"124":1}}],["环境变量配置支持便捷命令",{"2":{"124":1}}],["环境变量配置",{"0":{"110":1,"297":1},"1":{"298":1,"299":1},"2":{"453":1}}],["环境变量",{"2":{"46":1,"80":1,"115":1,"126":1,"141":1,"205":1,"217":2,"232":1,"247":1,"298":1,"299":1}}],["环境变量未生效",{"0":{"46":1}}],["环境变量中",{"2":{"43":1}}],["环境变量对容器内无效",{"2":{"33":1}}],["环境变量方式",{"0":{"27":1}}],["环境要求",{"0":{"15":1,"72":1,"450":1},"1":{"73":1,"74":1,"75":1,"76":1,"77":1}}],["历史记录中暴露敏感信息",{"2":{"26":1}}],["~",{"2":{"26":1,"27":2,"39":1,"43":3,"90":1,"102":1,"115":1,"122":2,"194":1,"205":1,"217":1,"263":1,"264":1,"266":1,"267":1,"282":1}}],["验证功能是否正常",{"2":{"156":1}}],["验证容器状态",{"2":{"146":1}}],["验证镜像可用性",{"2":{"136":1}}],["验证失败会显示详细错误信息并退出",{"2":{"125":1}}],["验证端到端功能",{"2":{"80":1}}],["验证配置文件",{"2":{"202":1}}],["验证配置",{"2":{"26":1}}],["验证安装",{"0":{"24":1}}],["ydzwsvfxhokhx11pdmlv",{"2":{"453":2}}],["ydzwsvy72n46nmxzvafi",{"2":{"453":1}}],["ye5blj0xdsxjd1tk1vfh",{"2":{"453":1}}],["ye5c4end34xjd1umbfns",{"2":{"453":1}}],["ye5c4jbx8gqc6ily6b30",{"2":{"453":1}}],["ye5e5jyq68bw80c889i5",{"2":{"453":1}}],["ye5ejub08wbw80bpd7hr",{"2":{"453":1}}],["ye5ejwoow0cva4fqydfc",{"2":{"453":1}}],["ye5907jc6ikhx1exow93",{"2":{"453":7}}],["ye7fg1hgqoxjd1utrfy3",{"2":{"453":1}}],["ye7fhfmghsc1kdxxxxxx",{"2":{"419":1}}],["ye7ilsbbpcbw80ca2ymj",{"2":{"453":1}}],["ye7ipm0dtsqc6imh310d",{"2":{"453":1}}],["ye7irm2sqobw80cqxd40",{"2":{"453":1}}],["ye7yhff668o2eybtfvr0",{"2":{"424":1}}],["ye9j62wydcn",{"2":{"37":1}}],["yield",{"2":{"407":3}}],["you",{"2":{"407":3,"430":1}}],["your",{"2":{"26":2,"27":2,"31":2,"33":4,"43":1,"69":1,"77":4,"92":1,"93":1,"163":1,"225":1,"309":1,"346":2,"408":2,"419":2,"429":2,"431":4,"440":1,"441":1}}],["yyyymmdd",{"2":{"298":1}}],["yyyymmddhhmmss",{"2":{"233":1}}],["y",{"2":{"123":1,"132":1,"140":1,"177":2,"293":1,"321":1}}],["yamlentry",{"2":{"425":1}}],["yaml文件配置",{"2":{"425":1}}],["yamlplatform",{"2":{"262":1}}],["yamlports",{"2":{"226":1}}],["yamlbuild",{"2":{"260":1}}],["yamlcr",{"2":{"252":1}}],["yamlcommon",{"2":{"206":1,"208":1,"218":1,"271":1,"274":1,"275":1,"276":1,"277":2}}],["yamlimage",{"2":{"233":1}}],["yamlmemory",{"2":{"229":1}}],["yamlvolumes",{"2":{"227":1}}],["yamlruntime",{"2":{"225":1,"242":1,"243":2,"270":1}}],["yamllanguage",{"2":{"213":1}}],["yamllaunch",{"2":{"112":1,"113":1,"216":1,"220":1,"232":1,"247":1}}],["yamldescription",{"2":{"212":1}}],["yamldocker",{"2":{"131":2,"140":3,"257":2}}],["yamlagent",{"2":{"132":1,"210":1}}],["yaml",{"0":{"69":1,"280":1},"2":{"10":1,"11":1,"26":1,"33":1,"36":1,"37":2,"47":1,"61":1,"63":1,"69":2,"78":1,"92":1,"93":1,"95":1,"100":1,"102":1,"112":2,"113":2,"114":1,"115":2,"122":4,"129":1,"130":1,"134":2,"139":2,"140":3,"144":1,"148":1,"152":1,"153":1,"154":1,"158":1,"168":1,"173":1,"176":1,"182":1,"183":1,"196":4,"198":1,"202":1,"204":1,"205":2,"211":1,"214":1,"215":1,"217":6,"237":1,"238":1,"239":1,"259":1,"263":1,"264":1,"265":1,"266":1,"267":4,"269":5,"270":5,"272":1,"280":1,"282":1,"283":1,"309":1,"425":1,"430":1,"431":1,"432":1,"440":1,"441":1,"442":1}}],["kernel",{"2":{"424":1}}],["keywords=query",{"2":{"371":1}}],["keywords",{"2":{"371":2}}],["keyerror",{"2":{"355":1}}],["key配置给",{"2":{"32":1}}],["key>",{"2":{"31":2,"33":3,"270":1,"431":1}}],["key",{"0":{"32":1,"163":1},"2":{"26":2,"27":2,"32":5,"33":1,"37":2,"46":2,"52":1,"55":3,"69":2,"77":4,"110":1,"112":1,"115":4,"122":2,"124":2,"163":1,"165":1,"220":1,"225":4,"232":3,"234":1,"242":1,"243":4,"245":1,"247":3,"265":2,"270":2,"271":1,"274":1,"275":1,"276":2,"277":1,"407":1,"430":3,"431":1,"440":3,"444":1,"446":1,"448":3,"453":4}}],["key=your",{"2":{"408":2,"419":2}}],["key=sk",{"2":{"122":1}}],["key=shared",{"2":{"110":2}}],["key=ak",{"2":{"122":1}}],["key=new",{"2":{"118":1}}],["key=value",{"2":{"115":1,"124":2}}],["key=xxxxx",{"2":{"105":1,"106":1,"119":1,"124":2}}],["key=",{"2":{"26":2,"27":2,"31":2,"33":3,"77":4,"200":2,"346":2,"429":1,"453":2}}],["kind",{"2":{"407":1}}],["km",{"2":{"393":1}}],["kubernetes",{"2":{"325":1,"356":1,"362":2}}],["k",{"2":{"189":4}}],["kwargs",{"2":{"158":1,"379":1,"380":1,"385":1}}],["kb",{"2":{"112":2,"189":1,"191":1}}],["knowledgebase=knowledgebase",{"2":{"440":1}}],["knowledgebase",{"2":{"440":5}}],["knowledge",{"0":{"189":1,"435":1},"2":{"10":1,"40":2,"64":2,"71":1,"112":4,"187":1,"189":11,"191":2,"330":4,"435":1,"437":1,"438":1,"439":1,"440":1}}],["设计理念",{"2":{"329":1}}],["设计和部署多个",{"2":{"12":1}}],["设置环境环境变量",{"0":{"453":1}}],["设置合理的执行超时时间",{"2":{"376":1}}],["设置合适的日志级别",{"2":{"315":1}}],["设置控制台专用级别为",{"2":{"312":1}}],["设置通用级别为",{"2":{"312":1}}],["设置日志级别",{"2":{"243":1,"319":1}}],["设置详细日志级别",{"2":{"202":1}}],["设置会话",{"2":{"190":1}}],["设置凭证",{"2":{"122":1}}],["设置单个字段",{"2":{"122":1}}],["设置全局配置",{"2":{"122":1}}],["设置全局配置字段",{"2":{"115":1}}],["设置网络",{"2":{"113":1}}],["设置为空字符串",{"2":{"112":1}}],["设置云平台",{"2":{"103":1}}],["设置部署模式",{"2":{"80":1}}],["设置byteplus访问凭证",{"2":{"77":1}}],["设置默认云服务为",{"2":{"77":1}}],["设置访问凭证",{"2":{"77":1}}],["设置",{"2":{"33":2,"85":1,"141":1}}],["设置您的访问凭证",{"2":{"26":1}}],["则说明",{"2":{"24":1}}],["是最常用的应用框架",{"2":{"349":1}}],["是一个统一的",{"2":{"396":1}}],["是一个",{"2":{"322":1}}],["是一个为开发者设计的强大命令行工具",{"2":{"60":1}}],["是做什么的",{"2":{"212":1}}],["是配置",{"2":{"204":1}}],["是您与",{"2":{"79":1}}],["是",{"2":{"69":1}}],["是生产环境的最佳实践",{"2":{"67":1}}],["是开发中最常用的命令",{"2":{"63":1}}],["是否能正确读取到记忆库中的信息",{"2":{"434":1}}],["是否让您感到调度混乱",{"2":{"397":1}}],["是否保存日志到文件",{"2":{"298":1}}],["是否在控制台显示日志",{"2":{"298":1}}],["是否正常运行",{"2":{"202":1}}],["是否正确",{"2":{"201":1}}],["是否有效",{"2":{"55":1}}],["是否可用",{"2":{"24":1}}],["是火山引擎推出的企业级",{"2":{"9":1}}],["nprint",{"2":{"424":2}}],["nprimes",{"2":{"424":2}}],["nrandom",{"2":{"424":2}}],["ndef",{"2":{"424":2}}],["number",{"2":{"191":2}}],["null",{"2":{"112":1,"424":5}}],["n",{"2":{"177":1,"424":67}}],["neednum",{"2":{"453":1}}],["network",{"2":{"113":3,"191":2}}],["news",{"2":{"375":3}}],["new",{"2":{"106":1,"118":2,"126":1,"407":2}}],["next",{"2":{"92":1,"93":1}}],["necessary",{"2":{"23":1}}],["nhsoa",{"2":{"37":1}}],["name>",{"2":{"431":1,"441":1}}],["namespace",{"0":{"240":1,"252":1},"2":{"111":1,"115":1,"122":1,"232":1,"247":1,"252":1,"265":1,"267":1,"275":1,"276":1,"284":2,"287":1}}],["name",{"0":{"210":1,"224":1,"239":1,"240":1,"241":1,"242":3,"252":3,"253":3},"2":{"37":1,"69":1,"83":2,"84":1,"85":4,"89":3,"92":1,"93":1,"100":1,"101":1,"106":1,"107":1,"109":1,"111":3,"115":2,"119":1,"122":3,"123":2,"126":1,"132":1,"138":1,"171":1,"188":3,"189":1,"190":2,"191":6,"206":1,"208":1,"210":3,"220":1,"224":1,"230":1,"232":8,"233":1,"234":4,"239":2,"241":1,"242":3,"243":3,"245":2,"247":7,"252":4,"255":1,"265":2,"267":3,"270":1,"271":2,"274":1,"275":3,"276":9,"277":2,"281":1,"282":1,"284":9,"286":1,"287":5,"310":1,"345":1,"355":1,"366":1,"381":1,"390":1,"407":8,"415":1,"424":2,"429":1,"430":7,"440":9,"453":5}}],["name=model",{"2":{"440":1}}],["name=app",{"2":{"407":3}}],["name=agent",{"2":{"407":1}}],["name=team",{"2":{"122":1,"126":1}}],["name=",{"2":{"33":1,"346":1,"424":1,"430":1,"453":3}}],["name和model",{"2":{"32":1}}],["none>",{"2":{"453":1}}],["none=true",{"2":{"407":1}}],["none",{"2":{"371":1,"387":4,"453":1}}],["not",{"2":{"43":1,"198":1,"199":1,"200":1,"279":1,"282":1,"368":1,"407":2,"430":2,"440":2}}],["no",{"2":{"21":1,"132":1,"140":1,"228":1,"424":2,"453":2}}],["what",{"2":{"434":1}}],["why",{"2":{"409":2}}],["when",{"2":{"134":1}}],["waiting",{"2":{"409":1,"453":1}}],["wanted",{"2":{"409":2}}],["want",{"2":{"407":1}}],["warranties",{"2":{"407":1}}],["warning",{"2":{"298":1,"300":1,"312":2,"390":1,"424":1,"453":1}}],["writing",{"2":{"407":1}}],["wrapping",{"2":{"93":1}}],["wrapper",{"2":{"82":1,"86":2,"90":3,"93":2}}],["www",{"2":{"407":1,"437":2}}],["window",{"2":{"453":1}}],["windows",{"2":{"199":1,"453":7}}],["will",{"2":{"134":1,"430":1,"440":1}}],["without",{"2":{"407":1}}],["with",{"2":{"23":1,"92":1,"93":1,"291":1,"360":1,"369":2,"407":2,"409":1,"430":1,"440":1,"453":2}}],["work",{"2":{"409":2}}],["workflow级",{"2":{"110":2,"126":1}}],["workflow",{"2":{"110":7}}],["workspace",{"2":{"21":1,"39":1,"245":1}}],["were",{"2":{"282":1}}],["weatheragentexecutor",{"2":{"381":1}}],["weather",{"2":{"89":2,"90":2,"92":3,"109":1,"119":1,"193":2,"194":2,"208":2,"210":1,"271":1,"274":1,"276":3,"345":2,"353":2,"368":5,"374":6,"375":3,"381":2}}],["web",{"2":{"85":2,"89":1,"369":1,"407":3,"446":1}}],["we",{"2":{"23":1}}],["gadk",{"2":{"339":1}}],["gateway",{"2":{"331":1}}],["greeting",{"2":{"158":1}}],["g++",{"2":{"132":1,"133":1,"140":1}}],["gcc",{"2":{"132":2,"133":1,"140":2}}],["generator",{"2":{"407":1}}],["generated",{"2":{"92":1,"93":1,"134":3,"407":1}}],["genai",{"2":{"407":1}}],["getenv",{"2":{"430":1,"440":1,"453":4}}],["getlogger",{"2":{"355":1,"390":1,"407":1,"430":1,"440":1,"453":1}}],["get",{"2":{"132":2,"140":2,"191":1,"329":2,"330":1,"345":2,"353":5,"362":4,"368":1,"369":1,"374":2,"375":2,"381":3,"387":2,"388":1,"391":1,"392":1,"407":1,"424":2}}],["g",{"2":{"115":1,"429":1,"431":1}}],["gt",{"2":{"80":1,"126":3,"259":2,"361":1}}],["governing",{"2":{"407":1}}],["google",{"2":{"98":1,"339":1,"381":1,"407":3,"451":1,"453":2}}],["go",{"2":{"37":1,"75":1,"211":4,"213":1,"214":1,"215":4,"257":1,"259":1,"275":5}}],["golang",{"0":{"75":1,"275":1},"2":{"10":1,"29":1,"37":1,"75":1,"92":1,"133":1,"140":2,"213":2,"214":3,"257":1,"259":2,"275":2}}],["global",{"2":{"26":4,"77":6,"103":1,"115":1,"122":7,"126":3,"200":3}}],["gitignore",{"2":{"270":2,"319":1}}],["github",{"2":{"23":1,"41":1}}],["git",{"2":{"23":3,"270":1}}],["root",{"2":{"453":1}}],["role=",{"2":{"407":1}}],["role>",{"2":{"191":3}}],["role",{"0":{"242":1,"253":1},"2":{"191":3,"232":1,"234":1,"242":1,"247":1,"276":1}}],["rpalbxxxxxxxxxxxxxxo2pq",{"2":{"452":1}}],["range",{"2":{"424":6}}],["random",{"2":{"424":10}}],["raise",{"2":{"391":1,"430":1,"440":1}}],["rag",{"2":{"330":1}}],["raw",{"2":{"158":2}}],["rm",{"2":{"310":1}}],["r",{"2":{"37":1,"147":1,"164":1,"171":2,"181":1,"191":6}}],["recreation",{"2":{"407":1}}],["recommended",{"2":{"21":1}}],["redistaskstore",{"2":{"387":1}}],["redis",{"2":{"360":6,"387":11,"388":1}}],["rendered",{"2":{"282":1}}],["release",{"2":{"191":1}}],["releasing",{"2":{"37":1,"51":1,"172":1}}],["resumption=none",{"2":{"453":1}}],["results=query",{"2":{"371":1}}],["results",{"2":{"371":6}}],["result",{"2":{"363":2,"368":2,"390":2,"424":2}}],["restart",{"0":{"228":1},"2":{"220":1}}],["restarting",{"2":{"172":1}}],["responsemetadata",{"2":{"424":1}}],["response",{"2":{"39":1,"100":2,"338":1,"345":2,"346":2,"353":2,"355":2,"369":3,"374":2,"382":2,"391":2,"415":2,"424":1,"430":4,"440":4,"453":5}}],["realtime",{"2":{"453":1}}],["readiness",{"2":{"325":1,"362":1}}],["ready",{"2":{"54":1,"171":2,"172":1,"189":1}}],["reasoning",{"2":{"158":4}}],["remove",{"2":{"134":1}}],["regenerate",{"0":{"261":1},"2":{"129":1,"134":1,"139":2,"257":1,"261":1,"288":1}}],["region=cn",{"2":{"424":1,"439":1}}],["region",{"0":{"236":1,"250":1},"2":{"69":1,"111":1,"115":2,"119":1,"122":2,"217":1,"232":1,"245":2,"247":1,"265":2,"271":1,"275":1,"276":1,"277":1,"287":1,"424":1,"453":1}}],["registry",{"2":{"49":2,"232":1,"239":1,"247":1,"252":1,"265":1}}],["returns",{"2":{"368":1,"369":1,"371":1,"374":1,"382":1,"393":1}}],["return",{"2":{"100":2,"338":1,"345":2,"353":1,"355":3,"359":1,"360":2,"363":1,"368":2,"369":1,"371":1,"374":1,"375":3,"382":1,"387":2,"390":3,"391":1,"394":2,"407":1,"415":2,"424":15,"430":2,"440":2,"453":2}}],["review",{"2":{"92":1,"93":1}}],["required",{"2":{"281":1,"355":2,"407":1,"430":1}}],["requirements",{"2":{"23":1,"36":1,"37":1,"50":1,"74":1,"92":1,"93":1,"100":1,"101":1,"105":1,"109":1,"132":1,"201":1,"208":1,"215":3,"406":1,"410":1,"425":2}}],["requestid",{"2":{"424":1}}],["requestcontext",{"2":{"382":2}}],["request",{"2":{"37":1,"352":1,"391":8,"453":2}}],["report",{"2":{"89":1}}],["repo",{"0":{"241":1,"252":1},"2":{"23":1,"111":1,"232":1,"247":1,"252":1,"276":1,"284":2,"287":1}}],["runconfig",{"2":{"407":1}}],["running",{"2":{"170":2,"172":1,"199":1,"291":1,"407":1,"409":2,"424":1,"430":2,"440":2,"453":12}}],["runner=runner",{"2":{"379":1,"381":1,"382":1,"386":1}}],["runner",{"2":{"96":2,"100":4,"345":4,"353":4,"355":1,"374":4,"375":3,"380":1,"381":3,"382":1,"383":2,"391":1,"394":6,"407":6,"409":28,"415":4,"424":3,"430":5,"440":4,"453":10}}],["runtime状态",{"2":{"37":1}}],["runtime状态为ready",{"2":{"37":1}}],["runtime初始化中",{"2":{"37":1}}],["runtime",{"0":{"51":1,"52":1,"112":1,"113":1,"191":1,"218":1,"225":1,"242":3,"243":1,"253":3,"254":1,"324":1,"396":1,"397":1},"1":{"325":1,"326":1,"327":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1},"2":{"33":4,"37":1,"51":1,"52":2,"54":1,"64":2,"67":1,"68":1,"69":1,"71":1,"106":1,"110":5,"112":5,"113":11,"133":1,"140":1,"147":5,"149":2,"164":1,"171":3,"180":1,"181":2,"187":1,"191":15,"206":1,"208":1,"210":1,"218":2,"220":1,"225":1,"232":6,"234":4,"242":4,"243":1,"245":6,"247":6,"253":1,"255":5,"257":1,"259":2,"270":1,"271":1,"274":2,"275":2,"276":6,"277":1,"283":4,"284":6,"286":1,"287":3,"332":3,"336":1,"396":1,"397":1,"400":1,"401":1,"404":2,"407":1,"430":1,"431":2,"432":1,"440":1,"441":1,"442":1,"448":2}}],["run",{"2":{"3":1,"4":1,"5":1,"85":1,"89":1,"100":3,"114":1,"120":1,"126":1,"338":1,"345":3,"351":1,"353":2,"355":2,"374":1,"375":3,"381":1,"382":1,"390":1,"391":2,"392":1,"394":4,"407":6,"414":2,"415":6,"416":1,"424":8,"430":4,"440":4,"453":5}}],["u003c=",{"2":{"424":1}}],["under",{"2":{"407":3}}],["unknown",{"2":{"391":1}}],["unexpected",{"2":{"390":1}}],["unset",{"2":{"307":2,"314":1}}],["unless",{"2":{"220":1,"228":2,"407":1}}],["unit",{"2":{"190":2}}],["uninstall",{"2":{"44":1}}],["url=url",{"2":{"453":1}}],["url=",{"2":{"381":1,"387":1,"429":1}}],["url>",{"2":{"191":3,"431":1}}],["url",{"2":{"149":1,"191":3,"245":3,"255":2,"369":4,"387":3,"429":1,"431":1,"453":1}}],["update`",{"2":{"191":1}}],["updated",{"2":{"134":1}}],["update",{"2":{"132":1,"133":1,"140":1,"188":1,"189":1,"190":1,"191":1,"329":1}}],["updateruntime",{"2":{"113":2}}],["u",{"2":{"123":1}}],["usage",{"2":{"407":1}}],["used",{"2":{"430":1,"440":1}}],["usersessionid",{"2":{"424":1}}],["user123",{"2":{"162":1}}],["user",{"2":{"39":2,"100":3,"158":2,"161":1,"162":1,"345":3,"352":1,"353":3,"382":1,"392":2,"407":8,"409":3,"415":3,"423":2,"424":1,"430":7,"433":2,"434":2,"440":6,"453":10}}],["use",{"2":{"23":1,"92":2,"93":2,"407":1,"447":2,"453":1}}],["using",{"2":{"21":1,"39":1,"92":1,"291":1}}],["uv做为示例",{"2":{"451":1}}],["uvicorn",{"2":{"409":1,"453":1}}],["uv",{"0":{"21":1},"2":{"15":1,"21":9,"23":4,"43":1,"44":2,"404":6,"451":5}}],["tips",{"2":{"450":1}}],["timeout",{"0":{"244":1}}],["time=$",{"2":{"123":1}}],["timestamp",{"2":{"37":1,"230":2,"232":1,"233":2,"237":3,"245":2,"247":1,"251":1,"255":1,"275":1,"276":1,"280":1,"287":1}}],["typing",{"2":{"371":1,"392":1}}],["type=memory",{"2":{"429":1}}],["type>",{"2":{"190":1}}],["types",{"2":{"69":1,"112":1,"113":1,"188":1,"189":1,"206":2,"220":1,"232":1,"247":1,"267":1,"271":1,"274":1,"275":1,"276":1,"277":1,"283":1,"387":1,"407":1,"431":2,"441":1}}],["type",{"0":{"216":1},"2":{"69":1,"86":2,"90":3,"92":1,"93":1,"106":1,"109":1,"119":1,"123":1,"125":1,"132":1,"135":1,"145":1,"188":2,"189":1,"190":2,"191":3,"206":1,"208":1,"216":3,"271":1,"274":1,"275":1,"276":1,"277":2,"286":1,"291":1,"382":1,"407":1,"409":1,"423":1,"424":1,"429":1,"431":2,"453":3}}],["transcription=audiotranscriptionconfig",{"2":{"453":2}}],["trae",{"2":{"447":1}}],["trace",{"2":{"424":1}}],["tracer",{"2":{"424":1}}],["traceback",{"2":{"424":1}}],["tracing",{"2":{"340":1}}],["try",{"2":{"355":1,"360":1,"390":2,"391":1,"407":1}}],["true",{"2":{"113":1,"225":1,"243":1,"274":1,"298":2,"314":1,"407":1,"424":7,"453":2}}],["tasks",{"2":{"387":1}}],["taskstore",{"2":{"385":1,"387":2,"388":2}}],["task",{"0":{"363":1,"384":1},"1":{"385":1,"386":1,"387":1,"388":1},"2":{"325":1,"327":1,"363":3,"385":1,"386":1,"387":24,"388":3}}],["tab",{"2":{"280":1}}],["tags",{"2":{"191":1}}],["tag",{"0":{"222":1,"237":1,"251":1},"2":{"69":1,"106":2,"111":1,"118":1,"119":1,"120":2,"123":2,"126":1,"138":1,"220":1,"232":1,"233":2,"237":3,"247":1,"274":1,"275":1,"276":1,"287":1}}],["ttl",{"2":{"190":6}}],["ts",{"2":{"112":2,"191":1}}],["tmp",{"2":{"110":1,"298":1,"311":1}}],["t",{"2":{"85":1,"89":1,"190":9,"424":1}}],["txt",{"2":{"36":2,"37":1,"50":1,"74":1,"92":1,"93":1,"100":1,"101":1,"105":1,"109":1,"132":1,"201":1,"208":1,"215":3,"406":1,"410":1,"425":2,"430":1}}],["teaching",{"2":{"430":1}}],["team",{"2":{"115":3,"265":3,"267":5}}],["technology",{"2":{"407":1}}],["temperature",{"2":{"368":3}}],["templates",{"2":{"36":1,"71":1,"92":1}}],["template",{"2":{"36":3,"70":2,"82":1,"85":2,"89":4,"92":4,"93":1,"193":1,"270":1,"282":1}}],["terminal",{"2":{"412":1}}],["terminus",{"2":{"32":1}}],["term",{"2":{"346":2,"407":1,"430":7,"453":2}}],["telemetry",{"2":{"336":1}}],["test123",{"2":{"158":1}}],["test",{"2":{"39":1,"269":1,"409":2,"423":1,"424":1,"453":2}}],["text2025",{"2":{"453":1}}],["text=prompt",{"2":{"407":1}}],["text",{"2":{"39":1,"369":1,"424":1}}],["thinking",{"2":{"382":1}}],["this",{"2":{"23":1,"134":2,"407":1}}],["their",{"2":{"453":1}}],["the",{"2":{"21":2,"23":1,"49":1,"92":2,"93":1,"407":8,"409":4,"424":1,"430":5,"440":4}}],["token",{"2":{"444":1,"453":1}}],["tos存储桶",{"2":{"111":1}}],["tos",{"0":{"238":1},"2":{"37":1,"111":1,"115":6,"122":2,"126":1,"232":2,"233":1,"234":1,"238":3,"245":6,"248":1,"249":1,"265":2,"267":3,"276":2}}],["to",{"2":{"23":1,"43":1,"83":1,"92":2,"93":2,"134":1,"327":1,"377":1,"407":2,"409":3,"430":3,"431":1,"440":2,"453":1}}],["toolid",{"2":{"424":1}}],["toolkit",{"2":{"291":4}}],["tools的veadk",{"2":{"418":1}}],["tools为agent提供标准化的沙箱运行环境和工具接口",{"2":{"411":1}}],["tools=tools",{"2":{"407":1}}],["tools=",{"2":{"345":1,"353":1,"374":1,"375":3,"381":1,"394":2,"415":1,"453":1}}],["toolset",{"2":{"112":4,"191":2,"453":4}}],["tools",{"0":{"190":1,"411":1},"1":{"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1},"2":{"40":2,"64":2,"71":1,"85":2,"89":1,"187":1,"190":12,"345":2,"353":2,"374":2,"381":2,"407":4,"412":1,"413":1,"414":1,"415":2,"424":1,"453":3}}],["tool",{"0":{"365":1,"372":1},"1":{"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"373":1,"374":1,"375":1,"376":1},"2":{"10":1,"112":6,"190":3,"191":3,"326":2,"366":2,"368":1,"369":1,"371":1,"373":2,"374":1,"375":3,"393":1,"413":1,"414":1,"415":1,"419":2,"420":1,"424":3,"425":2,"453":2}}],["volumes",{"0":{"227":1}}],["volcano",{"2":{"217":1,"407":1,"430":3,"440":3}}],["volc",{"2":{"200":4}}],["volces",{"2":{"37":1,"137":1,"171":1,"243":1,"259":3,"276":1,"424":2,"429":1,"453":1}}],["volceapi",{"2":{"37":3,"147":1,"164":1,"171":2,"452":1}}],["volcengine",{"2":{"23":1,"26":2,"27":2,"31":2,"33":2,"77":2,"103":1,"109":1,"115":3,"122":3,"200":2,"217":2,"259":1,"265":1,"339":1,"408":2,"419":2}}],["v",{"2":{"186":1}}],["v2>",{"2":{"431":1}}],["v2",{"2":{"120":2,"210":1,"429":1}}],["validate",{"2":{"387":1}}],["valueerror",{"2":{"390":1,"430":1,"440":1}}],["value",{"2":{"118":1}}],["variables",{"2":{"282":1,"424":1,"430":1,"440":1}}],["variable",{"2":{"93":1,"430":1,"440":1}}],["var",{"2":{"86":2,"90":3,"97":1,"101":2,"305":1,"306":1,"320":1}}],["vpc",{"2":{"113":7,"191":3}}],["v1",{"2":{"106":2,"111":1,"118":1,"119":1,"120":1,"134":1,"222":1,"237":2,"429":1,"431":2}}],["v3",{"2":{"32":1,"453":1}}],["viking",{"2":{"430":3,"439":3,"440":3,"441":2}}],["vikingmem",{"2":{"429":2,"430":2,"431":2}}],["vikingdb",{"2":{"188":1,"189":1,"429":2,"431":3,"439":1,"440":1}}],["vim",{"2":{"122":1}}],["virtual",{"2":{"21":1,"23":3}}],["vitepress",{"2":{"4":1,"6":2}}],["vefaas",{"2":{"450":1}}],["veauth",{"2":{"453":1}}],["veagent",{"2":{"424":1}}],["veadk是一个开源的智能体开发框架",{"2":{"430":1,"440":1}}],["veadk",{"2":{"21":2,"33":1,"82":1,"86":1,"90":1,"96":1,"97":1,"98":2,"99":1,"100":1,"339":1,"345":2,"353":2,"374":2,"381":3,"401":1,"404":1,"407":4,"414":1,"415":2,"418":2,"423":1,"424":1,"430":5,"440":5,"451":1,"453":17}}],["ve",{"2":{"111":1,"284":7,"437":2}}],["venv",{"2":{"21":2,"23":6,"44":3,"404":3,"451":3}}],["versions",{"2":{"191":1}}],["version>",{"2":{"191":2}}],["version",{"0":{"186":1,"214":1},"2":{"21":1,"24":1,"69":1,"109":1,"132":1,"186":1,"191":3,"208":1,"214":4,"259":2,"274":1,"275":1,"276":1,"284":3,"286":1,"407":1,"424":1,"453":3}}],["edition",{"2":{"453":8}}],["editable",{"2":{"23":1}}],["ecs",{"2":{"453":16}}],["echo",{"2":{"46":1,"132":1,"282":2,"314":1}}],["evalue",{"2":{"424":1}}],["eventqueue",{"2":{"382":2}}],["event",{"2":{"382":4,"383":1,"407":8,"409":28,"424":1,"429":2,"431":3,"453":1}}],["events",{"2":{"382":1,"407":1}}],["either",{"2":{"407":1}}],["eino",{"2":{"92":1}}],["else",{"2":{"368":1}}],["ep",{"2":{"232":1,"243":2,"247":1,"271":1,"276":1}}],["ease",{"2":{"92":1,"93":1}}],["error",{"2":{"52":1,"172":2,"198":1,"199":1,"200":1,"279":1,"280":1,"281":1,"282":1,"298":1,"300":1,"355":4,"360":1,"390":3,"391":1,"407":5}}],["encrypted",{"2":{"453":2}}],["ename",{"2":{"424":1}}],["enabled",{"2":{"298":1,"307":1,"314":2,"453":2}}],["enabled=true",{"2":{"293":1,"295":1,"296":1,"303":1,"304":1,"305":1,"306":1,"309":1,"318":1,"319":1,"320":1,"321":3}}],["enable",{"2":{"113":3,"191":2,"453":1}}],["entering",{"2":{"92":1}}],["entrypoint",{"0":{"350":1},"1":{"351":1,"352":1,"353":1,"354":1,"355":1},"2":{"96":1,"100":1,"101":1,"325":1,"338":1,"345":1,"351":1,"353":1,"355":1,"390":1,"391":1,"392":1,"394":2,"407":1,"415":1,"430":1,"440":1,"453":1}}],["entry",{"0":{"211":1},"2":{"69":1,"92":1,"93":1,"100":1,"106":2,"109":1,"118":1,"119":1,"120":2,"123":1,"126":2,"132":1,"206":1,"208":1,"211":5,"271":1,"274":1,"275":1,"276":1,"277":2,"286":1}}],["engine",{"2":{"76":1,"217":1,"360":4,"407":1,"430":3,"440":3}}],["env",{"2":{"191":1,"218":1,"274":1,"276":1,"319":3}}],["envs",{"0":{"218":1,"225":1,"243":1,"254":1},"2":{"33":3,"69":1,"106":1,"110":5,"206":1,"208":1,"218":2,"220":1,"225":2,"232":1,"243":3,"247":1,"270":2,"271":1,"274":2,"275":1,"276":2,"277":1,"283":4,"286":1,"287":1,"431":2,"441":1}}],["environment",{"2":{"21":3,"23":3,"424":1,"430":2,"440":2}}],["endpoint=",{"2":{"453":1}}],["endpoint=https",{"2":{"110":1,"119":1}}],["endpoint",{"2":{"32":3,"33":1,"37":2,"54":2,"63":1,"171":1,"217":1,"243":1,"245":1,"255":1,"276":1,"284":2,"424":2,"452":2,"453":1}}],["extra",{"2":{"453":5}}],["external",{"2":{"188":1}}],["expire",{"2":{"453":2}}],["express",{"2":{"407":1}}],["export",{"2":{"27":2,"31":1,"33":1,"46":1,"200":2,"202":1,"217":1,"293":1,"294":1,"295":2,"296":3,"299":3,"303":1,"304":3,"305":5,"306":2,"311":2,"312":2,"315":2,"316":2,"318":5,"320":4,"321":8,"408":2,"419":3,"439":2,"453":2}}],["exclude",{"2":{"407":1}}],["exc",{"2":{"390":1}}],["exceptions",{"2":{"430":1,"440":1}}],["exception",{"2":{"355":1,"360":1,"390":1,"391":1,"407":2}}],["except",{"2":{"355":2,"360":1,"390":2,"391":1,"407":2}}],["exceeded",{"2":{"49":1}}],["executed",{"2":{"424":1}}],["execute",{"2":{"360":1,"382":1,"383":2}}],["executor",{"0":{"378":1},"1":{"379":1,"380":1,"381":1,"382":1,"383":1},"2":{"327":1,"379":1,"381":3,"382":1,"386":1}}],["executors",{"2":{"291":4}}],["execution",{"2":{"11":1,"355":1,"382":2,"424":2}}],["example",{"2":{"110":1,"119":1,"319":1,"393":1,"437":2}}],["existing",{"2":{"86":1,"93":1,"238":1,"239":1}}],["e",{"2":{"23":1,"33":7,"110":4,"118":1,"119":2,"123":1,"355":6,"360":3,"390":5,"391":2,"407":3,"429":1,"431":1,"453":11}}],["|",{"2":{"21":1,"113":2,"387":1,"409":56,"424":18,"453":24}}],["speech",{"2":{"453":1}}],["specific",{"2":{"407":1}}],["specify",{"2":{"21":1}}],["special",{"2":{"122":1}}],["swagger",{"2":{"446":1,"450":1}}],["s123",{"2":{"434":1}}],["software",{"2":{"407":1}}],["southeast",{"2":{"259":1}}],["source",{"2":{"21":1,"23":2,"43":1,"44":1,"134":1,"404":1,"451":1,"453":2}}],["salesforce",{"2":{"437":1}}],["sandbox能力",{"2":{"412":3}}],["sandbox镜像集成了代码执行",{"2":{"411":1}}],["save",{"2":{"387":1,"388":1,"430":3,"453":2}}],["samples",{"2":{"347":1,"395":1}}],["sample",{"2":{"39":1,"433":1}}],["schedule",{"2":{"375":1}}],["scripts",{"2":{"131":1,"132":2,"133":1,"140":5,"206":1,"257":2,"260":1}}],["script",{"0":{"260":1},"2":{"131":2,"132":2,"133":1,"140":3,"206":1,"257":2,"260":2,"288":1}}],["sqlalchemy",{"2":{"360":1}}],["slim",{"2":{"131":1,"206":1,"257":1,"259":2,"276":1}}],["sz",{"2":{"123":1}}],["s",{"2":{"114":1,"190":4,"407":2,"424":1,"440":1}}],["summary",{"2":{"429":1}}],["success",{"2":{"424":1}}],["successful",{"2":{"39":1}}],["successfully",{"2":{"37":1,"92":1,"93":1,"391":1,"424":2}}],["sunny",{"2":{"368":1}}],["support中",{"2":{"437":1}}],["support",{"2":{"210":1,"437":1,"439":1,"453":1}}],["sudo",{"2":{"199":1}}],["subnet",{"2":{"113":4,"191":2}}],["sse",{"2":{"98":1,"158":1,"407":6}}],["systemctl",{"2":{"199":1}}],["system",{"2":{"85":2,"407":1}}],["sync",{"2":{"23":1}}],["smart",{"2":{"84":1}}],["stdout",{"2":{"424":1}}],["store",{"0":{"384":1},"1":{"385":1,"386":1,"387":1,"388":1},"2":{"327":1,"385":1,"386":1,"387":2}}],["stopped",{"2":{"172":1,"220":1,"228":2}}],["startup",{"2":{"409":2,"453":2}}],["started",{"2":{"409":1,"453":1}}],["start",{"0":{"449":1},"1":{"450":1,"451":1,"452":1,"453":1},"2":{"199":1,"211":1}}],["status",{"0":{"166":1},"1":{"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1},"2":{"51":1,"54":1,"63":1,"70":1,"80":1,"165":1,"167":1,"170":1,"171":1,"173":2,"189":1,"193":1,"194":1,"202":1,"291":3,"294":1,"302":1,"307":1,"312":1,"315":1,"369":2,"424":1}}],["strip",{"2":{"368":1}}],["strategy",{"2":{"291":1}}],["str",{"2":{"100":2,"338":1,"345":2,"351":1,"352":5,"353":1,"355":2,"357":1,"358":1,"359":1,"360":2,"361":1,"363":1,"366":1,"368":3,"369":1,"371":1,"373":2,"374":2,"375":6,"382":1,"387":3,"390":2,"391":1,"392":6,"394":2,"407":2,"415":2,"430":2,"440":2,"453":2}}],["streaming",{"2":{"407":2,"453":1}}],["streamingmode",{"2":{"407":1,"453":1}}],["streamablehttpconnectionparams",{"2":{"453":1}}],["streamable",{"2":{"407":1}}],["stream",{"2":{"36":1,"70":1,"85":1,"86":2,"89":3,"90":2,"92":2,"98":1,"407":2,"424":1}}],["steps",{"2":{"92":1,"93":1}}],["silicon",{"2":{"262":1}}],["signaturedoesnotmatch",{"2":{"57":1}}],["site",{"2":{"43":1}}],["simple",{"0":{"349":1},"1":{"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1},"2":{"36":3,"37":2,"39":1,"84":1,"259":2,"277":1,"406":1,"407":2,"409":1,"420":1,"425":1,"430":3,"440":1}}],["sd4fc6lpoh486npgcaav0",{"2":{"452":1}}],["sd4fe31poh486npgcaqq0",{"2":{"37":1}}],["sd4fe31poh486",{"2":{"37":2}}],["sdk",{"0":{"322":1},"1":{"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1},"2":{"0":1,"6":2,"18":1,"19":1,"20":1,"21":1,"23":4,"43":2,"44":4,"73":1,"322":2,"323":1,"329":1,"336":1,"339":1,"344":1,"346":1,"348":1,"395":1,"401":1,"404":1,"410":1,"425":1,"451":1}}],["separate",{"2":{"429":1,"431":1}}],["see",{"2":{"407":1}}],["seed",{"2":{"32":1,"89":1,"97":1,"440":1}}],["sent",{"2":{"407":1}}],["self",{"2":{"382":2,"387":8}}],["selected",{"2":{"92":1}}],["select",{"2":{"92":1,"360":1}}],["service=agentkit",{"2":{"424":1}}],["services",{"2":{"360":1}}],["service",{"2":{"243":1,"276":1,"407":4,"424":1,"430":1,"440":1,"453":1}}],["serverless",{"0":{"399":1},"2":{"396":1,"397":1}}],["server",{"2":{"211":2,"276":1,"382":3,"387":1,"407":1,"409":1,"446":2,"448":2,"453":9}}],["sess456",{"2":{"162":1}}],["sessionid",{"2":{"424":1}}],["sessions",{"2":{"64":1,"190":1}}],["session",{"2":{"39":2,"100":3,"158":1,"162":1,"190":11,"345":3,"352":1,"353":3,"369":2,"399":1,"407":16,"409":5,"415":3,"416":2,"422":3,"423":3,"424":5,"430":8,"433":2,"434":1,"440":5,"453":11}}],["searchquery",{"2":{"371":2}}],["search",{"2":{"85":2,"89":1,"371":2,"407":3,"447":2}}],["secretkey=",{"2":{"200":1}}],["secretkey",{"2":{"200":1,"282":1,"403":1,"450":1}}],["secret",{"2":{"26":2,"27":2,"31":2,"33":2,"46":1,"77":4,"115":2,"122":2,"200":1,"265":1,"270":1,"346":1,"408":1,"419":1,"433":1,"434":1}}],["setlevel",{"2":{"407":1}}],["setup",{"2":{"131":1,"132":2,"140":2,"206":1,"257":1,"260":1}}],["set",{"2":{"26":2,"77":5,"115":1,"122":4,"126":2,"190":1,"200":3,"387":1,"430":2,"440":2}}],["skills",{"2":{"409":2}}],["sk",{"0":{"31":1,"57":1},"2":{"25":1,"31":1,"33":1,"57":3,"77":1,"115":1,"141":1,"200":1,"282":1,"346":1,"408":2,"419":2,"424":2}}],["short",{"2":{"346":1,"407":1,"453":1}}],["show",{"2":{"26":1,"43":2,"114":1,"121":1,"122":1,"158":2,"188":1,"189":1,"190":2}}],["shanghai",{"2":{"368":1}}],["sha256",{"2":{"134":1}}],["shared",{"2":{"113":3,"267":4}}],["shell",{"2":{"26":1,"27":1,"33":1,"43":1,"46":1}}],["sh",{"2":{"21":3,"131":1,"132":2,"133":1,"140":6,"206":1,"211":2,"257":2,"260":2}}],["来验证",{"2":{"434":1}}],["来发起调用",{"2":{"433":1}}],["来安装",{"2":{"418":1}}],["来测试您的",{"2":{"409":1}}],["来快速启动项目",{"2":{"406":1}}],["来管理您的",{"2":{"404":1}}],["来管理虚拟环境和依赖",{"2":{"21":1}}],["来提供核心智能",{"2":{"32":1}}],["来处理",{"2":{"11":1}}],["推荐日常开发",{"2":{"195":1}}],["推荐调试时使用",{"2":{"195":1}}],["推荐首次配置",{"0":{"105":1}}],["推荐方式",{"0":{"26":1}}],["推荐",{"0":{"21":1},"2":{"44":1,"105":1,"182":1,"200":1,"210":1,"216":1,"217":1,"237":1,"238":1,"318":1}}],["推荐使用安全的全局配置方式",{"2":{"77":1}}],["推荐使用",{"2":{"15":1,"74":1,"440":1}}],["77",{"2":{"424":1}}],["7",{"0":{"123":1},"2":{"20":1,"37":1,"90":1,"105":8,"140":1,"310":1,"453":1}}],["稳定版本",{"0":{"18":1}}],["方舟的apikey",{"2":{"453":1}}],["方舟apikey",{"2":{"450":1}}],["方舟模型",{"2":{"37":1}}],["方舟模型接入点",{"2":{"37":1}}],["方便管理员补充到知识库",{"2":{"437":1}}],["方便开发者自定义和扩展",{"2":{"10":1}}],["方案",{"2":{"270":3}}],["方式",{"2":{"195":2,"237":3,"272":3}}],["方式二",{"2":{"33":1}}],["方式一",{"2":{"33":1}}],["方法",{"2":{"383":2}}],["方法三",{"0":{"22":1},"1":{"23":1}}],["方法二",{"0":{"21":1}}],["方法一",{"0":{"17":1},"1":{"18":1,"19":1,"20":1}}],["虚拟环境配置",{"2":{"451":1}}],["虚拟环境",{"2":{"15":1,"404":1}}],["或公网可访问的位置",{"2":{"450":1}}],["或会话创建和管理独立的运行环境",{"2":{"397":1}}],["或其子类",{"2":{"383":1}}],["或其他",{"2":{"43":1}}],["或为空",{"2":{"314":1}}],["或保存到用户目录",{"2":{"311":1}}],["或检查全局配置",{"2":{"282":1}}],["或者手动删除",{"2":{"310":1}}],["或者显式设置",{"2":{"307":1}}],["或者",{"2":{"200":1,"451":1}}],["或者指定特定模板",{"2":{"70":1}}],["或使用",{"2":{"131":1}}],["或解绑",{"2":{"112":1}}],["或权限不足",{"2":{"58":1}}],["或可能存在资源不足",{"2":{"51":1}}],["或联系管理员提高配额",{"2":{"49":1}}],["或认证失败",{"2":{"46":1}}],["或重启终端以使更改生效",{"2":{"43":1}}],["或运行",{"2":{"37":1}}],["或创建自定义推理接入点",{"2":{"32":1}}],["或",{"2":{"15":1,"27":1,"37":2,"43":1,"44":1,"52":1,"57":1,"76":1,"86":1,"112":2,"113":2,"125":1,"132":1,"158":1,"186":1,"211":1,"217":1,"279":1,"318":1,"329":1,"358":1,"404":1,"410":1,"425":1,"446":1}}],["或更高版本",{"2":{"15":1,"73":1}}],["包管理工具",{"2":{"418":1}}],["包管理器",{"2":{"15":1,"73":1}}],["包括",{"2":{"335":1}}],["包括工具的生命周期管理和会话操作",{"2":{"190":1}}],["包括是否在线",{"2":{"166":1}}],["包括基础应用",{"2":{"10":1,"29":1}}],["包含距离信息的字典",{"2":{"393":1}}],["包含输入消息和历史",{"2":{"382":1}}],["包含关键词",{"2":{"371":1}}],["包含网页内容的字典",{"2":{"369":1}}],["包含天气状况和温度的字典",{"2":{"368":1}}],["包含依赖服务检测",{"2":{"360":1}}],["包含依赖检查",{"0":{"360":1}}],["包含上下文信息",{"2":{"352":1}}],["包含用户输入和配置",{"2":{"352":1}}],["包含了所有运行参数",{"2":{"204":1}}],["包含时间戳",{"2":{"138":1}}],["包含元数据头",{"2":{"134":1}}],["包含以下配置项",{"2":{"122":1}}],["包含最新功能和修复",{"2":{"19":1}}],["包装一个",{"2":{"407":1}}],["包装后的项目结构",{"0":{"100":1}}],["包装器是标准的",{"2":{"101":1}}],["包装器文件示例",{"2":{"100":1}}],["包装器",{"2":{"98":2}}],["包装器类型对比",{"0":{"98":1}}],["包装器的作用",{"0":{"96":1}}],["包装",{"2":{"96":1}}],["包装并指定项目名称",{"2":{"90":1}}],["包装现有",{"2":{"90":1,"194":1}}],["包装现有的",{"2":{"83":1}}],["包装模式是一个强大的功能",{"2":{"94":1}}],["包装模式详解",{"0":{"94":1},"1":{"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1}}],["包装模式输出",{"0":{"93":1}}],["包装模式选项",{"0":{"86":1}}],["包装模式下根据源文件名自动生成",{"2":{"84":1}}],["包装模式",{"0":{"90":1,"194":1},"2":{"82":1,"83":1}}],["包产生冲突",{"2":{"44":1}}],["len",{"2":{"371":1}}],["level=warning",{"2":{"306":1,"312":1,"316":1,"320":1}}],["level=info",{"2":{"305":1,"312":1,"315":1,"318":1,"319":1}}],["level=error",{"2":{"299":1,"321":1}}],["level=debug",{"2":{"202":1,"296":1,"299":1,"304":1,"305":1,"316":1,"318":1,"321":2}}],["level",{"2":{"208":1,"218":1,"225":1,"243":1,"274":1,"276":1,"298":1,"299":2,"312":2}}],["ls",{"2":{"314":1}}],["lssf",{"2":{"21":1}}],["ltd",{"2":{"407":1}}],["lt",{"2":{"80":1,"259":2}}],["law",{"2":{"407":1}}],["lat2",{"2":{"393":2}}],["lat1",{"2":{"393":2}}],["later",{"2":{"390":1}}],["latest",{"2":{"69":1,"111":1,"136":1,"137":1,"171":1,"220":1,"222":2,"230":1,"237":3,"257":1,"259":4,"275":1,"375":1}}],["la",{"2":{"314":1}}],["langchain",{"2":{"158":1,"339":1}}],["language",{"0":{"213":1,"214":1},"2":{"92":1,"93":1,"132":2,"206":1,"208":2,"213":1,"214":5,"274":2,"275":2,"276":2,"284":1,"286":2,"407":1,"424":2}}],["launch命令",{"2":{"410":1,"425":1}}],["launched",{"2":{"37":1}}],["launch",{"0":{"150":1,"155":1,"216":1},"1":{"151":1,"152":1,"153":1,"154":1,"155":1},"2":{"37":3,"47":1,"61":1,"63":1,"69":2,"70":1,"80":1,"92":1,"93":1,"106":1,"109":1,"112":1,"113":1,"119":1,"123":2,"125":1,"126":1,"132":1,"135":1,"145":1,"151":1,"154":2,"193":1,"194":1,"195":1,"196":2,"202":1,"206":3,"208":1,"216":2,"267":1,"269":2,"271":2,"274":2,"275":2,"276":2,"277":3,"283":1,"286":1,"291":1,"299":1,"305":1,"431":2,"432":1,"441":1,"442":1}}],["lon2",{"2":{"393":2}}],["lon1",{"2":{"393":2}}],["longtermmemory",{"2":{"430":2}}],["long",{"2":{"346":1,"363":1,"430":6,"453":1}}],["lower",{"2":{"368":1}}],["loading",{"2":{"291":1}}],["logger",{"2":{"355":3,"360":1,"390":3,"391":3,"407":5,"430":3,"440":3,"453":3}}],["logging",{"2":{"340":1,"355":2,"390":2,"407":3,"430":2,"440":2,"453":2}}],["logs",{"2":{"190":1,"227":2,"293":1,"298":1,"303":1,"309":2,"310":2,"311":1,"314":2,"319":1,"321":1}}],["log",{"2":{"50":1,"202":1,"208":1,"218":1,"225":1,"243":1,"274":1,"276":1,"293":1,"294":1,"295":1,"296":2,"298":5,"299":5,"304":2,"305":6,"306":4,"307":1,"309":3,"310":2,"311":4,"312":4,"315":2,"316":2,"318":4,"319":4,"320":5,"321":6}}],["location",{"2":{"43":1,"161":1,"409":1,"423":1,"453":1}}],["local",{"0":{"33":1,"66":1,"76":1,"136":1,"146":1,"170":1,"179":1,"199":1,"219":1},"1":{"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1},"2":{"21":1,"33":2,"105":1,"109":1,"110":1,"125":1,"132":1,"141":1,"149":1,"172":1,"206":2,"216":3,"220":1,"269":1,"270":1,"274":2,"277":2,"286":1,"409":2,"423":1,"424":1,"453":2}}],["localhost",{"2":{"3":1,"39":1,"146":1,"149":1,"170":1,"360":1,"387":1,"409":1,"423":1,"453":1}}],["live",{"2":{"453":1}}],["liveness",{"2":{"325":1,"362":1}}],["litellm",{"2":{"453":1}}],["licenses",{"2":{"407":1}}],["license",{"2":{"407":8}}],["licensed",{"2":{"407":1}}],["limitations",{"2":{"407":1}}],["limit",{"0":{"229":2},"2":{"188":1,"220":2,"229":2,"274":2}}],["libxslt1",{"2":{"140":1}}],["libxml2",{"2":{"140":1}}],["libpq",{"2":{"132":1,"140":1}}],["list",{"2":{"36":1,"71":5,"124":2,"188":2,"189":2,"190":2,"191":1,"329":1,"330":1,"371":2}}],["linux",{"2":{"15":1,"199":1,"257":1,"262":2}}],["llm",{"2":{"32":1,"365":1,"367":1,"370":2,"447":2,"453":1}}],["版本信息",{"2":{"186":1}}],["版本一致",{"2":{"155":1}}],["版本支持",{"2":{"74":1,"75":1}}],["版本",{"2":{"15":1,"105":1}}],["开启控制台调试",{"2":{"321":1}}],["开启控制台和文件的",{"2":{"304":1}}],["开启控制台日志",{"0":{"294":1},"2":{"294":1,"315":1,"319":1}}],["开启详细日志",{"2":{"304":1}}],["开启",{"2":{"296":1}}],["开启文件日志时生效",{"2":{"298":1}}],["开启文件日志",{"0":{"293":1},"2":{"293":1,"303":2,"319":1,"320":1,"321":1}}],["开启调试模式",{"2":{"243":1}}],["开启调试",{"2":{"225":1,"274":1}}],["开启后按日期分割",{"2":{"321":1}}],["开启后",{"2":{"113":1}}],["开始前你需要准备",{"2":{"450":1}}],["开始销毁",{"2":{"181":1}}],["开始部署",{"2":{"153":1}}],["开始部署到云端平台",{"2":{"147":1}}],["开始部署到本地",{"2":{"146":1}}],["开始构建",{"2":{"153":1}}],["开始构建本地镜像",{"2":{"136":1}}],["开始启动",{"2":{"153":1}}],["开始云端构建",{"2":{"137":1}}],["开始使用",{"0":{"13":1,"34":1},"1":{"35":1,"36":1,"37":1}}],["开发者只需关注业务逻辑",{"2":{"338":1}}],["开发者通过",{"2":{"11":1}}],["开发工具包",{"2":{"322":1}}],["开发流程",{"2":{"99":1}}],["开发环境建议配置",{"2":{"319":1}}],["开发环境配置",{"2":{"318":1}}],["开发环境推荐配置",{"0":{"318":1}}],["开发环境资源限制小一些",{"2":{"274":1}}],["开发环境的天气查询",{"2":{"274":1}}],["开发环境",{"0":{"74":1,"75":1},"2":{"196":1,"269":1}}],["开发更强大的",{"2":{"40":1}}],["开发调试用",{"2":{"200":1}}],["开发调试",{"0":{"27":1},"2":{"248":1,"300":1}}],["开发版本",{"0":{"19":1}}],["开发",{"2":{"10":1,"29":1,"79":1,"80":1,"269":1}}],["开发平台",{"2":{"9":1}}],["模版来创建项目",{"2":{"430":1,"440":1}}],["模块依赖关系",{"0":{"336":1}}],["模块化与可扩展",{"2":{"10":1}}],["模板使用",{"2":{"430":1,"440":1}}],["模板生成的",{"2":{"407":1}}],["模板变量渲染失败",{"0":{"282":1}}],["模板变量用引号包裹",{"2":{"280":1}}],["模板变量",{"0":{"233":1}}],["模板和构建流程",{"2":{"213":1}}],["模板开始",{"2":{"90":1}}],["模板开发一个简单的",{"2":{"29":1}}],["模板创建",{"2":{"89":1}}],["模板模式输出",{"0":{"92":1}}],["模板模式选项",{"0":{"85":1}}],["模板模式下为",{"2":{"84":1}}],["模板模式",{"0":{"89":1,"193":1},"2":{"82":1,"83":1}}],["模板",{"2":{"70":1}}],["模板化项目",{"2":{"61":1}}],["模型接入点",{"2":{"232":1,"247":1}}],["模型端点等跨环境配置",{"2":{"110":1}}],["模型调用失败",{"0":{"55":1}}],["模型",{"2":{"32":1,"55":1,"225":1,"232":1,"247":1}}],["模式字段",{"0":{"287":1}}],["模式相同",{"2":{"252":1,"253":1,"254":1}}],["模式基本一致",{"2":{"249":1}}],["模式的配置项与",{"2":{"249":1}}],["模式的区别",{"0":{"248":1}}],["模式的专属配置",{"2":{"206":3}}],["模式支持模板变量",{"2":{"233":1}}],["模式配置",{"0":{"219":1,"231":1,"246":1},"1":{"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1}}],["模式状态",{"2":{"172":2}}],["模式前提",{"2":{"141":2}}],["模式参数",{"0":{"111":1}}],["模式下",{"2":{"33":2}}],["模式必读",{"0":{"33":1}}],["模式",{"0":{"76":1,"77":1,"136":1,"137":1,"146":1,"147":1,"170":1,"171":1,"179":1,"180":1,"199":1,"200":1},"2":{"12":1,"33":1,"149":2,"158":1,"216":1,"248":2,"269":3,"277":2,"448":1}}],["研究员",{"2":{"12":1}}],["例如公共读写",{"2":{"238":1}}],["例如",{"2":{"12":1,"37":1,"43":1,"84":1}}],["查询",{"2":{"332":1}}],["查询数据库",{"2":{"12":1}}],["查阅文档",{"2":{"59":1}}],["查看注解使用文档了解各种装饰器的详细用法",{"2":{"347":1}}],["查看详细信息",{"2":{"316":1}}],["查看详细的调试信息",{"2":{"296":1}}],["查看详细日志",{"2":{"202":1}}],["查看生成的日志文件",{"2":{"293":1}}],["查看生产环境状态",{"2":{"173":1}}],["查看配置内容",{"2":{"272":1}}],["查看配置变更但不保存",{"2":{"120":1}}],["查看特定版本详情",{"2":{"191":1}}],["查看会话详情",{"2":{"190":1}}],["查看工具详情",{"2":{"190":1}}],["查看工具列表",{"2":{"71":1}}],["查看支持的",{"2":{"188":1,"189":1}}],["查看版本",{"0":{"186":1}}],["查看所有命令列表",{"2":{"185":1}}],["查看所有可用模板",{"2":{"36":1}}],["查看某个命令的帮助",{"2":{"185":1}}],["查看任何命令的详细说明和参数",{"2":{"185":1}}],["查看帮助",{"0":{"185":1}}],["查看当前状态",{"2":{"173":1}}],["查看当前配置",{"0":{"121":1}}],["查看已有变量",{"2":{"124":1}}],["查看全局配置",{"2":{"122":1}}],["查看状态",{"2":{"80":1,"193":1,"194":1}}],["查看运行时详情",{"2":{"191":1}}],["查看运行时实例",{"2":{"71":1}}],["查看运行状态",{"2":{"70":1}}],["查看知识库详情",{"2":{"189":1}}],["查看知识库",{"2":{"71":1}}],["查看记忆集合详情",{"2":{"188":1}}],["查看记忆集合",{"2":{"71":1}}],["查看可用模板",{"2":{"71":1}}],["查看日志文件",{"2":{"321":1}}],["查看日志",{"2":{"59":1}}],["查看",{"2":{"50":1,"52":1,"63":1,"166":1,"188":1,"202":1,"395":1}}],["查看文档站点",{"2":{"3":1}}],["如何发起调用",{"0":{"433":1,"443":1}}],["如何在包装器中添加额外的依赖",{"2":{"101":1}}],["如不指定",{"2":{"388":1}}],["如需自定义逻辑",{"2":{"383":1}}],["如需日志",{"2":{"291":1}}],["如有问题",{"2":{"321":1}}],["如日志级别",{"2":{"218":1}}],["如火山引擎凭证",{"2":{"205":1}}],["如ep",{"2":{"32":1}}],["如",{"2":{"27":1,"84":1,"85":2,"225":1,"230":1,"262":1,"284":1,"437":1,"447":1}}],["如果机器人无法回答用户问题",{"2":{"437":1}}],["如果前面已执行",{"2":{"425":1}}],["如果需要将日志保存到文件",{"2":{"293":1}}],["如果需要自定义配置",{"2":{"37":1}}],["如果你想在控制台实时查看日志",{"2":{"294":1}}],["如果你的配置文件使用旧版字段名",{"2":{"284":1}}],["如果你需要变更网络",{"2":{"113":1}}],["如果填写了他人",{"2":{"238":1}}],["如果已有项目",{"2":{"198":1}}],["如果是新项目",{"2":{"198":1}}],["如果以上方案无法解决您的问题",{"2":{"59":1}}],["如果超过",{"2":{"51":1}}],["如果必须使用现有环境",{"2":{"44":1}}],["如果看到类似下面的输出",{"2":{"39":1}}],["如果配置了火山引擎的",{"2":{"33":1}}],["如果您在此处未找到解决方案",{"2":{"41":1}}],["如果您计划在本地",{"2":{"33":1}}],["如果您不提供这些信息",{"2":{"32":1}}],["如果您习惯使用",{"2":{"23":1}}],["如果遇到问题",{"2":{"28":1}}],["如果成功输出版本号",{"2":{"24":1}}],["如发送邮件",{"2":{"12":1}}],["如知识库",{"2":{"11":1}}],["敏捷构建",{"2":{"11":1}}],["代码示例中",{"2":{"453":1}}],["代码示例",{"2":{"453":1}}],["代码示例使用英文注释",{"2":{"7":1}}],["代码说明",{"0":{"416":1}}],["代码亮点",{"2":{"407":1}}],["代码即服务",{"2":{"399":1}}],["代码包的访问地址",{"2":{"245":1}}],["代码包的存储路径",{"2":{"245":1}}],["代码的入口文件",{"2":{"211":1}}],["代码是否有语法错误",{"2":{"201":1}}],["代码错误",{"2":{"201":1}}],["代码和部署代码分离",{"2":{"99":1}}],["代码",{"2":{"99":1,"101":1}}],["代码打包成",{"2":{"127":1}}],["代码打包成可移植的",{"2":{"80":1}}],["代码打包",{"2":{"11":1}}],["并规划后续的轮转与托管",{"2":{"448":1}}],["并提升调用准确率",{"2":{"447":1}}],["并提供统一的知识库接口与框架对接",{"2":{"435":1}}],["并提供统一的接入点",{"2":{"399":1}}],["并提供弹性伸缩",{"2":{"10":1}}],["并提供标准化的接口",{"2":{"10":1}}],["并将qa",{"2":{"443":1}}],["并在后台记录该问题",{"2":{"437":1}}],["并添加下面内容作为qa",{"2":{"437":1}}],["并告诉你密码是",{"2":{"434":1}}],["并自动处理模型",{"2":{"407":1}}],["并自动完成环境准备",{"2":{"11":1}}],["并通过",{"2":{"407":1}}],["并获取其",{"2":{"403":1}}],["并获取模型推理的",{"2":{"32":1}}],["并修改",{"2":{"319":1}}],["并随",{"2":{"259":1}}],["并执行构建",{"2":{"37":1}}],["并使用",{"2":{"36":1}}],["负责解析定义文件",{"2":{"11":1}}],["依赖安装",{"2":{"397":1}}],["依赖安装失败",{"2":{"50":1}}],["依赖问题",{"2":{"201":1}}],["依赖列表",{"2":{"100":1}}],["依赖包列表文件",{"2":{"215":1}}],["依赖包",{"2":{"98":1}}],["依赖冲突",{"0":{"44":1}}],["依赖文件",{"2":{"37":1,"105":1,"109":1,"208":1,"286":1}}],["依赖",{"2":{"11":1,"36":1}}],["的服务后端",{"2":{"450":1}}],["的火山账号的",{"2":{"450":1}}],["的凭证透传或转换",{"2":{"448":1}}],["的暴露收敛为",{"2":{"447":1}}],["的后端",{"2":{"446":1}}],["的工程骨架",{"2":{"444":1}}],["的认证插件",{"2":{"444":1}}],["的持续学习与演进",{"2":{"426":1}}],["的请求使用独立的沙箱环境",{"2":{"422":1}}],["的请求将共享沙箱实例",{"2":{"416":1}}],["的多次请求将共享同一个沙箱实例",{"2":{"422":1}}],["的无缝集成",{"2":{"407":1}}],["的获取",{"2":{"407":1}}],["的项目结构",{"2":{"406":1}}],["的一键部署",{"2":{"401":1}}],["的托管环境",{"2":{"397":1}}],["的健康状况",{"2":{"397":1}}],["的健康探测",{"2":{"356":1}}],["的业务逻辑",{"2":{"396":1}}],["的任务存储",{"2":{"387":1}}],["的执行逻辑",{"2":{"378":1}}],["的能力边界",{"2":{"376":1}}],["的组合和协作",{"2":{"372":1}}],["的响应结果",{"2":{"352":1,"382":1}}],["的调用请求",{"2":{"350":1}}],["的运行器实例",{"2":{"380":1}}],["的运行时环境",{"2":{"332":1}}],["的运行状态",{"2":{"166":1}}],["的运行状态和端点信息",{"2":{"80":1}}],["的运行状态和",{"2":{"63":1}}],["的向量化知识库",{"2":{"330":1}}],["的长期和短期记忆",{"2":{"329":1}}],["的各项服务",{"2":{"328":1}}],["的主入口函数",{"2":{"325":1,"350":1}}],["的日志系统设计原则",{"2":{"321":1}}],["的配置示例",{"2":{"275":1}}],["的默认",{"2":{"217":1}}],["的描述信息",{"2":{"212":1}}],["的名字前缀",{"2":{"210":1}}],["的名字",{"2":{"210":1}}],["的误用",{"2":{"113":1}}],["的网络",{"2":{"113":1}}],["的系统提示词",{"2":{"85":1}}],["的功能描述",{"2":{"85":1}}],["的显示名称",{"2":{"85":1}}],["的所有配置项",{"2":{"78":1}}],["的部署",{"2":{"70":1}}],["的开发和部署",{"2":{"40":1}}],["的核心文件",{"2":{"204":1}}],["的核心特性之一是其灵活的部署模型",{"2":{"65":1}}],["的核心配置文件",{"2":{"36":1}}],["的核心设计理念是将",{"2":{"11":1}}],["的安装和环境配置",{"2":{"35":1}}],["的安装和基本配置",{"2":{"14":1}}],["的",{"2":{"33":1,"96":1,"407":1,"414":1}}],["的全局配置功能来安全地存储您的凭证",{"2":{"26":1}}],["的自动化流程",{"2":{"12":1}}],["的定义与执行分离",{"2":{"11":1}}],["的完整文档",{"2":{"0":1}}],["丰富的项目模板",{"2":{"10":1}}],["多渠道接入",{"2":{"437":1}}],["多协议支持",{"2":{"401":1}}],["多重隔离保障",{"2":{"400":1}}],["多",{"0":{"375":1}}],["多环境管理",{"0":{"196":1,"269":1}}],["多环境部署",{"2":{"61":1}}],["多阶段构建",{"2":{"133":1,"140":1,"259":1}}],["多个项目共享同一个",{"2":{"99":1}}],["多智能体系统",{"2":{"12":1}}],["多智能体协作",{"2":{"10":1}}],["多语言支持",{"2":{"10":1}}],["云厂商",{"2":{"217":1}}],["云平台",{"2":{"109":1}}],["云端区域",{"2":{"247":1}}],["云端平台",{"2":{"216":3}}],["云端",{"2":{"210":1,"248":1}}],["云端的操作权限",{"2":{"201":1}}],["云端凭证未配置",{"0":{"200":1}}],["云端构建的最大等待时间",{"2":{"244":1}}],["云端构建",{"0":{"137":1}}],["云端构建和运行",{"2":{"105":1}}],["云端构建和部署",{"2":{"37":1}}],["云端运行",{"2":{"105":1,"246":1}}],["云端镜像仓库",{"2":{"67":1}}],["云端自动构建",{"2":{"67":1}}],["云端模式",{"0":{"67":1}}],["云端部署可能需要",{"2":{"165":1}}],["云端部署",{"0":{"77":1,"147":1,"163":1},"2":{"158":1,"216":1}}],["云端部署配置",{"2":{"37":1}}],["云端部署到线上运维的全套",{"2":{"10":1}}],["云原生部署",{"2":{"10":1}}],["协作示例",{"0":{"375":1}}],["协作场景中尤为重要",{"2":{"85":1}}],["协作和汇总",{"2":{"10":1}}],["协同完成复杂任务的系统",{"2":{"12":1}}],["协同工作的复杂系统",{"2":{"10":1}}],["协议进行实际的记忆读写",{"2":{"329":1}}],["协议的应用框架",{"2":{"326":1,"327":1}}],["协议模板",{"2":{"70":1}}],["协议等",{"2":{"10":1,"29":1}}],["协议",{"2":{"10":1}}],["支持两条路径",{"2":{"446":1}}],["支持两级环境变量配置",{"2":{"110":1}}],["支持将企业既有",{"2":{"446":1}}],["支持非技术人员快速编辑知识内容",{"2":{"437":1}}],["支持网页",{"2":{"437":1}}],["支持调用built",{"2":{"418":1}}],["支持标准化集成与api调用",{"2":{"411":1}}],["支持流式输出的",{"2":{"406":1}}],["支持流式输出的agent应用",{"2":{"92":1}}],["支持长时间运行的操作",{"2":{"363":1}}],["支持自定义基础镜像",{"2":{"256":1}}],["支持模板变量",{"2":{"232":1,"247":1,"251":1}}],["支持全国主要城市",{"2":{"212":1}}],["支持全局配置文件",{"2":{"115":1}}],["支持运行时的创建",{"2":{"191":1}}],["支持知识库的增删改查操作",{"2":{"189":1}}],["支持分页和过滤",{"2":{"188":1,"189":1,"190":1,"191":1}}],["支持创建",{"2":{"188":1}}],["支持通过",{"2":{"130":1}}],["支持三种模式",{"2":{"102":1}}],["支持的全局配置字段",{"2":{"115":1}}],["支持的关联字段",{"2":{"112":1}}],["支持的",{"2":{"97":1}}],["支持a2a协议的多智能体应用",{"2":{"92":1}}],["支持从零开始和基于现有代码两种模式",{"2":{"81":1}}],["支持离线工作",{"2":{"66":1}}],["支持火山方舟的多种模型",{"2":{"32":1}}],["支持",{"2":{"10":2,"29":1,"214":2,"300":1,"339":1,"340":1,"370":1,"377":1,"416":1}}],["支持构建多个",{"2":{"10":1}}],["支持一键将应用部署到云端",{"2":{"10":1}}],["与规则校验自动生成工具与参数描述",{"2":{"446":1}}],["与主流",{"2":{"437":1}}],["与最终回答分开显示",{"2":{"158":1}}],["与资源组件进行关联",{"2":{"112":1}}],["与已部署的",{"2":{"63":1}}],["与我们联系",{"2":{"41":1}}],["与",{"0":{"248":1},"2":{"10":1,"25":1,"252":1,"253":1,"254":1,"400":1,"444":1,"448":1}}],["affective",{"2":{"453":1}}],["affiliates",{"2":{"407":1}}],["audio=false",{"2":{"453":1}}],["audio",{"2":{"453":2}}],["auth",{"2":{"453":4}}],["authorization",{"2":{"452":2,"453":1}}],["automatically",{"2":{"134":1}}],["auto",{"0":{"234":1},"2":{"129":1,"134":2,"232":6,"234":2,"238":2,"239":2,"242":4,"247":4,"252":1,"266":1,"267":3,"275":1,"276":5,"287":2,"453":1}}],["a4",{"2":{"437":1}}],["a3",{"2":{"437":1}}],["a2",{"2":{"437":1}}],["a2aagentexecutor",{"2":{"379":1,"381":2,"386":1}}],["a2a",{"0":{"377":1},"1":{"378":1,"379":1,"380":1,"381":1,"382":1,"383":1,"384":1,"385":1,"386":1,"387":1,"388":1},"2":{"10":2,"29":1,"40":1,"70":2,"85":1,"92":4,"327":1,"377":1,"381":7,"382":4,"384":1,"386":2,"387":3,"401":1}}],["a1",{"2":{"437":1}}],["amp",{"2":{"403":1,"450":1}}],["amd64",{"2":{"257":1,"262":1}}],["agreed",{"2":{"407":1}}],["again",{"2":{"390":1}}],["agent模版来创建项目",{"2":{"414":1}}],["agentexecutor",{"2":{"382":2,"383":2}}],["agent=root",{"2":{"453":1}}],["agent=calendar",{"2":{"375":1}}],["agent=news",{"2":{"375":1}}],["agent=weather",{"2":{"374":1,"375":1}}],["agent=agent",{"2":{"100":1,"345":1,"353":1,"381":2,"394":2,"407":1,"415":1,"430":1,"440":1}}],["agent名称只能包含字母",{"2":{"125":1}}],["agent名称",{"2":{"125":1}}],["agent应用名称",{"2":{"109":1}}],["agent应用内部runtime常用环境变量",{"2":{"37":1}}],["agents",{"2":{"89":1,"90":2,"92":1,"93":1,"267":1,"407":2}}],["agent$",{"2":{"39":1}}],["agent",{"0":{"38":1,"39":1,"97":1,"194":1,"210":1,"345":1,"349":1,"364":1,"372":1,"375":1,"377":1,"378":1,"396":1,"405":1,"406":1,"453":1},"1":{"39":1,"350":1,"351":1,"352":1,"353":1,"354":1,"355":1,"356":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"363":1,"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":2,"374":2,"375":2,"376":2,"378":1,"379":2,"380":2,"381":2,"382":2,"383":2,"384":1,"385":1,"386":1,"387":1,"388":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":2,"407":2,"408":2,"409":2,"410":1},"2":{"9":2,"10":2,"11":1,"12":2,"28":1,"29":2,"32":4,"33":4,"36":7,"37":6,"39":3,"40":2,"55":1,"60":1,"62":1,"63":5,"69":2,"70":7,"78":1,"79":3,"80":8,"81":1,"82":1,"83":3,"84":4,"85":6,"86":8,"89":10,"90":20,"92":11,"93":13,"94":1,"95":4,"96":3,"97":17,"98":1,"99":5,"100":6,"101":7,"102":1,"105":4,"106":3,"107":1,"109":2,"111":1,"118":1,"119":2,"120":3,"122":1,"123":2,"126":4,"127":1,"132":2,"136":1,"137":1,"138":1,"142":1,"147":1,"153":2,"156":1,"164":2,"165":1,"166":1,"170":1,"171":2,"174":1,"177":1,"181":1,"193":2,"194":5,"198":1,"202":1,"204":1,"205":1,"206":3,"208":5,"210":5,"211":1,"212":3,"220":2,"223":1,"224":1,"225":1,"230":1,"232":3,"241":1,"243":6,"247":2,"252":1,"270":3,"271":4,"274":4,"275":5,"276":7,"277":6,"279":1,"281":1,"286":2,"287":1,"298":1,"309":1,"311":2,"319":1,"322":2,"325":3,"326":2,"327":5,"329":1,"330":1,"332":1,"339":1,"345":3,"348":1,"350":1,"352":1,"353":5,"355":1,"372":2,"373":2,"374":8,"375":13,"376":3,"377":3,"378":2,"379":1,"380":1,"381":11,"382":7,"386":1,"394":4,"396":2,"397":3,"399":3,"400":1,"401":1,"402":1,"406":2,"407":11,"408":1,"409":4,"415":5,"420":1,"424":1,"425":2,"426":3,"430":12,"434":2,"435":1,"440":11,"443":1,"446":1,"448":4,"453":15}}],["agentkitfullaccess",{"2":{"403":1,"450":1}}],["agentkitagentserverapp",{"2":{"336":1}}],["agentkita2aapp",{"0":{"327":1},"2":{"336":1,"377":1,"381":2,"386":1}}],["agentkitruntime",{"0":{"332":1},"2":{"336":1}}],["agentkitknowledge",{"0":{"330":1},"2":{"336":1}}],["agentkitmcp",{"0":{"331":1},"2":{"336":1}}],["agentkitmcpapp",{"0":{"326":1},"2":{"336":1,"364":1,"368":2,"374":1}}],["agentkitmemory",{"0":{"329":1},"2":{"336":1,"346":2}}],["agentkitsimpleapp",{"0":{"325":1},"2":{"100":2,"336":1,"338":2,"345":2,"349":1,"353":2,"407":4,"415":2,"430":2,"440":2,"453":2}}],["agentkit",{"0":{"0":1,"8":1,"14":1,"35":1,"43":1,"60":1,"69":1,"81":1,"102":1,"127":1,"142":1,"150":1,"156":1,"166":1,"174":1,"188":1,"189":1,"190":1,"191":1,"322":1,"396":1,"397":1,"411":1,"426":1,"435":1,"444":1,"445":1,"449":1,"452":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"9":1,"10":1,"11":1,"12":1,"13":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"151":1,"152":1,"153":1,"154":1,"155":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1,"335":1,"336":1,"337":1,"338":1,"339":1,"340":1,"341":1,"342":1,"343":1,"344":1,"345":1,"346":1,"347":1,"397":1,"398":1,"399":1,"400":1,"401":1,"402":1,"403":1,"404":1,"405":1,"406":1,"407":1,"408":1,"409":1,"410":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"445":1,"446":2,"447":2,"448":2,"450":1,"451":1,"452":1,"453":1},"2":{"0":1,"6":2,"9":1,"10":2,"11":5,"13":2,"14":1,"15":1,"18":1,"19":1,"20":1,"21":2,"23":5,"24":2,"25":2,"26":6,"28":1,"29":2,"31":1,"32":2,"33":4,"35":2,"36":6,"37":6,"39":4,"40":3,"41":1,"43":4,"44":5,"46":1,"47":3,"49":1,"51":2,"52":2,"54":2,"57":1,"59":1,"60":2,"61":3,"62":1,"63":9,"64":8,"65":1,"67":1,"68":1,"69":3,"70":8,"71":5,"73":1,"77":6,"78":1,"79":4,"80":2,"81":1,"82":2,"83":2,"84":1,"89":6,"90":7,"92":3,"93":6,"94":1,"95":1,"96":1,"99":1,"100":4,"102":1,"103":3,"106":3,"110":4,"111":2,"112":5,"113":4,"114":1,"115":6,"118":3,"120":1,"122":13,"123":2,"126":5,"129":1,"130":2,"134":6,"137":1,"139":4,"140":3,"141":1,"144":1,"148":2,"152":1,"153":1,"154":2,"158":5,"165":1,"168":1,"171":1,"173":2,"176":1,"182":3,"183":2,"185":3,"186":1,"187":1,"188":10,"189":9,"190":12,"191":11,"193":5,"194":6,"195":5,"196":8,"198":3,"200":3,"202":5,"204":1,"205":3,"217":5,"232":1,"233":2,"234":2,"240":1,"245":1,"247":1,"252":1,"259":5,"263":1,"264":1,"265":1,"266":1,"267":2,"269":6,"270":3,"272":3,"275":1,"279":1,"282":1,"283":2,"287":1,"290":1,"291":6,"293":4,"294":2,"295":3,"296":4,"298":6,"299":6,"300":1,"302":2,"303":3,"304":4,"305":7,"306":5,"307":3,"309":7,"310":4,"311":4,"312":5,"314":3,"315":3,"316":2,"318":6,"319":5,"320":5,"321":11,"322":2,"323":1,"328":1,"336":1,"338":1,"344":1,"345":1,"346":2,"348":1,"353":1,"368":1,"381":1,"395":1,"396":1,"397":1,"401":1,"403":1,"404":3,"406":3,"407":2,"410":1,"413":1,"414":1,"415":1,"419":2,"424":2,"425":3,"426":1,"427":1,"430":2,"431":1,"432":2,"433":3,"434":2,"435":2,"440":2,"441":1,"442":2,"443":1,"444":1,"445":1,"446":1,"448":1,"450":1,"451":3,"452":1,"453":1}}],["abcd",{"2":{"270":1}}],["abc123",{"2":{"147":1,"170":1,"171":1}}],["alias=true",{"2":{"407":1}}],["aliases",{"2":{"284":1}}],["all",{"2":{"360":1}}],["always",{"2":{"228":1}}],["alpine",{"2":{"131":2,"132":2,"133":2,"140":6,"257":2,"259":3,"275":2}}],["arbitrary",{"2":{"430":1}}],["are",{"2":{"430":2,"440":1}}],["ark",{"2":{"430":3,"440":3,"453":3}}],["args=",{"2":{"424":1,"453":1}}],["args",{"2":{"368":1,"369":1,"371":1,"374":1,"382":1,"393":1,"407":1}}],["arguments",{"2":{"80":1}}],["arm",{"2":{"262":1}}],["arm64",{"2":{"262":1}}],["artifacts=false",{"2":{"453":1}}],["artifact",{"2":{"191":8}}],["at",{"2":{"171":1,"407":1,"409":2,"453":3}}],["any",{"2":{"392":2,"407":1}}],["an",{"2":{"390":1,"407":2,"453":1}}],["anonymous",{"2":{"353":1,"392":1}}],["analyzer",{"2":{"210":1}}],["answer",{"2":{"158":1,"430":1,"440":1}}],["and",{"2":{"92":2,"93":2,"134":1,"407":2,"430":2,"440":1,"453":1}}],["additional",{"2":{"158":1,"407":1}}],["add",{"2":{"132":1,"140":1,"188":1,"189":1,"330":1}}],["adk",{"2":{"98":1,"329":1,"339":2,"381":1,"407":2,"451":1,"453":2}}],["aaaaaaaa",{"2":{"113":2,"191":1}}],["await",{"2":{"100":1,"345":1,"353":1,"355":1,"363":1,"369":1,"374":1,"375":3,"382":2,"390":1,"391":1,"394":2,"407":2,"415":1,"416":1,"430":2,"440":1,"453":1}}],["assistant",{"2":{"374":1,"375":3,"430":1}}],["as",{"0":{"372":1},"1":{"373":1,"374":1,"375":1,"376":1},"2":{"326":1,"355":2,"360":2,"369":2,"373":1,"374":1,"375":3,"390":2,"391":1,"407":3,"453":1}}],["async",{"0":{"363":1},"2":{"100":1,"325":1,"338":1,"345":1,"351":1,"353":1,"354":1,"355":1,"361":1,"363":2,"369":3,"370":1,"373":1,"374":1,"375":3,"382":1,"387":3,"390":1,"391":1,"392":1,"394":2,"407":3,"415":1,"416":1,"430":1,"440":1,"453":1}}],["astral",{"2":{"21":1}}],["a",{"0":{"372":1},"1":{"373":1,"374":1,"375":1,"376":1},"2":{"92":1,"101":4,"326":1,"373":1,"374":1,"375":3,"407":1,"409":2,"430":1,"453":11}}],["available",{"2":{"92":1}}],["action",{"2":{"424":1}}],["activate",{"2":{"21":2,"23":4,"44":1,"404":1,"451":1}}],["according",{"2":{"440":1}}],["account",{"2":{"233":3,"234":2}}],["accesskey=",{"2":{"200":1}}],["accesskey",{"2":{"200":1,"282":1,"403":2,"450":2}}],["accessdenied",{"2":{"58":1}}],["access",{"2":{"26":2,"27":2,"31":2,"33":2,"46":1,"77":4,"113":3,"115":2,"122":2,"200":1,"265":1,"346":1,"408":1,"419":1,"430":1,"440":1}}],["akltxxxxxxxx",{"2":{"265":1}}],["ak",{"0":{"31":1,"57":1},"2":{"25":1,"31":1,"33":1,"57":3,"77":1,"115":1,"141":1,"158":1,"200":1,"282":1,"346":1,"408":2,"419":2,"424":2}}],["apache",{"2":{"407":2}}],["ap",{"2":{"259":1}}],["apmplus",{"2":{"243":4,"276":4}}],["apk",{"2":{"132":1,"140":1}}],["apt",{"2":{"132":2,"140":2}}],["apiconfig",{"2":{"346":2}}],["apikey",{"0":{"242":1,"253":1},"2":{"158":1,"163":1,"232":1,"234":1,"242":1,"245":1,"247":1,"255":1,"276":1,"452":2,"453":1}}],["api密钥等跨环境共享",{"2":{"126":1}}],["api密钥",{"2":{"110":1}}],["apigateway",{"2":{"37":3,"147":1,"164":1,"171":2,"452":1}}],["api",{"0":{"32":1,"163":1},"2":{"12":1,"32":6,"33":3,"37":2,"52":1,"55":3,"69":2,"105":1,"106":1,"110":3,"112":1,"119":2,"124":3,"158":1,"163":1,"165":1,"220":1,"225":4,"232":3,"234":1,"242":1,"243":5,"245":1,"247":3,"255":1,"270":3,"271":1,"274":1,"275":1,"276":2,"277":1,"334":1,"347":1,"407":1,"410":1,"425":1,"429":1,"430":3,"431":2,"437":1,"440":3,"444":1,"446":1,"448":3,"453":4}}],["append",{"2":{"407":1}}],["apply",{"2":{"409":2}}],["application",{"2":{"409":3,"423":1,"453":3}}],["applicable",{"2":{"407":1}}],["apple",{"2":{"262":1}}],["apps",{"2":{"100":1,"336":1,"338":1,"345":1,"353":1,"368":1,"381":1,"407":1,"415":1,"430":1,"440":1,"453":1}}],["app│",{"2":{"92":2}}],["app",{"0":{"350":1,"356":1,"363":1,"365":1,"372":1,"378":1,"384":1},"1":{"351":1,"352":1,"353":1,"354":1,"355":1,"357":1,"358":1,"359":1,"360":1,"361":1,"362":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"373":1,"374":1,"375":1,"376":1,"379":1,"380":1,"381":1,"382":1,"383":1,"385":1,"386":1,"387":1,"388":1},"2":{"11":1,"29":1,"36":1,"69":1,"70":1,"92":9,"96":2,"100":4,"101":2,"211":1,"218":1,"227":2,"271":1,"274":2,"276":1,"325":3,"326":2,"327":2,"338":2,"345":4,"351":1,"353":2,"355":1,"357":1,"359":1,"360":1,"363":1,"366":1,"368":2,"369":1,"371":1,"373":1,"374":2,"375":3,"379":1,"381":3,"382":1,"385":1,"386":2,"387":1,"390":1,"391":1,"392":1,"393":1,"394":2,"407":9,"415":4,"430":8,"437":1,"440":6,"453":6}}],["aiohttp",{"2":{"369":2}}],["ai",{"2":{"9":1,"92":1,"93":1,"409":2,"426":1}}],["描述信息",{"2":{"286":1}}],["描述性强",{"2":{"210":1}}],["描述",{"2":{"7":1,"84":1,"85":1,"86":1,"87":1,"208":1}}],["图片存放在",{"2":{"7":1}}],["图片文件",{"2":{"6":1}}],["文件添加如下配置",{"2":{"431":1,"441":1}}],["文件应该在",{"2":{"319":1}}],["文件记录",{"2":{"312":1}}],["文件记录所有信息",{"2":{"299":1}}],["文件夹中",{"2":{"309":1}}],["文件日志被禁用了",{"2":{"314":1}}],["文件日志级别",{"2":{"299":1}}],["文件日志",{"2":{"291":1}}],["文件结构",{"0":{"206":1}}],["文件不会被删除",{"2":{"183":1}}],["文件会被修改吗",{"2":{"101":1}}],["文件需要满足以下条件",{"2":{"97":1}}],["文件要求",{"0":{"97":1}}],["文件复制到项目目录",{"2":{"95":1}}],["文件路径",{"2":{"86":1}}],["文件",{"2":{"63":1,"90":1,"95":3,"97":1,"101":1,"194":1,"270":1,"302":1,"307":1,"319":1,"425":1}}],["文件管理",{"2":{"61":1}}],["文件格式问题",{"2":{"47":1}}],["文件中已经包含了使用提示",{"2":{"101":1}}],["文件中没有",{"2":{"97":1}}],["文件中的配置",{"2":{"37":1}}],["文件中",{"2":{"26":1,"432":1,"442":1}}],["文件声明式地定义应用的元数据",{"2":{"11":1}}],["文件定义智能体应用的核心组件和配置",{"2":{"10":1}}],["文件使用中文编写",{"2":{"7":1}}],["文档字符串要明确",{"2":{"376":1}}],["文档字符串会作为工具描述",{"2":{"370":1}}],["文档字符串",{"0":{"393":1},"2":{"367":1}}],["文档问答系统",{"2":{"330":1}}],["文档编写",{"2":{"39":1}}],["文档规范",{"0":{"7":1}}],["文档内容",{"2":{"6":1}}],["文档",{"0":{"0":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1},"2":{"6":2,"347":1}}],["must",{"2":{"430":1,"440":1}}],["musl",{"2":{"132":1,"140":1}}],["multiple",{"2":{"429":1,"431":1}}],["msg",{"2":{"424":1}}],["might",{"2":{"407":1}}],["missing",{"2":{"355":2}}],["minute",{"2":{"190":2}}],["mtime",{"2":{"310":1}}],["metadata",{"2":{"424":1}}],["metrics",{"2":{"340":1}}],["message=new",{"2":{"407":1}}],["message",{"2":{"382":2,"407":2,"424":1}}],["messages=payload",{"2":{"391":1,"394":2}}],["messages=prompt",{"2":{"100":1,"345":1,"353":1,"355":1,"374":1,"415":1,"430":1,"440":1,"453":1}}],["messages=user",{"2":{"382":1}}],["messages=query",{"2":{"375":3}}],["mem0",{"2":{"188":1,"329":1,"429":5,"430":4,"431":5}}],["mem",{"2":{"112":2,"191":1,"429":1,"430":2}}],["memory=long",{"2":{"430":1}}],["memory>",{"2":{"429":1}}],["memorybase",{"2":{"329":1}}],["memory",{"0":{"188":1,"229":1,"426":1},"2":{"10":1,"40":2,"64":2,"71":1,"112":5,"187":1,"188":13,"191":1,"220":1,"274":1,"329":6,"346":6,"407":1,"426":1,"427":1,"428":1,"429":2,"430":7,"431":2,"453":3}}],["mkdir",{"2":{"70":1,"314":1}}],["myexecutor",{"2":{"386":1}}],["mytaskstore",{"2":{"385":1}}],["myagentexecutor",{"2":{"379":1}}],["myagent",{"2":{"106":1,"107":1}}],["myapp",{"2":{"37":1}}],["my",{"2":{"69":1,"70":5,"84":1,"86":1,"89":3,"90":5,"92":3,"93":6,"97":2,"100":4,"101":2,"105":2,"109":1,"111":2,"122":1,"126":1,"132":1,"136":1,"137":1,"147":1,"170":1,"171":2,"188":3,"189":1,"190":2,"191":3,"194":1,"198":1,"206":2,"208":2,"220":1,"230":1,"238":1,"239":1,"243":1,"265":3,"279":1,"298":1,"309":1,"311":1,"319":1,"346":1,"433":1,"434":1}}],["mcptoolset",{"2":{"453":3}}],["mcpservers",{"2":{"452":1}}],["mcp",{"0":{"364":1,"444":1,"445":1,"446":1,"447":1,"449":1,"452":1},"1":{"365":1,"366":1,"367":1,"368":1,"369":1,"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1,"445":1,"446":2,"447":2,"448":2,"450":1,"451":1,"452":1,"453":1},"2":{"40":1,"112":6,"191":3,"326":4,"331":3,"364":2,"365":1,"368":2,"369":1,"370":1,"371":1,"372":1,"374":2,"375":3,"393":1,"401":1,"444":3,"445":3,"446":5,"447":1,"448":4,"450":2,"451":2,"452":4,"453":13}}],["modalities=none",{"2":{"453":1}}],["modify",{"2":{"92":1,"93":1}}],["mod",{"2":{"37":1,"75":1,"215":2,"275":1}}],["mode=",{"2":{"453":1}}],["mode=streamingmode",{"2":{"407":1}}],["mode=public",{"2":{"113":1}}],["mode>",{"2":{"283":1}}],["model=",{"2":{"97":1}}],["model",{"2":{"33":2,"37":2,"69":1,"85":2,"89":1,"105":1,"110":1,"119":1,"124":3,"220":1,"225":1,"232":2,"243":4,"247":2,"270":3,"271":2,"274":1,"275":1,"276":2,"277":1,"326":1,"364":1,"387":2,"407":2,"430":7,"440":9,"453":4}}],["mode",{"2":{"23":1,"82":2,"113":4}}],["m",{"2":{"23":1,"123":2,"188":4,"293":1,"321":1,"404":1,"451":1}}],["may",{"2":{"407":2}}],["max",{"2":{"371":3,"453":1}}],["mac",{"2":{"199":1}}],["macos",{"2":{"15":1}}],["managed",{"2":{"134":1}}],["main",{"2":{"97":1,"100":1,"211":2,"275":1,"277":1,"345":1,"381":1,"407":1,"409":1,"415":1,"430":1,"440":1,"453":1}}],["markdown",{"2":{"7":1}}],["md中的信息重新组织语言后回答您",{"2":{"443":1}}],["md到知识库customer",{"2":{"437":1}}],["md",{"2":{"6":1,"437":1}}],["ignore",{"2":{"407":1}}],["its",{"2":{"407":1,"409":2}}],["it",{"2":{"134":1,"409":2}}],["i",{"2":{"114":1,"424":6,"453":10}}],["if",{"2":{"100":1,"345":1,"368":1,"381":1,"387":1,"407":2,"415":1,"424":15,"430":3,"440":2,"453":1}}],["implied",{"2":{"407":1}}],["import",{"2":{"97":1,"100":3,"338":1,"345":3,"346":2,"353":3,"360":1,"368":1,"371":2,"374":2,"381":5,"382":3,"387":3,"392":1,"407":9,"415":3,"424":2,"430":5,"440":5,"453":4}}],["image",{"0":{"222":1,"237":1,"251":1,"259":1},"2":{"37":1,"69":1,"106":2,"111":1,"118":1,"119":1,"120":2,"123":1,"126":1,"131":3,"132":1,"133":1,"138":1,"140":2,"171":1,"206":1,"217":1,"220":1,"230":2,"232":1,"237":3,"245":1,"247":1,"255":3,"257":2,"259":2,"274":1,"275":2,"276":2,"287":1,"288":1,"453":10}}],["images",{"2":{"6":1,"7":2}}],["iam",{"2":{"58":1,"242":1}}],["is",{"2":{"49":1,"134":1,"281":1,"407":2,"424":7,"430":1,"433":1,"434":1,"440":1,"453":2}}],["issues",{"2":{"41":1}}],["identity",{"2":{"400":1}}],["ide",{"2":{"342":1,"401":1}}],["id`",{"2":{"191":1}}],["ids",{"2":{"113":1,"191":1}}],["id=local",{"2":{"424":1}}],["id=",{"2":{"424":1,"433":2,"453":1}}],["id=t",{"2":{"419":1,"424":1}}],["id=session",{"2":{"100":1,"345":1,"353":1,"407":3,"415":1,"430":2,"440":1,"453":1}}],["id=user",{"2":{"100":1,"345":1,"353":1,"407":3,"415":1,"430":2,"440":1,"453":1}}],["id>",{"2":{"33":1,"188":5,"189":5,"190":13,"191":6,"270":1}}],["id",{"2":{"32":1,"37":2,"39":2,"55":1,"92":3,"100":6,"112":13,"113":5,"138":1,"158":3,"162":2,"164":1,"170":1,"171":2,"188":1,"189":1,"191":8,"230":4,"233":4,"234":2,"243":1,"245":4,"255":4,"284":2,"305":1,"335":1,"345":6,"346":2,"352":6,"353":6,"363":1,"387":5,"391":5,"392":2,"407":14,"409":6,"413":1,"414":2,"415":6,"416":2,"419":2,"422":3,"423":4,"424":4,"430":13,"434":3,"440":11,"453":15}}],["inbound",{"2":{"448":1}}],["inevitably",{"2":{"430":1,"440":1}}],["include",{"2":{"407":1}}],["instead",{"2":{"453":1}}],["instruction=",{"2":{"430":1,"440":1,"453":1}}],["instruction=system",{"2":{"407":1}}],["instruction",{"2":{"407":2}}],["instances",{"2":{"453":2}}],["instance",{"0":{"239":1,"252":1},"2":{"86":1,"111":2,"115":2,"122":4,"126":1,"232":1,"233":1,"234":1,"239":2,"247":1,"252":1,"265":2,"267":2,"275":1,"276":1,"282":1,"284":3,"287":1}}],["installed",{"2":{"450":1}}],["installation",{"2":{"404":1}}],["install",{"2":{"2":1,"18":1,"19":1,"20":1,"21":6,"23":5,"44":2,"132":1,"133":1,"140":4,"257":1,"260":1,"344":1,"404":2,"418":1,"451":4}}],["inmemorytaskstore",{"2":{"386":1}}],["input",{"2":{"382":1,"390":2,"453":3}}],["in",{"0":{"411":1},"1":{"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1},"2":{"368":1,"407":5,"411":2,"412":1,"413":1,"414":1,"418":1,"424":8,"430":3,"440":2,"453":1}}],["infrastructure",{"2":{"336":1}}],["info=true",{"2":{"390":1}}],["information",{"2":{"368":1}}],["info",{"2":{"208":1,"218":1,"243":1,"276":1,"291":4,"293":1,"298":2,"299":2,"300":1,"303":1,"312":3,"329":1,"330":1,"368":3,"391":2,"407":2,"409":6,"424":1,"430":2,"440":2,"453":12}}],["indent",{"2":{"158":1}}],["index=collection",{"2":{"440":1}}],["index=index",{"2":{"430":1}}],["index",{"2":{"6":1,"404":1,"429":1,"430":2,"451":1}}],["int",{"2":{"366":1,"371":1,"424":3}}],["internalendpoint",{"2":{"424":1}}],["internet",{"2":{"113":3}}],["interactive",{"2":{"107":1,"114":1}}],["introduction",{"2":{"6":1}}],["invalid",{"2":{"280":1,"390":2}}],["invalidaccesskeyid",{"2":{"57":1}}],["invocation",{"2":{"39":1}}],["invoking",{"2":{"39":1}}],["invoketool",{"2":{"424":1}}],["invoke",{"0":{"54":1,"156":1,"223":1},"1":{"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1},"2":{"39":3,"54":1,"63":1,"70":1,"80":1,"157":1,"158":4,"160":1,"161":1,"162":1,"163":1,"185":1,"193":1,"194":1,"195":2,"196":2,"220":1,"274":1,"325":1,"409":2,"410":1,"423":1,"424":2,"425":1,"433":1,"434":1,"443":1,"453":1}}],["init",{"0":{"81":1},"1":{"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1},"2":{"21":1,"26":1,"36":5,"63":1,"70":3,"71":1,"77":1,"80":1,"81":1,"83":2,"89":6,"90":6,"101":1,"115":1,"122":3,"126":2,"193":1,"194":1,"198":1,"200":1,"279":1,"387":1,"406":2,"425":1,"453":1}}],["initialized",{"2":{"92":1,"93":1}}],["initialize",{"2":{"21":1}}],["静态资源",{"2":{"6":1}}],["p66l",{"2":{"452":1}}],["permissions",{"2":{"407":1}}],["perform",{"2":{"371":1}}],["put",{"2":{"382":1}}],["public",{"2":{"6":1,"7":2,"113":2,"191":1,"259":2}}],["p",{"2":{"158":1,"314":1,"424":9}}],["postpaid",{"2":{"453":10}}],["post",{"2":{"409":1,"424":1}}],["postgresql",{"2":{"132":1,"140":1,"360":1}}],["policy",{"0":{"228":1},"2":{"220":1}}],["port=6379",{"2":{"360":1}}],["port=8000",{"2":{"100":1,"345":1,"381":1,"407":1,"415":1,"430":1,"440":1,"453":1}}],["port",{"0":{"223":1},"2":{"220":1,"274":1}}],["ports",{"0":{"226":1},"2":{"170":1,"220":1,"274":1}}],["pong",{"2":{"100":1,"345":1,"358":1,"359":1,"407":1,"415":1,"430":1,"440":1,"453":1}}],["point",{"0":{"211":1},"2":{"69":1,"92":1,"93":1,"100":1,"106":2,"109":1,"118":1,"119":1,"120":2,"123":1,"126":2,"132":1,"206":1,"208":1,"211":5,"271":1,"274":1,"275":1,"276":1,"277":2,"286":1,"425":1}}],["ping",{"0":{"356":1},"1":{"357":1,"358":1,"359":1,"360":1,"361":1,"362":1},"2":{"96":1,"100":2,"101":1,"325":2,"345":2,"357":2,"359":2,"360":3,"361":1,"362":1,"407":2,"415":2,"430":2,"440":2,"453":2}}],["pipeline",{"2":{"37":1,"50":2,"245":3,"248":1}}],["pip",{"0":{"17":1},"1":{"18":1,"19":1,"20":1},"2":{"15":1,"21":2,"23":3,"43":3,"44":3,"73":1,"404":2,"418":1,"451":3}}],["please",{"2":{"92":1,"390":1}}],["platform",{"0":{"262":1,"328":1,"346":1},"1":{"329":1,"330":1,"331":1,"332":1},"2":{"10":1,"11":1,"25":1,"32":2,"40":1,"46":1,"52":1,"59":1,"67":1,"68":1,"79":1,"129":1,"233":2,"234":2,"257":1,"262":2,"288":1,"322":1,"324":1,"328":1,"336":1,"347":1,"350":1,"356":1,"395":1,"430":3,"440":3}}],["parts=",{"2":{"407":1}}],["part",{"2":{"407":2}}],["params=streamablehttpconnectionparams",{"2":{"453":1}}],["param2",{"2":{"366":1}}],["param1",{"2":{"366":1}}],["pass",{"2":{"351":1,"357":1,"366":1,"373":1,"379":1,"381":1,"385":1,"386":1}}],["payload",{"2":{"100":2,"157":1,"158":3,"161":1,"162":1,"165":1,"338":1,"345":2,"351":1,"352":1,"353":2,"354":1,"355":2,"390":2,"391":2,"392":2,"394":2,"407":2,"415":2,"430":2,"434":1,"440":2,"453":2}}],["path=",{"2":{"43":1}}],["path",{"2":{"43":3,"83":1}}],["packages",{"2":{"43":1}}],["package",{"2":{"6":1}}],["pypi",{"2":{"418":1}}],["pydantic",{"2":{"371":1}}],["py",{"2":{"36":1,"37":1,"69":1,"86":1,"90":6,"92":2,"93":5,"97":1,"100":2,"101":1,"105":1,"106":2,"109":2,"118":1,"119":1,"120":3,"123":1,"125":1,"126":2,"132":1,"194":1,"206":1,"208":1,"211":3,"259":2,"271":1,"274":1,"276":1,"277":2,"309":1,"406":1,"407":1,"409":29,"415":1,"420":1,"424":9,"425":2,"453":12}}],["pythonimport",{"2":{"355":1,"360":1,"369":1,"390":1,"453":1}}],["pythonfrom",{"2":{"338":1,"345":1,"346":1,"353":1,"368":1,"371":1,"374":1,"381":1,"382":1,"387":1,"392":1,"415":1}}],["python版本为0",{"2":{"418":1}}],["python版本",{"2":{"109":1}}],["python3",{"2":{"23":1,"404":1,"424":3,"451":1}}],["python==0",{"2":{"20":1}}],["python",{"0":{"74":1,"274":1},"2":{"10":1,"15":2,"18":1,"19":1,"21":4,"23":5,"29":1,"36":1,"37":2,"43":3,"44":6,"50":1,"69":1,"73":1,"74":1,"86":1,"92":1,"93":1,"95":2,"97":2,"98":2,"100":1,"101":1,"105":1,"109":1,"131":3,"132":3,"133":1,"140":1,"201":1,"206":2,"208":1,"211":1,"213":4,"214":5,"215":2,"257":2,"259":5,"274":1,"276":2,"284":2,"286":1,"322":1,"338":1,"342":1,"344":1,"351":1,"357":1,"359":1,"363":1,"366":1,"373":1,"375":1,"379":1,"385":1,"386":1,"391":1,"393":1,"394":1,"401":1,"403":1,"404":4,"407":1,"416":1,"418":3,"430":1,"440":1,"450":1,"451":3}}],["primes",{"2":{"424":4}}],["prime",{"2":{"424":12}}],["print",{"2":{"346":1,"424":1}}],["private",{"2":{"113":7,"191":1}}],["proactivity=none",{"2":{"453":1}}],["provided",{"2":{"424":1,"453":2}}],["provider",{"0":{"217":1},"2":{"103":1,"106":1,"109":2,"188":5,"189":4,"217":3,"259":1}}],["provider=byteplus",{"2":{"77":1,"217":1}}],["processing",{"2":{"391":1,"409":2}}],["process",{"2":{"363":1,"390":1,"409":1,"453":1}}],["protocol",{"2":{"326":1,"364":1}}],["prod",{"2":{"90":1,"139":2,"148":1,"154":1,"173":1,"196":2,"215":1,"259":2,"269":2,"270":1,"276":2,"320":1}}],["production",{"2":{"90":1,"218":1,"276":2,"306":1}}],["pro",{"2":{"85":1,"453":2}}],["prompts",{"2":{"407":1}}],["prompt",{"2":{"85":2,"100":2,"158":2,"160":1,"161":1,"162":1,"345":2,"352":1,"353":2,"355":2,"373":1,"374":2,"391":1,"392":2,"394":2,"407":7,"409":3,"415":2,"423":2,"430":5,"434":1,"440":4,"453":5}}],["project=default",{"2":{"439":1}}],["projects",{"2":{"90":1,"194":1}}],["project",{"2":{"23":1,"83":2,"84":1,"92":2,"93":2,"100":1,"123":1,"309":1}}],["press",{"2":{"409":1,"453":1}}],["prevent",{"2":{"407":1}}],["preview",{"2":{"5":1}}],["pretty",{"2":{"158":1}}],["prefix",{"2":{"115":1,"122":1,"245":1,"265":1}}],["pre",{"2":{"19":1}}],["png",{"2":{"7":1}}],["37+08",{"2":{"453":1}}],["36",{"2":{"453":1}}],["3600",{"2":{"244":1}}],["35+08",{"2":{"453":1}}],["35",{"2":{"453":2}}],["33",{"2":{"453":8}}],["334df4",{"2":{"452":2}}],["38",{"2":{"424":2,"453":1}}],["38120",{"2":{"409":1}}],["31+08",{"2":{"453":1}}],["31",{"2":{"393":1}}],["39",{"2":{"393":1}}],["3️⃣",{"2":{"193":1,"194":1}}],["30",{"2":{"134":1,"146":1,"190":1,"422":1,"424":1}}],["32k",{"2":{"85":1}}],["3",{"0":{"24":1,"33":1,"37":1,"51":1,"68":1,"119":1,"162":1,"305":1,"333":1,"340":1,"392":1,"401":1,"408":1,"410":1,"421":1},"1":{"334":1,"335":1,"422":1,"423":1,"424":1},"2":{"6":1,"15":1,"21":1,"23":1,"37":3,"50":1,"51":1,"69":1,"70":1,"73":1,"74":4,"89":1,"92":3,"93":2,"105":3,"109":1,"122":1,"131":2,"132":2,"133":1,"136":5,"137":2,"139":1,"140":2,"146":4,"182":1,"202":1,"206":1,"208":1,"214":6,"217":1,"237":1,"257":1,"259":1,"266":1,"270":1,"272":1,"274":1,"276":2,"283":1,"286":1,"314":1,"315":1,"321":1,"353":1,"403":1,"404":1,"424":3,"437":1,"450":1,"451":1,"453":1}}],["288",{"2":{"453":1}}],["280",{"2":{"453":1}}],["265",{"2":{"453":1}}],["217",{"2":{"453":1}}],["21",{"2":{"424":9}}],["2100123456",{"2":{"233":1}}],["21076x",{"2":{"37":1}}],["22t14",{"2":{"453":1}}],["22",{"2":{"368":1}}],["22°c",{"2":{"164":1}}],["250",{"2":{"453":1}}],["250115",{"2":{"453":2}}],["250615",{"2":{"89":1,"97":1,"440":1}}],["256k",{"2":{"453":2}}],["25",{"2":{"368":1,"424":1,"453":2}}],["2gb",{"2":{"229":1}}],["2g",{"2":{"229":1}}],["2️⃣",{"2":{"193":1,"194":1}}],["2022",{"2":{"453":8}}],["20251101",{"2":{"310":1}}],["20251118",{"2":{"309":1}}],["20251119",{"2":{"309":1}}],["20251128153042",{"2":{"233":1}}],["2025112017",{"2":{"37":1}}],["20251120",{"2":{"37":1,"309":1}}],["20250120",{"2":{"147":1,"171":1}}],["20250520174054",{"2":{"32":1}}],["2025",{"2":{"134":1,"170":1,"171":1,"291":4,"407":1,"409":28,"424":10,"453":21}}],["200",{"2":{"409":1,"424":1}}],["20",{"2":{"76":1,"170":1,"171":1,"291":4,"409":28,"453":12}}],["24t10",{"2":{"453":1}}],["24t14",{"2":{"453":2}}],["24",{"2":{"75":1,"140":1,"214":3,"257":1,"259":2,"275":2,"286":1,"424":6,"453":13}}],["23t11",{"2":{"453":1}}],["23t16",{"2":{"453":2}}],["23t20",{"2":{"453":1}}],["23t21",{"2":{"453":2}}],["23",{"2":{"37":1,"424":9}}],["2",{"0":{"32":1,"36":1,"44":1,"47":1,"50":1,"55":1,"58":1,"67":1,"118":1,"161":1,"304":1,"328":1,"339":1,"391":1,"400":1,"405":1,"407":1,"420":1},"1":{"329":1,"330":1,"331":1,"332":1,"406":1,"407":1,"408":1,"409":1},"2":{"6":1,"37":3,"51":1,"70":1,"89":1,"92":3,"93":1,"105":2,"122":1,"136":1,"137":1,"139":1,"146":1,"147":1,"148":1,"154":1,"173":1,"182":1,"195":1,"202":1,"217":1,"237":1,"266":1,"270":1,"272":1,"283":1,"314":1,"315":1,"321":1,"353":1,"393":1,"404":1,"407":2,"418":1,"424":9,"437":1,"453":8}}],["18",{"2":{"453":3}}],["1761311852",{"2":{"453":2}}],["17",{"2":{"453":8}}],["17t10",{"2":{"134":1}}],["156",{"2":{"453":1}}],["155",{"2":{"453":1}}],["153",{"2":{"453":1}}],["15及以上",{"2":{"418":1}}],["151",{"2":{"409":28}}],["14",{"2":{"291":4,"453":1}}],["1g",{"2":{"220":1}}],["1️⃣",{"2":{"193":1,"194":1}}],["1+1=",{"2":{"158":1}}],["198",{"2":{"453":1}}],["19",{"2":{"140":1,"453":1}}],["1330124",{"2":{"453":1}}],["13",{"2":{"74":1,"214":1,"453":7}}],["118",{"2":{"453":1}}],["118到requirements",{"2":{"430":1}}],["116",{"2":{"393":1}}],["11",{"2":{"74":1,"90":1,"214":1,"291":4,"424":9}}],["123",{"2":{"437":1}}],["1234",{"2":{"270":1}}],["121",{"2":{"393":1}}],["127",{"2":{"381":2,"409":1,"424":1,"453":1}}],["12",{"2":{"21":1,"23":1,"50":1,"69":1,"74":1,"90":1,"92":1,"93":1,"105":1,"109":1,"131":2,"132":2,"133":1,"140":1,"206":1,"208":1,"214":3,"257":1,"259":1,"274":1,"276":2,"286":1,"404":1,"409":56,"451":1,"453":4}}],["103",{"2":{"424":1}}],["101",{"2":{"424":3}}],["1067",{"2":{"393":1}}],["10+",{"2":{"76":1,"403":1,"450":1}}],["1000",{"2":{"369":2}}],["100",{"2":{"37":2}}],["10",{"2":{"15":1,"73":1,"74":1,"90":1,"146":1,"170":1,"171":1,"188":1,"214":1,"371":1,"424":10,"453":18}}],["1",{"0":{"31":1,"35":1,"43":1,"46":1,"49":1,"54":1,"57":1,"66":1,"117":1,"160":1,"302":1,"303":2,"324":1,"338":1,"390":1,"399":1,"404":1,"406":1,"418":1,"419":1},"1":{"325":1,"326":1,"327":1},"2":{"6":1,"20":1,"32":2,"36":1,"37":2,"70":1,"75":1,"89":2,"92":4,"93":1,"97":1,"105":2,"106":1,"118":1,"122":1,"124":1,"136":2,"137":1,"139":1,"140":1,"146":1,"147":1,"148":1,"154":1,"173":1,"182":1,"195":1,"202":1,"214":3,"217":3,"220":1,"229":2,"237":1,"257":1,"259":3,"266":1,"270":1,"272":1,"275":2,"283":1,"286":1,"314":1,"315":1,"321":1,"353":1,"360":1,"361":1,"381":2,"404":1,"409":3,"424":10,"430":2,"434":1,"437":1,"440":2,"453":3}}],["站点配置文件",{"2":{"6":1}}],["c1m2",{"2":{"453":11}}],["cfc=false",{"2":{"453":1}}],["ctrl+c",{"2":{"409":1,"453":1}}],["c05d49af",{"2":{"270":1}}],["cp",{"2":{"245":3}}],["cpu",{"0":{"229":1},"2":{"220":2,"229":2,"262":1,"274":1,"453":10}}],["cmd",{"2":{"211":1}}],["certs",{"2":{"140":1,"257":1}}],["certificates",{"2":{"133":1}}],["chinese操作系统",{"2":{"453":1}}],["chinese",{"2":{"453":7}}],["choice",{"2":{"424":3}}],["check",{"2":{"360":1,"375":1}}],["checksum",{"2":{"134":1}}],["changes",{"2":{"134":1}}],["chat",{"2":{"90":2}}],["caching",{"2":{"453":2}}],["cache",{"2":{"132":1,"140":1}}],["cache=",{"2":{"110":1}}],["calls=100",{"2":{"453":1}}],["call",{"2":{"424":2,"453":2}}],["calculate",{"2":{"393":2}}],["calendar",{"2":{"375":2}}],["card=get",{"2":{"381":1}}],["card",{"2":{"381":3}}],["cat",{"2":{"202":1,"272":1,"282":1,"283":1,"293":1,"321":1}}],["ca",{"2":{"133":2}}],["c",{"2":{"114":1,"133":1,"140":1,"260":1,"407":1}}],["current",{"2":{"382":1}}],["curlcurl",{"2":{"453":1}}],["curl",{"2":{"21":1,"409":1,"423":1}}],["customagentexecutor",{"2":{"382":1}}],["customer",{"2":{"210":1,"440":1}}],["customize",{"2":{"134":1}}],["custom",{"2":{"86":1,"89":1,"90":1,"101":1,"132":1,"311":1}}],["city",{"2":{"345":2,"353":2,"368":8,"374":2,"375":1,"381":2}}],["ci",{"0":{"106":1,"123":1,"305":1},"2":{"80":1,"123":2,"126":1,"305":2}}],["crm",{"2":{"437":2}}],["critical",{"2":{"300":1}}],["credential",{"2":{"217":1}}],["creating",{"2":{"92":1}}],["createruntime",{"2":{"113":1}}],["createregistry",{"2":{"49":1}}],["created",{"2":{"92":1,"93":1,"170":1,"171":1,"453":1}}],["create",{"2":{"23":1,"188":1,"190":2,"191":3,"329":1,"346":1,"360":2,"407":1,"452":2,"453":1}}],["cr仓库名称",{"2":{"111":1}}],["cr命名空间",{"2":{"111":1}}],["cr命名空间和cr仓库名",{"2":{"37":1}}],["cr实例名称",{"2":{"111":1}}],["cr",{"0":{"49":1,"239":1,"240":1,"241":1,"252":3},"2":{"37":3,"49":2,"111":6,"115":5,"122":5,"126":2,"137":1,"171":1,"180":1,"232":6,"233":2,"234":2,"239":4,"240":1,"241":1,"245":2,"247":6,"252":3,"255":2,"259":4,"265":2,"267":5,"275":2,"276":4,"282":1,"284":7,"287":6}}],["cn",{"2":{"37":5,"69":1,"111":1,"115":2,"119":1,"122":2,"147":1,"164":1,"171":2,"217":1,"232":1,"236":2,"243":1,"247":1,"250":1,"259":3,"265":2,"271":1,"275":1,"276":2,"277":1,"287":1,"424":3,"452":1,"453":12}}],["cd用非交互式",{"2":{"126":1}}],["cd流水线中使用",{"2":{"123":1}}],["cd",{"0":{"106":1,"123":1,"305":1},"2":{"23":1,"36":1,"70":1,"80":1,"193":1,"194":1,"404":1,"451":1}}],["copy",{"2":{"407":1}}],["copyright",{"2":{"407":1}}],["co",{"2":{"407":1}}],["count",{"2":{"371":1,"424":2}}],["collection=customer",{"2":{"439":1}}],["collection=",{"2":{"429":1}}],["collections",{"2":{"329":1}}],["collection",{"2":{"188":1,"329":4,"346":1,"429":1,"430":5,"431":2,"440":4,"441":2}}],["code=import",{"2":{"424":1}}],["code",{"2":{"85":1,"89":1,"245":1,"248":1,"414":2,"415":3,"416":1,"424":12}}],["compression=none",{"2":{"453":1}}],["complete",{"2":{"409":1,"453":1}}],["completed",{"2":{"132":1,"291":1,"391":1}}],["compliance",{"2":{"407":1}}],["computation",{"2":{"363":1}}],["compile",{"2":{"259":1}}],["comma",{"2":{"429":1,"431":1}}],["command",{"2":{"43":1,"80":1}}],["comment",{"2":{"134":1}}],["commit",{"2":{"123":1}}],["common",{"0":{"207":1,"286":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1},"2":{"69":1,"206":1,"217":1,"225":2,"243":1,"259":1,"283":2}}],["com",{"2":{"23":1,"37":4,"110":1,"119":1,"137":1,"147":1,"164":1,"171":3,"243":1,"259":4,"276":1,"424":2,"429":1,"437":2,"452":1,"453":1}}],["conditions",{"2":{"407":1}}],["condition",{"2":{"368":3}}],["console=false",{"2":{"320":1}}],["console=true",{"2":{"294":1,"295":1,"296":1,"299":1,"304":1,"305":1,"315":1,"318":2,"319":1,"321":2}}],["console",{"2":{"298":1,"299":2,"305":1,"307":1,"312":2,"315":1,"318":1,"321":1}}],["connect",{"2":{"360":1}}],["connection",{"2":{"329":1,"330":1,"453":1}}],["conn",{"2":{"188":1,"189":1,"360":2}}],["contains",{"2":{"188":1}}],["container",{"0":{"224":1},"2":{"170":1,"220":1,"230":1,"232":1,"239":1,"247":1,"252":1,"265":1}}],["contextvars",{"2":{"335":1}}],["context",{"0":{"335":1},"2":{"158":1,"326":1,"336":1,"364":1,"382":4,"424":1,"453":1}}],["content",{"2":{"6":1,"158":1,"369":4,"382":1,"407":2,"409":1,"423":1,"453":1}}],["config=none",{"2":{"453":2}}],["config=runconfig",{"2":{"407":1}}],["config和agentkit",{"2":{"410":1,"425":1}}],["configuration=",{"2":{"346":2}}],["configuration",{"2":{"113":1,"198":1,"279":1,"291":1}}],["configured",{"2":{"424":1}}],["configure",{"2":{"92":1,"93":1}}],["config",{"0":{"102":1},"1":{"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1},"2":{"6":1,"26":5,"33":5,"37":2,"47":1,"49":1,"61":1,"63":1,"69":1,"70":1,"77":6,"80":1,"92":1,"93":1,"102":1,"103":3,"105":1,"106":3,"107":1,"110":3,"112":3,"113":2,"114":1,"115":1,"117":1,"118":3,"119":1,"120":1,"121":1,"122":10,"123":1,"126":7,"129":1,"134":1,"139":2,"144":1,"148":1,"152":1,"154":1,"158":1,"168":1,"173":1,"176":1,"182":1,"193":1,"194":1,"196":4,"198":1,"200":3,"205":1,"217":2,"263":1,"264":1,"266":1,"267":1,"269":2,"270":1,"272":1,"279":1,"281":1,"282":2,"346":2,"407":1,"453":4}}],["class",{"2":{"371":1,"379":1,"381":1,"382":1,"385":1,"386":1,"387":1}}],["clear",{"2":{"124":1}}],["cloudy",{"2":{"368":1}}],["cloud",{"0":{"67":1,"77":1,"111":1,"112":1,"113":1,"137":1,"147":1,"171":1,"180":1,"200":1,"217":1,"231":1,"248":1,"287":1},"1":{"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1},"2":{"33":1,"37":1,"69":2,"77":1,"103":1,"105":1,"106":2,"109":3,"112":1,"113":1,"119":1,"123":1,"125":1,"141":1,"149":1,"158":1,"172":1,"206":3,"208":1,"216":3,"217":4,"232":1,"233":1,"248":1,"249":1,"252":1,"253":1,"254":1,"259":1,"267":1,"269":1,"271":2,"276":2,"277":4,"291":2,"431":2,"441":1}}],["clone",{"2":{"23":2}}],["client",{"2":{"346":3,"360":2,"387":4,"448":1,"453":3}}],["clientsession",{"2":{"369":1}}],["clients",{"2":{"336":1}}],["cli",{"0":{"60":1,"79":1},"1":{"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"73":1,"74":1,"75":1,"76":1,"77":1,"78":1,"80":1,"81":1,"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1,"108":1,"109":1,"110":1,"111":1,"112":1,"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"119":1,"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"165":1,"166":1,"167":1,"168":1,"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1,"188":1,"189":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1,"196":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1},"2":{"0":1,"6":2,"10":1,"11":1,"24":1,"25":1,"35":1,"37":2,"60":1,"62":1,"65":1,"78":1,"79":3,"80":1,"186":1,"187":1,"230":1,"234":1,"245":1,"255":1,"261":1,"262":1,"284":1,"289":1,"290":1,"406":2,"414":1,"430":1,"440":1}}],["└───────────────┴──────────────┴──────────────┘",{"2":{"120":1}}],["└────┴──────────────────────────┴──────────┴──────────────────────────────────┘",{"2":{"92":1}}],["└──",{"2":{"6":4,"36":1,"100":1,"309":3,"336":4}}],["│",{"2":{"6":5,"92":23,"120":12,"309":4,"336":11}}],["配置本地环境",{"0":{"451":1}}],["配置上个章节获取的环境变量到agentkit",{"2":{"430":1,"440":1}}],["配置完环境变量后",{"2":{"420":1}}],["配置和调用沙箱工具",{"2":{"412":1}}],["配置和部署应用",{"2":{"410":1,"425":1}}],["配置和获取连接信息",{"2":{"329":1}}],["配置您的火山引擎访问凭证",{"2":{"408":1}}],["配置环境变量",{"0":{"408":1,"419":1},"2":{"414":1}}],["配置环境变量和资源",{"2":{"332":1}}],["配置字段速查表",{"0":{"285":1},"1":{"286":1,"287":1,"288":1}}],["配置没有保存",{"2":{"283":1}}],["配置示例",{"0":{"208":1,"220":1,"232":1,"247":1,"257":1,"265":1}}],["配置系统概览",{"0":{"205":1}}],["配置保留",{"2":{"183":1}}],["配置更新后强制刷新",{"2":{"139":1}}],["配置更新后需要强制刷新",{"2":{"129":1}}],["配置变化时自动更新",{"2":{"134":1,"141":1}}],["配置证书",{"2":{"133":1}}],["配置方式",{"2":{"133":1,"217":1}}],["配置方舟模型凭证",{"2":{"33":1}}],["配置参数等",{"2":{"225":1}}],["配置参数",{"0":{"131":1}}],["配置段自定义",{"2":{"130":1}}],["配置验证",{"0":{"125":1}}],["配置模板已生成",{"2":{"122":1}}],["配置项详解",{"0":{"209":1,"221":1,"235":1,"249":1,"258":1},"1":{"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"250":1,"251":1,"252":1,"253":1,"254":1,"259":1,"260":1,"261":1,"262":1}}],["配置项",{"2":{"120":1,"334":1}}],["配置预览",{"0":{"120":1}}],["配置优先级理解",{"2":{"126":1}}],["配置优先级",{"0":{"266":1,"312":1},"2":{"115":1,"205":1}}],["配置格式",{"2":{"113":1}}],["配置为",{"2":{"112":1}}],["配置里",{"2":{"112":1}}],["配置合并规则",{"2":{"110":1}}],["配置要求",{"2":{"98":1}}],["配置部署",{"2":{"95":1}}],["配置云端资源",{"2":{"79":1}}],["配置访问凭证",{"2":{"77":1}}],["配置应用",{"2":{"70":1,"80":1,"193":1,"194":1}}],["配置详解",{"2":{"69":1,"78":1}}],["配置是否正确",{"2":{"55":1}}],["配置错误或权限不足",{"2":{"57":1}}],["配置错误或模型配额用尽",{"2":{"55":1}}],["配置错误",{"2":{"54":1}}],["配置问题",{"0":{"45":1},"1":{"46":1,"47":1}}],["配置向导会引导您完成以下设置",{"2":{"37":1}}],["配置与部署",{"0":{"37":1}}],["配置火山引擎访问密钥",{"2":{"33":1}}],["配置文件位置",{"0":{"264":1}}],["配置文件详解",{"0":{"204":1},"1":{"205":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"238":1,"239":1,"240":1,"241":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1,"248":1,"249":1,"250":1,"251":1,"252":1,"253":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1,"269":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"279":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1}}],["配置文件说明",{"2":{"203":1}}],["配置文件找不到",{"0":{"198":1,"279":1}}],["配置文件和镜像已保留",{"2":{"181":1}}],["配置文件路径",{"2":{"129":1,"144":1,"152":1,"158":1,"168":1,"176":1}}],["配置文件格式错误",{"0":{"47":1}}],["配置文件中设置",{"2":{"305":1}}],["配置文件中",{"2":{"43":1}}],["配置文件",{"0":{"69":1},"2":{"27":1,"205":1}}],["配置",{"0":{"207":1,"256":1},"1":{"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1},"2":{"6":1,"102":1,"122":2,"232":2,"247":2,"248":1,"252":1,"253":1,"276":3}}],["├───────────────┼──────────────┼──────────────┤",{"2":{"120":1}}],["├────┼──────────────────────────┼──────────┼──────────────────────────────────┤",{"2":{"92":1}}],["├──",{"2":{"6":6,"36":2,"100":4,"309":4,"336":10}}],["构建好",{"2":{"432":1,"442":1}}],["构建一个带知识库能力的智能体",{"0":{"440":1},"2":{"440":1}}],["构建一个带长期记忆能力的智能体",{"0":{"430":1},"2":{"430":1}}],["构建一个具备代码执行能力的智能体",{"2":{"414":1}}],["构建阶段镜像",{"2":{"257":1}}],["构建速度",{"2":{"248":1}}],["构建流水线名称",{"2":{"245":1}}],["构建工作区名称",{"2":{"245":1}}],["构建相关",{"2":{"245":1}}],["构建超时时间",{"2":{"244":1}}],["构建时间",{"2":{"230":1,"245":1,"255":1}}],["构建时安装这些依赖",{"2":{"215":1}}],["构建后的镜像",{"2":{"230":1}}],["构建位置",{"2":{"216":1,"248":1}}],["构建配置",{"2":{"206":1}}],["构建完成",{"2":{"153":1}}],["构建信息会自动更新到配置文件",{"2":{"141":1}}],["构建脚本",{"2":{"288":1}}],["构建脚本等",{"2":{"256":1}}],["构建脚本不存在会记录警告但不会中断构建",{"2":{"141":1}}],["构建脚本的路径",{"2":{"141":1}}],["构建脚本示例",{"2":{"132":1}}],["构建自定义",{"2":{"141":1}}],["构建自定义配置",{"0":{"130":1},"1":{"131":1,"132":1,"133":1,"134":1},"2":{"132":1,"206":1}}],["构建记录",{"2":{"138":1}}],["构建结果",{"0":{"138":1}}],["构建结果位于",{"2":{"4":1}}],["构建成功",{"2":{"136":1,"137":1}}],["构建过程中执行自定义脚本",{"2":{"260":1}}],["构建过程",{"0":{"135":1},"1":{"136":1,"137":1},"2":{"256":1}}],["构建平台",{"2":{"129":1}}],["构建忽略规则",{"2":{"100":1}}],["构建镜像",{"2":{"80":1,"136":1,"153":1}}],["构建卓越的",{"2":{"79":1}}],["构建失败",{"0":{"201":1},"2":{"50":1,"201":1}}],["构建能够理解用户意图",{"2":{"12":1}}],["构建",{"2":{"9":1,"66":1,"68":1,"136":1,"140":3,"150":1,"259":1,"430":1,"440":1}}],["构建生产版本",{"0":{"4":1}}],["bit操作系统",{"2":{"453":1}}],["bit",{"2":{"453":11}}],["bindings",{"2":{"112":1}}],["bin",{"2":{"21":1,"23":2,"43":4,"44":1,"132":1,"140":2,"404":1,"451":1}}],["blobs",{"2":{"453":1}}],["body",{"2":{"453":2}}],["bookworm",{"2":{"259":2}}],["both",{"2":{"113":5}}],["bot",{"2":{"90":5,"109":1,"119":1,"210":1}}],["bearer",{"2":{"452":1,"453":1}}],["before",{"2":{"430":1,"440":1}}],["between",{"2":{"424":6}}],["because",{"2":{"409":2}}],["be",{"2":{"134":1}}],["beijing",{"2":{"37":5,"69":1,"111":1,"115":2,"119":1,"122":2,"147":1,"164":1,"171":2,"232":1,"236":2,"243":1,"247":1,"250":1,"259":3,"265":2,"271":1,"275":1,"276":2,"277":1,"287":1,"368":1,"407":1,"424":4,"439":1,"452":1,"453":13}}],["backend=",{"2":{"440":1}}],["backend=backend",{"2":{"430":1}}],["backend",{"2":{"430":4}}],["backups",{"2":{"134":1,"141":1}}],["bakery",{"2":{"409":2}}],["basis",{"2":{"407":1}}],["basic",{"2":{"29":1,"36":3,"70":2,"85":3,"86":1,"89":6,"90":2,"92":6,"93":2,"98":1,"100":1,"193":1,"407":1,"430":1,"440":1}}],["basemodel",{"2":{"371":2}}],["baseagentkitclient",{"0":{"334":1},"2":{"336":1}}],["bases",{"2":{"330":1}}],["basego",{"2":{"259":2}}],["base",{"0":{"259":1},"2":{"131":3,"132":1,"133":1,"140":2,"206":1,"217":2,"257":2,"259":7,"275":1,"276":1,"288":1,"330":2,"346":1,"429":1,"431":1,"453":1}}],["bashcurl",{"2":{"409":1,"423":1}}],["bashpython",{"2":{"409":1,"420":1}}],["bashpip",{"2":{"18":1,"19":1,"20":1,"44":1,"344":1,"418":1}}],["bashecho",{"2":{"46":1}}],["bashexport",{"2":{"27":1,"31":1,"43":1,"306":1,"439":1,"453":1}}],["bashuv",{"2":{"44":1,"404":1,"451":1}}],["bash✅",{"2":{"37":1}}],["bashmkdir",{"2":{"36":1,"404":1,"451":1}}],["bashrc",{"2":{"27":1,"43":2,"318":1}}],["bashagentkit",{"2":{"24":1,"37":2,"39":1,"101":1,"105":1,"107":1,"113":1,"117":1,"119":1,"121":1,"122":1,"126":4,"128":1,"140":3,"143":1,"151":1,"157":1,"160":1,"161":1,"162":1,"163":1,"167":1,"175":1,"177":1,"186":1,"269":1,"270":1,"279":1,"281":1,"410":1,"425":1}}],["bash",{"2":{"21":1,"23":2,"26":1,"33":2,"36":1,"70":1,"71":1,"77":1,"83":1,"89":1,"90":1,"103":1,"106":2,"110":1,"112":1,"118":1,"120":1,"122":3,"123":1,"126":1,"132":2,"139":1,"140":3,"148":1,"154":1,"173":1,"182":1,"185":1,"188":1,"189":1,"190":1,"191":1,"193":1,"194":1,"195":1,"196":1,"198":1,"200":1,"202":4,"217":2,"269":1,"270":1,"272":1,"282":1,"283":1,"291":1,"293":1,"294":1,"295":1,"296":1,"299":1,"302":1,"303":1,"304":1,"305":1,"307":1,"310":1,"311":1,"312":1,"314":1,"315":1,"316":1,"318":1,"319":1,"320":1,"321":1,"406":1,"408":1,"419":1}}],["bashnpm",{"2":{"2":1,"3":1,"4":1,"5":1}}],["bucket=team",{"2":{"122":1,"126":1}}],["bucket",{"0":{"238":1},"2":{"111":2,"115":2,"122":2,"126":1,"232":1,"233":1,"234":1,"238":4,"265":2,"267":4,"276":1}}],["builtin",{"2":{"407":1,"415":1}}],["built",{"0":{"411":1},"1":{"412":1,"413":1,"414":1,"415":1,"416":1,"417":1,"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1,"425":1},"2":{"37":1,"411":1,"412":1,"413":1,"414":1}}],["builder",{"2":{"133":1,"140":1,"257":1,"259":1,"275":1}}],["builds",{"2":{"115":2,"122":1,"245":1,"265":1}}],["build",{"0":{"127":1,"244":1,"256":1,"260":1,"288":1},"1":{"128":1,"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1},"2":{"4":1,"23":1,"63":1,"80":1,"92":2,"93":2,"128":1,"130":1,"131":4,"132":3,"133":1,"139":4,"140":9,"150":1,"185":1,"195":1,"202":2,"206":3,"217":1,"230":1,"245":1,"255":1,"257":4,"260":1,"272":1,"275":1,"276":1,"288":1,"295":1,"296":1,"304":1,"305":2}}],["by",{"2":{"92":1,"134":2,"407":2,"429":1,"431":1}}],["bytepluses",{"2":{"259":1}}],["byteplus",{"2":{"77":7,"103":2,"106":1,"109":1,"217":5,"259":1}}],["访问与会话保持",{"2":{"444":1}}],["访问地址等信息",{"2":{"166":1}}],["访问地址",{"2":{"146":1,"147":1,"170":1,"171":1}}],["访问控制",{"2":{"31":1}}],["访问",{"2":{"3":1,"59":1,"149":1,"413":1,"448":1}}],["dumps",{"2":{"407":1}}],["dump",{"2":{"387":1,"407":1}}],["db",{"2":{"360":2}}],["d",{"2":{"293":1,"321":1,"409":1}}],["datacenter",{"2":{"453":8}}],["database",{"2":{"429":4,"430":2,"431":4,"439":3,"440":2,"441":1}}],["data",{"2":{"227":2,"363":2,"368":3,"387":5,"407":3,"409":1,"423":1,"424":2,"453":1}}],["date",{"2":{"123":1,"293":1,"321":1}}],["daemon",{"2":{"141":1,"199":1}}],["dt",{"2":{"123":1}}],["dry",{"2":{"114":1,"120":1,"126":1}}],["dialog=none",{"2":{"453":1}}],["did",{"2":{"409":2}}],["dict",{"2":{"100":2,"338":2,"345":2,"351":2,"352":2,"353":2,"355":2,"363":2,"366":1,"367":1,"368":1,"369":1,"370":1,"371":2,"390":2,"391":2,"392":3,"393":1,"394":4,"407":2,"415":2,"430":2,"440":2,"453":2}}],["directory",{"2":{"87":1,"89":1,"90":2}}],["distributed",{"2":{"407":2}}],["distance",{"2":{"393":3}}],["dist",{"2":{"4":1}}],["done",{"2":{"453":1}}],["dough",{"2":{"409":1}}],["doubao",{"2":{"32":1,"85":1,"89":1,"97":1,"440":1,"453":2}}],["documents",{"2":{"371":1}}],["dockerimage",{"2":{"191":3}}],["dockerignore",{"2":{"92":1,"93":1,"100":1}}],["docker",{"0":{"130":1,"199":1,"256":1,"288":1},"1":{"131":1,"132":1,"133":1,"134":1,"257":1,"258":1,"259":1,"260":1,"261":1,"262":1},"2":{"63":1,"66":1,"67":1,"68":1,"76":3,"80":1,"100":1,"127":1,"130":2,"132":2,"136":2,"141":3,"146":1,"179":1,"183":1,"199":4,"201":1,"206":4,"210":1,"217":1,"219":1,"224":1,"239":1,"248":1,"256":1,"260":2,"275":1,"276":1}}],["dockerfile",{"0":{"134":1,"261":1},"2":{"37":1,"129":4,"134":4,"136":1,"137":1,"139":3,"141":4,"213":1,"217":1,"257":2,"261":3,"288":1}}],["docs",{"2":{"3":1,"4":1,"5":1,"6":1}}],["debian",{"2":{"453":3}}],["debug",{"2":{"225":2,"243":1,"274":2,"296":1,"298":1,"300":1,"304":2,"407":1,"409":28,"424":8,"453":5}}],["debug=true",{"2":{"110":2}}],["debugging",{"2":{"21":1}}],["details",{"2":{"453":1}}],["degraded",{"2":{"360":1}}],["demo",{"2":{"345":1,"353":1,"374":1,"381":1,"430":1,"440":1}}],["delete",{"2":{"188":1,"189":1,"190":2,"191":1,"310":1,"329":1,"330":1,"387":2,"388":1}}],["del",{"2":{"124":1}}],["deps",{"2":{"133":1,"140":2,"260":1}}],["dependencies",{"0":{"215":1},"2":{"109":1,"132":1,"208":1,"215":3,"275":1,"286":1}}],["deployment",{"2":{"90":1}}],["deployed",{"2":{"90":2}}],["deploy",{"0":{"142":1},"1":{"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1},"2":{"63":1,"80":1,"90":1,"92":1,"93":1,"112":1,"113":1,"123":1,"141":1,"143":1,"148":2,"150":1,"183":1,"195":1,"202":1,"230":1,"245":1,"283":1,"293":1,"302":1,"303":1,"306":1,"311":1}}],["describe",{"2":{"453":1}}],["description=description",{"2":{"407":1}}],["description=",{"2":{"97":1,"453":1}}],["description",{"0":{"212":1},"2":{"85":2,"89":1,"92":1,"109":1,"119":1,"188":2,"189":1,"190":2,"191":3,"208":1,"212":1,"274":1,"275":1,"276":1,"286":1,"407":3}}],["desktop",{"2":{"76":1,"199":1}}],["destroy",{"0":{"174":1},"1":{"175":1,"176":1,"177":1,"178":1,"179":1,"180":1,"181":1,"182":1,"183":1},"2":{"51":1,"52":1,"63":1,"70":1,"80":1,"175":1,"177":1,"182":3}}],["def",{"2":{"100":2,"338":1,"345":2,"351":1,"353":1,"354":1,"355":1,"357":1,"359":1,"360":1,"361":3,"363":1,"366":1,"368":1,"369":1,"370":2,"371":1,"373":1,"374":1,"375":3,"382":1,"387":4,"390":1,"391":1,"392":1,"393":1,"394":2,"407":2,"415":2,"424":1,"430":2,"440":2,"453":2}}],["defaults",{"2":{"77":1,"217":1,"431":1}}],["default",{"2":{"39":1,"353":1,"407":5,"453":1}}],["definition",{"2":{"11":1}}],["deepseek",{"2":{"32":1}}],["development",{"2":{"274":1}}],["dev",{"2":{"3":1,"132":3,"140":5,"182":1,"196":2,"222":1,"269":2,"274":2}}],["本章节将指导您安装依赖项并实现长期记忆功能",{"2":{"426":1}}],["本文档将详细介绍如何在智能体代码中集成和使用",{"2":{"412":1}}],["本文档详细介绍各种注解的使用方法和最佳实践",{"2":{"348":1}}],["本文档帮你理解每个配置项的作用",{"2":{"204":1}}],["本篇文档将详细介绍每个命令的功能",{"2":{"79":1}}],["本指南旨在帮助您诊断和解决在使用",{"2":{"41":1}}],["本指南将引导您使用",{"2":{"29":1}}],["本指南将引导您完成从环境配置",{"2":{"402":1}}],["本指南将引导您完成",{"2":{"14":1}}],["本地启动智能体服务",{"0":{"420":1}}],["本地启动并调用服务",{"0":{"409":1}}],["本地已安装",{"2":{"403":1}}],["本地配置不提交",{"2":{"270":1}}],["本地快速构建镜像后推送到云端运行",{"2":{"246":1}}],["本地电脑",{"2":{"216":3}}],["本地部署",{"0":{"146":1}}],["本地构建的镜像",{"2":{"255":1}}],["本地构建",{"0":{"136":1},"2":{"105":1,"216":1,"246":1}}],["本地构建和运行",{"2":{"105":1}}],["本地容器运行",{"2":{"66":1}}],["本地",{"2":{"66":1,"68":1,"248":2}}],["本地模式",{"0":{"66":1}}],["本地或云端",{"2":{"63":1}}],["本地日志",{"2":{"59":1}}],["本地调试凭证配置",{"0":{"33":1}}],["本地调试",{"0":{"417":1},"1":{"418":1,"419":1,"420":1,"421":1,"422":1,"423":1,"424":1},"2":{"10":1}}],["本地开发配置",{"0":{"274":1}}],["本地开发调试",{"2":{"216":1,"402":1}}],["本地开发",{"0":{"1":1,"76":1},"1":{"2":1,"3":1,"4":1,"5":1},"2":{"216":1}}],["本目录包含",{"2":{"0":1}}],["和网关鉴权深度集成",{"2":{"400":1}}],["和策略级",{"2":{"283":1}}],["和混合模式",{"2":{"102":1}}],["和其他必要的部署文件",{"2":{"95":1}}],["和中划线",{"2":{"84":1}}],["和",{"2":{"0":1,"10":1,"11":1,"23":1,"29":1,"32":2,"96":1,"101":1,"133":1,"158":1,"187":1,"210":1,"356":1,"370":1,"406":1,"408":1,"437":1,"452":1}}]],"serializationVersion":2}';export{t as default}; diff --git a/assets/chunks/VPLocalSearchBox.Nz1pInKC.js b/assets/chunks/VPLocalSearchBox.Nz1pInKC.js new file mode 100644 index 0000000..581e294 --- /dev/null +++ b/assets/chunks/VPLocalSearchBox.Nz1pInKC.js @@ -0,0 +1,8 @@ +var Ot=Object.defineProperty;var Rt=(a,e,t)=>e in a?Ot(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Ae=(a,e,t)=>Rt(a,typeof e!="symbol"?e+"":e,t);import{V as tt,D as le,h as ge,ah as st,ai as Ct,aj as At,ak as Mt,q as je,al as Lt,d as Dt,am as nt,p as he,an as Pt,ao as zt,s as Vt,ap as $t,v as Me,P as fe,O as Se,aq as jt,ar as Bt,W as Wt,R as Kt,$ as Jt,b as qt,o as H,j as x,a0 as Ut,as as Gt,k as L,at as Ht,au as Qt,c as Z,e as Ee,n as it,B as rt,F as at,a as pe,t as ve,av as Yt,aw as ot,ax as Zt,a5 as Xt,aa as es,ay as ts,_ as ss}from"./framework.CA4hJK0u.js";import{u as ns,c as is}from"./theme.BeLitqQO.js";const rs={root:()=>tt(()=>import("./@localSearchIndexroot.DRMEmN26.js"),[]),en:()=>tt(()=>import("./@localSearchIndexen.C2rQIYcR.js"),[])};/*! +* tabbable 6.3.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var gt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=gt.join(","),bt=typeof Element>"u",re=bt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!bt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},ye=function(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),r=n===""||n==="true",i=r||t&&e&&ye(e.parentNode);return i},as=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},yt=function(e,t,s){if(ye(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&re.call(e,Ne)&&n.unshift(e),n=n.filter(s),n},Oe=function(e,t,s){for(var n=[],r=Array.from(e);r.length;){var i=r.shift();if(!ye(i,!1))if(i.tagName==="SLOT"){var o=i.assignedElements(),l=o.length?o:i.children,c=Oe(l,!0,s);s.flatten?n.push.apply(n,c):n.push({scopeParent:i,candidates:c})}else{var h=re.call(i,Ne);h&&s.filter(i)&&(t||!e.includes(i))&&n.push(i);var m=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),f=!ye(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(m&&f){var g=Oe(m===!0?i.children:m.children,!0,s);s.flatten?n.push.apply(n,g):n.push({scopeParent:i,candidates:g})}else r.unshift.apply(r,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ie=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||as(e))&&!wt(e)?0:e.tabIndex},os=function(e,t){var s=ie(e);return s<0&&t&&!wt(e)?0:s},ls=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},cs=function(e){return xt(e)&&e.type==="hidden"},us=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},ds=function(e,t){for(var s=0;ssummary:first-of-type"),o=i?e.parentElement:e;if(re.call(o,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="full-native"||s==="legacy-full"){if(typeof n=="function"){for(var l=e;e;){var c=e.parentElement,h=Fe(e);if(c&&!c.shadowRoot&&n(c)===!0)return lt(e);e.assignedSlot?e=e.assignedSlot:!c&&h!==e.ownerDocument?e=h.host:e=c}e=l}if(vs(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return lt(e);return!1},gs=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s=0)},_t=function(e){var t=[],s=[];return e.forEach(function(n,r){var i=!!n.scopeParent,o=i?n.scopeParent:n,l=os(o,i),c=i?_t(n.candidates):o;l===0?i?t.push.apply(t,c):t.push(o):s.push({documentOrder:r,tabIndex:l,item:n,isScope:i,content:c})}),s.sort(ls).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},ys=function(e,t){t=t||{};var s;return t.getShadowRoot?s=Oe([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:bs}):s=yt(e,t.includeContainer,Be.bind(null,t)),_t(s)},ws=function(e,t){t=t||{};var s;return t.getShadowRoot?s=Oe([e],t.includeContainer,{filter:Re.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=yt(e,t.includeContainer,Re.bind(null,t)),s},ae=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return re.call(e,Ne)===!1?!1:Be(t,e)},xs=gt.concat("iframe").join(","),Le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return re.call(e,xs)===!1?!1:Re(t,e)};/*! +* focus-trap 7.6.6 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function We(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,s=Array(e);t0){var s=e[e.length-1];s!==t&&s._setPausedState(!0)}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Os=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Rs=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},be=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Cs=function(e){return be(e)&&!e.shiftKey},As=function(e){return be(e)&&e.shiftKey},ht=function(e){return setTimeout(e,0)},me=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1&&arguments[1]!==void 0?arguments[1]:{},b=d.hasFallback,E=b===void 0?!1:b,T=d.params,F=T===void 0?[]:T,_=r[u];if(typeof _=="function"&&(_=_.apply(void 0,Is(F))),_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var C=_;if(typeof _=="string"){try{C=s.querySelector(_)}catch(v){throw new Error("`".concat(u,'` appears to be an invalid selector; error="').concat(v.message,'"'))}if(!C&&!E)throw new Error("`".concat(u,"` as selector refers to no known node"))}return C},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!Le(u,r.tabbableOptions))if(c(s.activeElement)>=0)u=s.activeElement;else{var d=i.tabbableGroups[0],b=d&&d.firstTabbableNode;u=b||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},f=function(){if(i.containerGroups=i.containers.map(function(u){var d=ys(u,r.tabbableOptions),b=ws(u,r.tabbableOptions),E=d.length>0?d[0]:void 0,T=d.length>0?d[d.length-1]:void 0,F=b.find(function(v){return ae(v)}),_=b.slice().reverse().find(function(v){return ae(v)}),C=!!d.find(function(v){return ie(v)>0});return{container:u,tabbableNodes:d,focusableNodes:b,posTabIndexesFound:C,firstTabbableNode:E,lastTabbableNode:T,firstDomTabbableNode:F,lastDomTabbableNode:_,nextTabbableNode:function(p){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=d.indexOf(p);return O<0?I?b.slice(b.indexOf(p)+1).find(function(P){return ae(P)}):b.slice(0,b.indexOf(p)).reverse().find(function(P){return ae(P)}):d[O+(I?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(u){return u.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},g=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?g(d.shadowRoot):d},w=function(u){if(u!==!1&&u!==g(document)){if(!u||!u.focus){w(m());return}u.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=u,Os(u)&&u.select()}},S=function(u){var d=h("setReturnFocus",{params:[u]});return d||(d===!1?!1:u)},y=function(u){var d=u.target,b=u.event,E=u.isBackward,T=E===void 0?!1:E;d=d||Te(b),f();var F=null;if(i.tabbableGroups.length>0){var _=c(d,b),C=_>=0?i.containerGroups[_]:void 0;if(_<0)T?F=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:F=i.tabbableGroups[0].firstTabbableNode;else if(T){var v=i.tabbableGroups.findIndex(function(V){var k=V.firstTabbableNode;return d===k});if(v<0&&(C.container===d||Le(d,r.tabbableOptions)&&!ae(d,r.tabbableOptions)&&!C.nextTabbableNode(d,!1))&&(v=_),v>=0){var p=v===0?i.tabbableGroups.length-1:v-1,I=i.tabbableGroups[p];F=ie(d)>=0?I.lastTabbableNode:I.lastDomTabbableNode}else be(b)||(F=C.nextTabbableNode(d,!1))}else{var O=i.tabbableGroups.findIndex(function(V){var k=V.lastTabbableNode;return d===k});if(O<0&&(C.container===d||Le(d,r.tabbableOptions)&&!ae(d,r.tabbableOptions)&&!C.nextTabbableNode(d))&&(O=_),O>=0){var P=O===i.tabbableGroups.length-1?0:O+1,z=i.tabbableGroups[P];F=ie(d)>=0?z.firstTabbableNode:z.firstDomTabbableNode}else be(b)||(F=C.nextTabbableNode(d))}}else F=h("fallbackFocus");return F},R=function(u){var d=Te(u);if(!(c(d,u)>=0)){if(me(r.clickOutsideDeactivates,u)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}me(r.allowOutsideClick,u)||u.preventDefault()}},A=function(u){var d=Te(u),b=c(d,u)>=0;if(b||d instanceof Document)b&&(i.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var E,T=!0;if(i.mostRecentlyFocusedNode)if(ie(i.mostRecentlyFocusedNode)>0){var F=c(i.mostRecentlyFocusedNode),_=i.containerGroups[F].tabbableNodes;if(_.length>0){var C=_.findIndex(function(v){return v===i.mostRecentlyFocusedNode});C>=0&&(r.isKeyForward(i.recentNavEvent)?C+1<_.length&&(E=_[C+1],T=!1):C-1>=0&&(E=_[C-1],T=!1))}}else i.containerGroups.some(function(v){return v.tabbableNodes.some(function(p){return ie(p)>0})})||(T=!1);else T=!1;T&&(E=y({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),w(E||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},J=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=u;var b=y({event:u,isBackward:d});b&&(be(u)&&u.preventDefault(),w(b))},Q=function(u){(r.isKeyForward(u)||r.isKeyBackward(u))&&J(u,r.isKeyBackward(u))},W=function(u){Rs(u)&&me(r.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},$=function(u){var d=Te(u);c(d,u)>=0||me(r.clickOutsideDeactivates,u)||me(r.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},j=function(){if(i.active)return dt.activateTrap(n,o),i.delayInitialFocusTimer=r.delayInitialFocus?ht(function(){w(m())}):w(m()),s.addEventListener("focusin",A,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",$,{capture:!0,passive:!1}),s.addEventListener("keydown",Q,{capture:!0,passive:!1}),s.addEventListener("keydown",W),o},we=function(){if(i.active)return s.removeEventListener("focusin",A,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",$,!0),s.removeEventListener("keydown",Q,!0),s.removeEventListener("keydown",W),o},M=function(u){var d=u.some(function(b){var E=Array.from(b.removedNodes);return E.some(function(T){return T===i.mostRecentlyFocusedNode})});d&&w(m())},q=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,U=function(){q&&(q.disconnect(),i.active&&!i.paused&&i.containers.map(function(u){q.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return i.active},get paused(){return i.paused},activate:function(u){if(i.active)return this;var d=l(u,"onActivate"),b=l(u,"onPostActivate"),E=l(u,"checkCanFocusTrap");E||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=g(s),d==null||d();var T=function(){E&&f(),j(),U(),b==null||b()};return E?(E(i.containers.concat()).then(T,T),this):(T(),this)},deactivate:function(u){if(!i.active)return this;var d=ut({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},u);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,we(),i.active=!1,i.paused=!1,U(),dt.deactivateTrap(n,o);var b=l(d,"onDeactivate"),E=l(d,"onPostDeactivate"),T=l(d,"checkCanReturnFocus"),F=l(d,"returnFocus","returnFocusOnDeactivate");b==null||b();var _=function(){ht(function(){F&&w(S(i.nodeFocusedBeforeActivation)),E==null||E()})};return F&&T?(T(S(i.nodeFocusedBeforeActivation)).then(_,_),this):(_(),this)},pause:function(u){return i.active?(i.manuallyPaused=!0,this._setPausedState(!0,u)):this},unpause:function(u){return i.active?(i.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,u)):this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return i.containers=d.map(function(b){return typeof b=="string"?s.querySelector(b):b}),i.active&&f(),U(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return i.manuallyPaused}},_setPausedState:{value:function(u,d){if(i.paused===u)return this;if(i.paused=u,u){var b=l(d,"onPause"),E=l(d,"onPostPause");b==null||b(),we(),U(),E==null||E()}else{var T=l(d,"onUnpause"),F=l(d,"onPostUnpause");T==null||T(),f(),j(),U(),F==null||F()}return this}}}),o.updateContainerElements(e),o};function Ds(a,e={}){let t;const{immediate:s,...n}=e,r=le(!1),i=le(!1),o=f=>t&&t.activate(f),l=f=>t&&t.deactivate(f),c=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},m=ge(()=>{const f=st(a);return Ct(f).map(g=>{const w=st(g);return typeof w=="string"?w:At(w)}).filter(Mt)});return je(m,f=>{f.length&&(t=Ls(f,{...n,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),Lt(()=>l()),{hasFocus:r,isPaused:i,activate:o,deactivate:l,pause:c,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let r=!1;return s.every(i=>n.call(e,i)?(r=!0,!1):!0),r}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(r=>r.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const r=e.contentWindow;if(n=r.document,!r||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,r=null;const i=()=>{if(!n){n=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,o=0;r=Array.prototype.slice.call(r);const l=()=>{--i<=0&&n(o)};i||l(),r.forEach(c=>{ce.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,s(h)),l()},l)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),r=Node.DOCUMENT_POSITION_PRECEDING;if(n&r)if(t!==null){const i=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(i&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let r=!1,i=!1;return n.forEach((o,l)=>{o.val===s&&(r=l,i=o.handled)}),this.compareNodeIframe(e,t,s)?(r===!1&&!i?n.push({val:s,handled:!0}):r!==!1&&!i&&(n[r].handled=!0),!0):(r===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,r){const i=this.createIterator(t,e,n);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(i),c);for(;m();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(c,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,g=>l.push(g),n)}),l.push(c);l.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),r()}forEachNode(e,t,s,n=()=>{}){const r=this.getContexts();let i=r.length;i||n(),r.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(o,l):l()})}}let Ps=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let r=n.charAt(s+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(r=>{s.every(i=>{if(i.indexOf(r)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,r=typeof s=="string"?[]:s.limiters,i="";switch(r.forEach(o=>{i+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,r)=>n.start-r.start).forEach(n=>{let{start:r,end:i,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=r,n.length=i-r,t.push(n),s=i)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,r=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?r=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:r}}checkWhitespaceRanges(e,t,s){let n,r=!0,i=s.length,o=t-i,l=parseInt(e.start,10)-o;return l=l>i?i:l,n=l+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),l<0||n-l<0||l>i||n>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(l,n).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:n,valid:r}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=r.textContent,r.parentNode.replaceChild(o,r),i}wrapRangeInMappedTextNode(e,t,s,n,r){e.nodes.every((i,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!n(i.node))return!1;const c=t-i.start,h=(s>i.end?i.end:s)-i.start,m=e.value.substr(0,i.start),f=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,c,h),e.value=m+f,e.nodes.forEach((g,w)=>{w>=o&&(e.nodes[w].start>0&&w!==o&&(e.nodes[w].start-=h),e.nodes[w].end-=h)}),s-=h,r(i.node.previousSibling,i.start),s>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,s,n,r){const i=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[i]!=="";){if(!s(c[i],l))continue;let h=c.index;if(i!==0)for(let m=1;m{let l;for(;(l=e.exec(o.value))!==null&&l[i]!=="";){let c=l.index;if(i!==0)for(let m=1;ms(l[i],m),(m,f)=>{e.lastIndex=f,n(m)})}r()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(r=>{const i=r.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,i,r.value);m&&this.wrapRangeInMappedTextNode(r,c,h,f=>t(f,o,r.value.substring(c,h),l),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const r=i=>{s++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,o)=>this.opt.filter(o,i,s),r,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,g)=>this.opt.filter(g,c,s,m),f=>{m++,s++,this.opt.each(f)},()=>{m===0&&this.opt.noMatch(c),r[i-1]===c?this.opt.done(s):l(r[r.indexOf(c)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(s):l(r[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(r,i,o,l)=>this.opt.filter(r,i,o,l),(r,i)=>{s++,this.opt.each(r,i)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),r=this.matchesExclude(s);return!n||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function zs(a){const e=new Ps(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}const Vs="ENTRIES",St="KEYS",Et="VALUES",D="";class De{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=oe(this._path);if(oe(t)===D)return{done:!1,value:this.result()};const s=e.get(oe(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=oe(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>oe(e)).filter(e=>e!==D).join("")}value(){return oe(this._path).node.get(D)}result(){switch(this._type){case Et:return this.value();case St:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const oe=a=>a[a.length-1],$s=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,r=n+t,i=new Uint8Array(r*n).fill(t+1);for(let o=0;o{const l=r*i;e:for(const c of a.keys())if(c===D){const h=n[l-1];h<=t&&s.set(o,[a.get(c),h])}else{let h=r;for(let m=0;mt)continue e}Tt(a.get(c),e,t,s,n,h,i,o+c)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Ce(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,r]=Ue(s);for(const i of n.keys())if(i!==D&&i.startsWith(r)){const o=new Map;return o.set(i.slice(r.length),n.get(i)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,js(this._tree,e)}entries(){return new De(this,Vs)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return $s(this._tree,e,t)}get(e){const t=Ke(this._tree,e);return t!==void 0?t.get(D):void 0}has(e){const t=Ke(this._tree,e);return t!==void 0&&t.has(D)}keys(){return new De(this,St)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,Pe(this._tree,e).set(D,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=Pe(this._tree,e);return s.set(D,t(s.get(D))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=Pe(this._tree,e);let n=s.get(D);return n===void 0&&s.set(D,n=t()),n}values(){return new De(this,Et)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Ce=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==D&&e.startsWith(s))return t.push([a,s]),Ce(a.get(s),e.slice(s.length),t);return t.push([a,e]),Ce(void 0,"",t)},Ke=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==D&&e.startsWith(t))return Ke(a.get(t),e.slice(t.length))},Pe=(a,e)=>{const t=e.length;e:for(let s=0;a&&s{const[t,s]=Ce(a,e);if(t!==void 0){if(t.delete(D),t.size===0)It(s);else if(t.size===1){const[n,r]=t.entries().next().value;kt(s,n,r)}}},It=a=>{if(a.length===0)return;const[e,t]=Ue(a);if(e.delete(t),e.size===0)It(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==D&&kt(a.slice(0,-1),s,n)}},kt=(a,e,t)=>{if(a.length===0)return;const[s,n]=Ue(a);s.set(n+e,t),s.delete(n)},Ue=a=>a[a.length-1],Ge="or",Nt="and",Bs="and_not";class ue{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?$e:e.autoVacuum;this._options={...Ve,...e,autoVacuum:t,searchOptions:{...ft,...e.searchOptions||{}},autoSuggestOptions:{...Us,...e.autoSuggestOptions||{}}},this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=qe,this.addFields(this._options.fields)}add(e){const{extractField:t,stringifyField:s,tokenize:n,processTerm:r,fields:i,idField:o}=this._options,l=t(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,e);for(const h of i){const m=t(e,h);if(m==null)continue;const f=n(s(m,h),h),g=this._fieldIds[h],w=new Set(f).size;this.addFieldLength(c,g,this._documentCount-1,w);for(const S of f){const y=r(S,h);if(Array.isArray(y))for(const R of y)this.addTerm(g,c,R);else y&&this.addTerm(g,c,y)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%s===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),n);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:s,extractField:n,stringifyField:r,fields:i,idField:o}=this._options,l=n(e,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const h of i){const m=n(e,h);if(m==null)continue;const f=t(r(m,h),h),g=this._fieldIds[h],w=new Set(f).size;this.removeFieldLength(c,g,this._documentCount,w);for(const S of f){const y=s(S,h);if(Array.isArray(y))for(const R of y)this.removeTerm(g,c,R);else y&&this.removeTerm(g,c,y)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=qe,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||Je.batchSize,r=e.batchWait||Je.batchWait;let i=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),i%n===0&&await new Promise(c=>setTimeout(c,r)),i+=1}this._dirtCount-=s}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||$e.minDirtCount,s=s||$e.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:s}=this._options,n={...s,...t},r=this.executeQuery(e,t),i=[];for(const[o,{score:l,terms:c,match:h}]of r){const m=c.length||1,f={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(f,this._storedFields.get(o)),(n.filter==null||n.filter(f))&&i.push(f)}return e===ue.wildcard&&n.boostDocument==null||i.sort(vt),i}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const s=new Map;for(const{score:r,terms:i}of this.search(e,t)){const o=i.join(" "),l=s.get(o);l!=null?(l.score+=r,l.count+=1):s.set(o,{score:r,terms:i,count:1})}const n=[];for(const[r,{score:i,terms:o,count:l}]of s)n.push({suggestion:r,terms:o,score:i/l});return n.sort(vt),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(Ve.hasOwnProperty(e))return ze(Ve,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Ie(n),l._fieldLength=Ie(r),l._storedFields=Ie(i);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of s){const m=new Map;for(const f of Object.keys(h)){let g=h[f];o===1&&(g=g.ds),m.set(parseInt(f,10),Ie(g))}l._index.set(c,m)}return l}static async loadJSAsync(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await ke(n),l._fieldLength=await ke(r),l._storedFields=await ke(i);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of s){const f=new Map;for(const g of Object.keys(m)){let w=m[g];o===1&&(w=w.ds),f.set(parseInt(g,10),await ke(w))}++c%1e3===0&&await Ft(0),l._index.set(h,f)}return l}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:r,averageFieldLength:i,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ue(t);return c._documentCount=s,c._nextId=n,c._idToShortId=new Map,c._fieldIds=r,c._avgFieldLength=i,c._dirtCount=o||0,c._index=new X,c}executeQuery(e,t={}){if(e===ue.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f={...t,...e,queries:void 0},g=e.queries.map(w=>this.executeQuery(w,f));return this.combineResults(g,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:r}=this._options,i={tokenize:s,processTerm:n,...r,...t},{tokenize:o,processTerm:l}=i,m=o(e).flatMap(f=>l(f)).filter(f=>!!f).map(qs(i)).map(f=>this.executeQuerySpec(f,i));return this.combineResults(m,i.combineWith)}executeQuerySpec(e,t){const s={...this._options.searchOptions,...t},n=(s.fields||this._options.fields).reduce((S,y)=>({...S,[y]:ze(s.boost,y)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:o,bm25:l}=s,{fuzzy:c,prefix:h}={...ft.weights,...i},m=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,m,n,r,l);let g,w;if(e.prefix&&(g=this._index.atPrefix(e.term)),e.fuzzy){const S=e.fuzzy===!0?.2:e.fuzzy,y=S<1?Math.min(o,Math.round(e.term.length*S)):S;y&&(w=this._index.fuzzyGet(e.term,y))}if(g)for(const[S,y]of g){const R=S.length-e.term.length;if(!R)continue;w==null||w.delete(S);const A=h*S.length/(S.length+.3*R);this.termResults(e.term,S,A,e.termBoost,y,n,r,l,f)}if(w)for(const S of w.keys()){const[y,R]=w.get(S);if(!R)continue;const A=c*S.length/(S.length+R);this.termResults(e.term,S,A,e.termBoost,y,n,r,l,f)}return f}executeWildcardQuery(e){const t=new Map,s={...this._options.searchOptions,...e};for(const[n,r]of this._documentIds){const i=s.boostDocument?s.boostDocument(r,"",this._storedFields.get(n)):1;t.set(n,{score:i,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const s=t.toLowerCase(),n=Ws[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[r,i]of s)n[r]=Object.fromEntries(i);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,r,i,o,l,c=new Map){if(r==null)return c;for(const h of Object.keys(i)){const m=i[h],f=this._fieldIds[h],g=r.get(f);if(g==null)continue;let w=g.size;const S=this._avgFieldLength[f];for(const y of g.keys()){if(!this._documentIds.has(y)){this.removeTerm(f,y,t),w-=1;continue}const R=o?o(this._documentIds.get(y),t,this._storedFields.get(y)):1;if(!R)continue;const A=g.get(y),J=this._fieldLength.get(y)[f],Q=Js(A,w,this._documentCount,J,S,l),W=s*n*m*R*Q,$=c.get(y);if($){$.score+=W,Gs($.terms,e);const j=ze($.match,t);j?j.push(h):$.match[t]=[h]}else c.set(y,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,s){const n=this._index.fetch(s,mt);let r=n.get(e);if(r==null)r=new Map,r.set(t,1),n.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,mt),r=n.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,s):r.get(t)<=1?r.size<=1?n.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;tObject.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Ws={[Ge]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:r,match:i}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,i),pt(s.terms,r)}}return a},[Nt]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:r,terms:i,match:o}=e.get(s);pt(n.terms,i),t.set(s,{score:n.score+r,terms:n.terms,match:Object.assign(n.match,o)})}return t},[Bs]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},Ks={k:1.2,b:.7,d:.5},Js=(a,e,t,s,n,r)=>{const{k:i,b:o,d:l}=r;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(i+1)/(a+i*(1-o+o*s/n)))},qs=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,r=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,i=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:r,termBoost:i}},Ve={idField:"id",extractField:(a,e)=>a[e],stringifyField:(a,e)=>a.toString(),tokenize:a=>a.split(Hs),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ft={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Ks},Us={combineWith:Nt,prefix:(a,e,t)=>e===t.length-1},Je={batchSize:1e3,batchWait:10},qe={minDirtFactor:.1,minDirtCount:20},$e={...Je,...qe},Gs=(a,e)=>{a.includes(e)||a.push(e)},pt=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},vt=({score:a},{score:e})=>e-a,mt=()=>new Map,Ie=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},ke=async a=>{const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&await Ft(0);return e},Ft=a=>new Promise(e=>setTimeout(e,a)),Hs=/[\n\r\p{Z}\p{P}]+/u;class Qs{constructor(e=10){Ae(this,"max");Ae(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Ys=["aria-owns"],Zs={class:"shell"},Xs=["title"],en={class:"search-actions before"},tn=["title"],sn=["aria-activedescendant","aria-controls","placeholder"],nn={class:"search-actions"},rn=["title"],an=["disabled","title"],on=["id","role","aria-labelledby"],ln=["id","aria-selected"],cn=["href","aria-label","onMouseenter","onFocusin","data-index"],un={class:"titles"},dn=["innerHTML"],hn={class:"title main"},fn=["innerHTML"],pn={key:0,class:"excerpt-wrapper"},vn={key:0,class:"excerpt",inert:""},mn=["innerHTML"],gn={key:0,class:"no-results"},bn={class:"search-keyboard-shortcuts"},yn=["aria-label"],wn=["aria-label"],xn=["aria-label"],_n=["aria-label"],Sn=Dt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var _,C;const t=e,s=le(),n=le(),r=le(rs),i=ns(),{activate:o}=Ds(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=i,h=nt(async()=>{var v,p,I,O,P,z,V,k,K;return ot(ue.loadJSON((I=await((p=(v=r.value)[l.value])==null?void 0:p.call(v)))==null?void 0:I.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((O=c.value.search)==null?void 0:O.provider)==="local"&&((z=(P=c.value.search.options)==null?void 0:P.miniSearch)==null?void 0:z.searchOptions)},...((V=c.value.search)==null?void 0:V.provider)==="local"&&((K=(k=c.value.search.options)==null?void 0:k.miniSearch)==null?void 0:K.options)}))}),f=ge(()=>{var v,p;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((p=c.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?he(""):Pt("vitepress:local-search-filter",""),g=zt("vitepress:local-search-detailed-list",((_=c.value.search)==null?void 0:_.provider)==="local"&&((C=c.value.search.options)==null?void 0:C.detailedView)===!0),w=ge(()=>{var v,p,I;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((p=c.value.search.options)==null?void 0:p.disableDetailedView)===!0||((I=c.value.search.options)==null?void 0:I.detailedView)===!1)}),S=ge(()=>{var p,I,O,P,z,V,k;const v=((p=c.value.search)==null?void 0:p.options)??c.value.algolia;return((z=(P=(O=(I=v==null?void 0:v.locales)==null?void 0:I[l.value])==null?void 0:O.translations)==null?void 0:P.button)==null?void 0:z.buttonText)||((k=(V=v==null?void 0:v.translations)==null?void 0:V.button)==null?void 0:k.buttonText)||"Search"});Vt(()=>{w.value&&(g.value=!1)});const y=le([]),R=he(!1);je(f,()=>{R.value=!1});const A=nt(async()=>{if(n.value)return ot(new zs(n.value))},null),J=new Qs(16);$t(()=>[h.value,f.value,g.value],async([v,p,I],O,P)=>{var ee,xe,He,Qe;(O==null?void 0:O[0])!==v&&J.clear();let z=!1;if(P(()=>{z=!0}),!v)return;y.value=v.search(p).slice(0,16),R.value=!0;const V=I?await Promise.all(y.value.map(B=>Q(B.id))):[];if(z)return;for(const{id:B,mod:te}of V){const se=B.slice(0,B.indexOf("#"));let Y=J.get(se);if(Y)continue;Y=new Map,J.set(se,Y);const G=te.default??te;if(G!=null&&G.render||G!=null&&G.setup){const ne=Zt(G);ne.config.warnHandler=()=>{},ne.provide(Xt,i),Object.defineProperties(ne.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Ye=document.createElement("div");ne.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(de=>{var et;const _e=(et=de.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(_e==null?void 0:_e.startsWith("#"))&&_e.slice(1);if(!Ze)return;let Xe="";for(;(de=de.nextElementSibling)&&!/^h[1-6]$/i.test(de.tagName);)Xe+=de.outerHTML;Y.set(Ze,Xe)}),ne.unmount()}if(z)return}const k=new Set;if(y.value=y.value.map(B=>{const[te,se]=B.id.split("#"),Y=J.get(te),G=(Y==null?void 0:Y.get(se))??"";for(const ne in B.match)k.add(ne);return{...B,text:G}}),await fe(),z)return;await new Promise(B=>{var te;(te=A.value)==null||te.unmark({done:()=>{var se;(se=A.value)==null||se.markRegExp(T(k),{done:B})}})});const K=((ee=s.value)==null?void 0:ee.querySelectorAll(".result .excerpt"))??[];for(const B of K)(xe=B.querySelector('mark[data-markjs="true"]'))==null||xe.scrollIntoView({block:"center"});(Qe=(He=n.value)==null?void 0:He.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function Q(v){const p=es(v.slice(0,v.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(p)}}catch(I){return console.error(I),{id:v,mod:{}}}}const W=he(),$=ge(()=>{var v;return((v=f.value)==null?void 0:v.length)<=0});function j(v=!0){var p,I;(p=W.value)==null||p.focus(),v&&((I=W.value)==null||I.select())}Me(()=>{j()});function we(v){v.pointerType==="mouse"&&j()}const M=he(-1),q=he(!0);je(y,v=>{M.value=v.length?0:-1,U()});function U(){fe(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}Se("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=y.value.length-1),q.value=!0,U()}),Se("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=y.value.length&&(M.value=0),q.value=!0,U()});const N=jt();Se("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const p=y.value[M.value];if(v.target instanceof HTMLInputElement&&!p){v.preventDefault();return}p&&(N.go(p.id),t("close"))}),Se("Escape",()=>{t("close")});const d=is({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Me(()=>{window.history.pushState(null,"",null)}),Bt("popstate",v=>{v.preventDefault(),t("close")});const b=Wt(Kt?document.body:null);Me(()=>{fe(()=>{b.value=!0,fe().then(()=>o())})}),Jt(()=>{b.value=!1});function E(){f.value="",fe().then(()=>j(!1))}function T(v){return new RegExp([...v].sort((p,I)=>I.length-p.length).map(p=>`(${ts(p)})`).join("|"),"gi")}function F(v){var O;if(!q.value)return;const p=(O=v.target)==null?void 0:O.closest(".result"),I=Number.parseInt(p==null?void 0:p.dataset.index);I>=0&&I!==M.value&&(M.value=I),q.value=!1}return(v,p)=>{var I,O,P,z,V;return H(),qt(Yt,{to:"body"},[x("div",{ref_key:"el",ref:s,role:"button","aria-owns":(I=y.value)!=null&&I.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[x("div",{class:"backdrop",onClick:p[0]||(p[0]=k=>v.$emit("close"))}),x("div",Zs,[x("form",{class:"search-bar",onPointerup:p[4]||(p[4]=k=>we(k)),onSubmit:p[5]||(p[5]=Ut(()=>{},["prevent"]))},[x("label",{title:S.value,id:"localsearch-label",for:"localsearch-input"},[...p[7]||(p[7]=[x("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)])],8,Xs),x("div",en,[x("button",{class:"back-button",title:L(d)("modal.backButtonTitle"),onClick:p[1]||(p[1]=k=>v.$emit("close"))},[...p[8]||(p[8]=[x("span",{class:"vpi-arrow-left local-search-icon"},null,-1)])],8,tn)]),Gt(x("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":p[2]||(p[2]=k=>Qt(f)?f.value=k:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(O=y.value)!=null&&O.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:S.value,spellcheck:"false",type:"search"},null,8,sn),[[Ht,L(f)]]),x("div",nn,[w.value?Ee("",!0):(H(),Z("button",{key:0,class:it(["toggle-layout-button",{"detailed-list":L(g)}]),type:"button",title:L(d)("modal.displayDetails"),onClick:p[3]||(p[3]=k=>M.value>-1&&(g.value=!L(g)))},[...p[9]||(p[9]=[x("span",{class:"vpi-layout-list local-search-icon"},null,-1)])],10,rn)),x("button",{class:"clear-button",type:"reset",disabled:$.value,title:L(d)("modal.resetButtonTitle"),onClick:E},[...p[10]||(p[10]=[x("span",{class:"vpi-delete local-search-icon"},null,-1)])],8,an)])],32),x("ul",{ref_key:"resultsEl",ref:n,id:(P=y.value)!=null&&P.length?"localsearch-list":void 0,role:(z=y.value)!=null&&z.length?"listbox":void 0,"aria-labelledby":(V=y.value)!=null&&V.length?"localsearch-label":void 0,class:"results",onMousemove:F},[(H(!0),Z(at,null,rt(y.value,(k,K)=>(H(),Z("li",{key:k.id,id:"localsearch-item-"+K,"aria-selected":M.value===K?"true":"false",role:"option"},[x("a",{href:k.id,class:it(["result",{selected:M.value===K}]),"aria-label":[...k.titles,k.title].join(" > "),onMouseenter:ee=>!q.value&&(M.value=K),onFocusin:ee=>M.value=K,onClick:p[6]||(p[6]=ee=>v.$emit("close")),"data-index":K},[x("div",null,[x("div",un,[p[12]||(p[12]=x("span",{class:"title-icon"},"#",-1)),(H(!0),Z(at,null,rt(k.titles,(ee,xe)=>(H(),Z("span",{key:xe,class:"title"},[x("span",{class:"text",innerHTML:ee},null,8,dn),p[11]||(p[11]=x("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),x("span",hn,[x("span",{class:"text",innerHTML:k.title},null,8,fn)])]),L(g)?(H(),Z("div",pn,[k.text?(H(),Z("div",vn,[x("div",{class:"vp-doc",innerHTML:k.text},null,8,mn)])):Ee("",!0),p[13]||(p[13]=x("div",{class:"excerpt-gradient-bottom"},null,-1)),p[14]||(p[14]=x("div",{class:"excerpt-gradient-top"},null,-1))])):Ee("",!0)])],42,cn)],8,ln))),128)),L(f)&&!y.value.length&&R.value?(H(),Z("li",gn,[pe(ve(L(d)("modal.noResultsText"))+' "',1),x("strong",null,ve(L(f)),1),p[15]||(p[15]=pe('" ',-1))])):Ee("",!0)],40,on),x("div",bn,[x("span",null,[x("kbd",{"aria-label":L(d)("modal.footer.navigateUpKeyAriaLabel")},[...p[16]||(p[16]=[x("span",{class:"vpi-arrow-up navigate-icon"},null,-1)])],8,yn),x("kbd",{"aria-label":L(d)("modal.footer.navigateDownKeyAriaLabel")},[...p[17]||(p[17]=[x("span",{class:"vpi-arrow-down navigate-icon"},null,-1)])],8,wn),pe(" "+ve(L(d)("modal.footer.navigateText")),1)]),x("span",null,[x("kbd",{"aria-label":L(d)("modal.footer.selectKeyAriaLabel")},[...p[18]||(p[18]=[x("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)])],8,xn),pe(" "+ve(L(d)("modal.footer.selectText")),1)]),x("span",null,[x("kbd",{"aria-label":L(d)("modal.footer.closeKeyAriaLabel")},"esc",8,_n),pe(" "+ve(L(d)("modal.footer.closeText")),1)])])])],8,Ys)])}}}),Fn=ss(Sn,[["__scopeId","data-v-68e678c9"]]);export{Fn as default}; diff --git a/assets/chunks/framework.CA4hJK0u.js b/assets/chunks/framework.CA4hJK0u.js new file mode 100644 index 0000000..7d7af30 --- /dev/null +++ b/assets/chunks/framework.CA4hJK0u.js @@ -0,0 +1,19 @@ +/** +* @vue/shared v3.5.25 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Us(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ee={},Pt=[],Be=()=>{},gi=()=>!1,ln=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bs=e=>e.startsWith("onUpdate:"),ue=Object.assign,Ks=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sl=Object.prototype.hasOwnProperty,Q=(e,t)=>sl.call(e,t),K=Array.isArray,Lt=e=>Wn(e)==="[object Map]",mi=e=>Wn(e)==="[object Set]",q=e=>typeof e=="function",le=e=>typeof e=="string",tt=e=>typeof e=="symbol",te=e=>e!==null&&typeof e=="object",vi=e=>(te(e)||q(e))&&q(e.then)&&q(e.catch),yi=Object.prototype.toString,Wn=e=>yi.call(e),rl=e=>Wn(e).slice(8,-1),_i=e=>Wn(e)==="[object Object]",Un=e=>le(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,It=Us(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},il=/-\w/g,Ie=Bn(e=>e.replace(il,t=>t.slice(1).toUpperCase())),ol=/\B([A-Z])/g,ut=Bn(e=>e.replace(ol,"-$1").toLowerCase()),Kn=Bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Cn=Bn(e=>e?`on${Kn(e)}`:""),lt=(e,t)=>!Object.is(e,t),An=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},qs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ll=e=>{const t=le(e)?Number(e):NaN;return isNaN(t)?e:t};let vr;const qn=()=>vr||(vr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Gs(e){if(K(e)){const t={};for(let n=0;n{if(n){const s=n.split(al);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Xs(e){let t="";if(le(e))t=e;else if(K(e))for(let n=0;n!!(e&&e.__v_isRef===!0),pl=e=>le(e)?e:e==null?"":K(e)||te(e)&&(e.toString===yi||!q(e.toString))?Si(e)?pl(e.value):JSON.stringify(e,Ti,2):String(e),Ti=(e,t)=>Si(t)?Ti(e,t.value):Lt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[ls(s,i)+" =>"]=r,n),{})}:mi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ls(n))}:tt(t)?ls(t):te(t)&&!K(t)&&!_i(t)?String(t):t,ls=(e,t="")=>{var n;return tt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.25 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let me;class gl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=me,!t&&me&&(this.index=(me.scopes||(me.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(me=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(qt){let t=qt;for(qt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Kt;){let t=Kt;for(Kt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ri(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),zs(s),vl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ms(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Oi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Oi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qt)||(e.globalVersion=Qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ms(e))))return;e.flags|=2;const t=e.dep,n=re,s=Fe;re=e,Fe=!0;try{Ri(e);const r=e.fn(e._value);(t.version===0||lt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{re=n,Fe=s,Mi(e),e.flags&=-3}}function zs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)zs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Pi=[];function ze(){Pi.push(Fe),Fe=!1}function Qe(){const e=Pi.pop();Fe=e===void 0?!0:e}function yr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=re;re=void 0;try{t()}finally{re=n}}}let Qt=0;class yl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Gn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!re||!Fe||re===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==re)n=this.activeLink=new yl(re,this),re.deps?(n.prevDep=re.depsTail,re.depsTail.nextDep=n,re.depsTail=n):re.deps=re.depsTail=n,Li(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=re.depsTail,n.nextDep=void 0,re.depsTail.nextDep=n,re.depsTail=n,re.deps===n&&(re.deps=s)}return n}trigger(t){this.version++,Qt++,this.notify(t)}notify(t){Ys();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Js()}}}function Li(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Li(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const In=new WeakMap,yt=Symbol(""),Os=Symbol(""),Zt=Symbol("");function ye(e,t,n){if(Fe&&re){let s=In.get(e);s||In.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Gn),r.map=s,r.key=n),r.track()}}function Ye(e,t,n,s,r,i){const o=In.get(e);if(!o){Qt++;return}const l=c=>{c&&c.trigger()};if(Ys(),t==="clear")o.forEach(l);else{const c=K(e),f=c&&Un(n);if(c&&n==="length"){const a=Number(s);o.forEach((d,m)=>{(m==="length"||m===Zt||!tt(m)&&m>=a)&&l(d)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(Zt)),t){case"add":c?f&&l(o.get("length")):(l(o.get(yt)),Lt(e)&&l(o.get(Os)));break;case"delete":c||(l(o.get(yt)),Lt(e)&&l(o.get(Os)));break;case"set":Lt(e)&&l(o.get(yt));break}}Js()}function _l(e,t){const n=In.get(e);return n&&n.get(t)}function Ct(e){const t=z(e);return t===e?t:(ye(t,"iterate",Zt),Re(e)?t:t.map(De))}function Xn(e){return ye(e=z(e),"iterate",Zt),e}function rt(e,t){return Ze(e)?ct(e)?Dt(De(t)):Dt(t):De(t)}const bl={__proto__:null,[Symbol.iterator](){return as(this,Symbol.iterator,e=>rt(this,e))},concat(...e){return Ct(this).concat(...e.map(t=>K(t)?Ct(t):t))},entries(){return as(this,"entries",e=>(e[1]=rt(this,e[1]),e))},every(e,t){return Ke(this,"every",e,t,void 0,arguments)},filter(e,t){return Ke(this,"filter",e,t,n=>n.map(s=>rt(this,s)),arguments)},find(e,t){return Ke(this,"find",e,t,n=>rt(this,n),arguments)},findIndex(e,t){return Ke(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ke(this,"findLast",e,t,n=>rt(this,n),arguments)},findLastIndex(e,t){return Ke(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ke(this,"forEach",e,t,void 0,arguments)},includes(...e){return fs(this,"includes",e)},indexOf(...e){return fs(this,"indexOf",e)},join(e){return Ct(this).join(e)},lastIndexOf(...e){return fs(this,"lastIndexOf",e)},map(e,t){return Ke(this,"map",e,t,void 0,arguments)},pop(){return Wt(this,"pop")},push(...e){return Wt(this,"push",e)},reduce(e,...t){return _r(this,"reduce",e,t)},reduceRight(e,...t){return _r(this,"reduceRight",e,t)},shift(){return Wt(this,"shift")},some(e,t){return Ke(this,"some",e,t,void 0,arguments)},splice(...e){return Wt(this,"splice",e)},toReversed(){return Ct(this).toReversed()},toSorted(e){return Ct(this).toSorted(e)},toSpliced(...e){return Ct(this).toSpliced(...e)},unshift(...e){return Wt(this,"unshift",e)},values(){return as(this,"values",e=>rt(this,e))}};function as(e,t,n){const s=Xn(e),r=s[t]();return s!==e&&!Re(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const wl=Array.prototype;function Ke(e,t,n,s,r,i){const o=Xn(e),l=o!==e&&!Re(e),c=o[t];if(c!==wl[t]){const d=c.apply(e,i);return l?De(d):d}let f=n;o!==e&&(l?f=function(d,m){return n.call(this,rt(e,d),m,e)}:n.length>2&&(f=function(d,m){return n.call(this,d,m,e)}));const a=c.call(o,f,s);return l&&r?r(a):a}function _r(e,t,n,s){const r=Xn(e);let i=n;return r!==e&&(Re(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,rt(e,l),c,e)}),r[t](i,...s)}function fs(e,t,n){const s=z(e);ye(s,"iterate",Zt);const r=s[t](...n);return(r===-1||r===!1)&&Yn(n[0])?(n[0]=z(n[0]),s[t](...n)):r}function Wt(e,t,n=[]){ze(),Ys();const s=z(e)[t].apply(e,n);return Js(),Qe(),s}const Sl=Us("__proto__,__v_isRef,__isVue"),Ii=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function Tl(e){tt(e)||(e=String(e));const t=z(this);return ye(t,"has",e),t.hasOwnProperty(e)}class Ni{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Il:$i:i?Di:Hi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=K(t);if(!r){let c;if(o&&(c=bl[n]))return c;if(n==="hasOwnProperty")return Tl}const l=Reflect.get(t,n,ae(t)?t:s);if((tt(n)?Ii.has(n):Sl(n))||(r||ye(t,"get",n),i))return l;if(ae(l)){const c=o&&Un(n)?l:l.value;return r&&te(c)?en(c):c}return te(l)?r?en(l):Ht(l):l}}class Fi extends Ni{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=K(t)&&Un(n);if(!this._isShallow){const f=Ze(i);if(!Re(s)&&!Ze(s)&&(i=z(i),s=z(s)),!o&&ae(i)&&!ae(s))return f||(i.value=s),!0}const l=o?Number(n)e,pn=e=>Reflect.getPrototypeOf(e);function Rl(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=Lt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),a=n?Ps:t?Dt:De;return!t&&ye(i,"iterate",c?Os:yt),{next(){const{value:d,done:m}=f.next();return m?{value:d,done:m}:{value:l?[a(d[0]),a(d[1])]:a(d),done:m}},[Symbol.iterator](){return this}}}}function gn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ml(e,t){const n={get(r){const i=this.__v_raw,o=z(i),l=z(r);e||(lt(r,l)&&ye(o,"get",r),ye(o,"get",l));const{has:c}=pn(o),f=t?Ps:e?Dt:De;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&ye(z(r),"iterate",yt),r.size},has(r){const i=this.__v_raw,o=z(i),l=z(r);return e||(lt(r,l)&&ye(o,"has",r),ye(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=z(l),f=t?Ps:e?Dt:De;return!e&&ye(c,"iterate",yt),l.forEach((a,d)=>r.call(i,f(a),f(d),o))}};return ue(n,e?{add:gn("add"),set:gn("set"),delete:gn("delete"),clear:gn("clear")}:{add(r){!t&&!Re(r)&&!Ze(r)&&(r=z(r));const i=z(this);return pn(i).has.call(i,r)||(i.add(r),Ye(i,"add",r,r)),this},set(r,i){!t&&!Re(i)&&!Ze(i)&&(i=z(i));const o=z(this),{has:l,get:c}=pn(o);let f=l.call(o,r);f||(r=z(r),f=l.call(o,r));const a=c.call(o,r);return o.set(r,i),f?lt(i,a)&&Ye(o,"set",r,i):Ye(o,"add",r,i),this},delete(r){const i=z(this),{has:o,get:l}=pn(i);let c=o.call(i,r);c||(r=z(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&Ye(i,"delete",r,void 0),f},clear(){const r=z(this),i=r.size!==0,o=r.clear();return i&&Ye(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Rl(r,e,t)}),n}function Qs(e,t){const n=Ml(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Q(n,r)&&r in s?n:s,r,i)}const Ol={get:Qs(!1,!1)},Pl={get:Qs(!1,!0)},Ll={get:Qs(!0,!1)};const Hi=new WeakMap,Di=new WeakMap,$i=new WeakMap,Il=new WeakMap;function Nl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fl(e){return e.__v_skip||!Object.isExtensible(e)?0:Nl(rl(e))}function Ht(e){return Ze(e)?e:Zs(e,!1,xl,Ol,Hi)}function Hl(e){return Zs(e,!1,Al,Pl,Di)}function en(e){return Zs(e,!0,Cl,Ll,$i)}function Zs(e,t,n,s,r){if(!te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Fl(e);if(i===0)return e;const o=r.get(e);if(o)return o;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function ct(e){return Ze(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function Ze(e){return!!(e&&e.__v_isReadonly)}function Re(e){return!!(e&&e.__v_isShallow)}function Yn(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Rn(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&bi(e,"__v_skip",!0),e}const De=e=>te(e)?Ht(e):e,Dt=e=>te(e)?en(e):e;function ae(e){return e?e.__v_isRef===!0:!1}function He(e){return ji(e,!1)}function Ee(e){return ji(e,!0)}function ji(e,t){return ae(e)?e:new Dl(e,t)}class Dl{constructor(t,n){this.dep=new Gn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:z(t),this._value=n?t:De(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Re(t)||Ze(t);t=s?t:z(t),lt(t,n)&&(this._rawValue=t,this._value=s?t:De(t),this.dep.trigger())}}function Jn(e){return ae(e)?e.value:e}function ce(e){return q(e)?e():Jn(e)}const $l={get:(e,t,n)=>t==="__v_raw"?e:Jn(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ae(r)&&!ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Vi(e){return ct(e)?e:new Proxy(e,$l)}class jl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Gn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Vl(e){return new jl(e)}class kl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=z(t);let r=!0,i=t;if(!K(t)||!Un(String(n)))do r=!Yn(i)||Re(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Jn(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ae(this._raw[this._key])){const n=this._object[this._key];if(ae(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return _l(this._raw,this._key)}}class Wl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ul(e,t,n){return ae(e)?e:q(e)?new Wl(e):te(e)&&arguments.length>1?Bl(e,t,n):He(e)}function Bl(e,t,n){return new kl(e,t,n)}class Kl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Gn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&re!==this)return Ai(this,!0),!0}get value(){const t=this.dep.track();return Oi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ql(e,t,n=!1){let s,r;return q(e)?s=e:(s=e.get,r=e.set),new Kl(s,r,n)}const mn={},Nn=new WeakMap;let mt;function Gl(e,t=!1,n=mt){if(n){let s=Nn.get(n);s||Nn.set(n,s=[]),s.push(e)}}function Xl(e,t,n=ee){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=g=>r?g:Re(g)||r===!1||r===0?Je(g,1):Je(g);let a,d,m,v,b=!1,_=!1;if(ae(e)?(d=()=>e.value,b=Re(e)):ct(e)?(d=()=>f(e),b=!0):K(e)?(_=!0,b=e.some(g=>ct(g)||Re(g)),d=()=>e.map(g=>{if(ae(g))return g.value;if(ct(g))return f(g);if(q(g))return c?c(g,2):g()})):q(e)?t?d=c?()=>c(e,2):e:d=()=>{if(m){ze();try{m()}finally{Qe()}}const g=mt;mt=a;try{return c?c(e,3,[v]):e(v)}finally{mt=g}}:d=Be,t&&r){const g=d,M=r===!0?1/0:r;d=()=>Je(g(),M)}const H=Ei(),A=()=>{a.stop(),H&&H.active&&Ks(H.effects,a)};if(i&&t){const g=t;t=(...M)=>{g(...M),A()}}let $=_?new Array(e.length).fill(mn):mn;const p=g=>{if(!(!(a.flags&1)||!a.dirty&&!g))if(t){const M=a.run();if(r||b||(_?M.some((j,O)=>lt(j,$[O])):lt(M,$))){m&&m();const j=mt;mt=a;try{const O=[M,$===mn?void 0:_&&$[0]===mn?[]:$,v];$=M,c?c(t,3,O):t(...O)}finally{mt=j}}}else a.run()};return l&&l(p),a=new xi(d),a.scheduler=o?()=>o(p,!1):p,v=g=>Gl(g,!1,a),m=a.onStop=()=>{const g=Nn.get(a);if(g){if(c)c(g,4);else for(const M of g)M();Nn.delete(a)}},t?s?p(!0):$=a.run():o?o(p.bind(null,!0),!0):a.run(),A.pause=a.pause.bind(a),A.resume=a.resume.bind(a),A.stop=A,A}function Je(e,t=1/0,n){if(t<=0||!te(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ae(e))Je(e.value,t,n);else if(K(e))for(let s=0;s{Je(s,t,n)});else if(_i(e)){for(const s in e)Je(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Je(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.25 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function cn(e,t,n,s){try{return s?e(...s):e()}catch(r){an(r,t,n)}}function $e(e,t,n,s){if(q(e)){const r=cn(e,t,n,s);return r&&vi(r)&&r.catch(i=>{an(i,t,n)}),r}if(K(e)){const r=[];for(let i=0;i>>1,r=we[s],i=tn(r);i=tn(n)?we.push(e):we.splice(Jl(t),0,e),e.flags|=1,Wi()}}function Wi(){Fn||(Fn=ki.then(Ui))}function zl(e){K(e)?Nt.push(...e):it&&e.id===-1?it.splice(Rt+1,0,e):e.flags&1||(Nt.push(e),e.flags|=1),Wi()}function br(e,t,n=We+1){for(;ntn(n)-tn(s));if(Nt.length=0,it){it.push(...t);return}for(it=t,Rt=0;Rte.id==null?e.flags&2?-1:1/0:e.id;function Ui(e){try{for(We=0;We{s._d&&Vn(-1);const i=Dn(t);let o;try{o=e(...r)}finally{Dn(i),s._d&&Vn(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Df(e,t){if(pe===null)return e;const n=ns(pe),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Gt=e=>e&&(e.disabled||e.disabled===""),wr=e=>e&&(e.defer||e.defer===""),Sr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Tr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ls=(e,t)=>{const n=e&&e.to;return le(n)?t?t(n):null:n},Gi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:a,pc:d,pbc:m,o:{insert:v,querySelector:b,createText:_,createComment:H}}=f,A=Gt(t.props);let{shapeFlag:$,children:p,dynamicChildren:g}=t;if(e==null){const M=t.el=_(""),j=t.anchor=_("");v(M,n,s),v(j,n,s);const O=(x,P)=>{$&16&&a(p,x,P,r,i,o,l,c)},k=()=>{const x=t.target=Ls(t.props,b),P=Xi(x,t,_,v);x&&(o!=="svg"&&Sr(x)?o="svg":o!=="mathml"&&Tr(x)&&(o="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(x),A||(O(x,P),Mn(t,!1)))};A&&(O(n,j),Mn(t,!0)),wr(t.props)?(t.el.__isMounted=!1,be(()=>{k(),delete t.el.__isMounted},i)):k()}else{if(wr(t.props)&&e.el.__isMounted===!1){be(()=>{Gi.process(e,t,n,s,r,i,o,l,c,f)},i);return}t.el=e.el,t.targetStart=e.targetStart;const M=t.anchor=e.anchor,j=t.target=e.target,O=t.targetAnchor=e.targetAnchor,k=Gt(e.props),x=k?n:j,P=k?M:O;if(o==="svg"||Sr(j)?o="svg":(o==="mathml"||Tr(j))&&(o="mathml"),g?(m(e.dynamicChildren,g,x,r,i,o,l),or(e,t,!0)):c||d(e,t,x,P,r,i,o,l,!1),A)k?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):vn(t,n,M,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=t.target=Ls(t.props,b);R&&vn(t,R,null,f,0)}else k&&vn(t,j,O,f,1);Mn(t,A)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:a,target:d,props:m}=e;if(d&&(r(f),r(a)),i&&r(c),o&16){const v=i||!Gt(m);for(let b=0;b{e.isMounted=!0}),to(()=>{e.isUnmounting=!0}),e}const Me=[Function,Array],Yi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Me,onEnter:Me,onAfterEnter:Me,onEnterCancelled:Me,onBeforeLeave:Me,onLeave:Me,onAfterLeave:Me,onLeaveCancelled:Me,onBeforeAppear:Me,onAppear:Me,onAfterAppear:Me,onAppearCancelled:Me},Ji=e=>{const t=e.subTree;return t.component?Ji(t.component):t},tc={name:"BaseTransition",props:Yi,setup(e,{slots:t}){const n=Et(),s=ec();return()=>{const r=t.default&&Zi(t.default(),!0);if(!r||!r.length)return;const i=zi(r),o=z(e),{mode:l}=o;if(s.isLeaving)return us(i);const c=Er(i);if(!c)return us(i);let f=Is(c,o,s,n,d=>f=d);c.type!==de&&nn(c,f);let a=n.subTree&&Er(n.subTree);if(a&&a.type!==de&&!vt(a,c)&&Ji(n).type!==de){let d=Is(a,o,s,n);if(nn(a,d),l==="out-in"&&c.type!==de)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,a=void 0},us(i);l==="in-out"&&c.type!==de?d.delayLeave=(m,v,b)=>{const _=Qi(s,a);_[String(a.key)]=a,m[Xe]=()=>{v(),m[Xe]=void 0,delete f.delayedLeave,a=void 0},f.delayedLeave=()=>{b(),delete f.delayedLeave,a=void 0}}:a=void 0}else a&&(a=void 0);return i}}};function zi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==de){t=n;break}}return t}const nc=tc;function Qi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Is(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:a,onEnterCancelled:d,onBeforeLeave:m,onLeave:v,onAfterLeave:b,onLeaveCancelled:_,onBeforeAppear:H,onAppear:A,onAfterAppear:$,onAppearCancelled:p}=t,g=String(e.key),M=Qi(n,e),j=(x,P)=>{x&&$e(x,s,9,P)},O=(x,P)=>{const R=P[1];j(x,P),K(x)?x.every(w=>w.length<=1)&&R():x.length<=1&&R()},k={mode:o,persisted:l,beforeEnter(x){let P=c;if(!n.isMounted)if(i)P=H||c;else return;x[Xe]&&x[Xe](!0);const R=M[g];R&&vt(e,R)&&R.el[Xe]&&R.el[Xe](),j(P,[x])},enter(x){let P=f,R=a,w=d;if(!n.isMounted)if(i)P=A||f,R=$||a,w=p||d;else return;let F=!1;const Y=x[yn]=oe=>{F||(F=!0,oe?j(w,[x]):j(R,[x]),k.delayedLeave&&k.delayedLeave(),x[yn]=void 0)};P?O(P,[x,Y]):Y()},leave(x,P){const R=String(e.key);if(x[yn]&&x[yn](!0),n.isUnmounting)return P();j(m,[x]);let w=!1;const F=x[Xe]=Y=>{w||(w=!0,P(),Y?j(_,[x]):j(b,[x]),x[Xe]=void 0,M[R]===e&&delete M[R])};M[R]=e,v?O(v,[x,F]):F()},clone(x){const P=Is(x,t,n,s,r);return r&&r(P),P}};return k}function us(e){if(fn(e))return e=at(e),e.children=null,e}function Er(e){if(!fn(e))return qi(e.type)&&e.children?zi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&q(n.default))return n.default()}}function nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Zi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iFt(b,t&&(K(t)?t[_]:t),n,s,r));return}if(_t(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ft(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?ns(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,a=l.refs===ee?l.refs={}:l.refs,d=l.setupState,m=z(d),v=d===ee?gi:b=>Q(m,b);if(f!=null&&f!==c){if(xr(t),le(f))a[f]=null,v(f)&&(d[f]=null);else if(ae(f)){f.value=null;const b=t;b.k&&(a[b.k]=null)}}if(q(c))cn(c,l,12,[o,a]);else{const b=le(c),_=ae(c);if(b||_){const H=()=>{if(e.f){const A=b?v(c)?d[c]:a[c]:c.value;if(r)K(A)&&Ks(A,i);else if(K(A))A.includes(i)||A.push(i);else if(b)a[c]=[i],v(c)&&(d[c]=a[c]);else{const $=[i];c.value=$,e.k&&(a[e.k]=$)}}else b?(a[c]=o,v(c)&&(d[c]=o)):_&&(c.value=o,e.k&&(a[e.k]=o))};if(o){const A=()=>{H(),$n.delete(e)};A.id=-1,$n.set(e,A),be(A,n)}else xr(e),H()}}}function xr(e){const t=$n.get(e);t&&(t.flags|=8,$n.delete(e))}let Cr=!1;const At=()=>{Cr||(console.error("Hydration completed but contains mismatches."),Cr=!0)},sc=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",rc=e=>e.namespaceURI.includes("MathML"),_n=e=>{if(e.nodeType===1){if(sc(e))return"svg";if(rc(e))return"mathml"}},Ot=e=>e.nodeType===8;function ic(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:f}}=e,a=(p,g)=>{if(!g.hasChildNodes()){n(null,p,g),Hn(),g._vnode=p;return}d(g.firstChild,p,null,null,null),Hn(),g._vnode=p},d=(p,g,M,j,O,k=!1)=>{k=k||!!g.dynamicChildren;const x=Ot(p)&&p.data==="[",P=()=>_(p,g,M,j,O,x),{type:R,ref:w,shapeFlag:F,patchFlag:Y}=g;let oe=p.nodeType;g.el=p,Y===-2&&(k=!1,g.dynamicChildren=null);let W=null;switch(R){case St:oe!==3?g.children===""?(c(g.el=r(""),o(p),p),W=p):W=P():(p.data!==g.children&&(At(),p.data=g.children),W=i(p));break;case de:$(p)?(W=i(p),A(g.el=p.content.firstChild,p,M)):oe!==8||x?W=P():W=i(p);break;case Yt:if(x&&(p=i(p),oe=p.nodeType),oe===1||oe===3){W=p;const X=!g.children.length;for(let V=0;V{k=k||!!g.dynamicChildren;const{type:x,props:P,patchFlag:R,shapeFlag:w,dirs:F,transition:Y}=g,oe=x==="input"||x==="option";if(oe||R!==-1){F&&Ue(g,null,M,"created");let W=!1;if($(p)){W=To(null,Y)&&M&&M.vnode.props&&M.vnode.props.appear;const V=p.content.firstChild;if(W){const ne=V.getAttribute("class");ne&&(V.$cls=ne),Y.beforeEnter(V)}A(V,p,M),g.el=p=V}if(w&16&&!(P&&(P.innerHTML||P.textContent))){let V=v(p.firstChild,g,p,M,j,O,k);for(;V;){bn(p,1)||At();const ne=V;V=V.nextSibling,l(ne)}}else if(w&8){let V=g.children;V[0]===` +`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(V=V.slice(1));const{textContent:ne}=p;ne!==V&&ne!==V.replace(/\r\n|\r/g,` +`)&&(bn(p,0)||At(),p.textContent=g.children)}if(P){if(oe||!k||R&48){const V=p.tagName.includes("-");for(const ne in P)(oe&&(ne.endsWith("value")||ne==="indeterminate")||ln(ne)&&!It(ne)||ne[0]==="."||V)&&s(p,ne,null,P[ne],void 0,M)}else if(P.onClick)s(p,"onClick",null,P.onClick,void 0,M);else if(R&4&&ct(P.style))for(const V in P.style)P.style[V]}let X;(X=P&&P.onVnodeBeforeMount)&&Oe(X,M,g),F&&Ue(g,null,M,"beforeMount"),((X=P&&P.onVnodeMounted)||F||W)&&Co(()=>{X&&Oe(X,M,g),W&&Y.enter(p),F&&Ue(g,null,M,"mounted")},j)}return p.nextSibling},v=(p,g,M,j,O,k,x)=>{x=x||!!g.dynamicChildren;const P=g.children,R=P.length;for(let w=0;w{const{slotScopeIds:x}=g;x&&(O=O?O.concat(x):x);const P=o(p),R=v(i(p),g,P,M,j,O,k);return R&&Ot(R)&&R.data==="]"?i(g.anchor=R):(At(),c(g.anchor=f("]"),P,R),R)},_=(p,g,M,j,O,k)=>{if(bn(p.parentElement,1)||At(),g.el=null,k){const R=H(p);for(;;){const w=i(p);if(w&&w!==R)l(w);else break}}const x=i(p),P=o(p);return l(p),n(null,g,P,x,M,j,_n(P),O),M&&(M.vnode.el=g.el,ho(M,g.el)),x},H=(p,g="[",M="]")=>{let j=0;for(;p;)if(p=i(p),p&&Ot(p)&&(p.data===g&&j++,p.data===M)){if(j===0)return i(p);j--}return p},A=(p,g,M)=>{const j=g.parentNode;j&&j.replaceChild(p,g);let O=M;for(;O;)O.vnode.el===g&&(O.vnode.el=O.subTree.el=p),O=O.parent},$=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[a,d]}const Ar="data-allow-mismatch",oc={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function bn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Ar);)e=e.parentElement;const n=e&&e.getAttribute(Ar);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:s.includes(oc[t])}}qn().requestIdleCallback;qn().cancelIdleCallback;function lc(e,t){if(Ot(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Ot(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const _t=e=>!!e.type.__asyncLoader;function jf(e){q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let f=null,a,d=0;const m=()=>(d++,f=null,v()),v=()=>{let b;return f||(b=f=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((H,A)=>{c(_,()=>H(m()),()=>A(_),d+1)});throw _}).then(_=>b!==f&&f?f:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),a=_,_)))};return tr({name:"AsyncComponentWrapper",__asyncLoader:v,__asyncHydrate(b,_,H){let A=!1;(_.bu||(_.bu=[])).push(()=>A=!0);const $=()=>{A||H()},p=i?()=>{const g=i($,M=>lc(b,M));g&&(_.bum||(_.bum=[])).push(g)}:$;a?p():v().then(()=>!_.isUnmounted&&p())},get __asyncResolved(){return a},setup(){const b=he;if(nr(b),a)return()=>wn(a,b);const _=p=>{f=null,an(p,b,13,!s)};if(l&&b.suspense||$t)return v().then(p=>()=>wn(p,b)).catch(p=>(_(p),()=>s?fe(s,{error:p}):null));const H=He(!1),A=He(),$=He(!!r);return r&&setTimeout(()=>{$.value=!1},r),o!=null&&setTimeout(()=>{if(!H.value&&!A.value){const p=new Error(`Async component timed out after ${o}ms.`);_(p),A.value=p}},o),v().then(()=>{H.value=!0,b.parent&&fn(b.parent.vnode)&&b.parent.update()}).catch(p=>{_(p),A.value=p}),()=>{if(H.value&&a)return wn(a,b);if(A.value&&s)return fe(s,{error:A.value});if(n&&!$.value)return wn(n,b)}}})}function wn(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=fe(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const fn=e=>e.type.__isKeepAlive;function cc(e,t){eo(e,"a",t)}function ac(e,t){eo(e,"da",t)}function eo(e,t,n=he){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Qn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)fn(r.parent.vnode)&&fc(s,t,n,r),r=r.parent}}function fc(e,t,n,s){const r=Qn(t,e,s,!0);Zn(()=>{Ks(s[t],r)},n)}function Qn(e,t,n=he,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{ze();const l=un(n),c=$e(t,n,e,o);return l(),Qe(),c});return s?r.unshift(i):r.push(i),i}}const nt=e=>(t,n=he)=>{(!$t||e==="sp")&&Qn(e,(...s)=>t(...s),n)},uc=nt("bm"),jt=nt("m"),dc=nt("bu"),hc=nt("u"),to=nt("bum"),Zn=nt("um"),pc=nt("sp"),gc=nt("rtg"),mc=nt("rtc");function vc(e,t=he){Qn("ec",e,t)}const no="components";function Vf(e,t){return ro(no,e,!0,t)||e}const so=Symbol.for("v-ndc");function kf(e){return le(e)?ro(no,e,!1)||e:e||so}function ro(e,t,n=!0,s=!1){const r=pe||he;if(r){const i=r.type;{const l=na(i,!1);if(l&&(l===t||l===Ie(t)||l===Kn(Ie(t))))return i}const o=Rr(r[e]||i[e],t)||Rr(r.appContext[e],t);return!o&&s?i:o}}function Rr(e,t){return e&&(e[t]||e[Ie(t)]||e[Kn(Ie(t))])}function Wf(e,t,n,s){let r;const i=n,o=K(e);if(o||le(e)){const l=o&&ct(e);let c=!1,f=!1;l&&(c=!Re(e),f=Ze(e),e=Xn(e)),r=new Array(e.length);for(let a=0,d=e.length;at(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;c0;return t!=="default"&&(n.name=t),$s(),js(Se,null,[fe("slot",n,s&&s())],f?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$s();const o=i&&io(i(n)),l=n.key||o&&o.key,c=js(Se,{key:(l&&!tt(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function io(e){return e.some(t=>rn(t)?!(t.type===de||t.type===Se&&!io(t.children)):!0)?e:null}function Bf(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:Cn(s)]=e[s];return n}const Ns=e=>e?Po(e)?ns(e):Ns(e.parent):null,Xt=ue(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ns(e.parent),$root:e=>Ns(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>lo(e),$forceUpdate:e=>e.f||(e.f=()=>{er(e.update)}),$nextTick:e=>e.n||(e.n=zn.bind(e.proxy)),$watch:e=>Oc.bind(e)}),ds=(e,t)=>e!==ee&&!e.__isScriptSetup&&Q(e,t),yc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;if(t[0]!=="$"){const m=o[t];if(m!==void 0)switch(m){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ds(s,t))return o[t]=1,s[t];if(r!==ee&&Q(r,t))return o[t]=2,r[t];if(Q(i,t))return o[t]=3,i[t];if(n!==ee&&Q(n,t))return o[t]=4,n[t];Fs&&(o[t]=0)}}const f=Xt[t];let a,d;if(f)return t==="$attrs"&&ye(e.attrs,"get",""),f(e);if((a=l.__cssModules)&&(a=a[t]))return a;if(n!==ee&&Q(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,Q(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ds(r,t)?(r[t]=n,!0):s!==ee&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let c;return!!(n[l]||e!==ee&&l[0]!=="$"&&Q(e,l)||ds(t,l)||Q(i,l)||Q(s,l)||Q(Xt,l)||Q(r.config.globalProperties,l)||(c=o.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Kf(){return _c().slots}function _c(e){const t=Et();return t.setupContext||(t.setupContext=Io(t))}function Mr(e){return K(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Fs=!0;function bc(e){const t=lo(e),n=e.proxy,s=e.ctx;Fs=!1,t.beforeCreate&&Or(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:a,beforeMount:d,mounted:m,beforeUpdate:v,updated:b,activated:_,deactivated:H,beforeDestroy:A,beforeUnmount:$,destroyed:p,unmounted:g,render:M,renderTracked:j,renderTriggered:O,errorCaptured:k,serverPrefetch:x,expose:P,inheritAttrs:R,components:w,directives:F,filters:Y}=t;if(f&&wc(f,s,null),o)for(const X in o){const V=o[X];q(V)&&(s[X]=V.bind(n))}if(r){const X=r.call(n,n);te(X)&&(e.data=Ht(X))}if(Fs=!0,i)for(const X in i){const V=i[X],ne=q(V)?V.bind(n,n):q(V.get)?V.get.bind(n,n):Be,dn=!q(V)&&q(V.set)?V.set.bind(n):Be,dt=ie({get:ne,set:dn});Object.defineProperty(s,X,{enumerable:!0,configurable:!0,get:()=>dt.value,set:Ve=>dt.value=Ve})}if(l)for(const X in l)oo(l[X],s,n,X);if(c){const X=q(c)?c.call(n):c;Reflect.ownKeys(X).forEach(V=>{Ac(V,X[V])})}a&&Or(a,e,"c");function W(X,V){K(V)?V.forEach(ne=>X(ne.bind(n))):V&&X(V.bind(n))}if(W(uc,d),W(jt,m),W(dc,v),W(hc,b),W(cc,_),W(ac,H),W(vc,k),W(mc,j),W(gc,O),W(to,$),W(Zn,g),W(pc,x),K(P))if(P.length){const X=e.exposed||(e.exposed={});P.forEach(V=>{Object.defineProperty(X,V,{get:()=>n[V],set:ne=>n[V]=ne,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===Be&&(e.render=M),R!=null&&(e.inheritAttrs=R),w&&(e.components=w),F&&(e.directives=F),x&&nr(e)}function wc(e,t,n=Be){K(e)&&(e=Hs(e));for(const s in e){const r=e[s];let i;te(r)?"default"in r?i=wt(r.from||s,r.default,!0):i=wt(r.from||s):i=wt(r),ae(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Or(e,t,n){$e(K(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function oo(e,t,n,s){let r=s.includes(".")?fo(n,s):()=>n[s];if(le(e)){const i=t[e];q(i)&&Le(r,i)}else if(q(e))Le(r,e.bind(n));else if(te(e))if(K(e))e.forEach(i=>oo(i,t,n,s));else{const i=q(e.handler)?e.handler.bind(n):t[e.handler];q(i)&&Le(r,i,e)}}function lo(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>jn(c,f,o,!0)),jn(c,t,o)),te(t)&&i.set(t,c),c}function jn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&jn(e,i,n,!0),r&&r.forEach(o=>jn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Sc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Sc={data:Pr,props:Lr,emits:Lr,methods:Bt,computed:Bt,beforeCreate:_e,created:_e,beforeMount:_e,mounted:_e,beforeUpdate:_e,updated:_e,beforeDestroy:_e,beforeUnmount:_e,destroyed:_e,unmounted:_e,activated:_e,deactivated:_e,errorCaptured:_e,serverPrefetch:_e,components:Bt,directives:Bt,watch:Ec,provide:Pr,inject:Tc};function Pr(e,t){return t?e?function(){return ue(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function Tc(e,t){return Bt(Hs(e),Hs(t))}function Hs(e){if(K(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}function ao(){return!!(Et()||bt)}const Rc=Symbol.for("v-scx"),Mc=()=>wt(Rc);function sr(e,t){return es(e,null,t)}function qf(e,t){return es(e,null,{flush:"post"})}function Le(e,t,n){return es(e,t,n)}function es(e,t,n=ee){const{immediate:s,deep:r,flush:i,once:o}=n,l=ue({},n),c=t&&s||!t&&i!=="post";let f;if($t){if(i==="sync"){const v=Mc();f=v.__watcherHandles||(v.__watcherHandles=[])}else if(!c){const v=()=>{};return v.stop=Be,v.resume=Be,v.pause=Be,v}}const a=he;l.call=(v,b,_)=>$e(v,a,b,_);let d=!1;i==="post"?l.scheduler=v=>{be(v,a&&a.suspense)}:i!=="sync"&&(d=!0,l.scheduler=(v,b)=>{b?v():er(v)}),l.augmentJob=v=>{t&&(v.flags|=4),d&&(v.flags|=2,a&&(v.id=a.uid,v.i=a))};const m=Xl(e,t,l);return $t&&(f?f.push(m):c&&m()),m}function Oc(e,t,n){const s=this.proxy,r=le(e)?e.includes(".")?fo(s,e):()=>s[e]:e.bind(s,s);let i;q(t)?i=t:(i=t.handler,n=t);const o=un(this),l=es(r,i.bind(s),n);return o(),l}function fo(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ie(t)}Modifiers`]||e[`${ut(t)}Modifiers`];function Lc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const i=t.startsWith("update:"),o=i&&Pc(s,t.slice(7));o&&(o.trim&&(r=n.map(a=>le(a)?a.trim():a)),o.number&&(r=n.map(qs)));let l,c=s[l=Cn(t)]||s[l=Cn(Ie(t))];!c&&i&&(c=s[l=Cn(ut(t))]),c&&$e(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,$e(f,e,6,r)}}const Ic=new WeakMap;function uo(e,t,n=!1){const s=n?Ic:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!q(e)){const c=f=>{const a=uo(f,t,!0);a&&(l=!0,ue(o,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(te(e)&&s.set(e,null),null):(K(i)?i.forEach(c=>o[c]=null):ue(o,i),te(e)&&s.set(e,o),o)}function ts(e,t){return!e||!ln(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,ut(t))||Q(e,t))}function hs(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:a,props:d,data:m,setupState:v,ctx:b,inheritAttrs:_}=e,H=Dn(e);let A,$;try{if(n.shapeFlag&4){const g=r||s,M=g;A=Pe(f.call(M,g,a,d,v,m,b)),$=l}else{const g=t;A=Pe(g.length>1?g(d,{attrs:l,slots:o,emit:c}):g(d,null)),$=t.props?l:Nc(l)}}catch(g){Jt.length=0,an(g,e,1),A=fe(de)}let p=A;if($&&_!==!1){const g=Object.keys($),{shapeFlag:M}=p;g.length&&M&7&&(i&&g.some(Bs)&&($=Fc($,i)),p=at(p,$,!1,!0))}return n.dirs&&(p=at(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&nn(p,n.transition),A=p,Dn(H),A}const Nc=e=>{let t;for(const n in e)(n==="class"||n==="style"||ln(n))&&((t||(t={}))[n]=e[n]);return t},Fc=(e,t)=>{const n={};for(const s in e)(!Bs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Hc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ir(s,o,f):!!o;if(c&8){const a=t.dynamicProps;for(let d=0;dObject.create(po),mo=e=>Object.getPrototypeOf(e)===po;function Dc(e,t,n,s=!1){const r={},i=go();e.propsDefaults=Object.create(null),vo(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Hl(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function $c(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let d=0;d{c=!0;const[m,v]=yo(d,t,!0);ue(o,m),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!c)return te(e)&&s.set(e,Pt),Pt;if(K(i))for(let a=0;ae==="_"||e==="_ctx"||e==="$stable",ir=e=>K(e)?e.map(Pe):[Pe(e)],Vc=(e,t,n)=>{if(t._n)return t;const s=Ql((...r)=>ir(t(...r)),n);return s._c=!1,s},_o=(e,t,n)=>{const s=e._ctx;for(const r in e){if(rr(r))continue;const i=e[r];if(q(i))t[r]=Vc(r,i,s);else if(i!=null){const o=ir(i);t[r]=()=>o}}},bo=(e,t)=>{const n=ir(t);e.slots.default=()=>n},wo=(e,t,n)=>{for(const s in t)(n||!rr(s))&&(e[s]=t[s])},kc=(e,t,n)=>{const s=e.slots=go();if(e.vnode.shapeFlag&32){const r=t._;r?(wo(s,t,n),n&&bi(s,"_",r,!0)):_o(t,s)}else t&&bo(e,t)},Wc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ee;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:wo(r,t,n):(i=!t.$stable,_o(t,r)),o=t}else t&&(bo(e,t),o={default:1});if(i)for(const l in r)!rr(l)&&o[l]==null&&delete r[l]},be=Co;function Uc(e){return So(e)}function Bc(e){return So(e,ic)}function So(e,t){const n=qn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:a,parentNode:d,nextSibling:m,setScopeId:v=Be,insertStaticContent:b}=e,_=(u,h,y,C=null,S=null,T=null,N=void 0,I=null,L=!!h.dynamicChildren)=>{if(u===h)return;u&&!vt(u,h)&&(C=hn(u),Ve(u,S,T,!0),u=null),h.patchFlag===-2&&(L=!1,h.dynamicChildren=null);const{type:E,ref:B,shapeFlag:D}=h;switch(E){case St:H(u,h,y,C);break;case de:A(u,h,y,C);break;case Yt:u==null&&$(h,y,C,N);break;case Se:w(u,h,y,C,S,T,N,I,L);break;default:D&1?M(u,h,y,C,S,T,N,I,L):D&6?F(u,h,y,C,S,T,N,I,L):(D&64||D&128)&&E.process(u,h,y,C,S,T,N,I,L,xt)}B!=null&&S?Ft(B,u&&u.ref,T,h||u,!h):B==null&&u&&u.ref!=null&&Ft(u.ref,null,T,u,!0)},H=(u,h,y,C)=>{if(u==null)s(h.el=l(h.children),y,C);else{const S=h.el=u.el;h.children!==u.children&&f(S,h.children)}},A=(u,h,y,C)=>{u==null?s(h.el=c(h.children||""),y,C):h.el=u.el},$=(u,h,y,C)=>{[u.el,u.anchor]=b(u.children,h,y,C,u.el,u.anchor)},p=({el:u,anchor:h},y,C)=>{let S;for(;u&&u!==h;)S=m(u),s(u,y,C),u=S;s(h,y,C)},g=({el:u,anchor:h})=>{let y;for(;u&&u!==h;)y=m(u),r(u),u=y;r(h)},M=(u,h,y,C,S,T,N,I,L)=>{if(h.type==="svg"?N="svg":h.type==="math"&&(N="mathml"),u==null)j(h,y,C,S,T,N,I,L);else{const E=u.el&&u.el._isVueCE?u.el:null;try{E&&E._beginPatch(),x(u,h,S,T,N,I,L)}finally{E&&E._endPatch()}}},j=(u,h,y,C,S,T,N,I)=>{let L,E;const{props:B,shapeFlag:D,transition:U,dirs:G}=u;if(L=u.el=o(u.type,T,B&&B.is,B),D&8?a(L,u.children):D&16&&k(u.children,L,null,C,S,ps(u,T),N,I),G&&Ue(u,null,C,"created"),O(L,u,u.scopeId,N,C),B){for(const se in B)se!=="value"&&!It(se)&&i(L,se,null,B[se],T,C);"value"in B&&i(L,"value",null,B.value,T),(E=B.onVnodeBeforeMount)&&Oe(E,C,u)}G&&Ue(u,null,C,"beforeMount");const J=To(S,U);J&&U.beforeEnter(L),s(L,h,y),((E=B&&B.onVnodeMounted)||J||G)&&be(()=>{E&&Oe(E,C,u),J&&U.enter(L),G&&Ue(u,null,C,"mounted")},S)},O=(u,h,y,C,S)=>{if(y&&v(u,y),C)for(let T=0;T{for(let E=L;E{const I=h.el=u.el;let{patchFlag:L,dynamicChildren:E,dirs:B}=h;L|=u.patchFlag&16;const D=u.props||ee,U=h.props||ee;let G;if(y&&ht(y,!1),(G=U.onVnodeBeforeUpdate)&&Oe(G,y,h,u),B&&Ue(h,u,y,"beforeUpdate"),y&&ht(y,!0),(D.innerHTML&&U.innerHTML==null||D.textContent&&U.textContent==null)&&a(I,""),E?P(u.dynamicChildren,E,I,y,C,ps(h,S),T):N||V(u,h,I,null,y,C,ps(h,S),T,!1),L>0){if(L&16)R(I,D,U,y,S);else if(L&2&&D.class!==U.class&&i(I,"class",null,U.class,S),L&4&&i(I,"style",D.style,U.style,S),L&8){const J=h.dynamicProps;for(let se=0;se{G&&Oe(G,y,h,u),B&&Ue(h,u,y,"updated")},C)},P=(u,h,y,C,S,T,N)=>{for(let I=0;I{if(h!==y){if(h!==ee)for(const T in h)!It(T)&&!(T in y)&&i(u,T,h[T],null,S,C);for(const T in y){if(It(T))continue;const N=y[T],I=h[T];N!==I&&T!=="value"&&i(u,T,I,N,S,C)}"value"in y&&i(u,"value",h.value,y.value,S)}},w=(u,h,y,C,S,T,N,I,L)=>{const E=h.el=u?u.el:l(""),B=h.anchor=u?u.anchor:l("");let{patchFlag:D,dynamicChildren:U,slotScopeIds:G}=h;G&&(I=I?I.concat(G):G),u==null?(s(E,y,C),s(B,y,C),k(h.children||[],y,B,S,T,N,I,L)):D>0&&D&64&&U&&u.dynamicChildren?(P(u.dynamicChildren,U,y,S,T,N,I),(h.key!=null||S&&h===S.subTree)&&or(u,h,!0)):V(u,h,y,B,S,T,N,I,L)},F=(u,h,y,C,S,T,N,I,L)=>{h.slotScopeIds=I,u==null?h.shapeFlag&512?S.ctx.activate(h,y,C,N,L):Y(h,y,C,S,T,N,L):oe(u,h,L)},Y=(u,h,y,C,S,T,N)=>{const I=u.component=Qc(u,C,S);if(fn(u)&&(I.ctx.renderer=xt),Zc(I,!1,N),I.asyncDep){if(S&&S.registerDep(I,W,N),!u.el){const L=I.subTree=fe(de);A(null,L,h,y),u.placeholder=L.el}}else W(I,u,h,y,S,T,N)},oe=(u,h,y)=>{const C=h.component=u.component;if(Hc(u,h,y))if(C.asyncDep&&!C.asyncResolved){X(C,h,y);return}else C.next=h,C.update();else h.el=u.el,C.vnode=h},W=(u,h,y,C,S,T,N)=>{const I=()=>{if(u.isMounted){let{next:D,bu:U,u:G,parent:J,vnode:se}=u;{const xe=Eo(u);if(xe){D&&(D.el=se.el,X(u,D,N)),xe.asyncDep.then(()=>{u.isUnmounted||I()});return}}let Z=D,Te;ht(u,!1),D?(D.el=se.el,X(u,D,N)):D=se,U&&An(U),(Te=D.props&&D.props.onVnodeBeforeUpdate)&&Oe(Te,J,D,se),ht(u,!0);const ge=hs(u),Ne=u.subTree;u.subTree=ge,_(Ne,ge,d(Ne.el),hn(Ne),u,S,T),D.el=ge.el,Z===null&&ho(u,ge.el),G&&be(G,S),(Te=D.props&&D.props.onVnodeUpdated)&&be(()=>Oe(Te,J,D,se),S)}else{let D;const{el:U,props:G}=h,{bm:J,m:se,parent:Z,root:Te,type:ge}=u,Ne=_t(h);if(ht(u,!1),J&&An(J),!Ne&&(D=G&&G.onVnodeBeforeMount)&&Oe(D,Z,h),ht(u,!0),U&&os){const xe=()=>{u.subTree=hs(u),os(U,u.subTree,u,S,null)};Ne&&ge.__asyncHydrate?ge.__asyncHydrate(U,u,xe):xe()}else{Te.ce&&Te.ce._def.shadowRoot!==!1&&Te.ce._injectChildStyle(ge);const xe=u.subTree=hs(u);_(null,xe,y,C,u,S,T),h.el=xe.el}if(se&&be(se,S),!Ne&&(D=G&&G.onVnodeMounted)){const xe=h;be(()=>Oe(D,Z,xe),S)}(h.shapeFlag&256||Z&&_t(Z.vnode)&&Z.vnode.shapeFlag&256)&&u.a&&be(u.a,S),u.isMounted=!0,h=y=C=null}};u.scope.on();const L=u.effect=new xi(I);u.scope.off();const E=u.update=L.run.bind(L),B=u.job=L.runIfDirty.bind(L);B.i=u,B.id=u.uid,L.scheduler=()=>er(B),ht(u,!0),E()},X=(u,h,y)=>{h.component=u;const C=u.vnode.props;u.vnode=h,u.next=null,$c(u,h.props,C,y),Wc(u,h.children,y),ze(),br(u),Qe()},V=(u,h,y,C,S,T,N,I,L=!1)=>{const E=u&&u.children,B=u?u.shapeFlag:0,D=h.children,{patchFlag:U,shapeFlag:G}=h;if(U>0){if(U&128){dn(E,D,y,C,S,T,N,I,L);return}else if(U&256){ne(E,D,y,C,S,T,N,I,L);return}}G&8?(B&16&&Vt(E,S,T),D!==E&&a(y,D)):B&16?G&16?dn(E,D,y,C,S,T,N,I,L):Vt(E,S,T,!0):(B&8&&a(y,""),G&16&&k(D,y,C,S,T,N,I,L))},ne=(u,h,y,C,S,T,N,I,L)=>{u=u||Pt,h=h||Pt;const E=u.length,B=h.length,D=Math.min(E,B);let U;for(U=0;UB?Vt(u,S,T,!0,!1,D):k(h,y,C,S,T,N,I,L,D)},dn=(u,h,y,C,S,T,N,I,L)=>{let E=0;const B=h.length;let D=u.length-1,U=B-1;for(;E<=D&&E<=U;){const G=u[E],J=h[E]=L?ot(h[E]):Pe(h[E]);if(vt(G,J))_(G,J,y,null,S,T,N,I,L);else break;E++}for(;E<=D&&E<=U;){const G=u[D],J=h[U]=L?ot(h[U]):Pe(h[U]);if(vt(G,J))_(G,J,y,null,S,T,N,I,L);else break;D--,U--}if(E>D){if(E<=U){const G=U+1,J=GU)for(;E<=D;)Ve(u[E],S,T,!0),E++;else{const G=E,J=E,se=new Map;for(E=J;E<=U;E++){const Ce=h[E]=L?ot(h[E]):Pe(h[E]);Ce.key!=null&&se.set(Ce.key,E)}let Z,Te=0;const ge=U-J+1;let Ne=!1,xe=0;const kt=new Array(ge);for(E=0;E=ge){Ve(Ce,S,T,!0);continue}let ke;if(Ce.key!=null)ke=se.get(Ce.key);else for(Z=J;Z<=U;Z++)if(kt[Z-J]===0&&vt(Ce,h[Z])){ke=Z;break}ke===void 0?Ve(Ce,S,T,!0):(kt[ke-J]=E+1,ke>=xe?xe=ke:Ne=!0,_(Ce,h[ke],y,null,S,T,N,I,L),Te++)}const pr=Ne?Kc(kt):Pt;for(Z=pr.length-1,E=ge-1;E>=0;E--){const Ce=J+E,ke=h[Ce],gr=h[Ce+1],mr=Ce+1{const{el:T,type:N,transition:I,children:L,shapeFlag:E}=u;if(E&6){dt(u.component.subTree,h,y,C);return}if(E&128){u.suspense.move(h,y,C);return}if(E&64){N.move(u,h,y,xt);return}if(N===Se){s(T,h,y);for(let D=0;DI.enter(T),S);else{const{leave:D,delayLeave:U,afterLeave:G}=I,J=()=>{u.ctx.isUnmounted?r(T):s(T,h,y)},se=()=>{T._isLeaving&&T[Xe](!0),D(T,()=>{J(),G&&G()})};U?U(T,J,se):se()}else s(T,h,y)},Ve=(u,h,y,C=!1,S=!1)=>{const{type:T,props:N,ref:I,children:L,dynamicChildren:E,shapeFlag:B,patchFlag:D,dirs:U,cacheIndex:G}=u;if(D===-2&&(S=!1),I!=null&&(ze(),Ft(I,null,y,u,!0),Qe()),G!=null&&(h.renderCache[G]=void 0),B&256){h.ctx.deactivate(u);return}const J=B&1&&U,se=!_t(u);let Z;if(se&&(Z=N&&N.onVnodeBeforeUnmount)&&Oe(Z,h,u),B&6)nl(u.component,y,C);else{if(B&128){u.suspense.unmount(y,C);return}J&&Ue(u,null,h,"beforeUnmount"),B&64?u.type.remove(u,h,y,xt,C):E&&!E.hasOnce&&(T!==Se||D>0&&D&64)?Vt(E,h,y,!1,!0):(T===Se&&D&384||!S&&B&16)&&Vt(L,h,y),C&&dr(u)}(se&&(Z=N&&N.onVnodeUnmounted)||J)&&be(()=>{Z&&Oe(Z,h,u),J&&Ue(u,null,h,"unmounted")},y)},dr=u=>{const{type:h,el:y,anchor:C,transition:S}=u;if(h===Se){tl(y,C);return}if(h===Yt){g(u);return}const T=()=>{r(y),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(u.shapeFlag&1&&S&&!S.persisted){const{leave:N,delayLeave:I}=S,L=()=>N(y,T);I?I(u.el,T,L):L()}else T()},tl=(u,h)=>{let y;for(;u!==h;)y=m(u),r(u),u=y;r(h)},nl=(u,h,y)=>{const{bum:C,scope:S,job:T,subTree:N,um:I,m:L,a:E}=u;Fr(L),Fr(E),C&&An(C),S.stop(),T&&(T.flags|=8,Ve(N,u,h,y)),I&&be(I,h),be(()=>{u.isUnmounted=!0},h)},Vt=(u,h,y,C=!1,S=!1,T=0)=>{for(let N=T;N{if(u.shapeFlag&6)return hn(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const h=m(u.anchor||u.el),y=h&&h[Ki];return y?m(y):h};let rs=!1;const hr=(u,h,y)=>{u==null?h._vnode&&Ve(h._vnode,null,null,!0):_(h._vnode||null,u,h,null,null,null,y),h._vnode=u,rs||(rs=!0,br(),Hn(),rs=!1)},xt={p:_,um:Ve,m:dt,r:dr,mt:Y,mc:k,pc:V,pbc:P,n:hn,o:e};let is,os;return t&&([is,os]=t(xt)),{render:hr,hydrate:is,createApp:Cc(hr,is)}}function ps({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ht({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function To(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function or(e,t,n=!1){const s=e.children,r=t.children;if(K(s)&&K(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Eo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Eo(t)}function Fr(e){if(e)for(let t=0;te.__isSuspense;function Co(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):zl(e)}const Se=Symbol.for("v-fgt"),St=Symbol.for("v-txt"),de=Symbol.for("v-cmt"),Yt=Symbol.for("v-stc"),Jt=[];let Ae=null;function $s(e=!1){Jt.push(Ae=e?null:[])}function qc(){Jt.pop(),Ae=Jt[Jt.length-1]||null}let sn=1;function Vn(e,t=!1){sn+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function Ao(e){return e.dynamicChildren=sn>0?Ae||Pt:null,qc(),sn>0&&Ae&&Ae.push(e),e}function Gf(e,t,n,s,r,i){return Ao(Mo(e,t,n,s,r,i,!0))}function js(e,t,n,s,r){return Ao(fe(e,t,n,s,r,!0))}function rn(e){return e?e.__v_isVNode===!0:!1}function vt(e,t){return e.type===t.type&&e.key===t.key}const Ro=({key:e})=>e??null,On=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?le(e)||ae(e)||q(e)?{i:pe,r:e,k:t,f:!!n}:e:null);function Mo(e,t=null,n=null,s=0,r=null,i=e===Se?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ro(t),ref:t&&On(t),scopeId:Bi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:pe};return l?(lr(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=le(n)?8:16),sn>0&&!o&&Ae&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ae.push(c),c}const fe=Gc;function Gc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===so)&&(e=de),rn(e)){const l=at(e,t,!0);return n&&lr(l,n),sn>0&&!i&&Ae&&(l.shapeFlag&6?Ae[Ae.indexOf(e)]=l:Ae.push(l)),l.patchFlag=-2,l}if(sa(e)&&(e=e.__vccOpts),t){t=Xc(t);let{class:l,style:c}=t;l&&!le(l)&&(t.class=Xs(l)),te(c)&&(Yn(c)&&!K(c)&&(c=ue({},c)),t.style=Gs(c))}const o=le(e)?1:xo(e)?128:qi(e)?64:te(e)?4:q(e)?2:0;return Mo(e,t,n,s,r,o,i,!0)}function Xc(e){return e?Yn(e)||mo(e)?ue({},e):e:null}function at(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?Yc(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Ro(f),ref:t&&t.ref?n&&i?K(i)?i.concat(On(t)):[i,On(t)]:On(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Se?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&at(e.ssContent),ssFallback:e.ssFallback&&at(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&nn(a,c.clone(a)),a}function Oo(e=" ",t=0){return fe(St,null,e,t)}function Xf(e,t){const n=fe(Yt,null,e);return n.staticCount=t,n}function Yf(e="",t=!1){return t?($s(),js(de,null,e)):fe(de,null,e)}function Pe(e){return e==null||typeof e=="boolean"?fe(de):K(e)?fe(Se,null,e.slice()):rn(e)?ot(e):fe(St,null,String(e))}function ot(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:at(e)}function lr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),lr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!mo(t)?t._ctx=pe:r===3&&pe&&(pe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:pe},n=32):(t=String(t),s&64?(n=16,t=[Oo(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yc(...e){const t={};for(let n=0;nhe||pe;let kn,Vs;{const e=qn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};kn=t("__VUE_INSTANCE_SETTERS__",n=>he=n),Vs=t("__VUE_SSR_SETTERS__",n=>$t=n)}const un=e=>{const t=he;return kn(e),e.scope.on(),()=>{e.scope.off(),kn(t)}},Hr=()=>{he&&he.scope.off(),kn(null)};function Po(e){return e.vnode.shapeFlag&4}let $t=!1;function Zc(e,t=!1,n=!1){t&&Vs(t);const{props:s,children:r}=e.vnode,i=Po(e);Dc(e,s,i,t),kc(e,r,n||t);const o=i?ea(e,t):void 0;return t&&Vs(!1),o}function ea(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yc);const{setup:s}=n;if(s){ze();const r=e.setupContext=s.length>1?Io(e):null,i=un(e),o=cn(s,e,0,[e.props,r]),l=vi(o);if(Qe(),i(),(l||e.sp)&&!_t(e)&&nr(e),l){if(o.then(Hr,Hr),t)return o.then(c=>{Dr(e,c)}).catch(c=>{an(c,e,0)});e.asyncDep=o}else Dr(e,o)}else Lo(e)}function Dr(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:te(t)&&(e.setupState=Vi(t)),Lo(e)}function Lo(e,t,n){const s=e.type;e.render||(e.render=s.render||Be);{const r=un(e);ze();try{bc(e)}finally{Qe(),r()}}}const ta={get(e,t){return ye(e,"get",""),e[t]}};function Io(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ta),slots:e.slots,emit:e.emit,expose:t}}function ns(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Vi(Rn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Xt)return Xt[n](e)},has(t,n){return n in t||n in Xt}})):e.proxy}function na(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function sa(e){return q(e)&&"__vccOpts"in e}const ie=(e,t)=>ql(e,t,$t);function ks(e,t,n){try{Vn(-1);const s=arguments.length;return s===2?te(t)&&!K(t)?rn(t)?fe(e,null,[t]):fe(e,t):fe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&rn(n)&&(n=[n]),fe(e,t,n))}finally{Vn(1)}}const ra="3.5.25";/** +* @vue/runtime-dom v3.5.25 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ws;const $r=typeof window<"u"&&window.trustedTypes;if($r)try{Ws=$r.createPolicy("vue",{createHTML:e=>e})}catch{}const No=Ws?e=>Ws.createHTML(e):e=>e,ia="http://www.w3.org/2000/svg",oa="http://www.w3.org/1998/Math/MathML",Ge=typeof document<"u"?document:null,jr=Ge&&Ge.createElement("template"),la={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ge.createElementNS(ia,e):t==="mathml"?Ge.createElementNS(oa,e):n?Ge.createElement(e,{is:n}):Ge.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ge.createTextNode(e),createComment:e=>Ge.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ge.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{jr.innerHTML=No(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=jr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},st="transition",Ut="animation",on=Symbol("_vtc"),Fo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ca=ue({},Yi,Fo),aa=e=>(e.displayName="Transition",e.props=ca,e),Jf=aa((e,{slots:t})=>ks(nc,fa(e),t)),pt=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vr=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function fa(e){const t={};for(const w in e)w in Fo||(t[w]=e[w]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,b=ua(r),_=b&&b[0],H=b&&b[1],{onBeforeEnter:A,onEnter:$,onEnterCancelled:p,onLeave:g,onLeaveCancelled:M,onBeforeAppear:j=A,onAppear:O=$,onAppearCancelled:k=p}=t,x=(w,F,Y,oe)=>{w._enterCancelled=oe,gt(w,F?a:l),gt(w,F?f:o),Y&&Y()},P=(w,F)=>{w._isLeaving=!1,gt(w,d),gt(w,v),gt(w,m),F&&F()},R=w=>(F,Y)=>{const oe=w?O:$,W=()=>x(F,w,Y);pt(oe,[F,W]),kr(()=>{gt(F,w?c:i),qe(F,w?a:l),Vr(oe)||Wr(F,s,_,W)})};return ue(t,{onBeforeEnter(w){pt(A,[w]),qe(w,i),qe(w,o)},onBeforeAppear(w){pt(j,[w]),qe(w,c),qe(w,f)},onEnter:R(!1),onAppear:R(!0),onLeave(w,F){w._isLeaving=!0;const Y=()=>P(w,F);qe(w,d),w._enterCancelled?(qe(w,m),Kr(w)):(Kr(w),qe(w,m)),kr(()=>{w._isLeaving&&(gt(w,d),qe(w,v),Vr(g)||Wr(w,s,H,Y))}),pt(g,[w,Y])},onEnterCancelled(w){x(w,!1,void 0,!0),pt(p,[w])},onAppearCancelled(w){x(w,!0,void 0,!0),pt(k,[w])},onLeaveCancelled(w){P(w),pt(M,[w])}})}function ua(e){if(e==null)return null;if(te(e))return[gs(e.enter),gs(e.leave)];{const t=gs(e);return[t,t]}}function gs(e){return ll(e)}function qe(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[on]||(e[on]=new Set)).add(t)}function gt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[on];n&&(n.delete(t),n.size||(e[on]=void 0))}function kr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let da=0;function Wr(e,t,n,s){const r=e._endId=++da,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=ha(e,t);if(!o)return s();const f=o+"end";let a=0;const d=()=>{e.removeEventListener(f,m),i()},m=v=>{v.target===e&&++a>=c&&d()};setTimeout(()=>{a(n[b]||"").split(", "),r=s(`${st}Delay`),i=s(`${st}Duration`),o=Ur(r,i),l=s(`${Ut}Delay`),c=s(`${Ut}Duration`),f=Ur(l,c);let a=null,d=0,m=0;t===st?o>0&&(a=st,d=o,m=i.length):t===Ut?f>0&&(a=Ut,d=f,m=c.length):(d=Math.max(o,f),a=d>0?o>f?st:Ut:null,m=a?a===st?i.length:c.length:0);const v=a===st&&/\b(?:transform|all)(?:,|$)/.test(s(`${st}Property`).toString());return{type:a,timeout:d,propCount:m,hasTransform:v}}function Ur(e,t){for(;e.lengthBr(n)+Br(e[s])))}function Br(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Kr(e){return(e?e.ownerDocument:document).body.offsetHeight}function pa(e,t,n){const s=e[on];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qr=Symbol("_vod"),ga=Symbol("_vsh"),ma=Symbol(""),va=/(?:^|;)\s*display\s*:/;function ya(e,t,n){const s=e.style,r=le(n);let i=!1;if(n&&!r){if(t)if(le(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Pn(s,l,"")}else for(const o in t)n[o]==null&&Pn(s,o,"");for(const o in n)o==="display"&&(i=!0),Pn(s,o,n[o])}else if(r){if(t!==n){const o=s[ma];o&&(n+=";"+o),s.cssText=n,i=va.test(n)}}else t&&e.removeAttribute("style");qr in e&&(e[qr]=i?s.display:"",e[ga]&&(s.display="none"))}const Gr=/\s*!important$/;function Pn(e,t,n){if(K(n))n.forEach(s=>Pn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=_a(e,t);Gr.test(n)?e.setProperty(ut(s),n.replace(Gr,""),"important"):e[s]=n}}const Xr=["Webkit","Moz","ms"],ms={};function _a(e,t){const n=ms[t];if(n)return n;let s=Ie(t);if(s!=="filter"&&s in e)return ms[t]=s;s=Kn(s);for(let r=0;rvs||(Ta.then(()=>vs=0),vs=Date.now());function xa(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;$e(Ca(s,n.value),t,5,[s])};return n.value=e,n.attached=Ea(),n}function Ca(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Aa=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?pa(e,s,o):t==="style"?ya(e,n,s):ln(t)?Bs(t)||wa(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ra(e,t,s,o))?(zr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!le(s))?zr(e,Ie(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Jr(e,t,s,o))};function Ra(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ei(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ei(t)&&le(n)?!1:t in e}const ti=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>An(t,n):t};function Ma(e){e.target.composing=!0}function ni(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ys=Symbol("_assign");function si(e,t,n){return t&&(e=e.trim()),n&&(e=qs(e)),e}const zf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ys]=ti(r);const i=s||r.props&&r.props.type==="number";Mt(e,t?"change":"input",o=>{o.target.composing||e[ys](si(e.value,n,i))}),(n||i)&&Mt(e,"change",()=>{e.value=si(e.value,n,i)}),t||(Mt(e,"compositionstart",Ma),Mt(e,"compositionend",ni),Mt(e,"change",ni))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[ys]=ti(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?qs(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Oa=["ctrl","shift","alt","meta"],Pa={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Oa.some(n=>e[`${n}Key`]&&!t.includes(n))},Qf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=ut(r.key);if(t.some(o=>o===i||La[o]===i))return e(r)})},Ho=ue({patchProp:Aa},la);let zt,ri=!1;function Ia(){return zt||(zt=Uc(Ho))}function Na(){return zt=ri?zt:Bc(Ho),ri=!0,zt}const eu=(...e)=>{const t=Ia().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=$o(s);if(!r)return;const i=t._component;!q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Do(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},tu=(...e)=>{const t=Na().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=$o(s);if(r)return n(r,!0,Do(r))},t};function Do(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function $o(e){return le(e)?document.querySelector(e):e}const Fa=window.__VP_SITE_DATA__;function jo(e){return Ei()?(ml(e),!0):!1}const _s=new WeakMap,Ha=(...e)=>{var t;const n=e[0],s=(t=Et())==null?void 0:t.proxy;if(s==null&&!ao())throw new Error("injectLocal must be called in setup");return s&&_s.has(s)&&n in _s.get(s)?_s.get(s)[n]:wt(...e)},Vo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const nu=e=>e!=null,Da=Object.prototype.toString,$a=e=>Da.call(e)==="[object Object]",ft=()=>{},ii=ja();function ja(){var e,t;return Vo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function cr(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const ko=e=>e();function Wo(e,t={}){let n,s,r=ft;const i=c=>{clearTimeout(c),r(),r=ft};let o;return c=>{const f=ce(e),a=ce(t.maxWait);return n&&i(n),f<=0||a!==void 0&&a<=0?(s&&(i(s),s=null),Promise.resolve(c())):new Promise((d,m)=>{r=t.rejectOnCancel?m:d,o=c,a&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,d(o())},a)),n=setTimeout(()=>{s&&i(s),s=null,d(c())},f)})}}function Va(...e){let t=0,n,s=!0,r=ft,i,o,l,c,f;!ae(e[0])&&typeof e[0]=="object"?{delay:o,trailing:l=!0,leading:c=!0,rejectOnCancel:f=!1}=e[0]:[o,l=!0,c=!0,f=!1]=e;const a=()=>{n&&(clearTimeout(n),n=void 0,r(),r=ft)};return m=>{const v=ce(o),b=Date.now()-t,_=()=>i=m();return a(),v<=0?(t=Date.now(),_()):(b>v&&(c||!s)?(t=Date.now(),_()):l&&(i=new Promise((H,A)=>{r=f?A:H,n=setTimeout(()=>{t=Date.now(),s=!0,H(_()),a()},Math.max(0,v-b))})),!c&&!n&&(n=setTimeout(()=>s=!0,v)),s=!1,i)}}function ka(e=ko,t={}){const{initialState:n="active"}=t,s=ar(n==="active");function r(){s.value=!1}function i(){s.value=!0}const o=(...l)=>{s.value&&e(...l)};return{isActive:en(s),pause:r,resume:i,eventFilter:o}}function oi(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Wa(e){return Et()}function bs(e){return Array.isArray(e)?e:[e]}function ar(...e){if(e.length!==1)return Ul(...e);const t=e[0];return typeof t=="function"?en(Vl(()=>({get:t,set:ft}))):He(t)}function Ua(e,t=200,n={}){return cr(Wo(t,n),e)}function Ba(e,t=200,n=!1,s=!0,r=!1){return cr(Va(t,n,s,r),e)}function Uo(e,t,n={}){const{eventFilter:s=ko,...r}=n;return Le(e,cr(s,t),r)}function Ka(e,t,n={}){const{eventFilter:s,initialState:r="active",...i}=n,{eventFilter:o,pause:l,resume:c,isActive:f}=ka(s,{initialState:r});return{stop:Uo(e,t,{...i,eventFilter:o}),pause:l,resume:c,isActive:f}}function ss(e,t=!0,n){Wa()?jt(e,n):t?e():zn(e)}function su(e,t,n={}){const{debounce:s=0,maxWait:r=void 0,...i}=n;return Uo(e,t,{...i,eventFilter:Wo(s,{maxWait:r})})}function qa(e,t,n){return Le(e,t,{...n,immediate:!0})}function ru(e,t,n){let s;ae(n)?s={evaluating:n}:s={};const{lazy:r=!1,evaluating:i=void 0,shallow:o=!0,onError:l=ft}=s,c=Ee(!r),f=o?Ee(t):He(t);let a=0;return sr(async d=>{if(!c.value)return;a++;const m=a;let v=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const b=await e(_=>{d(()=>{i&&(i.value=!1),v||_()})});m===a&&(f.value=b)}catch(b){l(b)}finally{i&&m===a&&(i.value=!1),v=!0}}),r?ie(()=>(c.value=!0,f.value)):f}const je=Vo?window:void 0;function fr(e){var t;const n=ce(e);return(t=n==null?void 0:n.$el)!=null?t:n}function et(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},s=(l,c,f,a)=>(l.addEventListener(c,f,a),()=>l.removeEventListener(c,f,a)),r=ie(()=>{const l=bs(ce(e[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=qa(()=>{var l,c;return[(c=(l=r.value)==null?void 0:l.map(f=>fr(f)))!=null?c:[je].filter(f=>f!=null),bs(ce(r.value?e[1]:e[0])),bs(Jn(r.value?e[2]:e[1])),ce(r.value?e[3]:e[2])]},([l,c,f,a])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(f!=null&&f.length))return;const d=$a(a)?{...a}:a;t.push(...l.flatMap(m=>c.flatMap(v=>f.map(b=>s(m,v,b,d)))))},{flush:"post"}),o=()=>{i(),n()};return jo(n),o}function Ga(){const e=Ee(!1),t=Et();return t&&jt(()=>{e.value=!0},t),e}function Xa(e){const t=Ga();return ie(()=>(t.value,!!e()))}function Ya(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function iu(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=je,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=Ya(t);return et(r,i,a=>{a.repeat&&ce(l)||c(a)&&n(a)},o)}const Ja=Symbol("vueuse-ssr-width");function za(){const e=ao()?Ha(Ja,null):null;return typeof e=="number"?e:void 0}function Bo(e,t={}){const{window:n=je,ssrWidth:s=za()}=t,r=Xa(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=Ee(typeof s=="number"),o=Ee(),l=Ee(!1),c=f=>{l.value=f.matches};return sr(()=>{if(i.value){i.value=!r.value;const f=ce(e).split(",");l.value=f.some(a=>{const d=a.includes("not all"),m=a.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),v=a.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let b=!!(m||v);return m&&b&&(b=s>=oi(m[1])),v&&b&&(b=s<=oi(v[1])),d?!b:b});return}r.value&&(o.value=n.matchMedia(ce(e)),l.value=o.value.matches)}),et(o,"change",c,{passive:!0}),ie(()=>l.value)}const Sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Tn="__vueuse_ssr_handlers__",Qa=Za();function Za(){return Tn in Sn||(Sn[Tn]=Sn[Tn]||{}),Sn[Tn]}function Ko(e,t){return Qa[e]||t}function qo(e){return Bo("(prefers-color-scheme: dark)",e)}function ef(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const tf={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},li="vueuse-storage";function ur(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:d=je,eventFilter:m,onError:v=R=>{console.error(R)},initOnMounted:b}=s,_=(a?Ee:He)(typeof t=="function"?t():t),H=ie(()=>ce(e));if(!n)try{n=Ko("getDefaultStorage",()=>{var R;return(R=je)==null?void 0:R.localStorage})()}catch(R){v(R)}if(!n)return _;const A=ce(t),$=ef(A),p=(r=s.serializer)!=null?r:tf[$],{pause:g,resume:M}=Ka(_,()=>O(_.value),{flush:i,deep:o,eventFilter:m});Le(H,()=>x(),{flush:i}),d&&l&&ss(()=>{n instanceof Storage?et(d,"storage",x,{passive:!0}):et(d,li,P),b&&x()}),b||x();function j(R,w){if(d){const F={key:H.value,oldValue:R,newValue:w,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(li,{detail:F}))}}function O(R){try{const w=n.getItem(H.value);if(R==null)j(w,null),n.removeItem(H.value);else{const F=p.write(R);w!==F&&(n.setItem(H.value,F),j(w,F))}}catch(w){v(w)}}function k(R){const w=R?R.newValue:n.getItem(H.value);if(w==null)return c&&A!=null&&n.setItem(H.value,p.write(A)),A;if(!R&&f){const F=p.read(w);return typeof f=="function"?f(F,A):$==="object"&&!Array.isArray(F)?{...A,...F}:F}else return typeof w!="string"?w:p.read(w)}function x(R){if(!(R&&R.storageArea!==n)){if(R&&R.key==null){_.value=A;return}if(!(R&&R.key!==H.value)){g();try{(R==null?void 0:R.newValue)!==p.write(_.value)&&(_.value=k(R))}catch(w){v(w)}finally{R?zn(M):M()}}}}function P(R){x(R.detail)}return _}const nf="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function sf(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=je,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},m=qo({window:r}),v=ie(()=>m.value?"dark":"light"),b=c||(o==null?ar(s):ur(o,s,i,{window:r,listenToStorageChanges:l})),_=ie(()=>b.value==="auto"?v.value:b.value),H=Ko("updateHTMLAttrs",(g,M,j)=>{const O=typeof g=="string"?r==null?void 0:r.document.querySelector(g):fr(g);if(!O)return;const k=new Set,x=new Set;let P=null;if(M==="class"){const w=j.split(/\s/g);Object.values(d).flatMap(F=>(F||"").split(/\s/g)).filter(Boolean).forEach(F=>{w.includes(F)?k.add(F):x.add(F)})}else P={key:M,value:j};if(k.size===0&&x.size===0&&P===null)return;let R;a&&(R=r.document.createElement("style"),R.appendChild(document.createTextNode(nf)),r.document.head.appendChild(R));for(const w of k)O.classList.add(w);for(const w of x)O.classList.remove(w);P&&O.setAttribute(P.key,P.value),a&&(r.getComputedStyle(R).opacity,document.head.removeChild(R))});function A(g){var M;H(t,n,(M=d[g])!=null?M:g)}function $(g){e.onChanged?e.onChanged(g,A):A(g)}Le(_,$,{flush:"post",immediate:!0}),ss(()=>$(_.value));const p=ie({get(){return f?b.value:_.value},set(g){b.value=g}});return Object.assign(p,{store:b,system:v,state:_})}function rf(e={}){const{valueDark:t="dark",valueLight:n=""}=e,s=sf({...e,onChanged:(o,l)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,o==="dark",l,o):l(o)},modes:{dark:t,light:n}}),r=ie(()=>s.system.value);return ie({get(){return s.value==="dark"},set(o){const l=o?"dark":"light";r.value===l?s.value="auto":s.value=l}})}function ws(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const ci=1;function of(e,t={}){const{throttle:n=0,idle:s=200,onStop:r=ft,onScroll:i=ft,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:f=je,onError:a=O=>{console.error(O)}}=t,d=Ee(0),m=Ee(0),v=ie({get(){return d.value},set(O){_(O,void 0)}}),b=ie({get(){return m.value},set(O){_(void 0,O)}});function _(O,k){var x,P,R,w;if(!f)return;const F=ce(e);if(!F)return;(R=F instanceof Document?f.document.body:F)==null||R.scrollTo({top:(x=ce(k))!=null?x:b.value,left:(P=ce(O))!=null?P:v.value,behavior:ce(c)});const Y=((w=F==null?void 0:F.document)==null?void 0:w.documentElement)||(F==null?void 0:F.documentElement)||F;v!=null&&(d.value=Y.scrollLeft),b!=null&&(m.value=Y.scrollTop)}const H=Ee(!1),A=Ht({left:!0,right:!1,top:!0,bottom:!1}),$=Ht({left:!1,right:!1,top:!1,bottom:!1}),p=O=>{H.value&&(H.value=!1,$.left=!1,$.right=!1,$.top=!1,$.bottom=!1,r(O))},g=Ua(p,n+s),M=O=>{var k;if(!f)return;const x=((k=O==null?void 0:O.document)==null?void 0:k.documentElement)||(O==null?void 0:O.documentElement)||fr(O),{display:P,flexDirection:R,direction:w}=getComputedStyle(x),F=w==="rtl"?-1:1,Y=x.scrollLeft;$.left=Yd.value;const oe=Math.abs(Y*F)<=(o.left||0),W=Math.abs(Y*F)+x.clientWidth>=x.scrollWidth-(o.right||0)-ci;P==="flex"&&R==="row-reverse"?(A.left=W,A.right=oe):(A.left=oe,A.right=W),d.value=Y;let X=x.scrollTop;O===f.document&&!X&&(X=f.document.body.scrollTop),$.top=Xm.value;const V=Math.abs(X)<=(o.top||0),ne=Math.abs(X)+x.clientHeight>=x.scrollHeight-(o.bottom||0)-ci;P==="flex"&&R==="column-reverse"?(A.top=ne,A.bottom=V):(A.top=V,A.bottom=ne),m.value=X},j=O=>{var k;if(!f)return;const x=(k=O.target.documentElement)!=null?k:O.target;M(x),H.value=!0,g(O),i(O)};return et(e,"scroll",n?Ba(j,n,!0,!1):j,l),ss(()=>{try{const O=ce(e);if(!O)return;M(O)}catch(O){a(O)}}),et(e,"scrollend",p,l),{x:v,y:b,isScrolling:H,arrivedState:A,directions:$,measure(){const O=ce(e);f&&O&&M(O)}}}function ou(e,t,n={}){const{window:s=je}=n;return ur(e,t,s==null?void 0:s.localStorage,n)}function Go(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ss=new WeakMap;function lu(e,t=!1){const n=Ee(t);let s=null,r="";Le(ar(e),l=>{const c=ws(ce(l));if(c){const f=c;if(Ss.get(f)||Ss.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=ws(ce(e));!l||n.value||(ii&&(s=et(l,"touchmove",c=>{lf(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=ws(ce(e));!l||!n.value||(ii&&(s==null||s()),l.style.overflow=r,Ss.delete(l),n.value=!1)};return jo(o),ie({get(){return n.value},set(l){l?i():o()}})}function cu(e,t,n={}){const{window:s=je}=n;return ur(e,t,s==null?void 0:s.sessionStorage,n)}function au(e={}){const{window:t=je,...n}=e;return of(t,n)}function fu(e={}){const{window:t=je,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=Ee(n),c=Ee(s),f=()=>{if(t)if(o==="outer")l.value=t.outerWidth,c.value=t.outerHeight;else if(o==="visual"&&t.visualViewport){const{width:d,height:m,scale:v}=t.visualViewport;l.value=Math.round(d*v),c.value=Math.round(m*v)}else i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};f(),ss(f);const a={passive:!0};if(et("resize",f,a),t&&o==="visual"&&t.visualViewport&&et(t.visualViewport,"resize",f,a),r){const d=Bo("(orientation: portrait)");Le(d,()=>f())}return{width:l,height:c}}const Ts={};var Es={};const Xo=/^(?:[a-z]+:|\/\/)/i,cf="vitepress-theme-appearance",af=/#.*$/,ff=/[?#].*$/,uf=/(?:(^|\/)index)?\.(?:md|html)$/,ve=typeof document<"u",Yo={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function df(e,t,n=!1){if(t===void 0)return!1;if(e=ai(`/${e}`),n)return new RegExp(t).test(e);if(ai(t)!==e)return!1;const s=t.match(af);return s?(ve?location.hash:"")===s[0]:!0}function ai(e){return decodeURI(e).replace(ff,"").replace(uf,"$1")}function hf(e){return Xo.test(e)}function pf(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!hf(n)&&df(t,`/${n}/`,!0))||"root"}function gf(e,t){var s,r,i,o,l,c,f;const n=pf(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:zo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function Jo(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=mf(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function mf(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function vf(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function zo(e,t){return[...e.filter(n=>!vf(t,n)),...t]}const yf=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,_f=/^[a-z]:/i;function fi(e){const t=_f.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(yf,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const xs=new Set;function bf(e){if(xs.size===0){const n=typeof process=="object"&&(Es==null?void 0:Es.VITE_EXTRA_EXTENSIONS)||(Ts==null?void 0:Ts.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>xs.add(s))}const t=e.split(".").pop();return t==null||!xs.has(t.toLowerCase())}function uu(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const wf=Symbol(),Tt=Ee(Fa);function du(e){const t=ie(()=>gf(Tt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?He(!0):n==="force-auto"?qo():n?rf({storageKey:cf,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):He(!1),r=He(ve?location.hash:"");return ve&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Le(()=>e.data,()=>{r.value=ve?location.hash:""}),{site:t,theme:ie(()=>t.value.themeConfig),page:ie(()=>e.data),frontmatter:ie(()=>e.data.frontmatter),params:ie(()=>e.data.params),lang:ie(()=>t.value.lang),dir:ie(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:ie(()=>t.value.localeIndex||"root"),title:ie(()=>Jo(t.value,e.data)),description:ie(()=>e.data.description||t.value.description),isDark:s,hash:ie(()=>r.value)}}function Sf(){const e=wt(wf);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Tf(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function ui(e){return Xo.test(e)||!e.startsWith("/")?e:Tf(Tt.value.base,e)}function Ef(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),ve){const n="/agentkit-sdk-python/";t=fi(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${fi(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Ln=[];function hu(e){Ln.push(e),Zn(()=>{Ln=Ln.filter(t=>t!==e)})}function xf(){let e=Tt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=di(e,n);else if(Array.isArray(e))for(const s of e){const r=di(s,n);if(r){t=r;break}}return t}function di(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Cf=Symbol(),Qo="http://a.com",Af=()=>({path:"/",component:null,data:Yo});function pu(e,t){const n=Ht(Af()),s={route:n,go:r};async function r(l=ve?location.href:"/"){var c,f;l=Cs(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(ve&&l!==Cs(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(l)))}let i=null;async function o(l,c=0,f=!1){var m,v;if(await((m=s.onBeforePageLoad)==null?void 0:m.call(s,l))===!1)return;const a=new URL(l,Qo),d=i=a.pathname;try{let b=await e(d);if(!b)throw new Error(`Page not found: ${d}`);if(i===d){i=null;const{default:_,__pageData:H}=b;if(!_)throw new Error(`Invalid route component: ${_}`);await((v=s.onAfterPageLoad)==null?void 0:v.call(s,l)),n.path=ve?d:ui(d),n.component=Rn(_),n.data=Rn(H),ve&&zn(()=>{let A=Tt.value.base+H.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!Tt.value.cleanUrls&&!A.endsWith("/")&&(A+=".html"),A!==a.pathname&&(a.pathname=A,l=A+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let $=null;try{$=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if($){hi($,a.hash);return}}window.scrollTo(0,c)})}}catch(b){if(!/fetch|Page not found/.test(b.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(b),!f)try{const _=await fetch(Tt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await _.json(),await o(l,c,!0);return}catch{}if(i===d){i=null,n.path=ve?d:ui(d),n.component=t?Rn(t):null;const _=ve?d.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...Yo,relativePath:_}}}}return ve&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:d,pathname:m,hash:v,search:b}=new URL(f,c.baseURI),_=new URL(location.href);d===_.origin&&bf(m)&&(l.preventDefault(),m===_.pathname&&b===_.search?(v!==_.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:_.href,newURL:a}))),v?hi(c,v,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var f;if(l.state===null)return;const c=Cs(location.href);await o(c,l.state&&l.state.scrollPosition||0),await((f=s.onAfterRouteChange??s.onAfterRouteChanged)==null?void 0:f(c))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Rf(){const e=wt(Cf);if(!e)throw new Error("useRouter() is called without provider.");return e}function Zo(){return Rf().route}function hi(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-xf()+i;requestAnimationFrame(r)}}function Cs(e){const t=new URL(e,Qo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),Tt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const En=()=>Ln.forEach(e=>e()),gu=tr({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=Zo(),{frontmatter:n,site:s}=Sf();return Le(n,En,{deep:!0,flush:"post"}),()=>ks(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?ks(t.component,{onVnodeMounted:En,onVnodeUpdated:En,onVnodeUnmounted:En}):"404 Page Not Found"])}}),mu=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Mf="modulepreload",Of=function(e){return"/agentkit-sdk-python/"+e},pi={},vu=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Of(c),c in pi)return;pi[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2F%24%7Bc%7D"]${a}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":Mf,f||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),f)return new Promise((m,v)=>{d.addEventListener("load",m),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},yu=tr({setup(e,{slots:t}){const n=He(!1);return jt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function _u(){ve&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function bu(){if(ve){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),Pf(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function Pf(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function wu(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=As(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(As);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};sr(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=Jo(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let d=document.querySelector("meta[name=description]");d?d.getAttribute("content")!==a&&d.setAttribute("content",a):As(["meta",{name:"description",content:a}]),r(zo(o.head,If(c)))})}function As([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function Lf(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function If(e){return e.filter(t=>!Lf(t))}const Rs=new Set,el=()=>document.createElement("link"),Nf=e=>{const t=el();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Ff=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let xn;const Hf=ve&&(xn=el())&&xn.relList&&xn.relList.supports&&xn.relList.supports("prefetch")?Nf:Ff;function Su(){if(!ve||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Rs.has(c)){Rs.add(c);const f=Ef(c);f&&Hf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):Rs.add(l))})})};jt(s);const r=Zo();Le(()=>r.path,s),Zn(()=>{n&&n.disconnect()})}export{to as $,xf as A,Wf as B,Vf as C,Ee as D,hu as E,Se as F,fe as G,kf as H,Xo as I,Zo as J,Yc as K,wt as L,fu as M,Gs as N,iu as O,zn as P,au as Q,ve as R,en as S,Jf as T,jf as U,vu as V,lu as W,Ac as X,Bf as Y,Zf as Z,mu as _,Oo as a,Qf as a0,Kf as a1,wu as a2,Cf as a3,du as a4,wf as a5,gu as a6,yu as a7,Tt as a8,pu as a9,Ef as aa,tu as ab,Su as ac,bu as ad,_u as ae,ks as af,Xf as ag,ce as ah,bs as ai,fr as aj,nu as ak,jo as al,ru as am,cu as an,ou as ao,su as ap,Rf as aq,et as ar,Df as as,zf as at,ae as au,$f as av,Rn as aw,eu as ax,uu as ay,js as b,Gf as c,tr as d,Yf as e,bf as f,ui as g,ie as h,hf as i,Mo as j,Jn as k,df as l,Bo as m,Xs as n,$s as o,He as p,Le as q,Uf as r,sr as s,pl as t,Sf as u,jt as v,Ql as w,Zn as x,qf as y,hc as z}; diff --git a/assets/chunks/model_apikey.BbUdt8Yv.js b/assets/chunks/model_apikey.BbUdt8Yv.js new file mode 100644 index 0000000..d9b57ec --- /dev/null +++ b/assets/chunks/model_apikey.BbUdt8Yv.js @@ -0,0 +1 @@ +const t="/agentkit-sdk-python/assets/select_or_create_model_endpoint.CMTjcEUl.jpg",s="/agentkit-sdk-python/assets/model_apikey.L4dqV6qA.jpg";export{t as _,s as a}; diff --git a/assets/chunks/theme.BeLitqQO.js b/assets/chunks/theme.BeLitqQO.js new file mode 100644 index 0000000..c059f16 --- /dev/null +++ b/assets/chunks/theme.BeLitqQO.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.Nz1pInKC.js","assets/chunks/framework.CA4hJK0u.js"])))=>i.map(i=>d[i]); +import{d as p,c as u,r as c,n as N,o as s,a as j,t as M,b as _,w as h,T as ue,e as m,_ as g,u as Ce,i as He,f as Be,g as de,h as y,j as d,k as i,l as z,m as se,p as S,q as F,s as X,v as U,x as ve,y as fe,z as Ee,A as Fe,F as x,B as A,C as W,D as $e,E as Y,G as k,H as B,I as ye,J as Q,K as G,L as Z,M as De,N as Pe,O as ie,P as Le,Q as Ve,R as ee,S as Oe,U as Ge,V as Ue,W as Se,X as Te,Y as je,Z as ze,$ as We,a0 as Ke,a1 as qe}from"./framework.CA4hJK0u.js";const Re=p({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(e){return(t,n)=>(s(),u("span",{class:N(["VPBadge",e.type])},[c(t.$slots,"default",{},()=>[j(M(e.text),1)])],2))}}),Je={key:0,class:"VPBackdrop"},Xe=p({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(e){return(t,n)=>(s(),_(ue,{name:"fade"},{default:h(()=>[e.show?(s(),u("div",Je)):m("",!0)]),_:1}))}}),Ye=g(Xe,[["__scopeId","data-v-54a304ca"]]),L=Ce;function Qe(e,t){let n,a=!1;return()=>{n&&clearTimeout(n),a?n=setTimeout(e,t):(e(),(a=!0)&&setTimeout(()=>a=!1,t))}}function re(e){return e.startsWith("/")?e:`/${e}`}function he(e){const{pathname:t,search:n,hash:a,protocol:o}=new URL(e,"http://a.com");if(He(e)||e.startsWith("#")||!o.startsWith("http")||!Be(t))return e;const{site:r}=L(),l=t.endsWith("/")||t.endsWith(".html")?e:e.replace(/(?:(^\.+)\/)?.*$/,`$1${t.replace(/(\.md)?$/,r.value.cleanUrls?"":".html")}${n}${a}`);return de(l)}function q({correspondingLink:e=!1}={}){const{site:t,localeIndex:n,page:a,theme:o,hash:r}=L(),l=y(()=>{var f,$;return{label:(f=t.value.locales[n.value])==null?void 0:f.label,link:(($=t.value.locales[n.value])==null?void 0:$.link)||(n.value==="root"?"/":`/${n.value}/`)}});return{localeLinks:y(()=>Object.entries(t.value.locales).flatMap(([f,$])=>l.value.label===$.label?[]:{text:$.label,link:Ze($.link||(f==="root"?"/":`/${f}/`),o.value.i18nRouting!==!1&&e,a.value.relativePath.slice(l.value.link.length-1),!t.value.cleanUrls)+r.value})),currentLang:l}}function Ze(e,t,n,a){return t?e.replace(/\/$/,"")+re(n.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,a?".html":"")):e}const et={class:"NotFound"},tt={class:"code"},nt={class:"title"},at={class:"quote"},ot={class:"action"},st=["href","aria-label"],it=p({__name:"NotFound",setup(e){const{theme:t}=L(),{currentLang:n}=q();return(a,o)=>{var r,l,v,f,$;return s(),u("div",et,[d("p",tt,M(((r=i(t).notFound)==null?void 0:r.code)??"404"),1),d("h1",nt,M(((l=i(t).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",at,M(((v=i(t).notFound)==null?void 0:v.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",ot,[d("a",{class:"link",href:i(de)(i(n).link),"aria-label":((f=i(t).notFound)==null?void 0:f.linkLabel)??"go to home"},M((($=i(t).notFound)==null?void 0:$.linkText)??"Take me home"),9,st)])])}}}),rt=g(it,[["__scopeId","data-v-6ff51ddd"]]);function Ne(e,t){if(Array.isArray(e))return R(e);if(e==null)return[];t=re(t);const n=Object.keys(e).sort((o,r)=>r.split("/").length-o.split("/").length).find(o=>t.startsWith(re(o))),a=n?e[n]:[];return Array.isArray(a)?R(a):R(a.items,a.base)}function lt(e){const t=[];let n=0;for(const a in e){const o=e[a];if(o.items){n=t.push(o);continue}t[n]||t.push({items:[]}),t[n].items.push(o)}return t}function ct(e){const t=[];function n(a){for(const o of a)o.text&&o.link&&t.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&n(o.items)}return n(e),t}function le(e,t){return Array.isArray(t)?t.some(n=>le(e,n)):z(e,t.link)?!0:t.items?le(e,t.items):!1}function R(e,t){return[...e].map(n=>{const a={...n},o=a.base||t;return o&&a.link&&(a.link=o+a.link),a.items&&(a.items=R(a.items,o)),a})}function D(){const{frontmatter:e,page:t,theme:n}=L(),a=se("(min-width: 960px)"),o=S(!1),r=y(()=>{const w=n.value.sidebar,C=t.value.relativePath;return w?Ne(w,C):[]}),l=S(r.value);F(r,(w,C)=>{JSON.stringify(w)!==JSON.stringify(C)&&(l.value=r.value)});const v=y(()=>e.value.sidebar!==!1&&l.value.length>0&&e.value.layout!=="home"),f=y(()=>$?e.value.aside==null?n.value.aside==="left":e.value.aside==="left":!1),$=y(()=>e.value.layout==="home"?!1:e.value.aside!=null?!!e.value.aside:n.value.aside!==!1),V=y(()=>v.value&&a.value),b=y(()=>v.value?lt(l.value):[]);function P(){o.value=!0}function T(){o.value=!1}function I(){o.value?T():P()}return{isOpen:o,sidebar:l,sidebarGroups:b,hasSidebar:v,hasAside:$,leftAside:f,isSidebarEnabled:V,open:P,close:T,toggle:I}}function ut(e,t){let n;X(()=>{n=e.value?document.activeElement:void 0}),U(()=>{window.addEventListener("keyup",a)}),ve(()=>{window.removeEventListener("keyup",a)});function a(o){o.key==="Escape"&&e.value&&(t(),n==null||n.focus())}}function dt(e){const{page:t,hash:n}=L(),a=S(!1),o=y(()=>e.value.collapsed!=null),r=y(()=>!!e.value.link),l=S(!1),v=()=>{l.value=z(t.value.relativePath,e.value.link)};F([t,e,n],v),U(v);const f=y(()=>l.value?!0:e.value.items?le(t.value.relativePath,e.value.items):!1),$=y(()=>!!(e.value.items&&e.value.items.length));X(()=>{a.value=!!(o.value&&e.value.collapsed)}),fe(()=>{(l.value||f.value)&&(a.value=!1)});function V(){o.value&&(a.value=!a.value)}return{collapsed:a,collapsible:o,isLink:r,isActiveLink:l,hasActiveLink:f,hasChildren:$,toggle:V}}function vt(){const{hasSidebar:e}=D(),t=se("(min-width: 960px)"),n=se("(min-width: 1280px)");return{isAsideEnabled:y(()=>!n.value&&!t.value?!1:e.value?n.value:t.value)}}const ft=/\b(?:VPBadge|header-anchor|footnote-ref|ignore-header)\b/,ce=[];function Me(e){return typeof e.outline=="object"&&!Array.isArray(e.outline)&&e.outline.label||e.outlineTitle||"On this page"}function me(e){const t=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(n=>n.id&&n.hasChildNodes()).map(n=>{const a=Number(n.tagName[1]);return{element:n,title:ht(n),link:"#"+n.id,level:a}});return mt(t,e)}function ht(e){let t="";for(const n of e.childNodes)if(n.nodeType===1){if(ft.test(n.className))continue;t+=n.textContent}else n.nodeType===3&&(t+=n.textContent);return t.trim()}function mt(e,t){if(t===!1)return[];const n=(typeof t=="object"&&!Array.isArray(t)?t.level:t)||2,[a,o]=typeof n=="number"?[n,n]:n==="deep"?[2,6]:n;return _t(e,a,o)}function pt(e,t){const{isAsideEnabled:n}=vt(),a=Qe(r,100);let o=null;U(()=>{requestAnimationFrame(r),window.addEventListener("scroll",a)}),Ee(()=>{l(location.hash)}),ve(()=>{window.removeEventListener("scroll",a)});function r(){if(!n.value)return;const v=window.scrollY,f=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(v+f-$)<1,b=ce.map(({element:T,link:I})=>({link:I,top:kt(T)})).filter(({top:T})=>!Number.isNaN(T)).sort((T,I)=>T.top-I.top);if(!b.length){l(null);return}if(v<1){l(null);return}if(V){l(b[b.length-1].link);return}let P=null;for(const{link:T,top:I}of b){if(I>v+Fe()+4)break;P=T}l(P)}function l(v){o&&o.classList.remove("active"),v==null?o=null:o=e.value.querySelector(`a[href="/open?url=https%3A%2F%2Fgithub.com%2Fvolcengine%2Fagentkit-sdk-python%2Fcompare%2Fmain...feat%2F%24%7BdecodeURIComponent%28v%29%7D"]`);const f=o;f?(f.classList.add("active"),t.value.style.top=f.offsetTop+39+"px",t.value.style.opacity="1"):(t.value.style.top="33px",t.value.style.opacity="0")}}function kt(e){let t=0;for(;e!==document.body;){if(e===null)return NaN;t+=e.offsetTop,e=e.offsetParent}return t}function _t(e,t,n){ce.length=0;const a=[],o=[];return e.forEach(r=>{const l={...r,children:[]};let v=o[o.length-1];for(;v&&v.level>=l.level;)o.pop(),v=o[o.length-1];if(l.element.classList.contains("ignore-header")||v&&"shouldIgnore"in v){o.push({level:l.level,shouldIgnore:!0});return}l.level>n||l.level{const o=W("VPDocOutlineItem",!0);return s(),u("ul",{class:N(["VPDocOutlineItem",e.root?"root":"nested"])},[(s(!0),u(x,null,A(e.headers,({children:r,link:l,title:v})=>(s(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:t,title:v},M(v),9,bt),r!=null&&r.length?(s(),_(o,{key:0,headers:r},null,8,["headers"])):m("",!0)]))),256))],2)}}}),xe=g(gt,[["__scopeId","data-v-53c99d69"]]),$t={class:"content"},yt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Pt=p({__name:"VPDocAsideOutline",setup(e){const{frontmatter:t,theme:n}=L(),a=$e([]);Y(()=>{a.value=me(t.value.outline??n.value.outline)});const o=S(),r=S();return pt(o,r),(l,v)=>(s(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:N(["VPDocAsideOutline",{"has-outline":a.value.length>0}]),ref_key:"container",ref:o},[d("div",$t,[d("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),d("div",yt,M(i(Me)(i(n))),1),k(xe,{headers:a.value,root:!0},null,8,["headers"])])],2))}}),Lt=g(Pt,[["__scopeId","data-v-f610f197"]]),Vt={class:"VPDocAsideCarbonAds"},St=p({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(e){const t=()=>null;return(n,a)=>(s(),u("div",Vt,[k(i(t),{"carbon-ads":e.carbonAds},null,8,["carbon-ads"])]))}}),Tt={class:"VPDocAside"},Nt=p({__name:"VPDocAside",setup(e){const{theme:t}=L();return(n,a)=>(s(),u("div",Tt,[c(n.$slots,"aside-top",{},void 0,!0),c(n.$slots,"aside-outline-before",{},void 0,!0),k(Lt),c(n.$slots,"aside-outline-after",{},void 0,!0),a[0]||(a[0]=d("div",{class:"spacer"},null,-1)),c(n.$slots,"aside-ads-before",{},void 0,!0),i(t).carbonAds?(s(),_(St,{key:0,"carbon-ads":i(t).carbonAds},null,8,["carbon-ads"])):m("",!0),c(n.$slots,"aside-ads-after",{},void 0,!0),c(n.$slots,"aside-bottom",{},void 0,!0)]))}}),Mt=g(Nt,[["__scopeId","data-v-cb998dce"]]);function xt(){const{theme:e,page:t}=L();return y(()=>{const{text:n="Edit this page",pattern:a=""}=e.value.editLink||{};let o;return typeof a=="function"?o=a(t.value):o=a.replace(/:path/g,t.value.filePath),{url:o,text:n}})}function It(){const{page:e,theme:t,frontmatter:n}=L();return y(()=>{var $,V,b,P,T,I,w,C;const a=Ne(t.value.sidebar,e.value.relativePath),o=ct(a),r=wt(o,H=>H.link.replace(/[?#].*$/,"")),l=r.findIndex(H=>z(e.value.relativePath,H.link)),v=(($=t.value.docFooter)==null?void 0:$.prev)===!1&&!n.value.prev||n.value.prev===!1,f=((V=t.value.docFooter)==null?void 0:V.next)===!1&&!n.value.next||n.value.next===!1;return{prev:v?void 0:{text:(typeof n.value.prev=="string"?n.value.prev:typeof n.value.prev=="object"?n.value.prev.text:void 0)??((b=r[l-1])==null?void 0:b.docFooterText)??((P=r[l-1])==null?void 0:P.text),link:(typeof n.value.prev=="object"?n.value.prev.link:void 0)??((T=r[l-1])==null?void 0:T.link)},next:f?void 0:{text:(typeof n.value.next=="string"?n.value.next:typeof n.value.next=="object"?n.value.next.text:void 0)??((I=r[l+1])==null?void 0:I.docFooterText)??((w=r[l+1])==null?void 0:w.text),link:(typeof n.value.next=="object"?n.value.next.link:void 0)??((C=r[l+1])==null?void 0:C.link)}}})}function wt(e,t){const n=new Set;return e.filter(a=>{const o=t(a);return n.has(o)?!1:n.add(o)})}const E=p({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(e){const t=e,n=y(()=>t.tag??(t.href?"a":"span")),a=y(()=>t.href&&ye.test(t.href)||t.target==="_blank");return(o,r)=>(s(),_(B(n.value),{class:N(["VPLink",{link:e.href,"vp-external-link-icon":a.value,"no-icon":e.noIcon}]),href:e.href?i(he)(e.href):void 0,target:e.target??(a.value?"_blank":void 0),rel:e.rel??(a.value?"noreferrer":void 0)},{default:h(()=>[c(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),At={class:"VPLastUpdated"},Ct=["datetime"],Ht=p({__name:"VPDocFooterLastUpdated",setup(e){const{theme:t,page:n,lang:a}=L(),o=y(()=>new Date(n.value.lastUpdated)),r=y(()=>o.value.toISOString()),l=S("");return U(()=>{X(()=>{var v,f,$;l.value=new Intl.DateTimeFormat((f=(v=t.value.lastUpdated)==null?void 0:v.formatOptions)!=null&&f.forceLocale?a.value:void 0,(($=t.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(o.value)})}),(v,f)=>{var $;return s(),u("p",At,[j(M((($=i(t).lastUpdated)==null?void 0:$.text)||i(t).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:r.value},M(l.value),9,Ct)])}}}),Bt=g(Ht,[["__scopeId","data-v-1bb0c8a8"]]),Et={key:0,class:"VPDocFooter"},Ft={key:0,class:"edit-info"},Dt={key:0,class:"edit-link"},Ot={key:1,class:"last-updated"},Gt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Ut={class:"pager"},jt=["innerHTML"],zt=["innerHTML"],Wt={class:"pager"},Kt=["innerHTML"],qt=["innerHTML"],Rt=p({__name:"VPDocFooter",setup(e){const{theme:t,page:n,frontmatter:a}=L(),o=xt(),r=It(),l=y(()=>t.value.editLink&&a.value.editLink!==!1),v=y(()=>n.value.lastUpdated),f=y(()=>l.value||v.value||r.value.prev||r.value.next);return($,V)=>{var b,P,T,I;return f.value?(s(),u("footer",Et,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||v.value?(s(),u("div",Ft,[l.value?(s(),u("div",Dt,[k(E,{class:"edit-link-button",href:i(o).url,"no-icon":!0},{default:h(()=>[V[0]||(V[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),j(" "+M(i(o).text),1)]),_:1},8,["href"])])):m("",!0),v.value?(s(),u("div",Ot,[k(Bt)])):m("",!0)])):m("",!0),(b=i(r).prev)!=null&&b.link||(P=i(r).next)!=null&&P.link?(s(),u("nav",Gt,[V[1]||(V[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",Ut,[(T=i(r).prev)!=null&&T.link?(s(),_(E,{key:0,class:"pager-link prev",href:i(r).prev.link},{default:h(()=>{var w;return[d("span",{class:"desc",innerHTML:((w=i(t).docFooter)==null?void 0:w.prev)||"Previous page"},null,8,jt),d("span",{class:"title",innerHTML:i(r).prev.text},null,8,zt)]}),_:1},8,["href"])):m("",!0)]),d("div",Wt,[(I=i(r).next)!=null&&I.link?(s(),_(E,{key:0,class:"pager-link next",href:i(r).next.link},{default:h(()=>{var w;return[d("span",{class:"desc",innerHTML:((w=i(t).docFooter)==null?void 0:w.next)||"Next page"},null,8,Kt),d("span",{class:"title",innerHTML:i(r).next.text},null,8,qt)]}),_:1},8,["href"])):m("",!0)])])):m("",!0)])):m("",!0)}}}),Jt=g(Rt,[["__scopeId","data-v-1bcd8184"]]),Xt={class:"container"},Yt={class:"aside-container"},Qt={class:"aside-content"},Zt={class:"content"},en={class:"content-container"},tn={class:"main"},nn=p({__name:"VPDoc",setup(e){const{theme:t}=L(),n=Q(),{hasSidebar:a,hasAside:o,leftAside:r}=D(),l=y(()=>n.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(v,f)=>{const $=W("Content");return s(),u("div",{class:N(["VPDoc",{"has-sidebar":i(a),"has-aside":i(o)}])},[c(v.$slots,"doc-top",{},void 0,!0),d("div",Xt,[i(o)?(s(),u("div",{key:0,class:N(["aside",{"left-aside":i(r)}])},[f[0]||(f[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",Yt,[d("div",Qt,[k(Mt,null,{"aside-top":h(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":h(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":h(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):m("",!0),d("div",Zt,[d("div",en,[c(v.$slots,"doc-before",{},void 0,!0),d("main",tn,[k($,{class:N(["vp-doc",[l.value,i(t).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),k(Jt,null,{"doc-footer-before":h(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(v.$slots,"doc-after",{},void 0,!0)])])]),c(v.$slots,"doc-bottom",{},void 0,!0)],2)}}}),an=g(nn,[["__scopeId","data-v-e6f2a212"]]),on=p({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(e){const t=e,n=y(()=>t.href&&ye.test(t.href)),a=y(()=>t.tag||(t.href?"a":"button"));return(o,r)=>(s(),_(B(a.value),{class:N(["VPButton",[e.size,e.theme]]),href:e.href?i(he)(e.href):void 0,target:t.target??(n.value?"_blank":void 0),rel:t.rel??(n.value?"noreferrer":void 0)},{default:h(()=>[j(M(e.text),1)]),_:1},8,["class","href","target","rel"]))}}),sn=g(on,[["__scopeId","data-v-93dc4167"]]),rn=["src","alt"],ln=p({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(e){return(t,n)=>{const a=W("VPImage",!0);return e.image?(s(),u(x,{key:0},[typeof e.image=="string"||"src"in e.image?(s(),u("img",G({key:0,class:"VPImage"},typeof e.image=="string"?t.$attrs:{...e.image,...t.$attrs},{src:i(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,rn)):(s(),u(x,{key:1},[k(a,G({class:"dark",image:e.image.dark,alt:e.image.alt},t.$attrs),null,16,["image","alt"]),k(a,G({class:"light",image:e.image.light,alt:e.image.alt},t.$attrs),null,16,["image","alt"])],64))],64)):m("",!0)}}}),J=g(ln,[["__scopeId","data-v-ab19afbb"]]),cn={class:"container"},un={class:"main"},dn={class:"heading"},vn=["innerHTML"],fn=["innerHTML"],hn=["innerHTML"],mn={key:0,class:"actions"},pn={key:0,class:"image"},kn={class:"image-container"},_n=p({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(e){const t=Z("hero-image-slot-exists");return(n,a)=>(s(),u("div",{class:N(["VPHero",{"has-image":e.image||i(t)}])},[d("div",cn,[d("div",un,[c(n.$slots,"home-hero-info-before",{},void 0,!0),c(n.$slots,"home-hero-info",{},()=>[d("h1",dn,[e.name?(s(),u("span",{key:0,innerHTML:e.name,class:"name clip"},null,8,vn)):m("",!0),e.text?(s(),u("span",{key:1,innerHTML:e.text,class:"text"},null,8,fn)):m("",!0)]),e.tagline?(s(),u("p",{key:0,innerHTML:e.tagline,class:"tagline"},null,8,hn)):m("",!0)],!0),c(n.$slots,"home-hero-info-after",{},void 0,!0),e.actions?(s(),u("div",mn,[(s(!0),u(x,null,A(e.actions,o=>(s(),u("div",{key:o.link,class:"action"},[k(sn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):m("",!0),c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),e.image||i(t)?(s(),u("div",pn,[d("div",kn,[a[0]||(a[0]=d("div",{class:"image-bg"},null,-1)),c(n.$slots,"home-hero-image",{},()=>[e.image?(s(),_(J,{key:0,class:"image-src",image:e.image},null,8,["image"])):m("",!0)],!0)])])):m("",!0)])],2))}}),bn=g(_n,[["__scopeId","data-v-dd8814ff"]]),gn=p({__name:"VPHomeHero",setup(e){const{frontmatter:t}=L();return(n,a)=>i(t).hero?(s(),_(bn,{key:0,class:"VPHomeHero",name:i(t).hero.name,text:i(t).hero.text,tagline:i(t).hero.tagline,image:i(t).hero.image,actions:i(t).hero.actions},{"home-hero-info-before":h(()=>[c(n.$slots,"home-hero-info-before")]),"home-hero-info":h(()=>[c(n.$slots,"home-hero-info")]),"home-hero-info-after":h(()=>[c(n.$slots,"home-hero-info-after")]),"home-hero-actions-after":h(()=>[c(n.$slots,"home-hero-actions-after")]),"home-hero-image":h(()=>[c(n.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):m("",!0)}}),$n={class:"box"},yn={key:0,class:"icon"},Pn=["innerHTML"],Ln=["innerHTML"],Vn=["innerHTML"],Sn={key:4,class:"link-text"},Tn={class:"link-text-value"},Nn=p({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(e){return(t,n)=>(s(),_(E,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:h(()=>[d("article",$n,[typeof e.icon=="object"&&e.icon.wrap?(s(),u("div",yn,[k(J,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(s(),_(J,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(s(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Pn)):m("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Ln),e.details?(s(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,Vn)):m("",!0),e.linkText?(s(),u("div",Sn,[d("p",Tn,[j(M(e.linkText)+" ",1),n[0]||(n[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):m("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Mn=g(Nn,[["__scopeId","data-v-bd37d1a2"]]),xn={key:0,class:"VPFeatures"},In={class:"container"},wn={class:"items"},An=p({__name:"VPFeatures",props:{features:{}},setup(e){const t=e,n=y(()=>{const a=t.features.length;if(a){if(a===2)return"grid-2";if(a===3)return"grid-3";if(a%3===0)return"grid-6";if(a>3)return"grid-4"}else return});return(a,o)=>e.features?(s(),u("div",xn,[d("div",In,[d("div",wn,[(s(!0),u(x,null,A(e.features,r=>(s(),u("div",{key:r.title,class:N(["item",[n.value]])},[k(Mn,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText,rel:r.rel,target:r.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):m("",!0)}}),Cn=g(An,[["__scopeId","data-v-b1eea84a"]]),Hn=p({__name:"VPHomeFeatures",setup(e){const{frontmatter:t}=L();return(n,a)=>i(t).features?(s(),_(Cn,{key:0,class:"VPHomeFeatures",features:i(t).features},null,8,["features"])):m("",!0)}}),Bn=p({__name:"VPHomeContent",setup(e){const{width:t}=De({initialWidth:0,includeScrollbar:!1});return(n,a)=>(s(),u("div",{class:"vp-doc container",style:Pe(i(t)?{"--vp-offset":`calc(50% - ${i(t)/2}px)`}:{})},[c(n.$slots,"default",{},void 0,!0)],4))}}),En=g(Bn,[["__scopeId","data-v-c141a4bd"]]),Fn=p({__name:"VPHome",setup(e){const{frontmatter:t,theme:n}=L();return(a,o)=>{const r=W("Content");return s(),u("div",{class:N(["VPHome",{"external-link-icon-enabled":i(n).externalLinkIcon}])},[c(a.$slots,"home-hero-before",{},void 0,!0),k(gn,null,{"home-hero-info-before":h(()=>[c(a.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(a.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(a.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(a.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(a.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(a.$slots,"home-hero-after",{},void 0,!0),c(a.$slots,"home-features-before",{},void 0,!0),k(Hn),c(a.$slots,"home-features-after",{},void 0,!0),i(t).markdownStyles!==!1?(s(),_(En,{key:0},{default:h(()=>[k(r)]),_:1})):(s(),_(r,{key:1}))],2)}}}),Dn=g(Fn,[["__scopeId","data-v-e07eaea7"]]),On={},Gn={class:"VPPage"};function Un(e,t){const n=W("Content");return s(),u("div",Gn,[c(e.$slots,"page-top"),k(n),c(e.$slots,"page-bottom")])}const jn=g(On,[["render",Un]]),zn=p({__name:"VPContent",setup(e){const{page:t,frontmatter:n}=L(),{hasSidebar:a}=D();return(o,r)=>(s(),u("div",{class:N(["VPContent",{"has-sidebar":i(a),"is-home":i(n).layout==="home"}]),id:"VPContent"},[i(t).isNotFound?c(o.$slots,"not-found",{key:0},()=>[k(rt)],!0):i(n).layout==="page"?(s(),_(jn,{key:1},{"page-top":h(()=>[c(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":h(()=>[c(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(n).layout==="home"?(s(),_(Dn,{key:2},{"home-hero-before":h(()=>[c(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":h(()=>[c(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":h(()=>[c(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":h(()=>[c(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":h(()=>[c(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):i(n).layout&&i(n).layout!=="doc"?(s(),_(B(i(n).layout),{key:3})):(s(),_(an,{key:4},{"doc-top":h(()=>[c(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":h(()=>[c(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":h(()=>[c(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":h(()=>[c(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":h(()=>[c(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":h(()=>[c(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":h(()=>[c(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":h(()=>[c(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Wn=g(zn,[["__scopeId","data-v-9a6c75ad"]]),Kn={class:"container"},qn=["innerHTML"],Rn=["innerHTML"],Jn=p({__name:"VPFooter",setup(e){const{theme:t,frontmatter:n}=L(),{hasSidebar:a}=D();return(o,r)=>i(t).footer&&i(n).footer!==!1?(s(),u("footer",{key:0,class:N(["VPFooter",{"has-sidebar":i(a)}])},[d("div",Kn,[i(t).footer.message?(s(),u("p",{key:0,class:"message",innerHTML:i(t).footer.message},null,8,qn)):m("",!0),i(t).footer.copyright?(s(),u("p",{key:1,class:"copyright",innerHTML:i(t).footer.copyright},null,8,Rn)):m("",!0)])],2)):m("",!0)}}),Xn=g(Jn,[["__scopeId","data-v-566314d4"]]);function Yn(){const{theme:e,frontmatter:t}=L(),n=$e([]),a=y(()=>n.value.length>0);return Y(()=>{n.value=me(t.value.outline??e.value.outline)}),{headers:n,hasLocalNav:a}}const Qn={class:"menu-text"},Zn={class:"header"},ea={class:"outline"},ta=p({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(e){const t=e,{theme:n}=L(),a=S(!1),o=S(0),r=S(),l=S();function v(b){var P;(P=r.value)!=null&&P.contains(b.target)||(a.value=!1)}F(a,b=>{if(b){document.addEventListener("click",v);return}document.removeEventListener("click",v)}),ie("Escape",()=>{a.value=!1}),Y(()=>{a.value=!1});function f(){a.value=!a.value,o.value=window.innerHeight+Math.min(window.scrollY-t.navHeight,0)}function $(b){b.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Le(()=>{a.value=!1}))}function V(){a.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(b,P)=>(s(),u("div",{class:"VPLocalNavOutlineDropdown",style:Pe({"--vp-vh":o.value+"px"}),ref_key:"main",ref:r},[e.headers.length>0?(s(),u("button",{key:0,onClick:f,class:N({open:a.value})},[d("span",Qn,M(i(Me)(i(n))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(s(),u("button",{key:1,onClick:V},M(i(n).returnToTopLabel||"Return to top"),1)),k(ue,{name:"flyout"},{default:h(()=>[a.value?(s(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",Zn,[d("a",{class:"top-link",href:"#",onClick:V},M(i(n).returnToTopLabel||"Return to top"),1)]),d("div",ea,[k(xe,{headers:e.headers},null,8,["headers"])])],512)):m("",!0)]),_:1})],4))}}),na=g(ta,[["__scopeId","data-v-6b867909"]]),aa={class:"container"},oa=["aria-expanded"],sa={class:"menu-text"},ia=p({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(e){const{theme:t,frontmatter:n}=L(),{hasSidebar:a}=D(),{headers:o}=Yn(),{y:r}=Ve(),l=S(0);U(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Y(()=>{o.value=me(n.value.outline??t.value.outline)});const v=y(()=>o.value.length===0),f=y(()=>v.value&&!a.value),$=y(()=>({VPLocalNav:!0,"has-sidebar":a.value,empty:v.value,fixed:f.value}));return(V,b)=>i(n).layout!=="home"&&(!f.value||i(r)>=l.value)?(s(),u("div",{key:0,class:N($.value)},[d("div",aa,[i(a)?(s(),u("button",{key:0,class:"menu","aria-expanded":e.open,"aria-controls":"VPSidebarNav",onClick:b[0]||(b[0]=P=>V.$emit("open-menu"))},[b[1]||(b[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",sa,M(i(t).sidebarMenuLabel||"Menu"),1)],8,oa)):m("",!0),k(na,{headers:i(o),navHeight:l.value},null,8,["headers","navHeight"])])],2)):m("",!0)}}),ra=g(ia,[["__scopeId","data-v-2488c25a"]]);function la(){const e=S(!1);function t(){e.value=!0,window.addEventListener("resize",o)}function n(){e.value=!1,window.removeEventListener("resize",o)}function a(){e.value?n():t()}function o(){window.outerWidth>=768&&n()}const r=Q();return F(()=>r.path,n),{isScreenOpen:e,openScreen:t,closeScreen:n,toggleScreen:a}}const ca={},ua={class:"VPSwitch",type:"button",role:"switch"},da={class:"check"},va={key:0,class:"icon"};function fa(e,t){return s(),u("button",ua,[d("span",da,[e.$slots.default?(s(),u("span",va,[c(e.$slots,"default",{},void 0,!0)])):m("",!0)])])}const ha=g(ca,[["render",fa],["__scopeId","data-v-b4ccac88"]]),ma=p({__name:"VPSwitchAppearance",setup(e){const{isDark:t,theme:n}=L(),a=Z("toggle-appearance",()=>{t.value=!t.value}),o=S("");return fe(()=>{o.value=t.value?n.value.lightModeSwitchTitle||"Switch to light theme":n.value.darkModeSwitchTitle||"Switch to dark theme"}),(r,l)=>(s(),_(ha,{title:o.value,class:"VPSwitchAppearance","aria-checked":i(t),onClick:i(a)},{default:h(()=>[...l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])]),_:1},8,["title","aria-checked","onClick"]))}}),pe=g(ma,[["__scopeId","data-v-be9742d9"]]),pa={key:0,class:"VPNavBarAppearance"},ka=p({__name:"VPNavBarAppearance",setup(e){const{site:t}=L();return(n,a)=>i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",pa,[k(pe)])):m("",!0)}}),_a=g(ka,[["__scopeId","data-v-3f90c1a5"]]),ke=S();let Ie=!1,oe=0;function ba(e){const t=S(!1);if(ee){!Ie&&ga(),oe++;const n=F(ke,a=>{var o,r,l;a===e.el.value||(o=e.el.value)!=null&&o.contains(a)?(t.value=!0,(r=e.onFocus)==null||r.call(e)):(t.value=!1,(l=e.onBlur)==null||l.call(e))});ve(()=>{n(),oe--,oe||$a()})}return Oe(t)}function ga(){document.addEventListener("focusin",we),Ie=!0,ke.value=document.activeElement}function $a(){document.removeEventListener("focusin",we)}function we(){ke.value=document.activeElement}const ya={class:"VPMenuLink"},Pa=["innerHTML"],La=p({__name:"VPMenuLink",props:{item:{}},setup(e){const{page:t}=L();return(n,a)=>(s(),u("div",ya,[k(E,{class:N({active:i(z)(i(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,Pa)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),te=g(La,[["__scopeId","data-v-7eeeb2dc"]]),Va={class:"VPMenuGroup"},Sa={key:0,class:"title"},Ta=p({__name:"VPMenuGroup",props:{text:{},items:{}},setup(e){return(t,n)=>(s(),u("div",Va,[e.text?(s(),u("p",Sa,M(e.text),1)):m("",!0),(s(!0),u(x,null,A(e.items,a=>(s(),u(x,null,["link"in a?(s(),_(te,{key:0,item:a},null,8,["item"])):m("",!0)],64))),256))]))}}),Na=g(Ta,[["__scopeId","data-v-a6b0397c"]]),Ma={class:"VPMenu"},xa={key:0,class:"items"},Ia=p({__name:"VPMenu",props:{items:{}},setup(e){return(t,n)=>(s(),u("div",Ma,[e.items?(s(),u("div",xa,[(s(!0),u(x,null,A(e.items,a=>(s(),u(x,{key:JSON.stringify(a)},["link"in a?(s(),_(te,{key:0,item:a},null,8,["item"])):"component"in a?(s(),_(B(a.component),G({key:1,ref_for:!0},a.props),null,16)):(s(),_(Na,{key:2,text:a.text,items:a.items},null,8,["text","items"]))],64))),128))])):m("",!0),c(t.$slots,"default",{},void 0,!0)]))}}),wa=g(Ia,[["__scopeId","data-v-20ed86d6"]]),Aa=["aria-expanded","aria-label"],Ca={key:0,class:"text"},Ha=["innerHTML"],Ba={key:1,class:"vpi-more-horizontal icon"},Ea={class:"menu"},Fa=p({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(e){const t=S(!1),n=S();ba({el:n,onBlur:a});function a(){t.value=!1}return(o,r)=>(s(),u("div",{class:"VPFlyout",ref_key:"el",ref:n,onMouseenter:r[1]||(r[1]=l=>t.value=!0),onMouseleave:r[2]||(r[2]=l=>t.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":t.value,"aria-label":e.label,onClick:r[0]||(r[0]=l=>t.value=!t.value)},[e.button||e.icon?(s(),u("span",Ca,[e.icon?(s(),u("span",{key:0,class:N([e.icon,"option-icon"])},null,2)):m("",!0),e.button?(s(),u("span",{key:1,innerHTML:e.button},null,8,Ha)):m("",!0),r[3]||(r[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(s(),u("span",Ba))],8,Aa),d("div",Ea,[k(wa,{items:e.items},{default:h(()=>[c(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),_e=g(Fa,[["__scopeId","data-v-bfe7971f"]]),Da=["href","aria-label","innerHTML"],Oa=p({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(e){const t=e,n=S();U(async()=>{var r;await Le();const o=(r=n.value)==null?void 0:r.children[0];o instanceof HTMLElement&&o.className.startsWith("vpi-social-")&&(getComputedStyle(o).maskImage||getComputedStyle(o).webkitMaskImage)==="none"&&o.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${t.icon}.svg')`)});const a=y(()=>typeof t.icon=="object"?t.icon.svg:``);return(o,r)=>(s(),u("a",{ref_key:"el",ref:n,class:"VPSocialLink no-icon",href:e.link,"aria-label":e.ariaLabel??(typeof e.icon=="string"?e.icon:""),target:"_blank",rel:"noopener",innerHTML:a.value},null,8,Da))}}),Ga=g(Oa,[["__scopeId","data-v-60a9a2d3"]]),Ua={class:"VPSocialLinks"},ja=p({__name:"VPSocialLinks",props:{links:{}},setup(e){return(t,n)=>(s(),u("div",Ua,[(s(!0),u(x,null,A(e.links,({link:a,icon:o,ariaLabel:r})=>(s(),_(Ga,{key:a,icon:o,link:a,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}}),be=g(ja,[["__scopeId","data-v-e71e869c"]]),za={key:0,class:"group translations"},Wa={class:"trans-title"},Ka={key:1,class:"group"},qa={class:"item appearance"},Ra={class:"label"},Ja={class:"appearance-action"},Xa={key:2,class:"group"},Ya={class:"item social-links"},Qa=p({__name:"VPNavBarExtra",setup(e){const{site:t,theme:n}=L(),{localeLinks:a,currentLang:o}=q({correspondingLink:!0}),r=y(()=>a.value.length&&o.value.label||t.value.appearance||n.value.socialLinks);return(l,v)=>r.value?(s(),_(_e,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:h(()=>[i(a).length&&i(o).label?(s(),u("div",za,[d("p",Wa,M(i(o).label),1),(s(!0),u(x,null,A(i(a),f=>(s(),_(te,{key:f.link,item:f},null,8,["item"]))),128))])):m("",!0),i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",Ka,[d("div",qa,[d("p",Ra,M(i(n).darkModeSwitchLabel||"Appearance"),1),d("div",Ja,[k(pe)])])])):m("",!0),i(n).socialLinks?(s(),u("div",Xa,[d("div",Ya,[k(be,{class:"social-links-list",links:i(n).socialLinks},null,8,["links"])])])):m("",!0)]),_:1})):m("",!0)}}),Za=g(Qa,[["__scopeId","data-v-f953d92f"]]),eo=["aria-expanded"],to=p({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>(s(),u("button",{type:"button",class:N(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:n[0]||(n[0]=a=>t.$emit("click"))},[...n[1]||(n[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)])],10,eo))}}),no=g(to,[["__scopeId","data-v-6bee1efd"]]),ao=["innerHTML"],oo=p({__name:"VPNavBarMenuLink",props:{item:{}},setup(e){const{page:t}=L();return(n,a)=>(s(),_(E,{class:N({VPNavBarMenuLink:!0,active:i(z)(i(t).relativePath,e.item.activeMatch||e.item.link,!!e.item.activeMatch)}),href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,tabindex:"0"},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,ao)]),_:1},8,["class","href","target","rel","no-icon"]))}}),so=g(oo,[["__scopeId","data-v-815115f5"]]),io=p({__name:"VPNavBarMenuGroup",props:{item:{}},setup(e){const t=e,{page:n}=L(),a=r=>"component"in r?!1:"link"in r?z(n.value.relativePath,r.link,!!t.item.activeMatch):r.items.some(a),o=y(()=>a(t.item));return(r,l)=>(s(),_(_e,{class:N({VPNavBarMenuGroup:!0,active:i(z)(i(n).relativePath,e.item.activeMatch,!!e.item.activeMatch)||o.value}),button:e.item.text,items:e.item.items},null,8,["class","button","items"]))}}),ro={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},lo=p({__name:"VPNavBarMenu",setup(e){const{theme:t}=L();return(n,a)=>i(t).nav?(s(),u("nav",ro,[a[0]||(a[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(s(!0),u(x,null,A(i(t).nav,o=>(s(),u(x,{key:JSON.stringify(o)},["link"in o?(s(),_(so,{key:0,item:o},null,8,["item"])):"component"in o?(s(),_(B(o.component),G({key:1,ref_for:!0},o.props),null,16)):(s(),_(io,{key:2,item:o},null,8,["item"]))],64))),128))])):m("",!0)}}),co=g(lo,[["__scopeId","data-v-afb2845e"]]);function uo(e){const{localeIndex:t,theme:n}=L();function a(o){var I,w,C;const r=o.split("."),l=(I=n.value.search)==null?void 0:I.options,v=l&&typeof l=="object",f=v&&((C=(w=l.locales)==null?void 0:w[t.value])==null?void 0:C.translations)||null,$=v&&l.translations||null;let V=f,b=$,P=e;const T=r.pop();for(const H of r){let O=null;const K=P==null?void 0:P[H];K&&(O=P=K);const ne=b==null?void 0:b[H];ne&&(O=b=ne);const ae=V==null?void 0:V[H];ae&&(O=V=ae),K||(P=O),ne||(b=O),ae||(V=O)}return(V==null?void 0:V[T])??(b==null?void 0:b[T])??(P==null?void 0:P[T])??""}return a}const vo=["aria-label"],fo={class:"DocSearch-Button-Container"},ho={class:"DocSearch-Button-Placeholder"},ge=p({__name:"VPNavBarSearchButton",setup(e){const n=uo({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(a,o)=>(s(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":i(n)("button.buttonAriaLabel")},[d("span",fo,[o[0]||(o[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",ho,M(i(n)("button.buttonText")),1)]),o[1]||(o[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,vo))}}),mo={class:"VPNavBarSearch"},po={id:"local-search"},ko={key:1,id:"docsearch"},_o=p({__name:"VPNavBarSearch",setup(e){const t=Ge(()=>Ue(()=>import("./VPLocalSearchBox.Nz1pInKC.js"),__vite__mapDeps([0,1]))),n=()=>null,{theme:a}=L(),o=S(!1),r=S(!1);U(()=>{});function l(){o.value||(o.value=!0,setTimeout(v,16))}function v(){const b=new Event("keydown");b.key="k",b.metaKey=!0,window.dispatchEvent(b),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||v()},16)}function f(b){const P=b.target,T=P.tagName;return P.isContentEditable||T==="INPUT"||T==="SELECT"||T==="TEXTAREA"}const $=S(!1);ie("k",b=>{(b.ctrlKey||b.metaKey)&&(b.preventDefault(),$.value=!0)}),ie("/",b=>{f(b)||(b.preventDefault(),$.value=!0)});const V="local";return(b,P)=>{var T;return s(),u("div",mo,[i(V)==="local"?(s(),u(x,{key:0},[$.value?(s(),_(i(t),{key:0,onClose:P[0]||(P[0]=I=>$.value=!1)})):m("",!0),d("div",po,[k(ge,{onClick:P[1]||(P[1]=I=>$.value=!0)})])],64)):i(V)==="algolia"?(s(),u(x,{key:1},[o.value?(s(),_(i(n),{key:0,algolia:((T=i(a).search)==null?void 0:T.options)??i(a).algolia,onVnodeBeforeMount:P[2]||(P[2]=I=>r.value=!0)},null,8,["algolia"])):m("",!0),r.value?m("",!0):(s(),u("div",ko,[k(ge,{onClick:l})]))],64)):m("",!0)])}}}),bo=p({__name:"VPNavBarSocialLinks",setup(e){const{theme:t}=L();return(n,a)=>i(t).socialLinks?(s(),_(be,{key:0,class:"VPNavBarSocialLinks",links:i(t).socialLinks},null,8,["links"])):m("",!0)}}),go=g(bo,[["__scopeId","data-v-ef6192dc"]]),$o=["href","rel","target"],yo=["innerHTML"],Po={key:2},Lo=p({__name:"VPNavBarTitle",setup(e){const{site:t,theme:n}=L(),{hasSidebar:a}=D(),{currentLang:o}=q(),r=y(()=>{var f;return typeof n.value.logoLink=="string"?n.value.logoLink:(f=n.value.logoLink)==null?void 0:f.link}),l=y(()=>{var f;return typeof n.value.logoLink=="string"||(f=n.value.logoLink)==null?void 0:f.rel}),v=y(()=>{var f;return typeof n.value.logoLink=="string"||(f=n.value.logoLink)==null?void 0:f.target});return(f,$)=>(s(),u("div",{class:N(["VPNavBarTitle",{"has-sidebar":i(a)}])},[d("a",{class:"title",href:r.value??i(he)(i(o).link),rel:l.value,target:v.value},[c(f.$slots,"nav-bar-title-before",{},void 0,!0),i(n).logo?(s(),_(J,{key:0,class:"logo",image:i(n).logo},null,8,["image"])):m("",!0),i(n).siteTitle?(s(),u("span",{key:1,innerHTML:i(n).siteTitle},null,8,yo)):i(n).siteTitle===void 0?(s(),u("span",Po,M(i(t).title),1)):m("",!0),c(f.$slots,"nav-bar-title-after",{},void 0,!0)],8,$o)],2))}}),Vo=g(Lo,[["__scopeId","data-v-9f43907a"]]),So={class:"items"},To={class:"title"},No=p({__name:"VPNavBarTranslations",setup(e){const{theme:t}=L(),{localeLinks:n,currentLang:a}=q({correspondingLink:!0});return(o,r)=>i(n).length&&i(a).label?(s(),_(_e,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:i(t).langMenuLabel||"Change language"},{default:h(()=>[d("div",So,[d("p",To,M(i(a).label),1),(s(!0),u(x,null,A(i(n),l=>(s(),_(te,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):m("",!0)}}),Mo=g(No,[["__scopeId","data-v-acee064b"]]),xo={class:"wrapper"},Io={class:"container"},wo={class:"title"},Ao={class:"content"},Co={class:"content-body"},Ho=p({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(e){const t=e,{y:n}=Ve(),{hasSidebar:a}=D(),{frontmatter:o}=L(),r=S({});return fe(()=>{r.value={"has-sidebar":a.value,home:o.value.layout==="home",top:n.value===0,"screen-open":t.isScreenOpen}}),(l,v)=>(s(),u("div",{class:N(["VPNavBar",r.value])},[d("div",xo,[d("div",Io,[d("div",wo,[k(Vo,null,{"nav-bar-title-before":h(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Ao,[d("div",Co,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),k(_o,{class:"search"}),k(co,{class:"menu"}),k(Mo,{class:"translations"}),k(_a,{class:"appearance"}),k(go,{class:"social-links"}),k(Za,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),k(no,{class:"hamburger",active:e.isScreenOpen,onClick:v[0]||(v[0]=f=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),v[1]||(v[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),Bo=g(Ho,[["__scopeId","data-v-9fd4d1dd"]]),Eo={key:0,class:"VPNavScreenAppearance"},Fo={class:"text"},Do=p({__name:"VPNavScreenAppearance",setup(e){const{site:t,theme:n}=L();return(a,o)=>i(t).appearance&&i(t).appearance!=="force-dark"&&i(t).appearance!=="force-auto"?(s(),u("div",Eo,[d("p",Fo,M(i(n).darkModeSwitchLabel||"Appearance"),1),k(pe)])):m("",!0)}}),Oo=g(Do,[["__scopeId","data-v-a3e2920d"]]),Go=["innerHTML"],Uo=p({__name:"VPNavScreenMenuLink",props:{item:{}},setup(e){const t=Z("close-screen");return(n,a)=>(s(),_(E,{class:"VPNavScreenMenuLink",href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,onClick:i(t)},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,Go)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),jo=g(Uo,[["__scopeId","data-v-fa963d97"]]),zo=["innerHTML"],Wo=p({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(e){const t=Z("close-screen");return(n,a)=>(s(),_(E,{class:"VPNavScreenMenuGroupLink",href:e.item.link,target:e.item.target,rel:e.item.rel,"no-icon":e.item.noIcon,onClick:i(t)},{default:h(()=>[d("span",{innerHTML:e.item.text},null,8,zo)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ae=g(Wo,[["__scopeId","data-v-e04f3e85"]]),Ko={class:"VPNavScreenMenuGroupSection"},qo={key:0,class:"title"},Ro=p({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(e){return(t,n)=>(s(),u("div",Ko,[e.text?(s(),u("p",qo,M(e.text),1)):m("",!0),(s(!0),u(x,null,A(e.items,a=>(s(),_(Ae,{key:a.text,item:a},null,8,["item"]))),128))]))}}),Jo=g(Ro,[["__scopeId","data-v-f60dbfa7"]]),Xo=["aria-controls","aria-expanded"],Yo=["innerHTML"],Qo=["id"],Zo={key:0,class:"item"},es={key:1,class:"item"},ts={key:2,class:"group"},ns=p({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(e){const t=e,n=S(!1),a=y(()=>`NavScreenGroup-${t.text.replace(" ","-").toLowerCase()}`);function o(){n.value=!n.value}return(r,l)=>(s(),u("div",{class:N(["VPNavScreenMenuGroup",{open:n.value}])},[d("button",{class:"button","aria-controls":a.value,"aria-expanded":n.value,onClick:o},[d("span",{class:"button-text",innerHTML:e.text},null,8,Yo),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,Xo),d("div",{id:a.value,class:"items"},[(s(!0),u(x,null,A(e.items,v=>(s(),u(x,{key:JSON.stringify(v)},["link"in v?(s(),u("div",Zo,[k(Ae,{item:v},null,8,["item"])])):"component"in v?(s(),u("div",es,[(s(),_(B(v.component),G({ref_for:!0},v.props,{"screen-menu":""}),null,16))])):(s(),u("div",ts,[k(Jo,{text:v.text,items:v.items},null,8,["text","items"])]))],64))),128))],8,Qo)],2))}}),as=g(ns,[["__scopeId","data-v-d99bfeec"]]),os={key:0,class:"VPNavScreenMenu"},ss=p({__name:"VPNavScreenMenu",setup(e){const{theme:t}=L();return(n,a)=>i(t).nav?(s(),u("nav",os,[(s(!0),u(x,null,A(i(t).nav,o=>(s(),u(x,{key:JSON.stringify(o)},["link"in o?(s(),_(jo,{key:0,item:o},null,8,["item"])):"component"in o?(s(),_(B(o.component),G({key:1,ref_for:!0},o.props,{"screen-menu":""}),null,16)):(s(),_(as,{key:2,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):m("",!0)}}),is=p({__name:"VPNavScreenSocialLinks",setup(e){const{theme:t}=L();return(n,a)=>i(t).socialLinks?(s(),_(be,{key:0,class:"VPNavScreenSocialLinks",links:i(t).socialLinks},null,8,["links"])):m("",!0)}}),rs={class:"list"},ls=p({__name:"VPNavScreenTranslations",setup(e){const{localeLinks:t,currentLang:n}=q({correspondingLink:!0}),a=S(!1);function o(){a.value=!a.value}return(r,l)=>i(t).length&&i(n).label?(s(),u("div",{key:0,class:N(["VPNavScreenTranslations",{open:a.value}])},[d("button",{class:"title",onClick:o},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),j(" "+M(i(n).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",rs,[(s(!0),u(x,null,A(i(t),v=>(s(),u("li",{key:v.link,class:"item"},[k(E,{class:"link",href:v.link},{default:h(()=>[j(M(v.text),1)]),_:2},1032,["href"])]))),128))])],2)):m("",!0)}}),cs=g(ls,[["__scopeId","data-v-516e4bc3"]]),us={class:"container"},ds=p({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(e){const t=S(null),n=Se(ee?document.body:null);return(a,o)=>(s(),_(ue,{name:"fade",onEnter:o[0]||(o[0]=r=>n.value=!0),onAfterLeave:o[1]||(o[1]=r=>n.value=!1)},{default:h(()=>[e.open?(s(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:t,id:"VPNavScreen"},[d("div",us,[c(a.$slots,"nav-screen-content-before",{},void 0,!0),k(ss,{class:"menu"}),k(cs,{class:"translations"}),k(Oo,{class:"appearance"}),k(is,{class:"social-links"}),c(a.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):m("",!0)]),_:3}))}}),vs=g(ds,[["__scopeId","data-v-2dd6d0c7"]]),fs={key:0,class:"VPNav"},hs=p({__name:"VPNav",setup(e){const{isScreenOpen:t,closeScreen:n,toggleScreen:a}=la(),{frontmatter:o}=L(),r=y(()=>o.value.navbar!==!1);return Te("close-screen",n),X(()=>{ee&&document.documentElement.classList.toggle("hide-nav",!r.value)}),(l,v)=>r.value?(s(),u("header",fs,[k(Bo,{"is-screen-open":i(t),onToggleScreen:i(a)},{"nav-bar-title-before":h(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":h(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":h(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),k(vs,{open:i(t)},{"nav-screen-content-before":h(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":h(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):m("",!0)}}),ms=g(hs,[["__scopeId","data-v-7ad780c2"]]),ps=["role","tabindex"],ks={key:1,class:"items"},_s=p({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(e){const t=e,{collapsed:n,collapsible:a,isLink:o,isActiveLink:r,hasActiveLink:l,hasChildren:v,toggle:f}=dt(y(()=>t.item)),$=y(()=>v.value?"section":"div"),V=y(()=>o.value?"a":"div"),b=y(()=>v.value?t.depth+2===7?"p":`h${t.depth+2}`:"p"),P=y(()=>o.value?void 0:"button"),T=y(()=>[[`level-${t.depth}`],{collapsible:a.value},{collapsed:n.value},{"is-link":o.value},{"is-active":r.value},{"has-active":l.value}]);function I(C){"key"in C&&C.key!=="Enter"||!t.item.link&&f()}function w(){t.item.link&&f()}return(C,H)=>{const O=W("VPSidebarItem",!0);return s(),_(B($.value),{class:N(["VPSidebarItem",T.value])},{default:h(()=>[e.item.text?(s(),u("div",G({key:0,class:"item",role:P.value},je(e.item.items?{click:I,keydown:I}:{},!0),{tabindex:e.item.items&&0}),[H[1]||(H[1]=d("div",{class:"indicator"},null,-1)),e.item.link?(s(),_(E,{key:0,tag:V.value,class:"link",href:e.item.link,rel:e.item.rel,target:e.item.target},{default:h(()=>[(s(),_(B(b.value),{class:"text",innerHTML:e.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(s(),_(B(b.value),{key:1,class:"text",innerHTML:e.item.text},null,8,["innerHTML"])),e.item.collapsed!=null&&e.item.items&&e.item.items.length?(s(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:w,onKeydown:ze(w,["enter"]),tabindex:"0"},[...H[0]||(H[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)])],32)):m("",!0)],16,ps)):m("",!0),e.item.items&&e.item.items.length?(s(),u("div",ks,[e.depth<5?(s(!0),u(x,{key:0},A(e.item.items,K=>(s(),_(O,{key:K.text,item:K,depth:e.depth+1},null,8,["item","depth"]))),128)):m("",!0)])):m("",!0)]),_:1},8,["class"])}}}),bs=g(_s,[["__scopeId","data-v-0009425e"]]),gs=p({__name:"VPSidebarGroup",props:{items:{}},setup(e){const t=S(!0);let n=null;return U(()=>{n=setTimeout(()=>{n=null,t.value=!1},300)}),We(()=>{n!=null&&(clearTimeout(n),n=null)}),(a,o)=>(s(!0),u(x,null,A(e.items,r=>(s(),u("div",{key:r.text,class:N(["group",{"no-transition":t.value}])},[k(bs,{item:r,depth:0},null,8,["item"])],2))),128))}}),$s=g(gs,[["__scopeId","data-v-51288d80"]]),ys={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Ps=p({__name:"VPSidebar",props:{open:{type:Boolean}},setup(e){const{sidebarGroups:t,hasSidebar:n}=D(),a=e,o=S(null),r=Se(ee?document.body:null);F([a,o],()=>{var v;a.open?(r.value=!0,(v=o.value)==null||v.focus()):r.value=!1},{immediate:!0,flush:"post"});const l=S(0);return F(t,()=>{l.value+=1},{deep:!0}),(v,f)=>i(n)?(s(),u("aside",{key:0,class:N(["VPSidebar",{open:e.open}]),ref_key:"navEl",ref:o,onClick:f[0]||(f[0]=Ke(()=>{},["stop"]))},[f[2]||(f[2]=d("div",{class:"curtain"},null,-1)),d("nav",ys,[f[1]||(f[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(v.$slots,"sidebar-nav-before",{},void 0,!0),(s(),_($s,{items:i(t),key:l.value},null,8,["items"])),c(v.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):m("",!0)}}),Ls=g(Ps,[["__scopeId","data-v-42c4c606"]]),Vs=p({__name:"VPSkipLink",setup(e){const{theme:t}=L(),n=Q(),a=S();F(()=>n.path,()=>a.value.focus());function o({target:r}){const l=document.getElementById(decodeURIComponent(r.hash).slice(1));if(l){const v=()=>{l.removeAttribute("tabindex"),l.removeEventListener("blur",v)};l.setAttribute("tabindex","-1"),l.addEventListener("blur",v),l.focus(),window.scrollTo(0,0)}}return(r,l)=>(s(),u(x,null,[d("span",{ref_key:"backToTop",ref:a,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o},M(i(t).skipToContentLabel||"Skip to content"),1)],64))}}),Ss=g(Vs,[["__scopeId","data-v-fcbfc0e0"]]),Ts=p({__name:"Layout",setup(e){const{isOpen:t,open:n,close:a}=D(),o=Q();F(()=>o.path,a),ut(t,a);const{frontmatter:r}=L(),l=qe(),v=y(()=>!!l["home-hero-image"]);return Te("hero-image-slot-exists",v),(f,$)=>{const V=W("Content");return i(r).layout!==!1?(s(),u("div",{key:0,class:N(["Layout",i(r).pageClass])},[c(f.$slots,"layout-top",{},void 0,!0),k(Ss),k(Ye,{class:"backdrop",show:i(t),onClick:i(a)},null,8,["show","onClick"]),k(ms,null,{"nav-bar-title-before":h(()=>[c(f.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":h(()=>[c(f.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":h(()=>[c(f.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":h(()=>[c(f.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":h(()=>[c(f.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":h(()=>[c(f.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),k(ra,{open:i(t),onOpenMenu:i(n)},null,8,["open","onOpenMenu"]),k(Ls,{open:i(t)},{"sidebar-nav-before":h(()=>[c(f.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":h(()=>[c(f.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),k(Wn,null,{"page-top":h(()=>[c(f.$slots,"page-top",{},void 0,!0)]),"page-bottom":h(()=>[c(f.$slots,"page-bottom",{},void 0,!0)]),"not-found":h(()=>[c(f.$slots,"not-found",{},void 0,!0)]),"home-hero-before":h(()=>[c(f.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":h(()=>[c(f.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":h(()=>[c(f.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":h(()=>[c(f.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":h(()=>[c(f.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":h(()=>[c(f.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":h(()=>[c(f.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":h(()=>[c(f.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":h(()=>[c(f.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":h(()=>[c(f.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":h(()=>[c(f.$slots,"doc-before",{},void 0,!0)]),"doc-after":h(()=>[c(f.$slots,"doc-after",{},void 0,!0)]),"doc-top":h(()=>[c(f.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":h(()=>[c(f.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":h(()=>[c(f.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":h(()=>[c(f.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":h(()=>[c(f.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":h(()=>[c(f.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":h(()=>[c(f.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":h(()=>[c(f.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),k(Xn),c(f.$slots,"layout-bottom",{},void 0,!0)],2)):(s(),_(V,{key:1}))}}}),Ns=g(Ts,[["__scopeId","data-v-d8b57b2d"]]),xs={Layout:Ns,enhanceApp:({app:e})=>{e.component("Badge",Re)}};export{uo as c,xs as t,L as u}; diff --git a/assets/content_1.introduction_1.overview.md.CxYdc5QO.js b/assets/content_1.introduction_1.overview.md.CxYdc5QO.js new file mode 100644 index 0000000..98ffb7b --- /dev/null +++ b/assets/content_1.introduction_1.overview.md.CxYdc5QO.js @@ -0,0 +1 @@ +import{_ as n,c as o,o as r,ag as e}from"./chunks/framework.CA4hJK0u.js";const u=JSON.parse('{"title":"AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/1.overview.md","filePath":"content/1.introduction/1.overview.md","lastUpdated":1766137123000}'),a={name:"content/1.introduction/1.overview.md"};function i(s,t,l,g,d,c){return r(),o("div",null,[...t[0]||(t[0]=[e('

AgentKit

产品定位

AgentKit 是火山引擎推出的企业级 AI Agent 开发平台,为开发者提供完整的 Agent 构建、部署和运维解决方案。平台通过标准化的开发工具链和云原生基础设施,显著降低复杂智能体应用的开发部署门槛。

核心优势

  • 声明式应用定义:通过简洁的 YAML 文件定义智能体应用的核心组件和配置,实现"一次定义,处处运行"。
  • 模块化与可扩展:内置丰富的 Tool(工具)、Memory(记忆)、Knowledge(知识库)等模块,并提供标准化的接口,方便开发者自定义和扩展。
  • 云原生部署:与 AgentKit Platform 无缝集成,支持一键将应用部署到云端,并提供弹性伸缩、持续集成和高可用保障。
  • 多智能体协作:支持构建多个 Agent 协同工作的复杂系统,实现任务的分解、协作和汇总,支持 A2A 协议 Agent。
  • 全面的生命周期管理:提供从项目初始化、本地调试、云端部署到线上运维的全套 agentkit CLI 工具链。
  • 多语言支持:支持 Python 和 Golang 开发,满足不同技术栈需求。
  • 丰富的项目模板:提供多种预置模板,包括基础应用、流式输出、A2A 协议等,快速启动开发。

架构理念

AgentKit 的核心设计理念是将 Agent App定义执行分离。

  • 应用定义(Definition):开发者通过 agentkit.yaml 文件声明式地定义应用的元数据、依赖、运行时环境和所需使用的平台服务(如知识库、记忆模块等)。
  • 应用执行(Execution)agentkit CLI 和 AgentKit Platform 负责解析定义文件,并自动完成环境准备、代码打包、镜像构建、持续集成和云端部署等一系列繁琐工作。

这种分离的设计使得开发者可以专注于业务逻辑的实现,而将复杂的工程化问题交给 AgentKit 来处理,敏捷构建,快速生产级落地。

适用场景

  • 智能问答机器人:快速构建集成知识库的智能问答服务。
  • 自动化工作流:创建能够自动执行一系列任务(如发送邮件、生成报告、调用 API)的自动化流程。
  • 复杂数据分析:构建能够理解用户意图、查询数据库、分析数据并生成可视化报告的数据分析 Agent
  • 多智能体系统:设计和部署多个 Agent 协同完成复杂任务的系统,例如"研究员-分析师-报告员"模式。

开始使用

  • 安装 AgentKit:了解如何安装 AgentKit。
  • 快速开始:通过一个简单的示例,快速体验从开发到部署的全过程。
',13)])])}const A=n(a,[["render",i]]);export{u as __pageData,A as default}; diff --git a/assets/content_1.introduction_1.overview.md.CxYdc5QO.lean.js b/assets/content_1.introduction_1.overview.md.CxYdc5QO.lean.js new file mode 100644 index 0000000..7176609 --- /dev/null +++ b/assets/content_1.introduction_1.overview.md.CxYdc5QO.lean.js @@ -0,0 +1 @@ +import{_ as n,c as o,o as r,ag as e}from"./chunks/framework.CA4hJK0u.js";const u=JSON.parse('{"title":"AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/1.overview.md","filePath":"content/1.introduction/1.overview.md","lastUpdated":1766137123000}'),a={name:"content/1.introduction/1.overview.md"};function i(s,t,l,g,d,c){return r(),o("div",null,[...t[0]||(t[0]=[e("",13)])])}const A=n(a,[["render",i]]);export{u as __pageData,A as default}; diff --git a/assets/content_1.introduction_2.installation.md.B_uDtPtx.js b/assets/content_1.introduction_2.installation.md.B_uDtPtx.js new file mode 100644 index 0000000..151727f --- /dev/null +++ b/assets/content_1.introduction_2.installation.md.B_uDtPtx.js @@ -0,0 +1,48 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"安装 AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/2.installation.md","filePath":"content/1.introduction/2.installation.md","lastUpdated":1766137123000}'),l={name:"content/1.introduction/2.installation.md"};function e(h,s,p,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t(`

安装 AgentKit

本指南将引导您完成 AgentKit 的安装和基本配置。

环境要求

  • Python 版本: 3.10 或更高版本
  • 操作系统: Linux, macOS
  • 包管理器: 推荐使用 uvpip

我们强烈建议在 Python 虚拟环境 中安装 AgentKit,以避免与系统包产生冲突。

安装方法

方法一:pip 安装

稳定版本

适用于生产环境部署:

bash
pip install agentkit-sdk-python

开发版本

包含最新功能和修复:

bash
pip install --pre agentkit-sdk-python

指定版本

安装特定版本:

bash
pip install agentkit-sdk-python==0.1.7

方法二:uv 安装(推荐)

我们推荐使用 uv 来管理虚拟环境和依赖。

bash
# install uv
+curl -LsSf https://astral.sh/uv/install.sh | sh
+
+# Initialize uv environment
+uv init --no-workspace
+
+# Specify Python version for the environment
+uv venv --python 3.12
+
+# Activate the virtual environment
+source .venv/bin/activate
+
+# Install AgentKit using uv
+uv pip install agentkit-sdk-python
+
+# Install veadk (recommended for local debugging)
+uv pip install veadk-python

方法三:源码安装

适用于开发者和需要定制化场景:

从官方Github仓库安装

bash
# clone repo
+git clone git@github.com:volcengine/agentkit-sdk-python.git
+
+cd agentkit-sdk-python
+
+# we use uv to build this project
+uv venv --python 3.12
+
+# Activate the virtual environment
+source .venv/bin/activate
+
+# only install necessary requirements
+uv sync
+
+# install agentkit-sdk-python with editable mode
+uv pip install -e .

如果您习惯使用 pipvenv,也可以执行以下命令:

bash
# Create virtual environment
+python3 -m venv .venv
+
+# Activate virtual environment
+source .venv/bin/activate
+
+# Install AgentKit
+pip install agentkit-sdk-python

3. 验证安装

安装完成后,执行以下命令验证 agentkit CLI 是否可用:

bash
agentkit --version

如果成功输出版本号,则说明 AgentKit 已成功安装。

认证配置

在使用 agentkit CLI 与 AgentKit Platform 交互之前,您需要配置访问凭证(AK/SK)。

推荐方式:使用全局配置

使用 AgentKit 的全局配置功能来安全地存储您的凭证:

bash
# 初始化全局配置
+agentkit config --global --init
+
+# 设置您的访问凭证
+agentkit config --global --set volcengine.access_key="YOUR_ACCESS_KEY"
+agentkit config --global --set volcengine.secret_key="YOUR_SECRET_KEY"
+
+# 验证配置
+agentkit config --global --show

这种方式将凭证安全地存储在 ~/.agentkit/config.yaml 文件中,避免在 shell 历史记录中暴露敏感信息。

环境变量方式(开发调试)

对于临时开发调试,您可以设置环境变量:

bash
export VOLCENGINE_ACCESS_KEY="YOUR_ACCESS_KEY"
+export VOLCENGINE_SECRET_KEY="YOUR_SECRET_KEY"

⚠️ 注意:出于安全考虑,不建议将包含敏感信息的 export 命令添加到 shell 配置文件(如 ~/.bashrc~/.zshrc)中,因为这可能导致凭证泄露。

下一步

现在您已经成功安装并配置了 AgentKit,可以开始构建您的第一个 Agent 了。

  • 快速开始: 跟随我们的快速开始指南,体验从开发到部署的全过程。
  • 故障排除: 如果遇到问题,可以查阅故障排除指南。
`,42)])])}const g=i(l,[["render",e]]);export{c as __pageData,g as default}; diff --git a/assets/content_1.introduction_2.installation.md.B_uDtPtx.lean.js b/assets/content_1.introduction_2.installation.md.B_uDtPtx.lean.js new file mode 100644 index 0000000..454b030 --- /dev/null +++ b/assets/content_1.introduction_2.installation.md.B_uDtPtx.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"安装 AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/2.installation.md","filePath":"content/1.introduction/2.installation.md","lastUpdated":1766137123000}'),l={name:"content/1.introduction/2.installation.md"};function e(h,s,p,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t("",42)])])}const g=i(l,[["render",e]]);export{c as __pageData,g as default}; diff --git a/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.js b/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.js new file mode 100644 index 0000000..157abf4 --- /dev/null +++ b/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.js @@ -0,0 +1,30 @@ +import{_ as e,a as l}from"./chunks/model_apikey.BbUdt8Yv.js";import{_ as p,c as h,o as k,ag as n,j as i,a,t as o}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"快速入门","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/3.quickstart.md","filePath":"content/1.introduction/3.quickstart.md","lastUpdated":1766137123000}'),r={name:"content/1.introduction/3.quickstart.md"};function g(t,s,d,c,F,y){return k(),h("div",null,[s[5]||(s[5]=n(`

快速入门

本指南将引导您使用 “Basic Agent App” 模板开发一个简单的 Agent,快速体验 AgentKit 从开发、部署到测试的全流程。AgentKit 提供多种模板,包括基础应用、流式输出、A2A 协议等,支持 Python 和 Golang 开发。

准备工作

1. 获取火山引擎访问密钥 (AK/SK)

首先,您需要一个火山引擎账号并开通 AgentKit 服务。请访问 火山引擎控制台 完成注册和开通。

然后,在 访问控制 页面创建并获取访问密钥 (AK/SK)。

获取后,请将其设置为环境变量:

bash
export VOLCENGINE_ACCESS_KEY=<your_access_key>
+export VOLCENGINE_SECRET_KEY=<your_secret_key>

2. 获取模型推理 API Key (可选)

您的 Agent 通常需要调用大语言模型 (LLM) 来提供核心智能。AgentKit Platform 支持火山方舟的多种模型。请确保您已开通 火山方舟 服务,并获取模型推理的 EndpointAPI Key

  • 获取推理接入点 (Endpoint): 在方舟平台的「在线推理」页面,您可以选择预置的推理接入点,或创建自定义推理接入点。

    推理接入点

  • 获取 API Key: 在「API Key 管理」页面,选择或创建一个新的 API Key。

    API Key管理

请记录下您的 Endpoint IDep-20250520174054-xxxxx(也可以是模型ID如 deepseek-v3-1-terminus)和 API Key,后续将通过环境变量MODEL_AGENT_NAMEMODEL_AGENT_API_KEY配置给 Agent

如果您不提供这些信息,AgentKit Platform 将在云端部署时自动为您注入一个内置的 doubao-seed-1-6 模型。

3. 本地调试凭证配置 (Local 模式必读)

如果您计划在本地 (Local 模式) 运行和调试 Agent,由于本地环境无法自动注入云端凭证,您必须手动配置访问凭证,否则 Agent 将无法调用大模型。

您可以通过以下两种方式之一配置凭证:

方式一:配置方舟模型凭证

直接指定要使用的模型接入点和 API Key:

bash
# 在 config 时通过 --runtime_envs (-e) 设置
+agentkit config -e MODEL_AGENT_NAME=<your_endpoint_id> -e MODEL_AGENT_API_KEY=<your_api_key>

方式二:配置火山引擎访问密钥

如果配置了火山引擎的 AK/SK,veADK 会尝试自动获取您的模型访问权限:

bash
# 在 config 时通过 --runtime_envs (-e) 设置
+agentkit config -e VOLCENGINE_ACCESS_KEY=<your_access_key> -e VOLCENGINE_SECRET_KEY=<your_secret_key>

注意

  1. 在 Local 模式下,直接在宿主机 shell 中 export 环境变量对容器内无效,必须使用 agentkit config -e 将其写入 agentkit.yamlruntime_envs 中。
  2. 在 Cloud 模式下,Runtime 会自动注入相关凭证,通常无需手动配置上述环境变量。

开始使用

步骤 1: 安装 AgentKit

在开始之前,请确保您已遵循 安装 AgentKit 指南完成 agentkit CLI 的安装和环境配置。

步骤 2: 初始化项目

创建一个项目目录,并使用 agentkit init 命令初始化您的 Agent 应用:

bash
mkdir simple-agent && cd simple-agent
+agentkit init

执行后会显示可用模板列表,选择模板 1 (Basic Agent App)。您也可以使用 --template 参数直接指定模板:

bash
# 使用基础模板
+agentkit init --template basic
+
+# 使用流式输出模板
+agentkit init --template basic_stream
+
+# 查看所有可用模板
+agentkit init --list-templates

命令执行后,将在当前目录生成模板代码和配置文件:

txt
.
+├── agentkit.yaml       # **Agent** 的核心配置文件。
+├── requirements.txt    # 项目的 Python 依赖。
+└── simple_agent.py     # **Agent** 应用的入口文件。

步骤 3: 配置与部署

您可以使用 agentkit launch 命令一键完成应用的构建和云端部署。该命令会使用 agentkit.yaml 文件中的配置。

如果需要自定义配置(例如,指定部署区域、镜像仓库或传入模型密钥),可以手动编辑 agentkit.yaml,或运行 agentkit config 命令,通过交互式向导生成配置。

bash
agentkit config

配置向导会引导您完成以下设置:

通用配置(按 回车 使用默认值):

  • 1.应用名称:Agent 应用名称(默认值为 simple_agent,可直接按回车使用默认值)
  • 2.入口文件:应用入口文件(默认值为 simple_agent.py
  • 3.应用描述:应用描述信息(可选)
  • 4.编程语言:Python 或 Golang(默认 Python)
  • 5.依赖文件:默认 requirements.txtgo.mod
  • 6.Agent应用内部Runtime常用环境变量
    • MODEL_AGENT_NAME:方舟模型接入点 ID(可选)
    • MODEL_AGENT_API_KEY:方舟模型 API Key(可选)
  • 7.部署模式:选择 cloud(云端构建和部署)

云端部署配置

`,41)),i("ul",null,[s[3]||(s[3]=i("li",null,[i("strong",null,"1.服务区域"),a(":默认 "),i("code",null,"cn-beijing")],-1)),i("li",null,[s[0]||(s[0]=i("strong",null,"2.镜像标签",-1)),s[1]||(s[1]=a(":默认 ",-1)),i("code",null,o(t.timestamp),1),s[2]||(s[2]=a(", 会自动渲染为时间戳,格式如20251218154940",-1))]),s[4]||(s[4]=i("li",null,[i("strong",null,"3.CR 镜像仓库"),a(":CLI 会自动生成CR实例名称、CR命名空间和CR仓库名,用户也可手动指定(建议自动即可)")],-1))]),s[6]||(s[6]=n(`

完成配置后,执行 launch 命令即可一键部署:

bash
agentkit launch

该命令会自动完成以下步骤:

  1. 渲染 Dockerfile
  2. 创建项目压缩包并上传到 TOS
  3. 准备 CR(容器镜像仓库)资源
  4. 创建 Pipeline 并执行构建
  5. 部署到 Runtime 环境

部署成功会显示:

bash
 创建Runtime成功: r-ye9j62wydcn****nhsoa, request_id: 20251120***************5344
+等待Runtime状态为Ready...
+💡 提示:Runtime初始化中,请耐心等待,不要中断进程
+ Runtime状态为Ready
+  Runtime状态: Releasing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:23
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com
+100% 部署完成
+ Successfully launched agent: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com
+Built image: agentkit-cli-21076x****-cn-beijing.cr.volces.com/agentkit/myapp:2025112017****
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com

提示:首次部署大约需要 2-3 分钟,请耐心等待。

使用 Agent

调用 Agent

使用 invoke 命令测试 Agent:

bash
agentkit invoke "你好"

如果看到类似下面的输出,恭喜您,第一个 Agent 已成功运行!

text
(agentkit) test@localhost:~/workspace/simple-agent$ agentkit invoke "你好"
+Invoking agent...
+Using default headers: {'user_id': 'agentkit_user', 'session_id': 'agentkit_sample_session'}
+✅ Invocation successful
+📝 Response:
+你好!我是由****团队开发的AI助手,擅长数据科学(信息收集、数据分析等)、文档编写(撰写多章节文章、深度研究报告)以及软件开发(创建网站/应用、解决代码问题等)
+。有什么具体需求,我很乐意为你提供帮助!

下一步

恭喜您完成了第一个 Agent 的开发和部署!

接下来您可以:

  • 探索其他应用模板(MCP、A2A 等)
  • 集成 Memory、Knowledge、Tools 等 Platform 服务,开发更强大的 Agent
  • 使用 agentkit memoryagentkit knowledgeagentkit tools 等命令管理平台服务
`,17))])}const b=p(r,[["render",g]]);export{E as __pageData,b as default}; diff --git a/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.lean.js b/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.lean.js new file mode 100644 index 0000000..0a99526 --- /dev/null +++ b/assets/content_1.introduction_3.quickstart.md.D8kgkZZU.lean.js @@ -0,0 +1 @@ +import{_ as e,a as l}from"./chunks/model_apikey.BbUdt8Yv.js";import{_ as p,c as h,o as k,ag as n,j as i,a,t as o}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"快速入门","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/3.quickstart.md","filePath":"content/1.introduction/3.quickstart.md","lastUpdated":1766137123000}'),r={name:"content/1.introduction/3.quickstart.md"};function g(t,s,d,c,F,y){return k(),h("div",null,[s[5]||(s[5]=n("",41)),i("ul",null,[s[3]||(s[3]=i("li",null,[i("strong",null,"1.服务区域"),a(":默认 "),i("code",null,"cn-beijing")],-1)),i("li",null,[s[0]||(s[0]=i("strong",null,"2.镜像标签",-1)),s[1]||(s[1]=a(":默认 ",-1)),i("code",null,o(t.timestamp),1),s[2]||(s[2]=a(", 会自动渲染为时间戳,格式如20251218154940",-1))]),s[4]||(s[4]=i("li",null,[i("strong",null,"3.CR 镜像仓库"),a(":CLI 会自动生成CR实例名称、CR命名空间和CR仓库名,用户也可手动指定(建议自动即可)")],-1))]),s[6]||(s[6]=n("",17))])}const b=p(r,[["render",g]]);export{E as __pageData,b as default}; diff --git a/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.js b/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.js new file mode 100644 index 0000000..daf4a6a --- /dev/null +++ b/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.js @@ -0,0 +1,5 @@ +import{_ as l,c as a,o as e,ag as t}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"故障排除指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/4.troubleshooting.md","filePath":"content/1.introduction/4.troubleshooting.md","lastUpdated":1766137123000}'),s={name:"content/1.introduction/4.troubleshooting.md"};function n(o,i,r,h,d,c){return e(),a("div",null,[...i[0]||(i[0]=[t(`

故障排除指南

本指南旨在帮助您诊断和解决在使用 AgentKit 过程中可能遇到的常见问题。如果您在此处未找到解决方案,请随时通过 GitHub Issues 与我们联系。

安装问题

1. agentkit 命令未找到

  • 现象: 在终端中执行 agentkit 命令时,系统提示 command not found
  • 原因: 这通常是由于 pip 安装的可执行文件路径未被添加到系统的 PATH 环境变量中。
  • 解决方案:
    • 确认安装路径: 执行 pip show agentkit-sdk-pythonuv pip show agentkit-sdk-python,找到 Location 字段指示的安装路径。
    • 找到可执行文件: 在安装路径下的 bin 目录中(例如 .../site-packages/bin),应该能找到 agentkit 可执行文件。
    • 添加到 PATH: 将此 bin 目录的绝对路径添加到您的 ~/.bashrc~/.zshrc 或其他 Shell 配置文件中。
      bash
      export PATH="/path/to/your/python/bin:$PATH"
    • 重新加载配置: 执行 source ~/.bashrc 或重启终端以使更改生效。

2. 依赖冲突

  • 现象: 在安装 agentkit-sdk-python 时,pip 报告依赖版本冲突。
  • 原因: 您的 Python 环境中可能已存在与 AgentKit 不兼容的库版本。
  • 解决方案:
    • 使用虚拟环境(推荐): 强烈建议在项目中使用 uvvenv 创建一个干净的虚拟环境,以避免与系统级的 Python 包产生冲突。
      bash
      uv venv
      +source .venv/bin/activate
      +uv pip install agentkit-sdk-python
    • 清理环境重新安装: 如果必须使用现有环境,建议先卸载再重新安装:
      bash
      pip uninstall agentkit-sdk-python
      +pip install agentkit-sdk-python

配置问题

1. 环境变量未生效

  • 现象:提示无法连接到 AgentKit Platform 或认证失败。
  • 原因:可能未传入环境变量或传入了错误的环境变量名称
  • 解决方案
    • 确认已设置必需的环境变量
    bash
    echo $VOLCENGINE_ACCESS_KEY
    +echo $VOLCENGINE_SECRET_KEY
    • 确保没有多余的空格或引号
    • 在当前 shell 会话中重新 export 环境变量

2. 配置文件格式错误

  • 现象:执行 agentkit launch 时提示配置文件解析失败。
  • 原因:文件格式问题
  • 解决方案
    • 检查 agentkit.yaml 格式是否正确(注意缩进)
    • 重新运行 agentkit config 生成配置

部署问题

1. CR 创建失败

  • 现象
CreateRegistry: QuotaExceeded.Registry The quota of Registry is exceeded.
  • 原因:账号配额不足
  • 解决方案
    • CR 实例数量超出配额限制
    • agentkit config 中配置为已有的 CR 实例名称
    • 或联系管理员提高配额

2. 镜像构建失败

  • 现象:Pipeline 构建失败,提示依赖安装错误。
  • 原因:依赖安装失败
  • 解决方案
    • 检查 requirements.txt 中的依赖是否正确
    • 确认依赖版本是否兼容 Python 3.12
    • 查看 Pipeline 日志获取详细错误信息 (日志会自动下载到您本地根目录下,您可以注意交互界面的提示,在根目录找到一个类似命名的文件pipeline_failed_****ff20ce223.log)

3. Runtime 部署超时

  • 现象:Runtime 长时间处于 Releasing 状态。
  • 原因:首次部署耗时久,或可能存在资源不足
  • 解决方案
    • 首次部署通常需要 2-3 分钟,请耐心等待
    • 使用 agentkit status 检查状态
    • 如果超过 5 分钟仍未就绪,可能是资源不足,尝试 agentkit destroy 后重新部署

4. Runtime 状态异常

  • 现象:Runtime 状态为 FailedError
  • 原因:Runtime 内部异常
  • 解决方案
    • 检查环境变量配置是否正确(特别是模型 API Key)
    • 查看 AgentKit Platform 控制台的日志
    • 确认应用代码没有启动时错误
    • 尝试使用 agentkit destroy 清理后重新部署

调用问题

1. invoke 调用失败

  • 现象:执行 agentkit invoke 时提示连接失败或超时。
  • 原因:网络问题或 Endpoint 配置错误
  • 解决方案
    • 使用 agentkit status 确认 Runtime 状态为 Ready
    • 检查网络连接
    • 确认 Endpoint 地址正确
    • 检查防火墙或代理设置

2. 模型调用失败

  • 现象:Agent 返回错误,提示模型访问失败。
  • 原因:模型 API Key 配置错误或模型配额用尽
  • 解决方案
    • 确认方舟模型 API Key 配置是否正确
    • 检查接入点 ID 是否有效
    • 确认模型配额是否用尽
    • 登录方舟平台检查 API Key 权限

权限问题

1. AK/SK 认证失败

  • 现象:提示 InvalidAccessKeyIdSignatureDoesNotMatch
  • 原因:AK/SK 配置错误或权限不足
  • 解决方案
    • 确认 AK/SK 正确且有效
    • 检查是否有 AgentKit 服务的访问权限
    • 确认 AK/SK 没有被禁用或过期
    • 联系管理员分配相关权限

2. 资源访问被拒绝

  • 现象:提示 AccessDenied 或权限不足。
  • 原因:账号没有足够的权限执行操作
  • 解决方案
    • 确认账号有相应资源的操作权限
    • 检查 IAM 角色配置
    • 联系管理员授予必要权限

获取帮助

如果以上方案无法解决您的问题,请:

  1. 查看日志

    • 本地日志:检查命令行输出
    • Platform 日志:访问 AgentKit 控制台查看详细日志
  2. 联系支持

    • 提供详细的错误信息和日志
    • 说明复现步骤
    • 附上相关配置文件(注意脱敏)
    • 联系火山引擎技术支持
  3. 查阅文档

`,36)])])}const u=l(s,[["render",n]]);export{p as __pageData,u as default}; diff --git a/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.lean.js b/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.lean.js new file mode 100644 index 0000000..9fb4b45 --- /dev/null +++ b/assets/content_1.introduction_4.troubleshooting.md.UOTF9dWY.lean.js @@ -0,0 +1 @@ +import{_ as l,c as a,o as e,ag as t}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"故障排除指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/1.introduction/4.troubleshooting.md","filePath":"content/1.introduction/4.troubleshooting.md","lastUpdated":1766137123000}'),s={name:"content/1.introduction/4.troubleshooting.md"};function n(o,i,r,h,d,c){return e(),a("div",null,[...i[0]||(i[0]=[t("",36)])])}const u=l(s,[["render",n]]);export{p as __pageData,u as default}; diff --git a/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.js b/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.js new file mode 100644 index 0000000..d853c2c --- /dev/null +++ b/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.js @@ -0,0 +1,54 @@ +import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit CLI 概览","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/1.overview.md","filePath":"content/2.agentkit-cli/1.overview.md","lastUpdated":1768373971000}'),l={name:"content/2.agentkit-cli/1.overview.md"};function e(h,s,k,p,d,r){return t(),a("div",null,[...s[0]||(s[0]=[n(`

AgentKit CLI 概览

AgentKit CLI 是一个为开发者设计的强大命令行工具,旨在简化和加速 Agent 应用的开发、部署和管理全生命周期。无论您是进行本地快速原型验证,还是在生产环境中进行规模化部署,agentkit 命令都能提供一致且高效的开发体验。

核心优势

  • 声明式配置:所有配置通过一个 agentkit.yaml 文件管理,清晰、可移植且易于版本控制。
  • 多环境部署:无缝支持本地开发、混合部署和纯云端部署三种模式,满足不同场景需求。
  • 一键式操作:通过 agentkit launch 等高级命令,将构建、部署等多个步骤合而为一,极大提升效率。
  • 模板化项目:内置多种应用模板,帮助您快速启动项目,无需从零开始。
  • 智能交互:提供 agentkit config 等交互式向导,引导您完成配置,降低学习成本。

主要命令

agentkit CLI 提供了一系列直观的命令来管理您的 Agent 应用:

核心命令

命令功能描述
agentkit init初始化一个新的 Agent 项目,可选择不同的模板。
agentkit config通过交互式向导配置 agentkit.yaml 文件。
agentkit build将您的 Agent 应用构建为 Docker 镜像。
agentkit deploy将已构建的镜像部署到指定环境 (本地或云端)。
agentkit launch一键完成构建和部署,是开发中最常用的命令。
agentkit invoke与已部署的 Agent 进行交互,用于快速测试。
agentkit status查看 Agent 的运行状态和 Endpoint。
agentkit destroy停止并销毁 Agent 实例,释放相关资源。

平台服务命令

命令功能描述
agentkit memory管理 AgentKit Memory 记忆集合。
agentkit knowledge管理 AgentKit Knowledge 知识库。
agentkit tools管理 AgentKit Tools 工具和 Sessions 会话。
agentkit runtime管理 AgentKit Runtime 运行时实例。

想要了解每个命令的详细用法?请查阅 命令详解

三种部署模式

AgentKit CLI 的核心特性之一是其灵活的部署模型,旨在适应从开发到生产的不同阶段。

1. 本地模式 (local)

在您的本地机器上完成构建和部署,非常适合快速开发和调试。

  • 工作流: 源代码本地 Docker 构建本地容器运行
  • 优势: 迭代速度快,支持离线工作,便于直接调试。

2. 云端模式 (cloud)

将代码的构建和部署完全托管在 AgentKit Platform 上,是生产环境的最佳实践。

  • 工作流: 源代码云端自动构建云端镜像仓库生产级 Runtime
  • 优势: 无需本地 Docker 环境,内置可观测性,环境一致性高,安全可靠。

3. 混合模式 (hybrid)

在本地构建镜像,然后将其推送到云端 AgentKit Platform 进行部署。这种模式结合了本地控制和云端能力的优点。

  • 工作流: 源代码本地 Docker 构建上传至云端镜像仓库生产级 Runtime
  • 优势: 兼顾本地构建的灵活性和云端运行环境的稳定性,适合需要自定义构建流程的场景。

配置文件 (agentkit.yaml)

agentkit.yamlAgentKit 项目的核心,它以声明式的方式定义了应用的所有配置。我们强烈建议使用 agentkit config 命令来管理此文件。

yaml
# 通用配置
+common:
+  agent_name: my-agent
+  entry_point: app.py
+  python_version: '3.12'
+  launch_type: cloud # 定义默认的部署模式
+
+# 不同部署模式的特定配置
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: latest
+    runtime_envs:
+      MODEL_API_KEY: "your-api-key"

想要了解所有配置项的详细说明?请查阅 配置详解

快速上手

只需几分钟,即可完成您的第一个 Agent 的部署。

bash
# 1. 初始化项目 (选择 Basic App 模板)
+mkdir my-first-agent && cd my-first-agent
+agentkit init my-first-agent
+
+# 或者指定特定模板
+agentkit init my-first-agent --template basic_stream  # 流式输出模板
+agentkit init my-first-agent --template a2a           # A2A 协议模板
+
+# 2. 配置应用 (通过交互式向导)
+agentkit config
+
+# 3. 一键部署到云端
+agentkit launch
+
+# 4. 测试您的 Agent
+agentkit invoke "你好!"
+
+# 5. 查看运行状态
+agentkit status
+
+# 6. 清理资源(可选)
+agentkit destroy

探索更多功能

bash
# 查看可用模板
+agentkit init --list-templates
+
+# 管理平台服务
+agentkit memory list      # 查看记忆集合
+agentkit knowledge list   # 查看知识库
+agentkit tools list       # 查看工具列表
+agentkit runtime list     # 查看运行时实例

环境要求

✅ 基础环境(所有模式)

  • Python 3.10 或更高版本
  • pip 包管理器
  • 已安装 AgentKit SDK

🐍 Python 开发环境

  • Python 3.10, 3.11, 3.12, 3.13 版本支持
  • 推荐使用 requirements.txt 管理依赖

🐹 Golang 开发环境

  • Golang 1.24 版本支持
  • 使用 go.mod 管理依赖
  • 适用于高性能场景

🐳 本地开发(Local/Hybrid 模式)

  • Docker Desktop 或 Docker Engine 20.10+
  • 确保 Docker 服务已启动

☁️ 云端部署(Cloud/Hybrid 模式)

  • 火山引擎账号
  • 配置访问凭证(AK/SK),推荐使用安全的全局配置方式:
    bash
    # 初始化全局配置
    +agentkit config --global --init
    +
    +# 设置访问凭证
    +agentkit config --global --set volcengine.access_key="your_access_key"
    +agentkit config --global --set volcengine.secret_key="your_secret_key"
    +
    +# (Byteplus 可选)设置默认云服务为 BytePlus
    +agentkit config --global --set defaults.cloud_provider=byteplus
    +
    +# (Byteplus 可选)设置Byteplus访问凭证
    +agentkit config --global --set byteplus.access_key="your_byteplus_access_key"
    +agentkit config --global --set byteplus.secret_key="your_byteplus_secret_key"

下一步

  • 📖 命令详解: 深入了解每个 CLI 命令的参数和用法。
  • ⚙️ 配置详解: 掌握 agentkit.yaml 的所有配置项。
  • 🚀 快速入门: 跟随端到端的教程,从零开始构建一个完整的 Agent 应用。
`,44)])])}const c=i(l,[["render",e]]);export{g as __pageData,c as default}; diff --git a/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.lean.js b/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.lean.js new file mode 100644 index 0000000..82bf9ff --- /dev/null +++ b/assets/content_2.agentkit-cli_1.overview.md.BpjmCrAz.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as t,ag as n}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit CLI 概览","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/1.overview.md","filePath":"content/2.agentkit-cli/1.overview.md","lastUpdated":1768373971000}'),l={name:"content/2.agentkit-cli/1.overview.md"};function e(h,s,k,p,d,r){return t(),a("div",null,[...s[0]||(s[0]=[n("",44)])])}const c=i(l,[["render",e]]);export{g as __pageData,c as default}; diff --git a/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.js b/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.js new file mode 100644 index 0000000..aa67949 --- /dev/null +++ b/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.js @@ -0,0 +1,634 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const o=JSON.parse('{"title":"CLI 命令详解","description":"","frontmatter":{"title":"CLI 命令详解"},"headers":[],"relativePath":"content/2.agentkit-cli/2.commands.md","filePath":"content/2.agentkit-cli/2.commands.md","lastUpdated":1768373971000}'),l={name:"content/2.agentkit-cli/2.commands.md"};function e(p,s,h,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t(`

CLI 命令详解

AgentKit CLI 是您与 AgentKit Platform 交互的核心工具,提供了一套完整的命令集,旨在简化和自动化 Agent 开发、部署和管理的整个生命周期。无论您是初始化新项目、配置云端资源,还是测试和迭代您的 AgentAgentKit CLI 都能提供强大支持。

本篇文档将详细介绍每个命令的功能、参数选项和最佳实践,帮助您高效利用 AgentKit CLI 构建卓越的 Agent 应用。

命令总览

AgentKit CLI 遵循标准的 agentkit <command> [arguments] [options] 格式。

命令功能描述核心应用场景
init初始化项目:创建全新的 Agent 项目或包装现有代码。启动新 Agent 开发、快速部署已有代码。
config配置应用:以交互或非交互方式管理项目配置。设置部署模式、环境变量、镜像标签等。
build构建镜像:将您的 Agent 代码打包成可移植的 Docker 镜像。准备部署、CI/CD 集成。
deploy部署应用:将已构建的镜像发布到目标运行环境。上线或更新 Agent 服务。
launch一键启动:自动完成构建和部署两个步骤。快速迭代、简化上线流程。
invoke测试调用:在本地或云端直接调用 Agent,进行功能验证。调试 Agent 逻辑、验证端到端功能。
status查看状态:获取已部署 Agent 的运行状态和端点信息。监控服务健康状况、获取访问地址。
destroy清理资源:停止并删除已部署的 Agent 实例及相关资源。下线服务、释放云资源。

agentkit init

agentkit init 命令用于引导一个新的 Agent 项目,支持从零开始和基于现有代码两种模式,极大提升了项目启动效率。

使用模式

  1. 模板模式 (Template Mode):从 AgentKit 提供的内置模板创建项目,适合从零开始的开发者。
  2. 包装模式 (Wrapper Mode):将您已有的 veadk Agent 定义文件快速包装成可部署的 AgentKit 项目,实现代码复用。

命令格式

bash
# 模板模式:从预设模板创建
+agentkit init [project_name] [options]
+
+# 包装模式:包装现有的 Agent 定义文件
+agentkit init [project_name] --from-agent <path_to_agent_file> [options]

核心参数

  • project_name (可选):
    • 描述:为您的 Agent 项目指定一个唯一的名称,如 smart-faq-agent
    • 默认值:模板模式下为 simple_agent;包装模式下根据源文件名自动生成 (例如 agentkit-my_agent)。
    • 约束:只能包含字母、数字、下划线 (_) 和中划线 (-)。

模板模式选项

选项描述示例
--template, -t选择项目模板,如 basicbasic_streama2a--template basic
--agent-name设置 Agent 的显示名称。--agent-name "智能客服"
--descriptionAgent 的功能描述,在多 Agent 协作场景中尤为重要。--description "处理常见的用户问题"
--system-prompt定义 Agent 的系统提示词,塑造其角色和行为。--system-prompt "你是一个专业的客服..."
--model-name指定火山引擎方舟平台上的模型名称。--model-name "doubao-pro-32k"
--tools以逗号分隔的工具列表,如 web_search,run_code--tools "web_search"

包装模式选项

选项描述示例
--from-agent, -f(必需) 指定包含 veadk.Agent 定义的现有 Python 文件路径。--from-agent ./my_existing_agent.py
--agent-var当自动检测失败时,手动指定 Agent 对象在文件中的变量名。--agent-var "custom_agent_instance"
--wrapper-type生成的包装器类型,basic (标准) 或 stream (流式)。--wrapper-type stream

通用选项

选项描述默认值
--directory指定创建项目的目标目录。当前目录 (.)

使用示例

模板模式

bash
# 示例 1: 交互式创建,引导您选择模板
+agentkit init my-first-agent
+
+# 示例 2: 直接使用 'basic' 模板创建
+agentkit init weather-report-agent --template basic
+
+# 示例 3:在指定目录创建
+agentkit init my_agent --template basic_stream --directory ./my_agents
+
+# 示例 4:使用简写
+agentkit init weather -t basic
+
+# 示例 5: 自定义 Agent 属性
+agentkit init custom-agent \\
+  --template basic \\
+  --agent-name "高级助理" \\
+  --description "一个具备联网和代码执行能力的 Agent" \\
+  --tools "web_search,run_code"
+
+# 示例 6:创建流式输出的 Agent
+agentkit init stream_agent \\
+  --template basic_stream \\
+  --agent-name "流式对话助手" \\
+  --model-name "doubao-seed-1-6-250615"

包装模式

bash
# 示例 7:包装现有 Agent 文件(自动检测 Agent 变量)
+agentkit init --from-agent ./my_agent.py
+
+# 示例 8:包装并指定项目名称
+agentkit init weather_bot --from-agent ./weather_agent.py
+
+# 示例 9:使用简写和指定 Agent 变量名
+agentkit init -f ./my_agent.py --agent-var my_custom_agent
+
+# 示例 10:生成流式输出包装器
+agentkit init chat_bot \\
+  --from-agent ./chat_agent.py \\
+  --wrapper-type stream
+
+# 示例 11:在指定目录包装
+agentkit init deployed_agent \\
+  --from-agent ../agents/production_agent.py \\
+  --agent-var prod_agent \\
+  --wrapper-type basic \\
+  --directory ./deployment
+
+# 示例 12:完整的包装命令
+agentkit init my_deployed_bot \\
+  -f ~/projects/agents/my_bot.py \\
+  --agent-var bot \\
+  --wrapper-type stream \\
+  --directory ./deploy

最佳实践

  • 从模板开始:对于 AgentKit 新用户,建议从 basic 模板开始,它提供了简洁的项目结构。
  • 利用包装模式:当您已经拥有成熟的 veadk Agent 逻辑时,使用包装模式可以避免重写代码,专注于快速部署。
  • 明确命名:为您的项目和 Agent 取一个描述性的名称,有助于长期维护和团队协作。

运行效果

模板模式输出

当你运行模板模式命令后,会看到类似这样的输出:

     ✨ Build AI Agents with Ease ✨
+
+Available Templates
+┌────┬──────────────────────────┬──────────┬──────────────────────────────────┐
+│ ID │ Name                     │ Type     │ Description                      │
+├────┼──────────────────────────┼──────────┼──────────────────────────────────┤
+│ 1  │ Basic Agent App          │ Basic App│ 基础Agent应用,适合快速入门        │
+│ 2  │ Basic Stream Agent App   │ Stream App│ 支持流式输出的Agent应用           │
+│ 3  │ A2A Agent App            │ A2A App  │ 支持A2A协议的多智能体应用         │
+│ 4  │ Eino A2A Agent App       │ A2A App  │ 基于Eino框架的A2A应用(Golang)  │
+└────┴──────────────────────────┴──────────┴──────────────────────────────────┘
+
+Please select a template by entering the ID (1-2):
+Template ID: 1
+Selected: Basic Agent App
+
+Creating project: my_weather_agent
+Using template: Basic Agent App
+
+✨ Project initialized successfully!
+Template: Basic Agent App
+Entry point: my_weather_agent.py
+Language: Python 3.12
+
+Created files:
+  ✓ my_weather_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

包装模式输出 🆕

当你运行包装模式命令后,会看到类似这样的输出:

     ✨ Build AI Agents with Ease ✨
+
+🔄 Wrapping existing Agent file
+
+Project name: agentkit-my_agent
+Agent file: ./my_agent.py
+Wrapper type: basic
+
+✨ Project initialized successfully!
+Template: Agent Wrapper (Basic)
+Entry point: agentkit-my_agent.py
+Language: Python 3.12
+Agent file: my_agent.py
+Agent variable: agent
+
+Created files:
+  ✓ my_agent.py
+  ✓ agentkit-my_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

包装模式详解 🆕

包装模式是一个强大的功能,让你能够快速将已有的 Agent 定义文件部署到 AgentKit 平台,无需重写代码。

工作原理

  1. 解析 Agent 文件:自动分析你的 Python 文件,识别 Agent 对象定义
  2. 复制源文件:将你的 Agent 文件复制到项目目录
  3. 生成包装器:创建一个新的 Python 文件,导入并包装你的 Agent
  4. 配置部署:生成 agentkit.yaml 和其他必要的部署文件

包装器的作用

生成的包装器文件负责:

  • 导入你的 Agent:从你的文件中导入 Agent 对象
  • 创建 Runner:使用 veadk 的 Runner 包装 Agent
  • 提供部署接口:实现 AgentKit 要求的 @app.entrypoint@app.ping 接口
  • 处理请求/响应:自动处理 HTTP 请求格式转换

Agent 文件要求

你的 Agent 文件需要满足以下条件:

基本要求

python
# 必须是 Python 文件 (.py)
+# 必须包含 Agent 对象定义
+
+from veadk import Agent
+
+# Agent 定义 - 变量名可以是 agent、my_agent 等
+agent = Agent(
+    model="doubao-seed-1-6-250615",
+    description="我的 Agent"
+)

支持的 Agent 变量名

  • 系统会自动检测常见命名:agent, main_agent, my_agent
  • 也可以使用自定义命名,但需要用 --agent-var 参数指定

不支持的情况

  • ❌ 文件中没有 Agent(...) 定义
  • ❌ Agent 定义在函数内部(必须在模块级别)
  • ❌ Agent 对象通过复杂的逻辑生成(需要直接赋值)

包装器类型对比

特性Basic 包装器Stream 包装器
响应方式一次性返回完整结果流式返回(SSE)
适用场景标准对话、短响应长文本生成、实时输出
依赖包veadk-pythonveadk-python + google-adk
配置要求无特殊要求Agent 需要支持流式输出
客户端体验等待后一次性显示逐字显示,更好的交互体验

使用场景

适合使用包装模式的场景

  • ✅ 已有 veadk Agent 代码,想快速部署
  • ✅ 在本地开发调试好的 Agent,准备上线
  • ✅ 多个项目共享同一个 Agent 定义
  • ✅ 想要保持 Agent 代码和部署代码分离

适合使用模板模式的场景

  • ✅ 从零开始创建新 Agent
  • ✅ 学习 AgentKit 开发流程
  • ✅ 需要完整的示例代码作为起点

包装后的项目结构

my_project/
+├── my_agent.py              # 你的原始 Agent 定义
+├── agentkit-my_agent.py     # AgentKit 生成的包装器(入口文件)
+├── requirements.txt         # 依赖列表(含使用提示)
+├── agentkit.yaml           # 部署配置(entry_point 指向包装器)
+└── .dockerignore           # Docker 构建忽略规则

包装器文件示例 (basic 类型):

python
# 导入你的 Agent
+from my_agent import agent
+
+from veadk import Runner
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

常见问题

Q: 找不到 Agent 定义怎么办?

A: 使用 --agent-var 参数明确指定 Agent 变量名:

bash
agentkit init -f ./my_agent.py --agent-var my_custom_agent_name

Q: 可以修改生成的包装器吗?

A: 可以!包装器是标准的 Python 代码,你可以根据需要自由修改。但要注意保持 @app.entrypoint@app.ping 接口不变。

Q: 原始 Agent 文件会被修改吗?

A: 不会!系统只会复制你的文件到目标目录,不会修改原文件。

Q: 如何在包装器中添加额外的依赖?

A: 编辑生成的 requirements.txt 文件,添加你需要的依赖包。文件中已经包含了使用提示。


agentkit config

配置 Agent 应用的参数。支持三种模式:交互式(友好引导)、非交互式(快速更新)和混合模式(灵活组合)。

🆕 全局配置支持:新增全局配置功能(~/.agentkit/config.yaml),可跨项目共享配置。

使用方法

bash
# 项目配置
+agentkit config [参数] [选项]
+
+# 项目级:设置云平台(volcengine/byteplus)
+agentkit config --cloud_provider byteplus
+
+# 全局配置 🆕
+agentkit config --global [选项]

三种配置模式

🎯 交互式模式(默认,推荐首次配置)

无参数运行,系统会一步步引导你填写各项参数:

bash
agentkit config

交互流程示例

[1/7] 🤖 Agent 名称: my_agent
+[2/7] 📝 入口文件: my_agent.py  
+[3/7] 📄 应用描述: 我的天气查询 Agent
+[4/7] 🐍 Python 版本: 3.12
+[5/7] 📦 依赖文件: requirements.txt
+[6/7] 🚀 部署模式(选一个):
+  1. local - 本地构建和运行
+  2. hybrid - 本地构建,云端运行
+  3. cloud - 云端构建和运行(推荐)
+[7/7] 🔐 应用级环境变量(所有模式共享):
+  变量: MODEL_API_KEY=xxxxx

⚡ 非交互式模式(快速更新,适合脚本/CI/CD)

通过命令行参数直接配置,无需手动输入:

bash
# 完整配置示例
+agentkit config \\
+    --agent_name myAgent \\
+    --entry_point agent.py \\
+    --launch_type cloud \\
+    --cloud_provider byteplus \\
+    --image_tag v1.0.0 \\
+    --runtime_envs API_KEY=xxxxx
bash
# 增量更新(只修改部分配置)
+agentkit config --entry_point new_agent.py
+agentkit config --image_tag v1.0.1

🔀 混合模式

部分参数通过命令行指定,其他参数交互式输入:

bash
agentkit config --agent_name myAgent --interactive

主要参数

通用配置参数

参数说明示例
--agent_nameAgent应用名称my_weather_bot
--entry_point入口文件(必须 .py)agent.py
--description应用描述"天气查询助手"
--python_versionPython版本3.12
--dependencies_file依赖文件requirements.txt
--launch_type部署模式local, hybrid, cloud
--cloud_provider / --cloud-provider云平台volcengine, byteplus

环境变量配置(重要⭐)

AgentKit 支持两级环境变量配置:

参数级别说明使用场景
--runtime_envs / -e应用级所有部署模式共享API密钥、模型端点等跨环境配置
--workflow-runtime-envsWorkflow级仅当前部署模式使用调试标志、特定环境配置

使用示例

bash
# 应用级(所有模式共享)
+agentkit config \\
+    -e API_KEY=shared-key \\
+    -e MODEL_ENDPOINT=https://api.example.com
+
+# Workflow级(仅当前模式)
+agentkit config \\
+    --workflow-runtime-envs DEBUG=true \\
+    --workflow-runtime-envs LOCAL_CACHE=/tmp
+
+# 混合使用
+agentkit config \\
+    -e API_KEY=shared \\
+    --workflow-runtime-envs DEBUG=true

配置合并规则

  • 应用级环境变量被所有 workflow 继承
  • Workflow 级环境变量只在当前模式下生效
  • 同名变量:Workflow 级覆盖应用级

Cloud/Hybrid 模式参数

参数说明示例
--region火山引擎区域cn-beijing
--tos_bucketTOS存储桶agentkit-bucket
--image_tag镜像标签v1.0.0, latest
--cr_instance_nameCR实例名称my-cr-instance
--cr_namespace_nameCR命名空间agentkit
--cr_repo_nameCR仓库名称my-agent

💡 提示--cr_* 参数也支持旧的 --ve_cr_* 别名,保持向后兼容。

Runtime 关联资源(Cloud/Hybrid)

你可以通过 agentkit config 把 Runtime 与资源组件进行关联(或解绑),在 agentkit launch/deploy 创建/更新 Runtime 时自动透传到 Runtime API。

支持的关联字段:

  • memory_id:关联 Memory
  • knowledge_id:关联 Knowledge
  • tool_id:关联 Tool
  • mcp_toolset_id:关联 MCP Toolset

命令行配置示例

bash
# 绑定资源
+agentkit config \\
+  --memory_id mem-xxx \\
+  --knowledge_id kb-xxx \\
+  --tool_id tool-xxx \\
+  --mcp_toolset_id mcp-ts-xxx
+
+# 解绑(设置为空字符串)
+agentkit config --memory_id ""

YAML 落盘位置agentkit.yaml):

yaml
launch_types:
+  cloud:  # 或 hybrid
+    runtime_bindings:
+      memory_id: mem-xxx
+      knowledge_id: kb-xxx
+      tool_id: tool-xxx
+      mcp_toolset_id: mcp-ts-xxx

💡 解绑语义说明

  • 配置里 不写某个 key:表示不变更该绑定
  • 配置为 ""null:表示清空/解绑(会在更新 Runtime 时下发清空)

Runtime 网络配置(Cloud/Hybrid)

你可以通过 agentkit config 为 Runtime 设置网络(VPC/私网、公网或双栈)。该配置会在 首次创建 Runtime(CreateRuntime) 时生效。

⚠️ 限制:Runtime 已存在时,agentkit launch/deploy 会走 UpdateRuntime, 而 UpdateRuntime 不支持修改 network_configuration,所以该配置不会影响已有 Runtime 的网络。 如果你需要变更网络,请销毁并重新创建 Runtime。

命令行配置示例(私网)

bash
agentkit config \\
+  --runtime-network-mode private \\
+  --runtime-vpc-id vpc-xxxxxxxx \\
+  --runtime-subnet-id subnet-aaaaaaaa \\
+  --runtime-enable-shared-internet-access

YAML 配置格式agentkit.yaml):

yaml
launch_types:
+  cloud:  # 或 hybrid
+    runtime_network:
+      mode: private            # public | private | both
+      vpc_id: vpc-xxxxxxxx     # private/both 必填
+      enable_shared_internet_access: true  # 仅对 private/both 生效
+      subnet_ids:
+        - subnet-aaaaaaaa

mode 取值说明:

  • public:仅公网访问
  • private:仅私网访问(需要 vpc_id
  • both:同时开启公网与私网(需要 vpc_id

enable_shared_internet_access 说明:

  • 仅当 modeprivateboth 时生效;开启后 Runtime 将使用平台提供的共享公网出口访问公网
  • mode=public 且开启该开关,AgentKit 会报错以避免“看似配置但实际不生效”的误用

控制选项

选项说明
--config, -c指定配置文件路径(默认 agentkit.yaml
--interactive, -i强制使用交互式模式
--dry-run预览模式,显示变更但不保存
--show, -s显示当前配置

全局配置选项 🆕

AgentKit 支持全局配置文件(~/.agentkit/config.yaml),用于跨项目共享配置。

选项说明
--global, -g操作全局配置而非项目配置
--init初始化全局配置文件(创建模板)
--set设置全局配置字段(格式:key=value

支持的全局配置字段

字段说明示例
volcengine.access_key火山引擎 Access KeyAK***
volcengine.secret_key火山引擎 Secret KeySK***
volcengine.region默认区域cn-beijing
cr.instance_nameCR 实例名称team-cr-instance
cr.namespace_nameCR 命名空间agentkit-team
tos.bucketTOS Bucket 名称team-agentkit-builds
tos.prefixTOS 对象前缀agentkit-builds
tos.regionTOS 区域cn-beijing

配置优先级

环境变量 > 项目配置(agentkit.yaml) > 全局配置 > 默认值

使用示例

示例 1:首次配置(交互式)

bash
agentkit config

示例 2:快速更新单个配置项

bash
# 更新入口文件
+agentkit config --entry_point new_agent.py
+
+# 更新镜像标签
+agentkit config --image_tag v1.0.1
+
+# 添加环境变量
+agentkit config -e NEW_KEY=new_value

示例 3:完整的非交互式配置

bash
agentkit config \\
+    --agent_name weather-bot \\
+    --entry_point agent.py \\
+    --description "天气查询助手" \\
+    --launch_type cloud \\
+    --image_tag v1.0.0 \\
+    --region cn-beijing \\
+    -e API_KEY=xxxxx \\
+    -e MODEL_ENDPOINT=https://api.example.com

示例 4:配置预览

bash
# 查看配置变更但不保存
+agentkit config --entry_point agent.py --image_tag v2.0 --dry-run

输出示例:

通用配置 - 变更项:
+┌───────────────┬──────────────┬──────────────┐
+│ 配置项        │ 原值         │ 新值         │
+├───────────────┼──────────────┼──────────────┤
+│ entry_point   │ old_agent.py │ agent.py     │
+│ image_tag     │ v1.0         │ v2.0         │
+└───────────────┴──────────────┴──────────────┘
+
+🔍 预览模式:未保存任何更改

示例 5:查看当前配置

bash
agentkit config --show

示例 6:全局配置管理 🆕

初始化全局配置:

bash
# 创建全局配置模板
+agentkit config --global --init

输出:

✅ 全局配置文件已创建: ~/.agentkit/config.yaml
+
+📝 配置模板已生成,包含以下配置项:
+
+🔐 Volcengine 凭证
+  access_key: ''
+  secret_key: ''
+  region: cn-beijing
+
+📦 CR 配置
+  instance_name: ''
+  namespace_name: ''
+
+🗂️  TOS 配置
+  bucket: ''
+  prefix: agentkit-builds
+  region: cn-beijing

查看全局配置:

bash
agentkit config --global --show

设置全局配置:

bash
# 设置单个字段
+agentkit config --global --set cr.instance_name=team-cr-instance
+agentkit config --global --set tos.bucket=team-bucket
+
+# 设置凭证
+agentkit config --global --set volcengine.access_key=AK***
+agentkit config --global --set volcengine.secret_key=SK***

团队协作场景:

bash
# 1. 团队管理员创建并分享全局配置
+agentkit config --global --init
+vim ~/.agentkit/config.yaml  # 填入团队共享的配置
+
+# 2. 团队成员初始化项目时自动使用全局配置
+agentkit init my-agent
+# agentkit.yaml 中相关字段自动留空,运行时使用全局配置
+
+# 3. 特殊项目可以在 agentkit.yaml 中覆盖全局配置
+agentkit config --cr_instance_name special-cr  # 覆盖全局配置

示例 7:CI/CD 集成

bash
# 在CI/CD流水线中使用
+agentkit config \\
+    --agent_name \${CI_PROJECT_NAME} \\
+    --entry_point agent.py \\
+    --launch_type cloud \\
+    --image_tag \${CI_COMMIT_TAG} \\
+    -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+    
+agentkit launch

环境变量交互式输入

在交互式模式中,环境变量配置支持便捷命令:

🔐 应用级环境变量(输入 KEY=VALUE,空行结束)
+  
+  可用命令:
+  - 输入 KEY=VALUE 添加变量
+  - 输入 'list' 查看已有变量
+  - 输入 'del KEY' 删除某个变量
+  - 输入 'clear' 清空所有
+  - 直接按回车结束输入
+
+变量: MODEL_API_KEY=xxxxx
+✅ 已添加: MODEL_API_KEY
+
+变量: list
+当前变量:
+  MODEL_API_KEY=xxxxx
+
+变量: [回车结束]
+📋 共配置 1 个变量

配置验证

所有配置都会自动验证:

  • 必填项检查:Agent名称、入口文件不能为空
  • 格式验证:入口文件必须以 .py 结尾
  • 选项约束:launch_type 必须是 localhybridcloud
  • 命名规范:Agent名称只能包含字母、数字、下划线、中划线和点

验证失败会显示详细错误信息并退出。

最佳实践

  1. 首次配置用交互式:更友好的引导体验

    bash
    agentkit config
  2. 日常修改用非交互式:快速高效

    bash
    agentkit config --entry_point new_agent.py
  3. CI/CD用非交互式:完全自动化

    bash
    agentkit config --agent_name $PROJECT --image_tag $TAG
  4. 修改前先预览:避免错误

    bash
    agentkit config --entry_point agent.py --dry-run
  5. 环境变量分级管理

    • 应用级:API密钥等跨环境共享
    • Workflow级:调试开关等特定环境配置
  6. 团队协作使用全局配置 🆕:

    bash
    # 团队管理员设置
    +agentkit config --global --init
    +agentkit config --global --set cr.instance_name=team-cr
    +agentkit config --global --set tos.bucket=team-bucket
    +
    +# 团队成员直接使用
    +agentkit init my-agent  # 自动使用全局配置
    +agentkit launch         # 运行时自动使用全局配置
  7. 配置优先级理解

    • 项目配置可以覆盖全局配置
    • 环境变量优先级最高
    • 顺序:环境变量 > 项目配置 > 全局配置 > 默认值

agentkit build

将你的 Agent 代码打包成 Docker 镜像,为部署做准备。

使用方法

bash
agentkit build [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

--platform 构建平台

  • 指定目标平台架构
  • 默认:auto(自动识别)
  • 一般不需要手动设置

--regenerate-dockerfile 强制重新生成 Dockerfile

  • 强制重新生成 Dockerfile,即使已存在
  • 适用场景:配置更新后需要强制刷新 Dockerfile
  • 默认:False

Docker 构建自定义配置 🔧

AgentKit 支持通过 docker_build 配置段自定义 Docker 镜像构建过程。在 agentkit.yaml 中添加以下配置:

配置参数

base_image - 自定义基础镜像

Python 项目(字符串格式):

yaml
docker_build:
+  base_image: "python:3.12-slim"
+  # 或使用 Alpine 镜像
+  base_image: "python:3.12-alpine"

build_script - 自定义构建脚本

  • 路径相对于项目根目录
  • 用于安装系统依赖、编译扩展等
  • 脚本会在构建过程中自动执行
yaml
docker_build:
+  build_script: "scripts/setup.sh"

完整配置示例

Python 项目示例

yaml
agent_name: my-agent
+entry_point: agent.py
+language: Python
+language_version: "3.12"
+dependencies_file: requirements.txt
+launch_type: local
+
+# Docker 构建自定义配置
+docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/setup.sh"

构建脚本示例 (scripts/setup.sh):

bash
#!/bin/bash
+# 安装系统依赖
+apt-get update && apt-get install -y gcc g++ libpq-dev
+# 或 Alpine 系统使用:apk add --no-cache gcc musl-dev postgresql-dev
+
+echo "Custom build script completed"

使用场景

场景配置方式示例
使用轻量级镜像指定 Alpine 基础镜像base_image: "python:3.12-alpine"
安装系统依赖编写构建脚本build_script: "scripts/install_deps.sh"
编译 C 扩展安装编译工具在脚本中安装 gcc、g++ 等
配置证书更新 CA 证书在脚本中运行 update-ca-certificates
多阶段构建分别指定 builder 和 runtime仅 Golang 项目支持

Dockerfile 自动管理

  • Dockerfile 会根据配置自动生成,包含元数据头
  • 配置变化时自动更新(旧版本备份到 .agentkit/dockerfile_backups/
  • 删除元数据头后,AgentKit 不再自动管理该文件
  • 使用 --regenerate-dockerfile 强制重新生成

元数据头示例:

dockerfile
# ============================================================================
+# AUTO-GENERATED by AgentKit v1.x.x
+# ============================================================================
+# Source: agentkit.yaml
+# Checksum: sha256:...
+# Generated: 2025-01-17T10:30:00
+# 
+# This file is automatically generated and managed by AgentKit:
+#   - It will be auto-updated when agentkit.yaml config changes
+#   - To fully customize, remove this header comment
+# ============================================================================

构建过程

根据配置的 launch_type 自动选择构建方式:

🏠 Local 模式(本地构建)

在你的电脑上用 Docker 构建:

🔨 开始构建本地镜像...
+[1/3] 生成 Dockerfile...
+[2/3] Docker 构建镜像...
+[3/3] 验证镜像可用性...
+✅ 构建成功: my-agent:latest

预计耗时:1-3 分钟

☁️ Cloud 模式(云端构建)

在火山引擎上自动构建:

🔨 开始云端构建...
+[1/6] 生成 Dockerfile...
+[2/6] 打包项目代码...
+[3/6] 上传到对象存储...
+[4/6] 准备镜像仓库...
+[5/6] 创建构建流水线...
+[6/6] 执行构建任务...
+✅ 构建成功: xxx.cr.volces.com/agentkit/my-agent:latest

预计耗时:3-5 分钟

构建结果

  • 镜像名称{agent_name}:{image_tag}
  • 镜像信息:自动保存到配置文件
  • 构建记录:包含时间戳、镜像 ID 等

使用示例

bash
# 示例 1:使用默认配置
+agentkit build
+
+# 示例 2:指定配置文件
+agentkit build --config-file ./prod.yaml
+
+# 示例 3:强制重新生成 Dockerfile
+agentkit build --regenerate-dockerfile
+
+# 示例 4:配置更新后强制刷新
+agentkit build --config-file ./prod.yaml --regenerate-dockerfile

自定义构建示例

示例 5:使用 Alpine 基础镜像

  1. 修改 agentkit.yaml
yaml
docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/alpine-setup.sh"
  1. 创建 scripts/alpine-setup.sh
bash
#!/bin/sh
+apk add --no-cache gcc musl-dev postgresql-dev
  1. 构建:
bash
agentkit build

示例 6:安装系统依赖(C 扩展)

  1. 修改 agentkit.yaml
yaml
docker_build:
+  build_script: "scripts/install-deps.sh"
  1. 创建 scripts/install-deps.sh
bash
#!/bin/bash
+apt-get update && apt-get install -y \\
+    gcc g++ \\
+    libpq-dev \\
+    libxml2-dev \\
+    libxslt1-dev
  1. 构建:
bash
agentkit build

示例 7:Golang 多阶段构建

修改 agentkit.yaml

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:3.19"
+  build_script: "scripts/install-certs.sh"

构建:

bash
agentkit build

注意事项

Local 模式前提

  • ✅ 确保 Docker 已安装并运行
  • ✅ Docker daemon 可正常访问

Cloud 模式前提

  • ✅ 设置 AK/SK 环境变量
  • ✅ 确保网络能访问火山引擎

Docker 构建自定义

  • ✅ 构建脚本的路径,请填写相对于项目根目录的相对路径
  • ✅ 脚本会自动获得执行权限
  • ✅ 构建脚本不存在会记录警告但不会中断构建
  • ✅ Dockerfile 自动生成,配置变化时自动更新
  • ✅ 旧版本 Dockerfile 会备份到 .agentkit/dockerfile_backups/
  • ✅ 删除 Dockerfile 元数据头后不再自动管理

提示:构建信息会自动更新到配置文件,供 deploy 命令使用


agentkit deploy

将构建好的镜像启动运行,让 Agent 对外提供服务。

使用方法

bash
agentkit deploy [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

部署过程

根据配置的 launch_type 自动选择部署目标:

🏠 Local 模式(本地部署)

在你的电脑上启动容器:

🚀 开始部署到本地 Docker...
+[1/3] 停止旧版本容器...
+[2/3] 启动新容器...
+[3/3] 验证容器状态...
+✅ 部署成功!容器正在运行
+🌐 访问地址: http://localhost:8000

预计耗时:10-30 秒

☁️ Cloud 模式(云端部署)

在火山引擎上创建 Runtime:

🚀 开始部署到云端平台...
+✅ 生成 Runtime 名称: my-agent-20250120-abc123
+✅ 创建 Runtime: r-xxxxxx
+⏳ 等待 Runtime 就绪...
+✅ Runtime 已就绪!
+🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com

预计耗时:1-2 分钟

使用示例

bash
# 示例 1:部署到默认环境
+agentkit deploy
+
+# 示例 2:部署到生产环境
+agentkit deploy --config-file ./prod.yaml

部署完成后

Local 模式

  • ✅ 容器在本地运行
  • ✅ 可通过 localhost:端口 访问
  • ✅ 自动进行健康检查

Cloud 模式

  • ✅ Runtime 在云端运行
  • ✅ 获得一个公网可访问的 URL
  • ✅ 自动验证 Runtime 状态

agentkit launch

构建 + 部署,一步完成!相当于自动执行 build 再执行 deploy

使用方法

bash
agentkit launch [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

执行流程

🚀 开始启动 Agent...
+
+━━━ 第一步:构建镜像 ━━━
+🔨 读取配置: agentkit.yaml
+🔨 开始构建...
+✅ 构建完成
+
+━━━ 第二步:部署应用 ━━━
+🚀 开始部署...
+✅ 部署完成
+
+✨ Agent 已成功启动!

使用示例

bash
# 示例 1:一键启动
+agentkit launch
+
+# 示例 2:启动到生产环境
+agentkit launch --config-file ./prod.yaml

为什么用 launch

  • 省时省力 - 一个命令代替两个
  • 🔒 版本一致 - 确保构建和部署使用同一配置
  • 🚀 快速迭代 - 改完代码立即测试

agentkit invoke

向已部署的 Agent 发送测试请求,验证功能是否正常。

使用方法

bash
agentkit invoke [消息内容] [选项]

⚠️ 重要:必须提供消息内容或 --payload 选项之一,两者不能同时使用

参数说明

消息内容

  • 直接在命令后面输入要发送的文字,不需要加任何选项标记
  • 会自动包装成 {"prompt": "你的消息"}
  • 不能和 --payload 同时使用
  • 示例:agentkit invoke "你好"agentkit invoke "今天天气怎么样?"

选项

--payload, -p 自定义请求数据

  • 用 JSON 格式指定完整的请求内容
  • 不能和消息内容同时使用
  • 示例:--payload '{"prompt": "你好", "context": "greeting"}'

--headers, -h 自定义请求头

  • 用 JSON 格式指定 HTTP 请求头
  • 默认会自动添加 user_idsession_id
  • 示例:--headers '{"user_id": "test123"}'

--raw 输出原始响应(调试用)

  • 流式调用时:逐条打印服务端推送的 SSE 事件 JSON,便于确认事件格式
  • 非流式调用时:输出紧凑的原始 JSON(不做 pretty indent)
  • 示例:agentkit invoke "你好" --raw

--show-reasoning 输出推理内容(LangChain 调试用)

  • 当流式事件包含 additional_kwargs.reasoning_content 时,增量打印该字段
  • 与最终回答分开显示(先 Reasoning 后 Answer)
  • 示例:agentkit invoke "1+1=?" --show-reasoning

--apikey, -ak API 密钥

  • 云端部署(Cloud 模式)时可能需要
  • 用于身份验证
  • 可选参数

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:当前目录的 agentkit.yaml

使用示例

示例 1:直接发送消息(最简单)

bash
agentkit invoke "今天杭州天气如何?"

等同于发送以下 JSON:

json
{
+  "prompt": "今天杭州天气如何?"
+}

示例 2:自定义请求内容

bash
agentkit invoke --payload '{"prompt": "杭州天气?", "user_location": "杭州"}'

示例 3:带请求头

bash
agentkit invoke \\
+  --payload '{"prompt": "杭州天气?"}' \\
+  --headers '{"user_id": "user123", "session_id": "sess456"}'

示例 4:云端部署(带 API Key)

bash
agentkit invoke "你好" --apikey your_api_key_here

运行效果

💬 正在调用 Agent...
+✅ Runtime ID: r-xxxxxx
+🌐 调用地址: http://xxx.apigateway-cn-beijing.volceapi.com
+✅ 调用成功!
+
+📡 Agent 响应:
+杭州今天天气晴,温度 22°C,适合出行。

注意事项

  • ⚠️ 消息内容和 --payload 只能选一个
  • ⚠️ 云端部署可能需要 API Key
  • ⚠️ 调用前确保 Agent 已部署(用 agentkit status 检查)

agentkit status

查看 Agent 的运行状态,包括是否在线、访问地址等信息。

使用方法

bash
agentkit status [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

输出示例

🏠 Local 模式

✅ 容器名称: my-agent
+✅ 运行状态: running
+🌐 访问地址: http://localhost:8000
+
+详细信息:
+{
+    "container_id": "abc123...",
+    "status": "running",
+    "ports": ["8000:8000"],
+    "created": "2025-01-20 10:00:00",
+    "health": "healthy"
+}

☁️ Cloud 模式

✅ Runtime ID: r-xxxxxx
+✅ 运行状态: Ready
+🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com
+
+详细信息:
+{
+    "runtime_id": "r-xxxxxx",
+    "runtime_name": "my-agent-20250120-abc123",
+    "status": "Ready",
+    "endpoint": "http://xxx.apigateway-cn-beijing.volceapi.com",
+    "image": "xxx.cr.volces.com/agentkit/my-agent:latest",
+    "created_at": "2025-01-20 10:00:00"
+}

状态说明

Local 模式状态

  • running - 正常运行中
  • ⏸️ stopped - 已停止
  • 🔄 restarting - 重启中
  • error - 出现错误

Cloud 模式状态

  • Ready - 就绪,可接收请求
  • 🔄 Releasing - 正在部署
  • Error - 运行错误
  • Failed - 部署失败

使用示例

bash
# 示例 1:查看当前状态
+agentkit status
+
+# 示例 2:查看生产环境状态
+agentkit status --config-file ./prod.yaml

agentkit destroy

停止并删除 Agent 实例,释放资源。⚠️ 这是不可逆操作!

使用方法

bash
agentkit destroy [选项]

参数说明

--force 强制删除

  • 跳过确认提示,直接删除
  • 默认不开启(会要求确认)
  • 谨慎使用!

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

安全确认

默认会要求你确认操作:

🗑️ 准备销毁运行中的 Agent...
+⚠️ 此操作不可恢复!
+确定要继续吗?[y/N]: y

跳过确认(不推荐):

bash
agentkit destroy --force

会删除什么

🏠 Local 模式

  • ✅ 停止 Docker 容器
  • ✅ 删除容器实例
  • ⚠️ 镜像会保留(可手动删除)

☁️ Cloud 模式

  • ✅ 删除 Runtime 实例
  • ✅ 释放云端资源
  • ⚠️ 镜像会保留(可在 CR 中手动删除)

运行效果

🗑️ 开始销毁 Agent 资源...
+✅ 停止 Runtime: r-xxxxxx
+✅ 删除 Runtime 成功
+✅ 资源已清理完成
+
+提示:配置文件和镜像已保留,可随时重新部署。

使用示例

bash
# 示例 1:安全删除(推荐)
+agentkit destroy
+
+# 示例 2:强制删除
+agentkit destroy --force
+
+# 示例 3:删除指定环境
+agentkit destroy --config-file ./dev.yaml

重要提示

  • ⚠️ 不可恢复:删除后无法撤销,数据将永久丢失
  • 配置保留agentkit.yaml 文件不会被删除
  • 镜像保留:Docker 镜像不会被删除,可重新部署
  • 💡 重新部署:随时可以用 agentkit deploy 重新部署

通用选项

所有命令都支持这些选项:

--help 查看帮助

查看任何命令的详细说明和参数:

bash
# 查看某个命令的帮助
+agentkit invoke --help
+agentkit build --help
+
+# 查看所有命令列表
+agentkit --help

--version 查看版本

显示 CLI 版本信息:

bash
agentkit --version
+# 或
+agentkit -v

平台服务命令

AgentKit CLI 提供了丰富的平台服务管理命令,用于管理 Memory、Knowledge、Tools 和 Runtime 等资源。

agentkit memory

管理 AgentKit Memory 记忆集合,支持创建、查看、更新和删除记忆集合。

bash
# 创建记忆集合 (默认 provider-type: MEM0)
+agentkit memory create --name my-memory --description "我的记忆集合"
+
+# 添加外部记忆集合
+agentkit memory add --provider-collection-id <id> --provider-type VIKINGDB_MEMORY --name my-external-memory
+
+# 列出所有记忆集合 (支持分页和过滤)
+agentkit memory list
+agentkit memory list --name-contains "my" --limit 10
+
+# 查看记忆集合详情
+agentkit memory show -m <id>
+
+# 更新记忆集合
+agentkit memory update -m <id> --description "更新后的描述"
+
+# 删除记忆集合
+agentkit memory delete -m <id>
+
+# 获取连接信息
+agentkit memory conn -m <id>
+
+# 查看支持的 Provider 类型
+agentkit memory provider-types

agentkit knowledge

管理 AgentKit Knowledge 知识库,支持知识库的增删改查操作。

bash
# 添加知识库 (连接外部知识库)
+agentkit knowledge add --name my-kb --provider-knowledge-id <id> --provider-type VIKINGDB_KNOWLEDGE
+
+# 列出所有知识库 (支持分页和过滤)
+agentkit knowledge list
+agentkit knowledge list --status Ready
+
+# 查看知识库详情
+agentkit knowledge show -k <id>
+
+# 更新知识库
+agentkit knowledge update -k <id> --description "更新后的描述"
+
+# 删除知识库
+agentkit knowledge delete -k <id>
+
+# 获取连接信息
+agentkit knowledge conn -k <id>
+
+# 查看支持的 Provider 类型
+agentkit knowledge provider-types

agentkit tools

管理 AgentKit Tools 工具和 Sessions 会话,包括工具的生命周期管理和会话操作。

bash
# 工具管理
+# 创建工具 (需要指定 tool-type)
+agentkit tools create --name my-tool --tool-type <type> --description "我的工具"
+# 列出工具 (支持分页和过滤)
+agentkit tools list
+# 查看工具详情
+agentkit tools show -t <id>
+# 更新工具
+agentkit tools update -t <id> --description "新描述"
+# 删除工具
+agentkit tools delete -t <id>
+
+# 会话管理
+# 创建会话
+agentkit tools session create -t <id> --name my-session --ttl 30 --ttl-unit minute
+# 列出会话
+agentkit tools session list -t <id>
+# 查看会话详情
+agentkit tools session show -t <id> -s <session_id>
+# 获取会话日志
+agentkit tools session logs -t <id> -s <session_id>
+# 设置会话 TTL
+agentkit tools session set-ttl -t <id> -s <session_id> --ttl 60 --ttl-unit minute
+# 删除会话
+agentkit tools session delete -t <id> -s <session_id>

agentkit runtime

管理 AgentKit Runtime 运行时实例,支持运行时的创建、更新、删除和版本管理。

bash
# 创建运行时 (需要指定 artifact 信息)
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --description "我的运行时"
+
+# 创建运行时并关联资源
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --memory-id mem-xxx \\
+  --knowledge-id kb-xxx \\
+  --tool-id tool-xxx \\
+  --mcp-toolset-id mcp-ts-xxx
+
+# 创建运行时并开启私网访问(VPC)
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --vpc-id vpc-xxxxxxxx \\
+  --subnet-ids subnet-aaaaaaaa \\
+  --enable-private-network \\
+  --enable-public-network false
+
+# 列出所有运行时 (支持分页和过滤)
+agentkit runtime list
+
+# 查看运行时详情
+agentkit runtime get -r <id>
+
+# 更新运行时
+agentkit runtime update -r <id> --description "新描述"
+
+> 💡 提示:\`agentkit runtime update\` 目前仅支持更新 artifact/description/env/tags 以及资源绑定字段(\`memory-id/knowledge-id/tool-id/mcp-toolset-id\`),不支持修改网络配置。
+
+# 删除运行时
+agentkit runtime delete -r <id>
+
+# 发布新版本
+agentkit runtime release -r <id> --version-number <version>
+
+# 查看特定版本详情
+agentkit runtime version -r <id> --version-number <version>
+
+# 列出所有版本
+agentkit runtime versions -r <id>

常用工作流

📝 完整开发流程(模板模式)

从零开始到上线的完整步骤:

bash
# 1️⃣ 创建项目
+agentkit init weather_agent --template basic
+cd weather_agent
+
+# 2️⃣ 配置应用
+agentkit config
+
+# 3️⃣ 一键部署
+agentkit launch
+
+# 4️⃣ 测试功能
+agentkit invoke "杭州天气怎么样?"
+
+# 5️⃣ 查看状态
+agentkit status

🔄 快速部署已有 Agent(包装模式)🆕

将现有的 Agent 快速部署上线:

bash
# 1️⃣ 包装现有 Agent 文件
+agentkit init --from-agent ~/my_projects/weather_agent.py
+
+# 2️⃣ 进入项目目录
+cd agentkit-weather_agent
+
+# 3️⃣ (可选)配置应用
+agentkit config
+
+# 4️⃣ 一键部署
+agentkit launch
+
+# 5️⃣ 测试功能
+agentkit invoke "今天天气如何?"
+
+# 6️⃣ 查看状态
+agentkit status

🔄 快速迭代流程

修改代码后的更新流程:

bash
# 方式 1:分步执行(推荐调试时使用)
+agentkit build        # 重新构建
+agentkit deploy       # 重新部署
+agentkit invoke "测试"  # 测试验证
+
+# 方式 2:一键更新(推荐日常开发)
+agentkit launch       # 自动构建+部署
+agentkit invoke "测试"  # 测试验证

🌍 多环境管理

在开发、测试、生产环境间切换:

bash
# 开发环境
+agentkit launch --config-file agentkit.dev.yaml
+agentkit invoke "测试" --config-file agentkit.dev.yaml
+
+# 生产环境
+agentkit launch --config-file agentkit.prod.yaml
+agentkit invoke "测试" --config-file agentkit.prod.yaml

常见问题

遇到错误不要慌,这里有解决方案!

❌ 配置文件找不到

Error: Configuration file not found: agentkit.yaml

原因:当前目录没有配置文件

解决

bash
# 如果是新项目
+agentkit init my_agent
+
+# 如果已有项目
+agentkit config

❌ Docker 没有运行(Local 模式)

Error: Docker daemon not running

原因:Docker 服务未启动

解决

  • Windows/Mac:打开 Docker Desktop
  • Linux:sudo systemctl start docker

❌ 云端凭证未配置(Cloud 模式)

Error: VOLC_ACCESSKEY or VOLC_SECRETKEY not set

原因:没有设置火山引擎 AK/SK

解决

bash
# 推荐:使用安全的全局配置
+agentkit config --global --init
+agentkit config --global --set volcengine.access_key="你的AccessKey"
+agentkit config --global --set volcengine.secret_key="你的SecretKey"
+
+# 或者:临时环境变量(开发调试用)
+export VOLC_ACCESSKEY="你的AccessKey"
+export VOLC_SECRETKEY="你的SecretKey"

❌ 构建失败

❌ 构建失败: ...

可能原因和解决方案

  1. 依赖问题 - 检查 requirements.txt 是否正确
  2. 代码错误 - 检查 Python 代码是否有语法错误
  3. 网络问题 - 检查网络连接,重试构建
  4. 权限问题 - 确保有 Docker/云端的操作权限

💡 调试技巧

1. 查看详细日志

bash
# 设置详细日志级别
+export LOG_LEVEL=DEBUG
+agentkit build

2. 验证配置文件

bash
# 检查配置是否正确
+cat agentkit.yaml

3. 分步执行

bash
# 分开执行,更容易定位问题
+agentkit build    # 先构建
+agentkit deploy   # 再部署
+# 而不是直接用 launch

4. 检查运行状态

bash
# 查看 Agent 是否正常运行
+agentkit status

下一步

`,435)])])}const c=i(l,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.lean.js b/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.lean.js new file mode 100644 index 0000000..e9df2e3 --- /dev/null +++ b/assets/content_2.agentkit-cli_2.commands.md.Dg4HXmoC.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const o=JSON.parse('{"title":"CLI 命令详解","description":"","frontmatter":{"title":"CLI 命令详解"},"headers":[],"relativePath":"content/2.agentkit-cli/2.commands.md","filePath":"content/2.agentkit-cli/2.commands.md","lastUpdated":1768373971000}'),l={name:"content/2.agentkit-cli/2.commands.md"};function e(p,s,h,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t("",435)])])}const c=i(l,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.js b/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.js new file mode 100644 index 0000000..038ab65 --- /dev/null +++ b/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.js @@ -0,0 +1,347 @@ +import{_ as e,c as h,o as p,ag as l,j as s,t as n,a as t}from"./chunks/framework.CA4hJK0u.js";const A=JSON.parse('{"title":"配置文件详解","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/3.configurations.md","filePath":"content/2.agentkit-cli/3.configurations.md","lastUpdated":1770735100000}'),k={name:"content/2.agentkit-cli/3.configurations.md"},d={tabindex:"0"},r={tabindex:"0"},o={tabindex:"0"};function g(a,i,E,c,y,u){return p(),h("div",null,[i[37]||(i[37]=l(`

配置文件详解

agentkit.yaml 是配置 Agent 的核心文件,包含了所有运行参数。本文档帮你理解每个配置项的作用。

配置系统概览

AgentKit 采用两级配置架构:

配置文件位置作用
项目配置./agentkit.yaml项目级配置,每个 Agent 项目独立
全局配置~/.agentkit/config.yaml用户级配置,跨项目共享(如火山引擎凭证)

配置优先级

环境变量 > 项目配置 > 全局配置 > 默认值

文件结构

项目配置文件由三部分组成:

yaml
common:
+  # 基础配置(所有模式通用)
+  agent_name: my_agent
+  entry_point: my_agent.py
+  language: Python
+  launch_type: cloud
+  runtime_envs: {}           # 应用级环境变量
+
+launch_types:
+  local:
+    # Local 模式的专属配置
+  hybrid:
+    # Hybrid 模式的专属配置
+  cloud:
+    # Cloud 模式的专属配置
+
+docker_build:
+  # Docker 构建配置(可选)
+  base_image: python:3.12-slim
+  build_script: scripts/setup.sh

三个部分

  • common - 通用配置,适用于所有部署模式
  • launch_types - 针对不同部署模式的特定配置
  • docker_build - Docker 构建自定义配置(可选)

common 配置

所有部署模式都需要的基础配置。

配置示例

yaml
common:
+  agent_name: my_weather_agent        # Agent 名称(必填)
+  entry_point: my_weather_agent.py    # 入口文件(必填)
+  description: 天气查询 Agent          # 描述(可选)
+  language: Python                    # 编程语言
+  language_version: '3.12'            # 语言版本
+  dependencies_file: requirements.txt  # 依赖文件
+  launch_type: cloud                  # 部署模式
+  runtime_envs:                       # 应用级环境变量(所有模式共享)
+    LOG_LEVEL: info

配置项详解

agent_name(必填)

Agent 的名字

  • 📝 作用:给你的 Agent 起个名字
  • 规则:只能用字母、数字、_-
  • 🎯 用途
    • Docker 镜像的名字
    • 云端 Runtime 的名字前缀
    • 默认的镜像仓库名

示例

yaml
agent_name: weather_agent           # 推荐:简单清晰
+agent_name: financial-analyzer-v2   # 可以:带版本号
+agent_name: customer_support_bot    # 可以:描述性强

entry_point(必填)

Agent 代码的入口文件

  • 📝 作用:指定运行哪个文件
  • 规则:必须是 .py.go.sh 结尾
  • 🎯 用途:容器启动时运行这个文件

示例

yaml
# Python 项目
+entry_point: app.py
+entry_point: server.py
+
+# Go 项目
+entry_point: main.go
+entry_point: cmd/server/main.go
+
+# 自定义启动脚本
+entry_point: start.sh

description(可选)

Agent 的描述信息

  • 📝 作用:简单描述 Agent 是做什么的
  • 规则:任意文字
  • 🎯 用途:帮助团队成员理解用途

示例

yaml
description: "天气查询 Agent,支持全国主要城市"
+description: "客服助手,处理常见问题"

language(可选)

编程语言

  • 📝 作用:指定项目使用的编程语言
  • 选项PythonGolang
  • 默认Python
  • 🎯 用途:决定 Dockerfile 模板和构建流程

示例

yaml
language: Python    # Python 项目
+language: Golang    # Go 项目

language_version(可选)

语言运行版本

  • 📝 作用:指定语言版本
  • Python 支持3.103.113.123.13
  • Golang 支持1.24
  • 默认:Python 3.12,Golang 1.24

示例

yaml
# Python 项目
+language: Python
+language_version: '3.12'
+
+# Go 项目
+language: Golang
+language_version: '1.24'

⚠️ 注意python_version 已废弃,请使用 language_version

dependencies_file(可选)

依赖包列表文件

  • 📝 作用:指定依赖文件位置
  • 默认:Python 项目为 requirements.txt,Go 项目为 go.mod
  • 🎯 用途:构建时安装这些依赖

示例

yaml
# Python 项目
+dependencies_file: requirements.txt
+dependencies_file: requirements/prod.txt
+
+# Go 项目
+dependencies_file: go.mod

launch_type(必填)

部署和运行模式

  • 📝 作用:选择在哪里构建和运行
  • 选项localhybridcloud
模式适合场景构建位置运行位置
local本地开发调试本地电脑本地电脑
hybrid过渡阶段本地电脑云端平台
cloud生产环境云端平台云端平台

示例

yaml
launch_type: local   # 本地开发
+launch_type: hybrid  # 本地构建 + 云端部署
+launch_type: cloud   # 生产环境(推荐)

cloud_provider(可选)

云厂商(平台服务提供方)

  • 📝 作用:选择平台服务使用 Volcano Engine(CN)或 BytePlus(Overseas)
  • 选项volcenginebyteplus
  • 默认volcengine
  • 🎯 用途
    • 影响默认 region、endpoint、credential 命名空间
    • 影响自动生成 Dockerfile 的默认 base 镜像选择(当未显式配置 docker_build.base_image 时)

优先级(从高到低)

环境变量 > 项目配置(agentkit.yaml) > 全局配置(~/.agentkit/config.yaml) > 默认值

配置方式

yaml
# 1) 项目配置(推荐:写进 agentkit.yaml)
+common:
+  cloud_provider: byteplus
bash
# 1.1) 项目配置(非交互命令写入 agentkit.yaml)
+agentkit config --cloud_provider byteplus
yaml
# 2) 全局配置(跨项目生效)
+defaults:
+  cloud_provider: byteplus
bash
# 3) 环境变量(临时覆盖)
+export CLOUD_PROVIDER=byteplus

runtime_envs(可选)

应用级环境变量

  • 📝 作用:定义所有部署模式共享的环境变量
  • 🎯 用途:传递通用配置,如日志级别
  • ⚠️ 优先级:策略级 runtime_envs 会覆盖应用级同名变量

示例

yaml
common:
+  runtime_envs:
+    LOG_LEVEL: info
+    APP_ENV: production

Local 模式配置

在本地 Docker 上构建和运行,适合开发调试。

配置示例

yaml
launch_types:
+  local:
+    image_tag: latest                  # 镜像标签
+    invoke_port: 8000                  # 应用端口
+    container_name: my_agent           # 容器名称(可选)
+    runtime_envs:                      # 策略级环境变量
+      MODEL_AGENT_API_KEY: xxx
+    ports:                             # 端口映射
+      - "8000:8000"
+    restart_policy: unless-stopped     # 重启策略
+    memory_limit: 1g                   # 内存限制
+    cpu_limit: '1'                     # CPU 限制

配置项详解

image_tag

镜像版本标签

  • 默认:latest
  • 作用:区分不同版本的镜像
  • 示例:latestv1.0dev

invoke_port

Agent 监听的端口

  • 默认:8000
  • 作用:指定应用监听哪个端口
  • ❗ 必须与代码中的端口一致

container_name

Docker 容器名称

  • 默认:使用 agent_name
  • 作用:给容器起个名字
  • 可以留空,自动生成

runtime_envs

策略级运行时环境变量

传递给容器的环境变量,如 API Key、配置参数等。会与 common.runtime_envs 合并,同名变量会覆盖。

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: your_api_key  # 模型 API Key
+  DEBUG: 'true'                      # 开启调试
+  LOG_LEVEL: debug                   # 覆盖 common 中的日志级别

ports

端口映射

将容器内部端口映射到主机端口,格式:主机端口:容器端口

yaml
ports:
+  - "8080:8000"  # 主机 8080 映射到容器 8000
+  - "9090:9090"  # 监控端口

volumes

卷挂载

将主机目录挂载到容器内,格式:主机路径:容器路径

yaml
volumes:
+  - "./data:/app/data"      # 数据目录
+  - "./logs:/app/logs"      # 日志目录

restart_policy

容器重启策略

  • 默认:unless-stopped
  • 选项:
    • no - 不重启
    • on-failure - 失败时重启
    • always - 总是重启
    • unless-stopped - 除非手动停止,否则重启

memory_limit / cpu_limit

资源限制

限制容器使用的资源,防止占用过多。

yaml
memory_limit: 2g    # 限制 2GB 内存
+cpu_limit: '1'      # 限制 1 个 CPU 核

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

字段说明
container_id部署后的容器 ID
image_id构建后的镜像 ID
build_timestamp构建时间
deploy_timestamp部署时间
full_image_name完整镜像名(如 my-agent:latest

Cloud 模式配置

在火山引擎上构建和运行,适合生产环境。

配置示例

yaml
launch_types:
+  cloud:
+    region: cn-beijing                       # 区域
+    image_tag: "{{timestamp}}"               # 镜像标签(支持模板变量)
+    
+    # TOS 对象存储配置
+    tos_bucket: Auto                         # 自动创建存储桶
+    
+    # Container Registry 配置
+    cr_instance_name: Auto                   # CR 实例名(Auto = 自动创建)
+    cr_namespace_name: agentkit              # CR 命名空间
+    cr_repo_name: ""                         # CR 仓库名(空 = 使用 agent_name)
+    
+    # Runtime 配置
+    runtime_name: Auto                       # Runtime 名称
+    runtime_role_name: Auto                  # 授权角色名
+    runtime_apikey_name: Auto                # API Key 密钥名
+    
+    # 环境变量
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # 模型 API Key
+      MODEL_AGENT_NAME: ep-xxx               # 模型接入点

模板变量

Cloud 模式支持模板变量,在构建/部署时自动渲染:

`,114)),s("table",d,[i[4]||(i[4]=s("thead",null,[s("tr",null,[s("th",null,"变量"),s("th",null,"说明"),s("th",null,"示例值")])],-1)),s("tbody",null,[s("tr",null,[s("td",null,[s("code",null,n(a.timestamp),1)]),i[0]||(i[0]=s("td",null,"当前时间戳(YYYYMMDDHHmmss)",-1)),i[1]||(i[1]=s("td",null,[s("code",null,"20251128153042")],-1))]),s("tr",null,[s("td",null,[s("code",null,n(a.account_id),1)]),i[2]||(i[2]=s("td",null,"火山引擎账号 ID",-1)),i[3]||(i[3]=s("td",null,[s("code",null,"2100123456")],-1))])])]),i[38]||(i[38]=l(`

使用示例

yaml
image_tag: "{{timestamp}}"                          # 每次构建唯一 tag
+cr_instance_name: "agentkit-platform-{{account_id}}"     # 账号隔离的 CR 实例
+tos_bucket: "agentkit-platform-{{account_id}}"           # 账号隔离的存储桶

Auto 关键字

当配置值为 Auto 时,CLI 会自动创建或管理对应资源:

`,4)),s("table",r,[i[12]||(i[12]=s("thead",null,[s("tr",null,[s("th",null,"字段"),s("th",null,"Auto 行为")])],-1)),s("tbody",null,[s("tr",null,[i[6]||(i[6]=s("td",null,[s("code",null,"tos_bucket")],-1)),s("td",null,[i[5]||(i[5]=t("自动创建存储桶 ",-1)),s("code",null,"agentkit-platform-"+n(a.account_id),1)])]),s("tr",null,[i[8]||(i[8]=s("td",null,[s("code",null,"cr_instance_name")],-1)),s("td",null,[i[7]||(i[7]=t("自动创建 CR 实例 ",-1)),s("code",null,"agentkit-platform-"+n(a.account_id),1)])]),i[9]||(i[9]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,"自动创建 Runtime")],-1)),i[10]||(i[10]=s("tr",null,[s("td",null,[s("code",null,"runtime_role_name")]),s("td",null,"自动创建授权角色")],-1)),i[11]||(i[11]=s("tr",null,[s("td",null,[s("code",null,"runtime_apikey_name")]),s("td",null,"自动创建 API Key 密钥")],-1))])]),i[39]||(i[39]=l('

配置项详解

region

火山引擎区域

  • 默认:cn-beijing
  • 作用:选择服务运行的地理位置
  • 可选:cn-beijing(目前仅支持北京区域)

💡 建议:选择离用户最近的区域,降低延迟

image_tag

镜像版本标签

',7)),s("ul",null,[s("li",null,[i[13]||(i[13]=t("默认:",-1)),s("code",null,n(a.timestamp),1),i[14]||(i[14]=t("(每次构建生成唯一标签)",-1))]),i[20]||(i[20]=s("li",null,"作用:区分不同版本",-1)),s("li",null,[i[15]||(i[15]=t("示例:",-1)),s("code",null,n(a.timestamp),1),i[16]||(i[16]=t("、",-1)),i[17]||(i[17]=s("code",null,"latest",-1)),i[18]||(i[18]=t("、",-1)),i[19]||(i[19]=s("code",null,"v1.0.0",-1))])]),i[40]||(i[40]=l(`
yaml
# 方式 1:使用时间戳(推荐,确保每次构建唯一)
+image_tag: "{{timestamp}}"
+
+# 方式 2:固定版本
+image_tag: v1.0.0
+
+# 方式 3:使用 latest(不推荐用于生产)
+image_tag: latest

tos_bucket

对象存储桶

  • 默认:Auto(自动创建)
  • 作用:存储代码压缩包(用于云端构建)
  • 安全说明:tos_bucket 必须为当前账号名下的桶;如果填写了他人(例如公共读写)桶名,工具会阻止上传并提示更换
yaml
# 自动创建(推荐)
+tos_bucket: Auto
+
+# 使用已有存储桶
+tos_bucket: my-existing-bucket

cr_instance_name

Container Registry 实例名

  • 默认:Auto(自动创建)
  • 作用:Docker 镜像存储在哪个 CR 实例
yaml
# 自动创建
+cr_instance_name: Auto
+
+# 使用已有实例
+cr_instance_name: my-existing-cr

cr_namespace_name

CR 命名空间

  • 默认:agentkit
  • 作用:组织和管理镜像
  • 自动创建:不存在时自动创建

cr_repo_name

CR 仓库名称

  • 默认:空(使用 agent_name
  • 作用:存储镜像的仓库
  • 自动创建:不存在时自动创建

runtime_name / runtime_role_name / runtime_apikey_name

Runtime 相关配置

  • 默认:Auto(自动创建)
  • 作用:管理云端运行时实例及其认证
yaml
runtime_name: Auto           # Runtime 名称
+runtime_role_name: Auto      # IAM 授权角色
+runtime_apikey_name: Auto    # API Key 密钥名

runtime_envs

策略级运行时环境变量

Agent 运行时需要的配置,最重要的是模型 API 凭证。会与 common.runtime_envs 合并。

必须配置

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: xxx  # 火山方舟 API Key
+  MODEL_AGENT_NAME: ep-xxx  # 火山方舟接入点 ID

可选配置(增强功能):

yaml
runtime_envs:
+  # 基础配置
+  MODEL_AGENT_API_KEY: xxx
+  MODEL_AGENT_NAME: ep-xxx
+  
+  # 可观测性(日志、监控、链路追踪)
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: my_agent
+  
+  # 其他配置
+  DEBUG: 'true'     # 开启调试模式
+  LOG_LEVEL: info   # 设置日志级别

build_timeout

构建超时时间

  • 默认:3600(秒)
  • 作用:云端构建的最大等待时间

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

TOS 存储相关

字段说明
tos_prefix对象存储前缀(默认 agentkit-builds
tos_regionTOS 服务区域
tos_object_key代码包的存储路径
tos_object_url代码包的访问地址

Code Pipeline 构建相关

字段说明
cp_workspace_name构建工作区名称
cp_pipeline_name构建流水线名称
cp_pipeline_id流水线 ID

镜像相关

字段说明
cr_region镜像仓库区域
cr_image_full_url完整的镜像 URL

Runtime 运行时相关

字段说明
runtime_idRuntime 实例 ID
runtime_endpoint应用访问地址
runtime_apikeyRuntime API 密钥
build_timestamp构建时间
deploy_timestamp部署时间

Hybrid 模式配置

本地构建,云端运行。适合开发调试阶段,本地快速构建镜像后推送到云端运行。

配置示例

yaml
launch_types:
+  hybrid:
+    region: cn-beijing                       # 云端区域
+    image_tag: "{{timestamp}}"               # 镜像标签(支持模板变量)
+    
+    # Container Registry 配置
+    cr_instance_name: Auto                   # CR 实例名
+    cr_namespace_name: agentkit              # CR 命名空间
+    cr_repo_name: ""                         # CR 仓库名
+    
+    # Runtime 配置
+    runtime_name: Auto                       # Runtime 名称
+    runtime_role_name: Auto                  # 授权角色名
+    runtime_apikey_name: Auto                # API Key 密钥名
+    
+    # 环境变量
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # 模型 API Key
+      MODEL_AGENT_NAME: ep-xxx               # 模型接入点

与 Cloud 模式的区别

对比项Hybrid 模式Cloud 模式
构建位置本地 Docker云端 Code Pipeline
TOS 配置不需要需要(存储代码包)
构建速度快(本地)较慢(上传+云端构建)
适用场景开发调试生产环境

配置项详解

Hybrid 模式的配置项与 Cloud 模式基本一致,但不需要 TOS 相关配置(因为本地构建不需要上传代码包)。

region

火山引擎区域

  • 默认:cn-beijing
  • 作用:选择云端服务运行的地理位置

image_tag

镜像版本标签

`,53)),s("ul",null,[s("li",null,[i[21]||(i[21]=t("默认:",-1)),s("code",null,n(a.timestamp),1)]),i[22]||(i[22]=s("li",null,"作用:区分不同版本的镜像",-1)),i[23]||(i[23]=s("li",null,"支持模板变量",-1))]),i[41]||(i[41]=l(`

cr_instance_name / cr_namespace_name / cr_repo_name

Container Registry 配置

与 Cloud 模式相同,用于存储本地构建的镜像。

yaml
cr_instance_name: Auto          # 自动创建 CR 实例
+cr_namespace_name: agentkit     # 命名空间
+cr_repo_name: ""                # 仓库名(空 = 使用 agent_name)

runtime_name / runtime_role_name / runtime_apikey_name

Runtime 配置

与 Cloud 模式相同,管理云端运行时实例。

runtime_envs

策略级运行时环境变量

与 Cloud 模式相同,传递给云端运行时的环境变量。

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

字段说明
image_id本地构建的镜像 ID
build_timestamp构建时间
full_image_name完整镜像名
cr_image_full_urlCR 中的完整镜像 URL
runtime_idRuntime 实例 ID
runtime_endpoint应用访问地址
runtime_apikeyRuntime API 密钥

docker_build 配置

自定义 Docker 构建过程,支持自定义基础镜像、构建脚本等。

配置示例

yaml
docker_build:
+  # Python 项目 - 字符串格式
+  base_image: "python:3.12-slim"
+  
+  # 自定义构建脚本
+  build_script: "scripts/setup.sh"
+  
+  # 强制重新生成 Dockerfile
+  regenerate_dockerfile: false
+  
+  # 目标平台(跨平台构建)
+  platform: "linux/amd64"

Go 项目多阶段构建

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"    # 构建阶段镜像
+    runtime: "alpine:latest"         # 运行时镜像
+  build_script: "scripts/install_certs.sh"

配置项详解

base_image

自定义基础镜像

  • 默认:根据语言自动选择
  • Python 默认:使用 AgentKit 预置 base 镜像,并随 common.cloud_provider 自动切换
    • volcengine:agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python<version>-bookworm-slim-latest
    • byteplus:agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python<version>-bookworm-slim-latest
  • Golang 默认:agentkit-cn-beijing.cr.volces.com/base/compile_basego:1.24(构建)+ agentkit-cn-beijing.cr.volces.com/base/runtime_basego:latest(运行)
yaml
# Python 项目 - 字符串
+base_image: "python:3.12-alpine"
+
+# Go 项目 - 字典(多阶段构建)
+base_image:
+  builder: "golang:1.24-alpine"
+  runtime: "alpine:latest"

build_script

自定义构建脚本

  • 默认:无
  • 作用:在 Docker 构建过程中执行自定义脚本
  • 路径:相对于项目根目录

使用场景

  • 安装系统依赖
  • 编译 C 扩展
  • 下载额外资源
yaml
build_script: "scripts/setup.sh"
+build_script: "docker/install_deps.sh"

regenerate_dockerfile

强制重新生成 Dockerfile

  • 默认:false
  • 作用:即使 Dockerfile 已存在,也重新生成
  • CLI 参数:--regenerate-dockerfile

platform

目标 CPU 架构

  • 默认:当前系统架构
  • 作用:跨平台构建
  • CLI 参数:--platform
yaml
platform: "linux/amd64"    # x86_64 架构
+platform: "linux/arm64"    # ARM 架构(如 Apple Silicon)

全局配置

全局配置存储在 ~/.agentkit/config.yaml,跨项目共享。

配置文件位置

~/.agentkit/config.yaml

配置示例

yaml
# 火山引擎凭证
+volcengine:
+  access_key: "AKLTxxxxxxxx"
+  secret_key: "xxxxxxxx"
+  region: "cn-beijing"
+
+# Container Registry 默认配置
+cr:
+  instance_name: "my-team-cr-instance"
+  namespace_name: "my-team"
+
+# TOS 默认配置
+tos:
+  bucket: "my-team-bucket"
+  prefix: "agentkit-builds"
+  region: "cn-beijing"

配置优先级

当项目配置为空或 Auto 时,会自动使用全局配置:

1. 项目配置明确设置的值(最高优先级)
+2. 全局配置 (~/.agentkit/config.yaml)
+3. 默认值(最低优先级)

使用场景

团队共享配置

团队成员可以共享相同的 CR 实例和 TOS 存储桶:

yaml
# ~/.agentkit/config.yaml
+cr:
+  instance_name: "team-shared-cr"
+  namespace_name: "team-agents"
+
+tos:
+  bucket: "team-shared-bucket"

项目配置只需设置 Auto,即可自动使用团队配置:

yaml
# agentkit.yaml
+launch_types:
+  cloud:
+    cr_instance_name: Auto    # 使用全局配置中的 team-shared-cr
+    tos_bucket: Auto          # 使用全局配置中的 team-shared-bucket

最佳实践

🌍 多环境管理

为不同环境创建独立配置文件:

bash
agentkit.dev.yaml   # 开发环境(local 模式)
+agentkit.test.yaml  # 测试环境(hybrid 模式)
+agentkit.prod.yaml  # 生产环境(cloud 模式)

使用方式

bash
# 开发
+agentkit launch --config-file agentkit.dev.yaml
+
+# 生产
+agentkit launch --config-file agentkit.prod.yaml

🔐 安全管理敏感信息

❌ 错误做法(硬编码):

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: c05d49af-1234-5678-abcd-xxxx  # 不要这样!

✅ 正确做法

方案 1:交互式配置

bash
agentkit config  # 运行时输入敏感信息

方案 2:使用 .gitignore

bash
# .gitignore 文件
+agentkit.local.yaml    # 本地配置不提交
+agentkit.prod.yaml     # 生产配置不提交
+*.secret.yaml          # 所有包含密钥的配置

方案 3:创建配置模板

yaml
# agentkit.yaml.template (提交到 Git)
+runtime_envs:
+  MODEL_AGENT_API_KEY: <请填写你的 API Key>
+  MODEL_AGENT_NAME: <请填写接入点 ID>

📝 添加配置注释

让团队成员更容易理解配置:

yaml
common:
+  agent_name: weather_agent
+  entry_point: app.py
+  launch_type: cloud  # 生产环境使用云端部署
+
+launch_types:
+  cloud:
+    region: cn-beijing  # 北京区域,离用户最近
+    runtime_envs:
+      # 火山方舟的模型访问凭证
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx

✅ 定期验证配置

确保配置文件始终有效:

bash
# 方式 1:运行配置命令检查
+agentkit config
+
+# 方式 2:查看配置内容
+cat agentkit.yaml
+
+# 方式 3:尝试构建(不部署)
+agentkit build

完整示例

📱 本地开发配置(Python)

适合快速开发和调试:

yaml
common:
+  agent_name: dev_weather_agent
+  entry_point: app.py
+  description: 开发环境的天气查询 Agent
+  language: Python
+  language_version: '3.12'
+  launch_type: local
+  runtime_envs:
+    APP_ENV: development
+
+launch_types:
+  local:
+    image_tag: dev
+    invoke_port: 8000
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+      DEBUG: 'true'         # 开启调试
+      LOG_LEVEL: debug      # 详细日志
+    ports:
+      - "8000:8000"
+    memory_limit: 512m      # 开发环境资源限制小一些
+    cpu_limit: '0.5'

� Golang 项目配置

Go 语言 Agent 的配置示例:

yaml
common:
+  agent_name: go_agent
+  entry_point: main.go
+  description: Go 语言 Agent
+  language: Golang
+  language_version: '1.24'
+  dependencies_file: go.mod
+  launch_type: hybrid
+
+launch_types:
+  hybrid:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"
+    cr_instance_name: Auto
+    cr_namespace_name: agentkit
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+
+docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:latest"

� 生产环境配置

适合正式上线:

yaml
common:
+  agent_name: prod_weather_agent
+  entry_point: server.py
+  description: 生产环境的天气查询 Agent
+  language: Python
+  language_version: '3.12'
+  launch_type: cloud
+  runtime_envs:
+    APP_ENV: production
+    LOG_LEVEL: info
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"    # 使用时间戳确保唯一
+    
+    # CR 配置
+    cr_instance_name: Auto
+    cr_namespace_name: production
+    cr_repo_name: weather_agent
+    
+    # TOS 配置
+    tos_bucket: Auto
+    
+    # Runtime 配置
+    runtime_name: Auto
+    runtime_role_name: Auto
+    runtime_apikey_name: Auto
+    
+    runtime_envs:
+      # 基础配置
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx
+      
+      # 可观测性(生产环境推荐开启)
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: prod_weather_agent
+
+docker_build:
+  base_image: "python:3.12-slim"

🎯 最小配置示例

Local 模式(最简配置):

yaml
common:
+  agent_name: simple-agent
+  entry_point: agent.py
+  launch_type: local

Cloud 模式(最简配置):

yaml
common:
+  agent_name: cloud-agent
+  entry_point: main.py
+  launch_type: cloud
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx

常见问题

❓ 配置文件找不到

Error: Configuration file not found

解决

bash
agentkit init my_agent  # 创建新项目
+# 或
+agentkit config         # 创建配置

❓ YAML 格式错误

Error: Invalid YAML format

检查清单

`,102)),s("ul",null,[i[25]||(i[25]=s("li",null,"✅ 使用空格缩进(不要用 Tab)",-1)),i[26]||(i[26]=s("li",null,"✅ 检查冒号后面有空格",-1)),i[27]||(i[27]=s("li",null,"✅ 字符串包含特殊字符要加引号",-1)),s("li",null,[i[24]||(i[24]=t("✅ 模板变量用引号包裹:",-1)),s("code",null,'"'+n(a.timestamp)+'"',1)])]),i[42]||(i[42]=l(`

❓ 必填项缺失

Error: agent_name is required

解决

bash
agentkit config  # 重新配置,填写必填项

❓ 模板变量渲染失败

Error: Config field 'cr_instance_name' template variables were not fully rendered

可能原因

  1. 火山引擎凭证未配置
  2. AK/SK 权限不足

解决方法

bash
# 检查环境变量
+echo $VOLC_ACCESSKEY
+echo $VOLC_SECRETKEY
+
+# 或检查全局配置
+cat ~/.agentkit/config.yaml

❓ 环境变量不生效

可能原因

  1. 变量名拼写错误
  2. 配置没有保存
  3. 没有重新部署
  4. common.runtime_envs 和策略级 runtime_envs 混淆

解决方法

bash
# 1. 检查配置
+cat agentkit.yaml
+
+# 2. 确认环境变量位置正确
+# common.runtime_envs - 所有模式共享
+# launch_types.<mode>.runtime_envs - 该模式专用
+
+# 3. 重新部署
+agentkit deploy

❓ 旧配置字段名不兼容

如果你的配置文件使用旧版字段名(如 ve_cr_instance_namepython_version),请更新为新名称:

旧字段名新字段名
python_versionlanguage_version
ve_cr_instance_namecr_instance_name
ve_cr_namespace_namecr_namespace_name
ve_cr_repo_namecr_repo_name
ve_runtime_idruntime_id
ve_runtime_nameruntime_name
ve_runtime_endpointruntime_endpoint

💡 提示:CLI 仍然支持旧字段名(通过 aliases),但建议迁移到新名称。


配置字段速查表

common 字段

字段必填默认值说明
agent_name-Agent 名称
entry_point-入口文件
description描述信息
languagePython编程语言
language_version3.12/1.24语言版本
dependencies_file自动检测依赖文件
launch_typelocal部署模式
runtime_envs{}应用级环境变量

Cloud/Hybrid 模式字段

`,24)),s("table",o,[i[36]||(i[36]=s("thead",null,[s("tr",null,[s("th",null,"字段"),s("th",null,"默认值"),s("th",null,"说明")])],-1)),s("tbody",null,[i[30]||(i[30]=s("tr",null,[s("td",null,[s("code",null,"region")]),s("td",null,[s("code",null,"cn-beijing")]),s("td",null,"火山引擎区域")],-1)),s("tr",null,[i[28]||(i[28]=s("td",null,[s("code",null,"image_tag")],-1)),s("td",null,[s("code",null,n(a.timestamp),1)]),i[29]||(i[29]=s("td",null,"镜像标签",-1))]),i[31]||(i[31]=s("tr",null,[s("td",null,[s("code",null,"cr_instance_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"CR 实例名")],-1)),i[32]||(i[32]=s("tr",null,[s("td",null,[s("code",null,"cr_namespace_name")]),s("td",null,[s("code",null,"agentkit")]),s("td",null,"CR 命名空间")],-1)),i[33]||(i[33]=s("tr",null,[s("td",null,[s("code",null,"cr_repo_name")]),s("td",null,"空(用 agent_name)"),s("td",null,"CR 仓库名")],-1)),i[34]||(i[34]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"Runtime 名称")],-1)),i[35]||(i[35]=s("tr",null,[s("td",null,[s("code",null,"runtime_envs")]),s("td",null,[s("code",null,"{}")]),s("td",null,"策略级环境变量")],-1))])]),i[43]||(i[43]=l('

docker_build 字段

字段默认值说明
base_image自动选择基础镜像
build_script构建脚本
regenerate_dockerfilefalse强制重新生成
platform当前架构目标平台

下一步

',5))])}const b=e(k,[["render",g]]);export{A as __pageData,b as default}; diff --git a/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.lean.js b/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.lean.js new file mode 100644 index 0000000..fd5c534 --- /dev/null +++ b/assets/content_2.agentkit-cli_3.configurations.md.B5LW8eA4.lean.js @@ -0,0 +1 @@ +import{_ as e,c as h,o as p,ag as l,j as s,t as n,a as t}from"./chunks/framework.CA4hJK0u.js";const A=JSON.parse('{"title":"配置文件详解","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/3.configurations.md","filePath":"content/2.agentkit-cli/3.configurations.md","lastUpdated":1770735100000}'),k={name:"content/2.agentkit-cli/3.configurations.md"},d={tabindex:"0"},r={tabindex:"0"},o={tabindex:"0"};function g(a,i,E,c,y,u){return p(),h("div",null,[i[37]||(i[37]=l("",114)),s("table",d,[i[4]||(i[4]=s("thead",null,[s("tr",null,[s("th",null,"变量"),s("th",null,"说明"),s("th",null,"示例值")])],-1)),s("tbody",null,[s("tr",null,[s("td",null,[s("code",null,n(a.timestamp),1)]),i[0]||(i[0]=s("td",null,"当前时间戳(YYYYMMDDHHmmss)",-1)),i[1]||(i[1]=s("td",null,[s("code",null,"20251128153042")],-1))]),s("tr",null,[s("td",null,[s("code",null,n(a.account_id),1)]),i[2]||(i[2]=s("td",null,"火山引擎账号 ID",-1)),i[3]||(i[3]=s("td",null,[s("code",null,"2100123456")],-1))])])]),i[38]||(i[38]=l("",4)),s("table",r,[i[12]||(i[12]=s("thead",null,[s("tr",null,[s("th",null,"字段"),s("th",null,"Auto 行为")])],-1)),s("tbody",null,[s("tr",null,[i[6]||(i[6]=s("td",null,[s("code",null,"tos_bucket")],-1)),s("td",null,[i[5]||(i[5]=t("自动创建存储桶 ",-1)),s("code",null,"agentkit-platform-"+n(a.account_id),1)])]),s("tr",null,[i[8]||(i[8]=s("td",null,[s("code",null,"cr_instance_name")],-1)),s("td",null,[i[7]||(i[7]=t("自动创建 CR 实例 ",-1)),s("code",null,"agentkit-platform-"+n(a.account_id),1)])]),i[9]||(i[9]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,"自动创建 Runtime")],-1)),i[10]||(i[10]=s("tr",null,[s("td",null,[s("code",null,"runtime_role_name")]),s("td",null,"自动创建授权角色")],-1)),i[11]||(i[11]=s("tr",null,[s("td",null,[s("code",null,"runtime_apikey_name")]),s("td",null,"自动创建 API Key 密钥")],-1))])]),i[39]||(i[39]=l("",7)),s("ul",null,[s("li",null,[i[13]||(i[13]=t("默认:",-1)),s("code",null,n(a.timestamp),1),i[14]||(i[14]=t("(每次构建生成唯一标签)",-1))]),i[20]||(i[20]=s("li",null,"作用:区分不同版本",-1)),s("li",null,[i[15]||(i[15]=t("示例:",-1)),s("code",null,n(a.timestamp),1),i[16]||(i[16]=t("、",-1)),i[17]||(i[17]=s("code",null,"latest",-1)),i[18]||(i[18]=t("、",-1)),i[19]||(i[19]=s("code",null,"v1.0.0",-1))])]),i[40]||(i[40]=l("",53)),s("ul",null,[s("li",null,[i[21]||(i[21]=t("默认:",-1)),s("code",null,n(a.timestamp),1)]),i[22]||(i[22]=s("li",null,"作用:区分不同版本的镜像",-1)),i[23]||(i[23]=s("li",null,"支持模板变量",-1))]),i[41]||(i[41]=l("",102)),s("ul",null,[i[25]||(i[25]=s("li",null,"✅ 使用空格缩进(不要用 Tab)",-1)),i[26]||(i[26]=s("li",null,"✅ 检查冒号后面有空格",-1)),i[27]||(i[27]=s("li",null,"✅ 字符串包含特殊字符要加引号",-1)),s("li",null,[i[24]||(i[24]=t("✅ 模板变量用引号包裹:",-1)),s("code",null,'"'+n(a.timestamp)+'"',1)])]),i[42]||(i[42]=l("",24)),s("table",o,[i[36]||(i[36]=s("thead",null,[s("tr",null,[s("th",null,"字段"),s("th",null,"默认值"),s("th",null,"说明")])],-1)),s("tbody",null,[i[30]||(i[30]=s("tr",null,[s("td",null,[s("code",null,"region")]),s("td",null,[s("code",null,"cn-beijing")]),s("td",null,"火山引擎区域")],-1)),s("tr",null,[i[28]||(i[28]=s("td",null,[s("code",null,"image_tag")],-1)),s("td",null,[s("code",null,n(a.timestamp),1)]),i[29]||(i[29]=s("td",null,"镜像标签",-1))]),i[31]||(i[31]=s("tr",null,[s("td",null,[s("code",null,"cr_instance_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"CR 实例名")],-1)),i[32]||(i[32]=s("tr",null,[s("td",null,[s("code",null,"cr_namespace_name")]),s("td",null,[s("code",null,"agentkit")]),s("td",null,"CR 命名空间")],-1)),i[33]||(i[33]=s("tr",null,[s("td",null,[s("code",null,"cr_repo_name")]),s("td",null,"空(用 agent_name)"),s("td",null,"CR 仓库名")],-1)),i[34]||(i[34]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"Runtime 名称")],-1)),i[35]||(i[35]=s("tr",null,[s("td",null,[s("code",null,"runtime_envs")]),s("td",null,[s("code",null,"{}")]),s("td",null,"策略级环境变量")],-1))])]),i[43]||(i[43]=l("",5))])}const b=e(k,[["render",g]]);export{A as __pageData,b as default}; diff --git a/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.js b/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.js new file mode 100644 index 0000000..d64c79c --- /dev/null +++ b/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.js @@ -0,0 +1,150 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"日志系统","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/4.logging.md","filePath":"content/2.agentkit-cli/4.logging.md","lastUpdated":1764227036000}'),l={name:"content/2.agentkit-cli/4.logging.md"};function h(p,s,e,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t(`

日志系统

AgentKit CLI 内置了灵活的日志系统,帮助你了解命令执行过程、调试问题和追踪运行状态。

默认行为

AgentKit 默认配置如下:

  • 控制台输出:关闭(不显示日志)
  • 文件日志:关闭(不记录日志)
  • 💡 按需开启:根据需要通过环境变量开启日志功能
bash
# 默认情况下,命令运行时无任何日志输出
+agentkit status
+
+# 如需日志,请通过环境变量开启(见下文)

日志示例

[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Loading configuration...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Using launch_type: cloud
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Querying status with cloud strategy...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Status query completed: running

快速开始

开启文件日志

如果需要将日志保存到文件:

bash
# 开启文件日志(默认 INFO 级别)
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit deploy
+
+# 查看生成的日志文件
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log

开启控制台日志

如果你想在控制台实时查看日志:

bash
# 开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 运行命令,现在可以在控制台看到日志了
+agentkit status

同时开启控制台和文件日志

bash
# 同时开启控制台和文件日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit build

调试模式

遇到问题需要详细日志时:

bash
# 开启 DEBUG 级别日志(自动开启控制台和文件输出)
+export AGENTKIT_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令,查看详细的调试信息
+agentkit build

环境变量配置

通过环境变量,你可以完全自定义日志行为。

基础配置

环境变量说明默认值示例
AGENTKIT_LOG_CONSOLE是否在控制台显示日志falsetrue / false
AGENTKIT_FILE_ENABLED是否保存日志到文件falsetrue / false
AGENTKIT_LOG_LEVEL日志级别(控制台和文件)INFODEBUG / INFO / WARNING / ERROR
AGENTKIT_LOG_FILE日志文件路径(开启文件日志时生效).agentkit/logs/agentkit-YYYYMMDD.log/tmp/my-agent.log

高级配置

分别控制控制台和文件的日志级别:

环境变量说明默认值
AGENTKIT_CONSOLE_LOG_LEVEL控制台日志级别INFO
AGENTKIT_FILE_LOG_LEVEL文件日志级别INFO

使用示例

bash
# 控制台只看重要的错误,文件记录所有信息
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+
+agentkit launch

日志级别说明

AgentKit 支持 5 种日志级别,级别越高,信息越少:

级别说明适用场景
DEBUG详细的调试信息问题排查、开发调试
INFO常规操作信息(默认)了解命令执行过程
WARNING警告信息关注潜在问题
ERROR错误信息只看失败的操作
CRITICAL严重错误只看致命错误

常用场景

场景 1:正常使用(默认配置)

适合日常使用,无日志输出,保护信息安全。

bash
# 无需任何配置,直接使用
+agentkit status
+agentkit deploy

效果

  • ✅ 控制台:干净整洁,无日志输出
  • ✅ 文件:无日志文件生成,保护信息安全

场景 1.1:需要保存日志记录

开启文件日志,便于追溯操作历史:

bash
# 开启文件日志
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit deploy

效果

  • ✅ 控制台:干净整洁
  • ✅ 日志:自动保存到 .agentkit/logs/,默认 INFO 级别

场景 2:调试问题

遇到错误或异常行为时,开启详细日志:

bash
# 开启控制台和文件的 DEBUG 日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 运行命令
+agentkit build

效果

  • ✅ 控制台:显示详细的执行过程
  • ✅ 日志文件:保存完整 DEBUG 信息,便于事后分析

场景 3:CI/CD 环境

在持续集成环境中,需要在控制台看到日志,同时保存完整记录:

bash
# 在 CI 配置文件中设置
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_FILE=/var/log/agentkit/build-\${BUILD_ID}.log
+
+# 运行构建
+agentkit launch

效果

  • ✅ 控制台:显示关键信息,便于查看 CI 日志
  • ✅ 日志文件:保存详细信息,便于事后分析

场景 4:生产环境

生产环境只记录警告和错误到文件:

bash
export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_FILE_LOG_LEVEL=WARNING
+export AGENTKIT_LOG_FILE=/var/log/agentkit/production.log
+
+# 运行命令
+agentkit deploy

效果

  • ✅ 控制台:无输出,保持清爽
  • ✅ 日志文件:只记录警告和错误,聚焦问题

场景 5:完全静默

不需要任何日志时(默认行为):

bash
# 默认配置即为完全静默,无需设置环境变量
+agentkit status
+
+# 或者显式设置(确保之前的环境变量不影响)
+unset AGENTKIT_LOG_CONSOLE
+unset AGENTKIT_FILE_ENABLED

效果

  • ✅ 控制台:无日志输出
  • ✅ 文件:无日志文件生成

日志文件管理

日志文件位置

当开启文件日志后(AGENTKIT_FILE_ENABLED=true),日志保存在项目根目录的 .agentkit/logs/ 文件夹中:

your-project/
+├── .agentkit/
+│   └── logs/
+│       ├── agentkit-20251120.log  # 今天的日志
+│       ├── agentkit-20251119.log  # 昨天的日志
+│       └── agentkit-20251118.log  # 前天的日志
+├── agentkit.yaml
+└── my_agent.py

自动清理旧日志

日志文件会随时间增多,建议定期清理:

bash
# 删除 7 天前的日志
+find .agentkit/logs -name "agentkit-*.log" -mtime +7 -delete
+
+# 或者手动删除
+rm .agentkit/logs/agentkit-20251101.log

自定义日志路径

bash
# 保存到指定位置
+export AGENTKIT_LOG_FILE=/tmp/my-custom-agent.log
+
+# 或保存到用户目录
+export AGENTKIT_LOG_FILE=$HOME/.agentkit-logs/agent.log
+
+agentkit deploy

配置优先级

当多种配置方式同时存在时,优先级如下(从高到低):

  1. 专用环境变量 - AGENTKIT_CONSOLE_LOG_LEVEL
  2. 通用环境变量 - AGENTKIT_LOG_LEVEL
  3. 默认值 - INFO

示例

bash
# 设置通用级别为 INFO
+export AGENTKIT_LOG_LEVEL=INFO
+
+# 设置控制台专用级别为 WARNING(优先级更高)
+export AGENTKIT_CONSOLE_LOG_LEVEL=WARNING
+
+# 结果:控制台显示 WARNING,文件记录 INFO
+agentkit status

故障排查

日志文件没有创建

可能原因

  • 文件日志被禁用了
  • 目录权限不足

解决方法

bash
# 1. 检查是否禁用了文件日志
+echo $AGENTKIT_FILE_ENABLED  # 应该是 true 或为空
+
+# 2. 检查目录权限
+ls -la .agentkit/logs/
+
+# 3. 手动创建目录
+mkdir -p .agentkit/logs
+
+# 4. 确保环境变量正确
+unset AGENTKIT_FILE_ENABLED  # 重置为默认值

控制台没有日志输出

可能原因

  • 控制台日志默认是关闭的
  • 日志级别设置过高

解决方法

bash
# 1. 开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 2. 设置合适的日志级别
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+
+# 3. 运行命令
+agentkit status

日志太多或太少

调整日志级别

bash
# 日志太多 - 只看重要信息
+export AGENTKIT_LOG_LEVEL=WARNING
+
+# 日志太少 - 查看详细信息
+export AGENTKIT_LOG_LEVEL=DEBUG

最佳实践

开发环境推荐配置

在你的 .bashrc.zshrc 中添加(可选):

bash
# AgentKit 开发环境配置(根据需要选择)
+# 选项1:只开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 选项2:同时开启控制台和文件日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

推荐

  • 默认不配置,保持干净
  • 需要调试时临时开启
  • 避免敏感信息意外记录

团队协作

在项目根目录创建 .env.example 文件:

bash
# AgentKit 日志配置示例
+# 根据需要复制到 .env 并修改
+
+# === 开发环境建议配置 ===
+# 开启控制台日志(便于实时查看)
+AGENTKIT_LOG_CONSOLE=true
+
+# 开启文件日志(便于问题追溯,可选)
+# AGENTKIT_FILE_ENABLED=true
+
+# 设置日志级别
+AGENTKIT_LOG_LEVEL=INFO
+
+# 自定义日志路径(可选)
+# AGENTKIT_LOG_FILE=./logs/my-agent.log

提醒

  • 团队成员根据需求自行调整
  • .env 文件应该在 .gitignore 中,避免提交个人配置
  • 默认不开启文件日志,保护信息安全

生产部署建议

bash
# 生产环境配置
+export AGENTKIT_LOG_CONSOLE=false          # 关闭控制台
+export AGENTKIT_FILE_ENABLED=true          # 开启文件日志
+export AGENTKIT_FILE_LOG_LEVEL=WARNING     # 只记录警告和错误
+export AGENTKIT_LOG_FILE=/var/log/agentkit/prod.log  # 统一路径

优点

  • 减少不必要的输出
  • 聚焦重要问题
  • 便于日志管理和监控

总结

AgentKit 的日志系统设计原则:

  • 🔒 安全优先 - 默认不输出日志,避免信息泄露
  • 🎯 按需启用 - 通过环境变量灵活开启
  • 🔧 灵活配置 - 控制台和文件可独立控制
  • 📊 分级控制 - 不同场景使用不同日志级别
  • 📁 自动管理 - 开启后按日期分割,便于查找

快速参考

bash
# 1. 开启文件日志
+export AGENTKIT_FILE_ENABLED=true
+
+# 2. 开启控制台调试
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 3. 查看日志文件(需要先开启文件日志)
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log
+
+# 4. 控制台和文件使用不同级别
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

如有问题,请参考 故障排查 章节或联系技术支持。

`,130)])])}const o=i(l,[["render",h]]);export{g as __pageData,o as default}; diff --git a/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.lean.js b/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.lean.js new file mode 100644 index 0000000..34e2a6a --- /dev/null +++ b/assets/content_2.agentkit-cli_4.logging.md.BmTvgFmd.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"日志系统","description":"","frontmatter":{},"headers":[],"relativePath":"content/2.agentkit-cli/4.logging.md","filePath":"content/2.agentkit-cli/4.logging.md","lastUpdated":1764227036000}'),l={name:"content/2.agentkit-cli/4.logging.md"};function h(p,s,e,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t("",130)])])}const o=i(l,[["render",h]]);export{g as __pageData,o as default}; diff --git a/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.js b/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.js new file mode 100644 index 0000000..a145db4 --- /dev/null +++ b/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.js @@ -0,0 +1,67 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit SDK 概览","description":"","frontmatter":{},"headers":[],"relativePath":"content/3.agentkit-sdk/1.overview.md","filePath":"content/3.agentkit-sdk/1.overview.md","lastUpdated":1764210317000}'),l={name:"content/3.agentkit-sdk/1.overview.md"};function e(p,s,h,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t(`

AgentKit SDK 概览

AgentKit SDK 是一个 Python 开发工具包,用于快速构建符合 AgentKit Platform 标准的 Agent 应用。SDK 提供了一套简洁的装饰器和客户端接口,帮助开发者专注于 Agent 业务逻辑的实现。

核心架构

AgentKit SDK 采用模块化设计,主要包含以下模块:

1. Runtime 应用框架

提供多种应用模式,将用户代码封装为符合 Platform 标准的 HTTP 服务:

AgentkitSimpleApp

最常用的应用框架,适用于标准的 Agent 应用。

核心装饰器

  • @app.entrypoint - 定义 Agent 的主入口函数
  • @app.ping - 定义健康检查函数
  • @app.async_task - 定义异步任务(规划中)

标准路由

  • /invoke - Agent 调用端点
  • /ping - 健康检查
  • /health/readiness/liveness - Kubernetes 就绪探针

AgentkitMCPApp

基于 MCP (Model Context Protocol) 协议的应用框架,用于将工具封装为 MCP 服务。

核心装饰器

  • @app.tool - 将函数注册为 MCP 工具
  • @app.agent_as_a_tool - 将 Agent 封装为 MCP 工具

AgentkitA2aApp

基于 A2A (Agent-to-Agent) 协议的应用框架,用于构建可互相通信的 Agent。

核心装饰器

  • @app.agent_executor - 注册 Agent 执行器
  • @app.task_store - 注册任务存储(可选)

2. Platform 服务客户端

提供便捷的客户端接口,用于访问 AgentKit Platform 的各项服务。

AgentkitMemory

记忆服务客户端,管理 Agent 的长期和短期记忆。

主要功能

  • create_memory_collection() - 创建记忆库
  • list_memory_collections() - 列举记忆库
  • get_memory_collection() - 获取记忆库详情
  • update_memory_collection() - 更新记忆库配置
  • delete_memory_collection() - 删除记忆库
  • get_memory_connection_info() - 获取连接信息

设计理念:控制面和数据面解耦

  • 控制面(SDK 提供):管理记忆库的创建、配置和获取连接信息
  • 数据面(ADK 实现):通过 MemoryBase 或 Mem0 协议进行实际的记忆读写

AgentkitKnowledge

知识库服务客户端,管理 Agent 的向量化知识库。

主要功能

  • list_knowledge_bases() - 列举知识库
  • add_knowledge_base() - 添加知识库
  • get_knowledge_connection_info() - 获取知识库连接信息
  • delete_knowledge_base() - 删除知识库

使用场景

  • RAG(检索增强生成)应用
  • 文档问答系统
  • 知识图谱集成

AgentkitMCP

MCP Gateway 客户端,用于管理和路由大量 MCP 工具。

主要功能

  • 注册和管理 MCP 服务
  • 工具聚合和智能路由
  • 降低工具集成复杂度

AgentkitRuntime

Runtime 管理客户端,用于管理 Agent 的运行时环境。

主要功能

  • 创建和管理 Runtime 实例
  • 查询 Runtime 状态
  • 配置环境变量和资源

3. 基础设施模块

BaseAgentkitClient

所有客户端的基类,提供统一的配置和 HTTP 请求能力。

配置项

  • API 端点配置
  • 认证凭证管理
  • 请求重试和超时
  • 日志和监控

Context 管理

使用 contextvars 管理每个请求的上下文信息,包括:

  • 用户身份
  • 会话 ID
  • 请求元数据
  • 链路追踪信息

模块依赖关系

AgentKit SDK
+
+├── Runtime Apps (应用框架层)
+│   ├── AgentkitSimpleApp
+│   ├── AgentkitMCPApp
+│   ├── AgentkitA2aApp
+│   └── AgentkitAgentServerApp
+
+├── Platform Clients (服务客户端层)
+│   ├── AgentkitMemory
+│   ├── AgentkitKnowledge
+│   ├── AgentkitMCP
+│   └── AgentkitRuntime
+
+└── Infrastructure (基础设施层)
+    ├── BaseAgentkitClient
+    ├── Context
+    └── Telemetry (可观测性)

主要特性

1. 装饰器驱动

使用 Python 装饰器简化应用开发,开发者只需关注业务逻辑:

python
from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    # 业务逻辑
+    return response

2. 框架无关

SDK 不限制使用特定的 Agent 框架,支持:

  • Volcengine ADK (veadk)
  • Google ADK (gadk)
  • LangChain
  • 自定义框架

3. 自动化的可观测性

内置 OpenTelemetry 支持,自动收集:

  • 链路追踪(Tracing)
  • 性能指标(Metrics)
  • 日志(Logging)

4. 生产就绪

提供完整的生产环境支持:

  • 健康检查端点
  • 优雅关闭
  • 错误处理
  • 请求重试

5. 类型安全

完整的 Python 类型注解,提供:

  • IDE 自动补全
  • 类型检查
  • 更好的代码可维护性

快速开始

安装

bash
pip install agentkit-sdk-python

创建一个简单的 Agent

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

使用 Platform 服务

python
from agentkit.sdk.memory import AgentkitMemory
+from agentkit.base_client import ApiConfig
+
+# 初始化客户端
+config = ApiConfig(
+    access_key="your_ak",
+    secret_key="your_sk"
+)
+memory_client = AgentkitMemory(config)
+
+# 创建记忆库
+response = memory_client.create_memory_collection(
+    name="my-memory",
+    short_term_configuration={...},
+    long_term_configuration={...}
+)
+print(f"Memory ID: {response.id}")

下一步

  • 查看注解使用文档了解各种装饰器的详细用法
  • 参考 samples/ 目录下的完整示例
  • 阅读 Platform 服务客户端的 API 文档
`,77)])])}const E=i(l,[["render",e]]);export{g as __pageData,E as default}; diff --git a/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.lean.js b/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.lean.js new file mode 100644 index 0000000..0308fe3 --- /dev/null +++ b/assets/content_3.agentkit-sdk_1.overview.md.D47HXcGC.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit SDK 概览","description":"","frontmatter":{},"headers":[],"relativePath":"content/3.agentkit-sdk/1.overview.md","filePath":"content/3.agentkit-sdk/1.overview.md","lastUpdated":1764210317000}'),l={name:"content/3.agentkit-sdk/1.overview.md"};function e(p,s,h,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[t("",77)])])}const E=i(l,[["render",e]]);export{g as __pageData,E as default}; diff --git a/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.js b/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.js new file mode 100644 index 0000000..897ffe8 --- /dev/null +++ b/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.js @@ -0,0 +1,340 @@ +import{_ as i,c as a,o as n,ag as h}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"注解使用指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/3.agentkit-sdk/2.annotation.md","filePath":"content/3.agentkit-sdk/2.annotation.md","lastUpdated":1764227036000}'),t={name:"content/3.agentkit-sdk/2.annotation.md"};function l(p,s,k,e,r,E){return n(),a("div",null,[...s[0]||(s[0]=[h(`

注解使用指南

AgentKit SDK 提供了一套简洁的装饰器(注解),用于快速构建不同类型的 Agent 应用。本文档详细介绍各种注解的使用方法和最佳实践。

Simple Agent 注解

AgentkitSimpleApp 是最常用的应用框架,提供标准的 HTTP 服务端点。

@app.entrypoint

定义 Agent 的主入口函数,处理来自 Platform 的调用请求。

函数签名

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    pass

参数说明

  • payload (dict): 请求体,包含用户输入和配置

    • prompt (str): 用户输入的提示词
    • 其他自定义字段
  • headers (dict): 请求头,包含上下文信息

    • user_id (str): 用户 ID
    • session_id (str): 会话 ID
    • request_id (str): 请求追踪 ID
    • 其他自定义头部
  • 返回值 (str): Agent 的响应结果

完整示例

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    """Agent 主入口函数"""
+    # 1. 提取输入参数
+    prompt = payload.get("prompt", "")
+    user_id = headers.get("user_id", "anonymous")
+    session_id = headers.get("session_id", "default")
+    
+    # 2. 调用 Agent 运行
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    
+    # 3. 返回结果
+    return response

注意事项

  1. 必须是异步函数:使用 async def 定义
  2. 参数顺序固定:第一个参数是 payload,第二个是 headers
  3. 返回字符串:返回值会被自动封装为 JSON 响应
  4. 错误处理:建议在函数内部处理异常

错误处理示例

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        prompt = payload["prompt"]
+        response = await runner.run(messages=prompt)
+        return response
+    except KeyError as e:
+        logger.error(f"Missing required field: {e}")
+        return f"Error: Missing required field {e}"
+    except Exception as e:
+        logger.error(f"Agent execution failed: {e}")
+        return f"Error: {str(e)}"

@app.ping

定义健康检查函数,用于 Platform 和 Kubernetes 的健康探测。

函数签名

python
@app.ping
+def ping() -> str:
+    pass

参数说明

  • 无参数:健康检查函数不接收任何参数
  • 返回值 (str): 健康状态信息,通常返回 "pong" 或 "ok"

基本示例

python
@app.ping
+def ping() -> str:
+    """健康检查"""
+    return "pong!"

高级示例:包含依赖检查

python
import redis
+from sqlalchemy import create_engine
+
+# 初始化依赖
+redis_client = redis.Redis(host='localhost', port=6379)
+db_engine = create_engine('postgresql://...')
+
+@app.ping
+def ping() -> str:
+    """健康检查,包含依赖服务检测"""
+    try:
+        # 检查 Redis 连接
+        redis_client.ping()
+        
+        # 检查数据库连接
+        with db_engine.connect() as conn:
+            conn.execute("SELECT 1")
+        
+        return "ok - all services healthy"
+    except Exception as e:
+        logger.error(f"Health check failed: {e}")
+        return f"degraded - {str(e)}"

注意事项

  1. 无参数:函数签名必须为 def ping() -> str:
  2. 同步函数:使用 def 而非 async def
  3. 快速响应:应在 1 秒内返回,避免超时
  4. 轻量级检查:避免执行耗时操作

可用端点

健康检查函数会自动注册到以下端点:

  • GET /ping - 基础健康检查
  • GET /health - 健康状态
  • GET /readiness - Kubernetes 就绪探针
  • GET /liveness - Kubernetes 存活探针

@app.async_task(规划中)

用于定义异步任务,支持长时间运行的操作。

python
@app.async_task
+async def process_long_task(task_id: str, data: dict) -> dict:
+    """处理长时间运行的任务"""
+    # 长时间运行的逻辑
+    result = await heavy_computation(data)
+    return result

注意:此功能正在规划中,暂未实现。

MCP Agent 注解

AgentkitMCPApp 用于构建 MCP (Model Context Protocol) 服务,将函数封装为标准的 MCP 工具。

@app.tool

将函数注册为 MCP 工具,供 LLM 调用。

函数签名

python
@app.tool
+def tool_name(param1: str, param2: int) -> dict:
+    pass

参数说明

  • 函数参数:工具的输入参数,必须有类型注解
  • 返回值:工具的执行结果,建议返回 dict 类型
  • 文档字符串:会作为工具描述,供 LLM 理解工具用途

基本示例

python
from agentkit.apps import AgentkitMCPApp
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.tool
+def get_city_weather(city: str) -> dict[str, str]:
+    """获取城市天气信息
+    
+    Args:
+        city: 城市名称(必须为英文)
+        
+    Returns:
+        包含天气状况和温度的字典
+    """
+    weather_data = {
+        "beijing": {"condition": "Sunny", "temperature": 25},
+        "shanghai": {"condition": "Cloudy", "temperature": 22},
+    }
+    
+    city = city.lower().strip()
+    if city in weather_data:
+        info = weather_data[city]
+        return {"result": f"{info['condition']}, {info['temperature']}°C"}
+    else:
+        return {"result": f"Weather information not found for {city}"}

异步工具示例

python
import aiohttp
+
+@mcp_app.tool
+async def fetch_web_content(url: str) -> dict:
+    """获取网页内容
+    
+    Args:
+        url: 网页 URL
+        
+    Returns:
+        包含网页内容的字典
+    """
+    async with aiohttp.ClientSession() as session:
+        async with session.get(url) as response:
+            content = await response.text()
+            return {
+                "status": response.status,
+                "content": content[:1000]  # 截取前 1000 字符
+            }

注意事项

  1. 类型注解必需:所有参数必须有类型注解,MCP 需要此信息生成工具模式
  2. 详细的文档字符串:文档字符串会作为工具描述,帮助 LLM 理解工具用途
  3. 同步和异步均可:支持 defasync def
  4. 返回结构化数据:建议返回 dict 类型,便于 LLM 解析
  5. 错误处理:在函数内部处理异常,避免工具调用失败

复杂参数示例

python
from typing import List, Optional
+from pydantic import BaseModel
+
+class SearchQuery(BaseModel):
+    keywords: List[str]
+    max_results: int = 10
+    filters: Optional[dict] = None
+
+@mcp_app.tool
+def search_documents(query: SearchQuery) -> dict:
+    """搜索文档
+    
+    Args:
+        query: 搜索查询对象,包含关键词、结果数量和过滤条件
+        
+    Returns:
+        搜索结果列表
+    """
+    # 实现搜索逻辑
+    results = perform_search(
+        keywords=query.keywords,
+        max_results=query.max_results,
+        filters=query.filters
+    )
+    return {"results": results, "count": len(results)}

@app.agent_as_a_tool

将整个 Agent 封装为 MCP 工具,实现 Agent 的组合和协作。

函数签名

python
@app.agent_as_a_tool
+async def agent_tool(prompt: str) -> str:
+    pass

使用示例

python
from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+# 创建一个专门的天气 Agent
+weather_agent = Agent(tools=[get_city_weather])
+weather_runner = Runner(agent=weather_agent)
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(prompt: str) -> str:
+    """天气助手 Agent
+    
+    专门处理天气相关查询的 Agent,可以查询全球城市的天气信息。
+    
+    Args:
+        prompt: 用户的天气查询
+        
+    Returns:
+        天气查询结果
+    """
+    response = await weather_runner.run(messages=prompt)
+    return response

多 Agent 协作示例

python
# 创建多个专门的 Agent
+weather_agent = Agent(tools=[get_city_weather])
+news_agent = Agent(tools=[get_latest_news])
+calendar_agent = Agent(tools=[check_schedule])
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(query: str) -> str:
+    """天气助手"""
+    return await Runner(agent=weather_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def news_assistant(query: str) -> str:
+    """新闻助手"""
+    return await Runner(agent=news_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def calendar_assistant(query: str) -> str:
+    """日程助手"""
+    return await Runner(agent=calendar_agent).run(messages=query)

注意事项

  1. Agent 职责单一:每个 Agent 应专注于特定领域
  2. 清晰的描述:文档字符串要明确 Agent 的能力边界
  3. 异步执行:通常是异步函数
  4. 合理的超时:设置合理的执行超时时间

A2A Agent 注解

AgentkitA2aApp 用于构建 A2A (Agent-to-Agent) 应用,支持 Agent 之间的通信和协作。

@app.agent_executor

注册 Agent 执行器,定义 Agent 的执行逻辑。

函数签名

python
@app.agent_executor(runner=runner, **kwargs)
+class MyAgentExecutor(A2aAgentExecutor):
+    pass

参数说明

  • runner: Agent 的运行器实例
  • kwargs: 其他配置参数

基本示例

python
from agentkit.apps import AgentkitA2aApp
+from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor
+from veadk import Agent, Runner
+from veadk.a2a.agent_card import get_agent_card
+from veadk.tools.demo_tools import get_city_weather
+
+# 创建 A2A 应用
+a2a_app = AgentkitA2aApp()
+
+# 创建 Agent
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+# 注册执行器
+@a2a_app.agent_executor(runner=runner)
+class WeatherAgentExecutor(A2aAgentExecutor):
+    """天气查询 Agent 执行器"""
+    pass
+
+# 运行应用
+if __name__ == "__main__":
+    a2a_app.run(
+        agent_card=get_agent_card(agent=agent, url="http://127.0.0.1:8000"),
+        host="127.0.0.1",
+        port=8000,
+    )

自定义执行器示例

python
from a2a.server.agent_execution import AgentExecutor
+from a2a.server.agent_execution.context import RequestContext
+from a2a.server.events.event_queue import EventQueue
+
+@a2a_app.agent_executor(runner=runner)
+class CustomAgentExecutor(AgentExecutor):
+    """自定义 Agent 执行器"""
+    
+    async def execute(
+        self,
+        context: RequestContext,
+        event_queue: EventQueue
+    ) -> str:
+        """执行 Agent 逻辑
+        
+        Args:
+            context: 请求上下文,包含输入消息和历史
+            event_queue: 事件队列,用于发送中间结果
+            
+        Returns:
+            Agent 的响应结果
+        """
+        # 从上下文提取输入
+        user_message = context.current_input
+        
+        # 发送中间事件(可选)
+        await event_queue.put({
+            "type": "thinking",
+            "content": "正在思考..."
+        })
+        
+        # 执行 Agent
+        response = await self.runner.run(messages=user_message)
+        
+        return response

注意事项

  1. 继承 AgentExecutor:必须继承自 AgentExecutor 或其子类
  2. 提供 runner:必须通过参数传入 runner 实例
  3. 实现 execute 方法:如需自定义逻辑,重写 execute 方法
  4. 使用 event_queue:通过事件队列发送中间状态

@app.task_store

注册任务存储,用于持久化 A2A 任务状态。

函数签名

python
@app.task_store(**kwargs)
+class MyTaskStore(TaskStore):
+    pass

使用默认存储

python
# 不指定 task_store,会使用内存存储(InMemoryTaskStore)
+a2a_app = AgentkitA2aApp()
+
+@a2a_app.agent_executor(runner=runner)
+class MyExecutor(A2aAgentExecutor):
+    pass

自定义任务存储示例

python
from a2a.server.tasks.task_store import TaskStore
+from a2a.types import Task
+import redis
+
+@a2a_app.task_store(redis_url="redis://localhost:6379")
+class RedisTaskStore(TaskStore):
+    """基于 Redis 的任务存储"""
+    
+    def __init__(self, redis_url: str):
+        self.redis_client = redis.from_url(redis_url)
+    
+    async def save_task(self, task: Task) -> None:
+        """保存任务"""
+        task_data = task.model_dump_json()
+        self.redis_client.set(f"task:{task.id}", task_data)
+    
+    async def get_task(self, task_id: str) -> Task | None:
+        """获取任务"""
+        task_data = self.redis_client.get(f"task:{task_id}")
+        if task_data:
+            return Task.model_validate_json(task_data)
+        return None
+    
+    async def delete_task(self, task_id: str) -> None:
+        """删除任务"""
+        self.redis_client.delete(f"task:{task_id}")

注意事项

  1. 可选装饰器:如不指定,使用内存存储
  2. 继承 TaskStore:必须继承自 TaskStore
  3. 实现必需方法:实现 save_taskget_taskdelete_task 等方法
  4. 持久化存储:生产环境建议使用持久化存储(Redis、数据库等)

最佳实践

1. 错误处理

所有装饰的函数都应该有良好的错误处理:

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        # 业务逻辑
+        result = await process(payload)
+        return result
+    except ValueError as e:
+        logger.warning(f"Invalid input: {e}")
+        return f"Invalid input: {str(e)}"
+    except Exception as e:
+        logger.error(f"Unexpected error: {e}", exc_info=True)
+        return "An error occurred. Please try again later."

2. 日志记录

添加适当的日志以便追踪问题:

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    request_id = headers.get("request_id", "unknown")
+    logger.info(f"[{request_id}] Processing request: {payload}")
+    
+    try:
+        response = await runner.run(messages=payload["prompt"])
+        logger.info(f"[{request_id}] Request completed successfully")
+        return response
+    except Exception as e:
+        logger.error(f"[{request_id}] Request failed: {e}")
+        raise

3. 类型注解

使用完整的类型注解提高代码质量:

python
from typing import Dict, Any
+
+@app.entrypoint
+async def run(payload: Dict[str, Any], headers: Dict[str, str]) -> str:
+    prompt: str = payload["prompt"]
+    user_id: str = headers.get("user_id", "anonymous")
+    # ...

4. 文档字符串

为所有函数添加详细的文档字符串:

python
@mcp_app.tool
+def calculate_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> dict:
+    """计算两个地理坐标之间的距离
+    
+    使用 Haversine 公式计算地球表面两点间的大圆距离。
+    
+    Args:
+        lat1: 起点纬度(度)
+        lon1: 起点经度(度)
+        lat2: 终点纬度(度)
+        lon2: 终点经度(度)
+        
+    Returns:
+        包含距离信息的字典,距离单位为公里
+        
+    Example:
+        >>> calculate_distance(39.9, 116.4, 31.2, 121.5)
+        {"distance_km": 1067.5}
+    """
+    # 实现逻辑

5. 性能优化

避免在装饰的函数中执行耗时初始化:

python
# ❌ 不好的做法
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    agent = Agent(tools=[...])  # 每次请求都创建
+    runner = Runner(agent=agent)
+    return await runner.run(messages=payload["prompt"])
+
+# ✅ 好的做法
+agent = Agent(tools=[...])  # 只创建一次
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    return await runner.run(messages=payload["prompt"])

下一步

  • 查看 samples/ 目录下的完整示例代码
  • 阅读 SDK 概览 了解整体架构
  • 部署应用到 AgentKit Platform
`,103)])])}const y=i(t,[["render",l]]);export{g as __pageData,y as default}; diff --git a/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.lean.js b/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.lean.js new file mode 100644 index 0000000..462eb67 --- /dev/null +++ b/assets/content_3.agentkit-sdk_2.annotation.md.36mHSS0p.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as h}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"注解使用指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/3.agentkit-sdk/2.annotation.md","filePath":"content/3.agentkit-sdk/2.annotation.md","lastUpdated":1764227036000}'),t={name:"content/3.agentkit-sdk/2.annotation.md"};function l(p,s,k,e,r,E){return n(),a("div",null,[...s[0]||(s[0]=[h("",103)])])}const y=i(t,[["render",l]]);export{g as __pageData,y as default}; diff --git a/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.js b/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.js new file mode 100644 index 0000000..dfbf5ad --- /dev/null +++ b/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.js @@ -0,0 +1,146 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"AgentKit Runtime:从本地到云端的 Agent 部署利器","description":"","frontmatter":{},"headers":[],"relativePath":"content/4.runtime/1.runtime_quickstart.md","filePath":"content/4.runtime/1.runtime_quickstart.md","lastUpdated":1765808136000}'),p={name:"content/4.runtime/1.runtime_quickstart.md"};function e(l,s,h,k,r,g){return n(),a("div",null,[...s[0]||(s[0]=[t(`

AgentKit Runtime:从本地到云端的 Agent 部署利器

AgentKit Runtime 是一个统一的、托管式的 Agent 运行环境,旨在为您提供一个安全、高效、可扩展的 Serverless 平台,让您能专注于 Agent 的业务逻辑,而非繁琐的底层运维。

AgentKit Runtime 为您解决什么?

  • 运维负担重:您是否曾为环境搭建、网络配置、依赖安装、手动扩缩容和故障排查而耗费大量精力?
  • 缺乏统一管理平台:为不同的 Agent 或会话创建和管理独立的运行环境,是否让您感到调度混乱、难以维护?
  • 安全与隔离挑战:您是否担心多用户或多 Agent 场景下的权限冲突、数据泄露或恶意访问风险?
  • 监控与日志缺失:您是否需要花费额外成本来配置日志系统、指标收集和告警规则,以便实时监控 Agent 的健康状况?

AgentKit Runtime 通过提供一个 Serverless 的托管环境,系统性地解决了以上所有问题。

核心优势

1. Serverless 架构:极致简化运维,优化成本

  • 零基础设施管理:无需关心底层服务器和复杂的环境配置,实现真正的“代码即服务”。
  • 统一运行时平台:在同一环境中高效运行和调度多个 Agent 实例(Session),并提供统一的接入点。
  • 自动化生命周期管理:根据实时流量从零自动扩展到大规模并发,实现无人值守的弹性伸缩。
  • 按量付费:仅在 Agent 运行时产生费用,无流量时资源自动缩减至零,最大限度节省云成本。
  • 内建监控与日志:提供开箱即用的实时监控和日志系统,轻松追踪 Agent 运行状态,快速定位问题。

2. 企业级安全隔离

  • 多重隔离保障:基于云厂商成熟的虚拟化和容器技术,确保每个 Agent Runtime 都在独立、受保护的环境中运行。
  • 精细化权限控制:与 Identity 和网关鉴权深度集成,严格隔离会话上下文与访问权限,有效防止数据串扰和越权风险。

3. 框架无关的快速集成

  • 广泛的框架支持:深度融合 veADK,同时兼容主流的 Python Agent 框架,仅需少量适配即可快速接入。
  • 多协议支持:原生支持 HTTP、MCP、A2A 等多种通信协议,满足不同应用场景的需求。
  • 一键部署:通过 AgentKit SDK,您可以轻松实现从本地 IDE 到云端 Runtime 的一键部署。

三步上手:从本地开发到云端部署

本指南将引导您完成从环境配置、本地开发调试,到最终将 Agent 部署到生产环境的全过程。

前提条件

在开始之前,请确保您已准备好:

  1. 一个已开通 AgentKit 服务的火山引擎账号,并获取其 AccessKey & SecretKey

    提示:请确保您的 AccessKey 拥有 AgentKitFullAccess 权限。

  2. 本地已安装 Python 3.10+

第 1 步:环境配置

我们推荐使用 uvpython3 -m venv 来管理您的 Python 虚拟环境。以下示例将使用 uv

uv 安装指南请参考:uv installation

1. 创建并激活虚拟环境

bash
mkdir agentkit-runtime-quickstart
+cd agentkit-runtime-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

2. 安装核心依赖

您可以通过 --index 参数指定镜像源以加快安装速度。

bash
uv pip install veadk-python
+uv pip install agentkit-sdk-python

第 2 步:创建并本地调试 Agent

1. 初始化 Agent 项目

我们强烈推荐您使用 agentkit-cli 来快速启动项目。init 命令可以从模板创建一个结构完整的、支持流式输出的 Agent 项目。

bash
# 使用 agentkit-cli 从模板创建项目
+agentkit init

这会自动生成一个包含 simple_agent.pyrequirements.txt 的项目结构,让您能立即开始开发。

2. 智能体代码概览

使用 basic_stream 模板生成的 simple_agent.py 核心代码如下。它展示了如何基于 AgentkitSimpleApp 包装一个 veADKAgent,并通过 Runner 执行,最终以 SSE(Server-Sent Events)事件流返回结果。

python
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import logging
+
+from google.adk.agents import RunConfig
+from google.adk.agents.run_config import StreamingMode
+from google.genai.types import Content, Part
+from veadk import Agent, Runner
+
+from agentkit.apps import AgentkitSimpleApp
+from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+
+app = AgentkitSimpleApp()
+
+app_name = "simple_streamable_app"
+
+agent_name = "Agent"
+description = DEFAULT_DESCRIPTION
+system_prompt = DEFAULT_INSTRUCTION
+
+
+tools = []
+
+# from veadk.tools.builtin_tools.web_search import web_search
+# tools.append(web_search)
+
+
+agent = Agent(
+    name=agent_name,
+    description=description,
+    instruction=system_prompt,
+    tools=tools,
+)
+agent.model._additional_args["stream_options"] = {"include_usage": True}
+runner = Runner(agent=agent, app_name=app_name)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict):
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+
+    session_service = runner.short_term_memory.session_service  # type: ignore
+
+    # prevent session recreation
+    session = await session_service.get_session(
+        app_name=app_name, user_id=user_id, session_id=session_id
+    )
+    if not session:
+        await session_service.create_session(
+            app_name=app_name, user_id=user_id, session_id=session_id
+        )
+
+    new_message = Content(role="user", parts=[Part(text=prompt)])
+    try:
+        async for event in runner.run_async(
+            user_id=user_id,
+            session_id=session_id,
+            new_message=new_message,
+            run_config=RunConfig(streaming_mode=StreamingMode.SSE),
+        ):
+            # Format as SSE data
+            sse_event = event.model_dump_json(exclude_none=True, by_alias=True)
+            logger.debug("Generated event in agent run streaming: %s", sse_event)
+            yield sse_event
+    except Exception as e:
+        logger.exception("Error in event_generator: %s", e)
+        # You might want to yield an error event here
+        error_data = json.dumps({"error": str(e)})
+        yield error_data
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

代码亮点

  • 默认使用火山方舟的豆包模型,并自动处理模型 API Key 的获取。
  • 内置了会话管理逻辑,确保多轮对话的连续性。
  • 通过 AgentkitSimpleApp 实现了与 AgentKit Runtime 的无缝集成。

3. 配置环境变量

在启动 Agent 服务之前,您需要配置火山引擎的访问凭证:

bash
# 必需:配置您的火山引擎访问凭证
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

重要提示:请务必将 your_akyour_sk 替换为您的真实凭证。

4. 本地启动并调用服务

一切就绪后,运行以下命令启动 Agent 服务:

bash
python simple_agent.py

服务将监听 http://0.0.0.0:8000。现在,打开另一个终端,使用 curl 来测试您的 Agent

bash
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "讲一个笑话!"}'

参数说明:

  • user_id:用户标识符
  • session_id:会话标识符
  • prompt:用户的自然语言请求

**执行日志示例: **

调用成功后,控制台会输出详细的执行日志:

INFO:     Started server process [38120]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+INFO:     127.0.0.1:60807 - "POST /invoke HTTP/1.1" 200 OK
+INFO:__main__:Running agent with prompt: 讲一个笑话!, user_id: test, session_id: local_session
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output: Why
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  did
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  AI
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  apply
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  for
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  a
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  job
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  at
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  bakery
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ?
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Because
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  it
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  wanted
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  to
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  work
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  on
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  its
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: d
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ough
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  processing
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  skills
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: !
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  😄
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Why did the AI apply for a job at the bakery?
+
+Because it wanted to work on its **dough** processing skills! 😄

第 3 步:部署到生产环境

完成本地开发和测试后,您可以将智能体部署到 AgentKit 平台:

  1. 打包代码:确保所有依赖都已正确配置在 requirements.txt 中,使用模版生成的代码默认已经包含了所有必要的依赖。
  2. 平台部署:根据[快速开始]指南,通过agentkit configagentkit launch命令,配置和部署应用。
  3. 调用应用:部署完成后,您可以通过平台提供的 API 或 SDK 调用智能体。调用示例:
    bash
    agentkit invoke "讲一个笑话!"

至此,您已成功完成了从本地开发到云端部署的全过程!

`,53)])])}const o=i(p,[["render",e]]);export{E as __pageData,o as default}; diff --git a/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.lean.js b/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.lean.js new file mode 100644 index 0000000..3451565 --- /dev/null +++ b/assets/content_4.runtime_1.runtime_quickstart.md.BmdJbidS.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"AgentKit Runtime:从本地到云端的 Agent 部署利器","description":"","frontmatter":{},"headers":[],"relativePath":"content/4.runtime/1.runtime_quickstart.md","filePath":"content/4.runtime/1.runtime_quickstart.md","lastUpdated":1765808136000}'),p={name:"content/4.runtime/1.runtime_quickstart.md"};function e(l,s,h,k,r,g){return n(),a("div",null,[...s[0]||(s[0]=[t("",53)])])}const o=i(p,[["render",e]]);export{E as __pageData,o as default}; diff --git a/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.js b/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.js new file mode 100644 index 0000000..d3e42b6 --- /dev/null +++ b/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.js @@ -0,0 +1,62 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit Built-in Tools 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/5.tools/1.sandbox_quickstart.md","filePath":"content/5.tools/1.sandbox_quickstart.md","lastUpdated":1764687855000}'),e={name:"content/5.tools/1.sandbox_quickstart.md"};function l(p,s,h,o,r,k){return n(),a("div",null,[...s[0]||(s[0]=[t(`

AgentKit Built-in Tools 快速开始指南

Built-in Tools为Agent提供标准化的沙箱运行环境和工具接口。提供的All-in-one sandbox镜像集成了代码执行、浏览器自动化、终端操作等核心能力,支持标准化集成与API调用。

核心能力

  • 提供code sandbox能力,让Agent安全地“运行代码”
  • 提供browser sandbox能力:让Agent“像人一样操作网页”
  • 提供terminal sandbox能力:让Agent“像人一样操作操作系统控制台(Terminal)”
  • 提供文件系统能力:让Agent上传、下载文件

本文档将详细介绍如何在智能体代码中集成和使用 Built-in Tools,特别是代码执行沙箱功能。通过本指南,您将学会如何创建、配置和调用沙箱工具。

前置准备:创建沙箱工具

在开始编写代码之前,您需要先在火山引擎控制台创建一个沙箱工具实例:

  1. 访问 AgentKit Built-in Tools 控制台
  2. 创建新的沙箱工具实例
  3. 记录生成的 TOOL_ID,后续配置中会用到

智能体代码示例

以下代码展示了如何使用 VeADK 构建一个具备代码执行能力的智能体。通过集成 Built-in Tools 的 run_code 工具,您的智能体将能够在沙箱环境中安全地执行代码。 我们推荐您使用agentkit-cli,从Basic Agent模版来创建项目。在模版创建完成后,你需要做以下修改:

  • 为智能体添加代码执行工具 run_code
  • 配置环境变量 AGENTKIT_TOOL_ID 为您的沙箱工具实例 ID 最终,您的代码文件应该如下:

完整代码

将代码保存为simple_agent_tool.py

python
from veadk import Agent, Runner
+from veadk.tools.builtin_tools.run_code import run_code
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+agent: Agent = Agent(
+    tools=[run_code],
+)
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+    return response
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

代码说明

  • run_code 工具:提供安全的代码执行环境,支持 Python、JavaScript 等多种编程语言
  • session_id:用于标识用户会话,同一 session_id 的请求将共享沙箱实例
  • 异步处理:使用 async/await 语法支持高并发请求

本地调试

1. 官方源安装VeADK

您可以直接使用 Python 包管理工具 pip 从 PyPI 平台 来安装 veadk-python

bash
pip install veadk-python

说明:支持调用built-in-tools的veadk-python版本为0.2.15及以上。

1. 配置环境变量

在启动智能体之前,需要配置以下环境变量:

bash
# 必需配置:沙箱工具 ID(从控制台获取)
+export AGENTKIT_TOOL_ID=t-ye7fhfmghsc1kdxxxxxx
+
+# 必需配置:火山引擎访问凭证
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

📝 注意事项:

  • 请将 your_akyour_sk 等占位符替换为您的实际配置值
  • AGENTKIT_TOOL_ID 从火山引擎控制台创建沙箱工具后获取

2. 本地启动智能体服务

配置完环境变量后,运行以下命令启动智能体:

bash
python simple_agent_tool.py

服务启动成功后,将监听 http://0.0.0.0:8000,您可以通过该地址调用智能体。

3. 调用智能体

工具实例调用机制

工具实例支持基于会话的智能调度管理:

  • 自动创建:首次使用某个 session_id 调用时,系统会自动创建对应的沙箱会话实例
  • 会话复用:相同 session_id 的多次请求将共享同一个沙箱实例,保持代码执行的上下文连续性
  • 生命周期:每个会话实例默认有效期为 30 分钟,超时后自动销毁
  • 隔离性:不同 session_id 的请求使用独立的沙箱环境,互不干扰

调用示例

使用以下 curl 命令测试智能体的代码执行能力:

bash
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: veadk-test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "给我在50和100之间一个随机的质数"}'

参数说明:

  • user_id:用户标识符
  • session_id:会话标识符,用于关联沙箱实例
  • prompt:用户的自然语言请求

执行日志示例

调用成功后,控制台会输出详细的执行日志:

2025-11-23 21:10:24 | DEBUG | runner.py:578 - Function call: id='call_jwrcwdayjj8xnlgalyzzcoqq' args={'code': 'import random\\n\\ndef is_prime(n):\\n    if n <= 1:\\n        return False\\n    if n == 2:\\n        return True\\n    if n % 2 == 0:\\n        return False\\n    for i in range(3, int(n**0.5) + 1, 2):\\n        if n % i == 0:\\n            return False\\n    return True\\n\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\nrandom_prime = random.choice(primes_between)\\nprint(random_prime)', 'language': 'python3'} name='run_code'
+2025-11-23 21:10:24 | DEBUG | run_code.py:48 - tools endpoint: agentkit.cn-beijing.volces.com
+2025-11-23 21:10:24 | DEBUG | run_code.py:54 - tool_user_session_id: veAgent_veadk-test_local_session
+2025-11-23 21:10:24 | DEBUG | run_code.py:56 - Running code in language: python3, session_id=local_session, code=import random
+
+def is_prime(n):
+    if n <= 1:
+        return False
+    if n == 2:
+        return True
+    if n % 2 == 0:
+        return False
+    for i in range(3, int(n**0.5) + 1, 2):
+        if n % i == 0:
+            return False
+    return True
+
+primes_between = [p for p in range(50, 101) if is_prime(p)]
+random_prime = random.choice(primes_between)
+print(random_prime), tool_id=t-ye7yhff668o2eybtfvr0, host=agentkit.cn-beijing.volces.com, service=agentkit, region=cn-beijing
+2025-11-23 21:10:24 | DEBUG | run_code.py:65 - Get AK/SK from tool context failed.
+2025-11-23 21:10:24 | DEBUG | run_code.py:77 - Successfully get AK/SK from environment variables.
+2025-11-23 21:10:25 | DEBUG | run_code.py:103 - Invoke run code response: {'ResponseMetadata': {'RequestId': '****', 'Action': 'InvokeTool', 'Version': '2025-10-30', 'Service': 'agentkit', 'Region': 'cn-beijing'}, 'Result': {'ToolId': 't-****', 'UserSessionId': '****', 'SessionId': 's-****', 'Endpoint': '', 'InternalEndpoint': '', 'Result': '{\\n  "success": true,\\n  "message": "Code executed successfully",\\n  "data": {\\n    "kernel_name": "python3",\\n    "session_id": "****",\\n    "status": "ok",\\n    "execution_count": 1,\\n    "outputs": [\\n      {\\n        "output_type": "stream",\\n        "name": "stdout",\\n        "text": "67\\\\n",\\n        "data": null,\\n        "metadata": {},\\n        "execution_count": null,\\n        "ename": null,\\n        "evalue": null,\\n        "traceback": null\\n      }\\n    ],\\n    "code": "import random\\\\n\\\\ndef is_prime(n):\\\\n    if n \\\\u003c= 1:\\\\n        return False\\\\n    if n == 2:\\\\n        return True\\\\n    if n % 2 == 0:\\\\n        return False\\\\n    for i in range(3, int(n**0.5) + 1, 2):\\\\n        if n % i == 0:\\\\n            return False\\\\n    return True\\\\n\\\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\\\nrandom_prime = random.choice(primes_between)\\\\nprint(random_prime)",\\n    "msg_id": "****"\\n  }\\n}'}}
+2025-11-23 21:10:38 | DEBUG | runner.py:586 - Event output: 在50到100之间的随机质数为:67
+2025-11-23 21:10:38 | WARNING | runner.py:652 - No tracer is configured in the agent, no trace id provided.
+INFO:     127.0.0.1:52785 - "POST /invoke HTTP/1.1" 200 OK

部署到生产环境

完成本地开发和测试后,您可以将智能体部署到 AgentKit 平台:

  1. 打包代码:确保所有依赖都已正确配置在 requirements.txt
  2. 平台部署:参考Runtime 快速开始 部分部署tool,主要有以下几步:
    • 在项目根目录运行 agentkit init 命令,初始化项目,会生成 agentkit.yaml 文件(如果前面已执行,跳过此步)
    • 确保agentkit.yaml文件配置,应用入口设置为您刚才已经调通的应用代码simple_agent_tool.py,即:
    yaml
    entry_point: simple_agent_tool.py
    • 确保所有依赖都已正确配置在 requirements.txt
    • 根据[快速开始]指南,通过agentkit configagentkit launch命令,配置和部署应用。
  3. 调用应用:部署完成后,您可以通过平台提供的 API 或 SDK 调用智能体。调用示例:
    bash
    agentkit invoke "给我在50和100之间一个随机的质数"
`,45)])])}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.lean.js b/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.lean.js new file mode 100644 index 0000000..a7d85a3 --- /dev/null +++ b/assets/content_5.tools_1.sandbox_quickstart.md.C65A9nS4.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit Built-in Tools 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/5.tools/1.sandbox_quickstart.md","filePath":"content/5.tools/1.sandbox_quickstart.md","lastUpdated":1764687855000}'),e={name:"content/5.tools/1.sandbox_quickstart.md"};function l(p,s,h,o,r,k){return n(),a("div",null,[...s[0]||(s[0]=[t("",45)])])}const g=i(e,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.js b/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.js new file mode 100644 index 0000000..907d33b --- /dev/null +++ b/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.js @@ -0,0 +1,85 @@ +import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.CA4hJK0u.js";const o=JSON.parse('{"title":"AgentKit Memory 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/6.memory/1.memory_quickstart.md","filePath":"content/6.memory/1.memory_quickstart.md","lastUpdated":1764687855000}'),t={name:"content/6.memory/1.memory_quickstart.md"};function e(l,s,h,k,r,E){return n(),a("div",null,[...s[0]||(s[0]=[p(`

AgentKit Memory 快速开始指南

AI Agent 运行过程中面临多轮任务日益复杂、上下文窗口不足的问题,需要有记忆能力来进行上下文保持与个性化定制。Agentkit Memory 提供统一的记忆库使用接口并与主流框架进行对接,为 Agent 运行记忆库支持提供跨会话、上下文感知和个性化交互,实现 Agent 的持续学习与演进。本章节将指导您安装依赖项并实现长期记忆功能。

使用示例

以下示例展示了如何使用 Agentkit Memory 实现长期记忆功能。

步骤如下

  • 创建包含语义策略的记忆资源
  • 将事件(对话历史)写入记忆资源
  • 从长期记忆中检索记忆记录

创建记忆库

通过火山引擎控制台,为智能体创建记忆库Agentkit-Memory

获取记忆资源的连接信息

在记忆详情-集成代码页面,获取连接信息。

  • 对于 Mem0 类型的记忆资源,您可以看到类似如下的环境变量:
DATABASE_MEM0_BASE_URL="https://mem0-your-mem-url.mem0.volces.com:8000"
+DATABASE_MEM0_API_KEY="xxxxxx-xxxxxxx"
  • 对于 VikingDB 类型的记忆资源,您可以看到类似如下的环境变量:
DATABASE_VIKINGMEM_COLLECTION=<collection_name of your vikingdb memory> #index
+DATABASE_VIKINGMEM_MEMORY_TYPE=memory_summary_04uyfx # memory type, separate multiple by comma, e.g. event_v1,event_v2

构建一个带长期记忆能力的智能体

VeADK是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。 以下示例展示了如何使用 VeADK 构建一个带长期记忆能力的智能体,记忆库后端采用 mem0。智能体可以根据用户输入的问题,使用长期记忆来存储用户偏好、会话摘要等个性化交互信息。

您无需从 0-1 构建 veadk 项目,我们推荐您使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改:

  • 为 Agent 添加LongTermMemory
  • 配置上个章节获取的环境变量到agentkit.yaml
  • 增加mem0ai==0.1.118requirements.txt
  • 在每一轮对话结束后显式调用runner.save_session_to_long_term_memory,将对话结果保存到长期记忆库

最终,您的代码文件应该如下:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.memory.long_term_memory import LongTermMemory
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+index = "simple_app" # required for viking backend, arbitrary for mem0 backend
+
+backend = "mem0" # one of "mem0", "viking_mem"
+if backend == "viking_mem":
+    collection_name = os.getenv("DATABASE_VIKINGMEM_COLLECTION")
+    if not collection_name:
+        raise ValueError("DATABASE_VIKINGMEM_COLLECTION environment variable is not set")
+    index = collection_name
+
+app = AgentkitSimpleApp()
+long_term_memory = LongTermMemory(
+  backend=backend,
+  index=index
+)
+
+agent = Agent(
+  name="simple_app_agent",
+  instruction="You are a helpful assistant.",
+  long_term_memory=long_term_memory
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+
+    # save the teaching prompt and answer in long term memory
+    await runner.save_session_to_long_term_memory(session_id=session_id, user_id=user_id)
+
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

环境配置

请为您的 agentkit.yaml 文件添加如下配置

# 当长期记忆后端为 mem0 时,添加如下配置
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_MEM0_BASE_URL: <your mem0 url>
+      DATABASE_MEM0_API_KEY: <your mem0 api key>
+
+# 当长期记忆后端为 VikingDB 时,添加如下配置
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKINGMEM_COLLECTION: <your vikingdb collection name>
+      DATABASE_VIKINGMEM_MEMORY_TYPE: <your vikingdb memory type, defaults to "event_v1", separate multiple by comma, e.g. event_v1,event_v2>

启动服务

运行 agentkit launch。构建好 Runtime 链接信息将被自动保存在 agentkit.yaml 文件中。

如何发起调用

执行如下发起调用

agentkit invoke "My secret is 0xabcd"

将自动使用 user_id="agentkit_user", session_id="agentkit_sample_session"来发起调用。

校验记忆库是否生效

在首轮调用中,您保存了密码。我们需要更换session_id,来验证 Agent 是否能正确读取到记忆库中的信息。建议您等待约 1 分钟,待长期记忆抽取完成后,再发起调用。

agentkit invoke \\
+  --payload '{"prompt": "What is my secret?"}' \\
+  --headers '{"user_id": "agentkit_user", "session_id": "s123"}'

您将看到 Agent 成功读取到记忆库中的信息,并告诉你密码是 0xabcd

`,33)])])}const g=i(t,[["render",e]]);export{o as __pageData,g as default}; diff --git a/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.lean.js b/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.lean.js new file mode 100644 index 0000000..493c11f --- /dev/null +++ b/assets/content_6.memory_1.memory_quickstart.md._3gVMsCE.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.CA4hJK0u.js";const o=JSON.parse('{"title":"AgentKit Memory 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/6.memory/1.memory_quickstart.md","filePath":"content/6.memory/1.memory_quickstart.md","lastUpdated":1764687855000}'),t={name:"content/6.memory/1.memory_quickstart.md"};function e(l,s,h,k,r,E){return n(),a("div",null,[...s[0]||(s[0]=[p("",33)])])}const g=i(t,[["render",e]]);export{o as __pageData,g as default}; diff --git a/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.js b/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.js new file mode 100644 index 0000000..d59b107 --- /dev/null +++ b/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.js @@ -0,0 +1,103 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Knowledge 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/7.knowledge/1.knowledge_quickstart.md","filePath":"content/7.knowledge/1.knowledge_quickstart.md","lastUpdated":1764227036000}'),h={name:"content/7.knowledge/1.knowledge_quickstart.md"};function t(p,s,k,e,d,E){return n(),a("div",null,[...s[0]||(s[0]=[l(`

AgentKit Knowledge 快速开始指南

Agentkit Knowledge 提供主流的知识库的一键配置导入能力,实现在 AgentKit 平台轻松关联知识库,并提供统一的知识库接口与框架对接,提升 Agent 使用不同知识库的便利性。

使用示例

步骤如下

  • 创建知识库资源
  • 将模版文件添加到知识库
  • 从知识库中检索记忆记录

创建知识库

通过火山引擎控制台,为智能体创建知识库VikingDB-Knowledge,并添加下面内容作为qa.md到知识库customer_support中。

md
# 智能客服知识库
+
+## 1. 公司简介
+
+VE 科技是一家专注于智能客服与知识管理的高科技公司。我们的核心产品是 **智能客服系统**,通过自然语言处理与知识库检索,为企业客户提供高效、智能的自动化客服解决方案。
+
+## 2. 产品功能说明
+
+- **自动问答**:基于知识库,快速响应常见问题。
+- **多渠道接入**:支持网页、App、微信、飞书等渠道。
+- **智能推荐**:根据上下文推荐相关答案。
+- **数据分析**:提供用户问题统计与客服绩效报告。
+- **自助知识库管理**:支持非技术人员快速编辑知识内容。
+
+---
+
+## 3. 常见问题 (FAQ)
+
+### Q1: 智能客服系统支持哪些语言?
+
+A1: 目前支持 **中文****英文**,后续将逐步增加日语、韩语等多语言支持。
+
+### Q2: 系统可以接入现有的 CRM 吗?
+
+A2: 可以。我们的系统支持通过 API 与主流 CRM 系统(如 Salesforce、Zoho、金蝶)进行无缝集成。
+
+### Q3: 如果机器人无法回答用户问题,会怎么办?
+
+A3: 系统会自动将问题转接至人工客服,并在后台记录该问题,方便管理员补充到知识库。
+
+### Q4: 知识库内容多久更新一次?
+
+## A4: 知识库支持 **实时更新**,管理员提交后即可立即生效。
+
+## 4. 联系我们
+
+- 官网:[https://www.example.com](https://www.example.com)
+- 客服邮箱:support@ve
+- 服务热线:400-123-4567

导入知识库

通过火山引擎控制台,为智能体导入知识库Agentkit-Knowledge

获取记忆资源的连接信息

在记忆详情-集成代码页面,获取连接信息。

  • 对于 VikingDB Knowledge 类型的记忆资源,您可以看到类似如下的环境变量:
bash
export DATABASE_VIKING_COLLECTION=customer_support
+export DATABASE_VIKING_PROJECT=default
+export DATABASE_VIKING_REGION=cn-beijing

构建一个带知识库能力的智能体

VeADK是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。

以下示例展示了如何使用 VeADK 构建一个带知识库能力的智能体,知识库后端采用 VikingDB Knowledge。智能体可以根据用户输入的问题,使用知识库来回答用户的问题。

您无需从 0-1 构建 veadk 项目,推荐使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改:

  • 为 Agent 添加Knowledgebase
  • 配置上个章节获取的环境变量到agentkit.yaml

最终,您的代码文件应该如下:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.knowledgebase import KnowledgeBase
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+collection_name = os.getenv("DATABASE_VIKING_COLLECTION")
+if not collection_name:
+    raise ValueError("DATABASE_VIKING_COLLECTION environment variable is not set")
+
+model_name = "doubao-seed-1-6-250615"
+
+app = AgentkitSimpleApp()
+knowledgebase = KnowledgeBase(backend="viking", index=collection_name)
+
+
+agent = Agent(
+    instruction="Answer customer's questions according to your knowledgebase.",
+    model_name=model_name,
+    knowledgebase=knowledgebase
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

环境配置

请为您的 agentkit.yaml 文件添加如下配置

launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKING_COLLECTION: <your viking collection name>

启动服务

运行 agentkit launch。构建好 Runtime 链接信息将被自动保存在 agentkit.yaml 文件中。

如何发起调用

执行如下发起调用

agentkit invoke "你们有什么产品?"

您将看到 Agent 成功读取到知识库中的信息,并将qa.md中的信息重新组织语言后回答您。

`,30)])])}const o=i(h,[["render",t]]);export{g as __pageData,o as default}; diff --git a/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.lean.js b/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.lean.js new file mode 100644 index 0000000..f89d61f --- /dev/null +++ b/assets/content_7.knowledge_1.knowledge_quickstart.md.BmMqyhTj.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as l}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Knowledge 快速开始指南","description":"","frontmatter":{},"headers":[],"relativePath":"content/7.knowledge/1.knowledge_quickstart.md","filePath":"content/7.knowledge/1.knowledge_quickstart.md","lastUpdated":1764227036000}'),h={name:"content/7.knowledge/1.knowledge_quickstart.md"};function t(p,s,k,e,d,E){return n(),a("div",null,[...s[0]||(s[0]=[l("",30)])])}const o=i(h,[["render",t]]);export{g as __pageData,o as default}; diff --git a/assets/content_8.mcp_1.overview.md.Ds1BUHd2.js b/assets/content_8.mcp_1.overview.md.Ds1BUHd2.js new file mode 100644 index 0000000..707697e --- /dev/null +++ b/assets/content_8.mcp_1.overview.md.Ds1BUHd2.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,ag as l}from"./chunks/framework.CA4hJK0u.js";const s=JSON.parse('{"title":"AgentKit MCP","description":"","frontmatter":{},"headers":[],"relativePath":"content/8.mcp/1.overview.md","filePath":"content/8.mcp/1.overview.md","lastUpdated":1764227036000}'),n={name:"content/8.mcp/1.overview.md"};function r(o,e,P,c,p,h){return i(),a("div",null,[...e[0]||(e[0]=[l('

AgentKit MCP

AgentKit MCP 提供统一的 MCP 网关与工具治理中枢。以共享实例、预制认证插件与自动搜索能力,降低接入门槛、减少 Token 成本、提升工具命中与可靠性,让团队可以专注在业务逻辑与体验打磨。 核心定位:统一入口、轻障碍接入、可治理的工具体系。承载 MCP 访问与会话保持,结合 OAuth2 与 API-Key 的认证插件,以及跨工具的语义搜索能力,形成“易接入、可治理、低成本”的工程骨架。

AgentKit MCP 功能点

AgentKit MCP 主要包括 MCP 服务和 MCP 工具集

MCP 服务

支持将企业既有 Web/HTTP 服务与第三方接口需要快速进入 Agent。AgentKit 支持两条路径:

  1. 直接转发 MCP Server,面向已具备 MCP 的后端
  2. 将 HTTP 转换为 MCP,通过上传 Swagger 与规则校验自动生成工具与参数描述,使历史资产快速纳入 MCP 能力集。

适用场景

  • 面向具体后端(MCP Server 或 HTTP)
  • 提供访问域名与会话保持
  • 认证在服务级别预制(API-Key、OAuth)
  • 适合工具规模可控与明确场景

MCP 工具集

随着工具数量膨胀或客户端存在工具上限(如 Trae 最多 50 个),自动搜索将“工具全集”对 LLM 的暴露收敛为 search/use 两个封装工具,以向量检索选择高匹配度工具,降低上下文冗余与延迟,并提升调用准确率。

适用场景:

  • 组合多个 MCP 服务的工具集合
  • 以语义检索选择最优工具
  • 对 LLM 暴露为 search/use 两个工具
  • 适合工具数量大、客户端有工具上限的场景

认证与安全

AgentKit MCP 认证链路优先采用 OAuth2 客户端凭证 模式,适用于前端应用访问 Agent runtime、服务端任务访问 Agent runtime,以及 Agent 访问 MCP Server。同时提供 API-Key 作为低依赖的补充方案,并规划后续的轮转与托管。

认证模式的区分:

  • Inbound:Agent 与 MCP 入站认证(OAuth2、API-Key),细化到自然人授权码与客户端凭证。
  • Outbound:网关访问 MCP Server 的凭证透传或转换(API-Key、OAuth client)。
',17)])])}const d=t(n,[["render",r]]);export{s as __pageData,d as default}; diff --git a/assets/content_8.mcp_1.overview.md.Ds1BUHd2.lean.js b/assets/content_8.mcp_1.overview.md.Ds1BUHd2.lean.js new file mode 100644 index 0000000..7881fcb --- /dev/null +++ b/assets/content_8.mcp_1.overview.md.Ds1BUHd2.lean.js @@ -0,0 +1 @@ +import{_ as t,c as a,o as i,ag as l}from"./chunks/framework.CA4hJK0u.js";const s=JSON.parse('{"title":"AgentKit MCP","description":"","frontmatter":{},"headers":[],"relativePath":"content/8.mcp/1.overview.md","filePath":"content/8.mcp/1.overview.md","lastUpdated":1764227036000}'),n={name:"content/8.mcp/1.overview.md"};function r(o,e,P,c,p,h){return i(),a("div",null,[...e[0]||(e[0]=[l("",17)])])}const d=t(n,[["render",r]]);export{s as __pageData,d as default}; diff --git a/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.js b/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.js new file mode 100644 index 0000000..6664c13 --- /dev/null +++ b/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.js @@ -0,0 +1,211 @@ +import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"AgentKit MCP Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"content/8.mcp/2.mcp_quickstart.md","filePath":"content/8.mcp/2.mcp_quickstart.md","lastUpdated":1764687855000}'),e={name:"content/8.mcp/2.mcp_quickstart.md"};function l(t,s,h,k,r,c){return i(),n("div",null,[...s[0]||(s[0]=[p(`

AgentKit MCP Quick Start

环境要求

开始前你需要准备:

  1. 一个开通了 AgentKit 的火山账号的 AccessKey & SecretKey

    Tips: 需要确保 AccessKey 有 AgentKitFullAccess 权限。

  2. MCP 服务(可以部署在 VeFaas 或公网可访问的位置)

    • 现存支持 MCP 的服务后端
    • 现存的 HTTP 服务和服务的 Swagger 接口定义Json,具体可以参考Swagger
  3. Python 3.10+ installed

  4. 方舟APIKEY

第一步:配置本地环境

可以使用 uv 或者 python3 -m venv 进行虚拟环境管理,下文将以 uv做为示例

uv 安装参考:uv install

虚拟环境配置

bash
mkdir agentkit-mcp-quickstart
+cd agentkit-mcp-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

安装依赖

可以通过 --index 指定源,加快安装速度

bash
uv pip install veadk-python
+uv pip install google-adk
+pip install agentkit-sdk-python

第二步:创建 AgentKit MCP

  1. 登录火山引擎 AgentKit 控制台

  2. 为准备好的后端 创建 MCP 服务

  3. 获取到创建后的 MCP 服务 Endpoint 和 ApiKey。会看到以下类似的输出:

httpUrl即为 MCP 服务的 Endpoint,Authorization 即为 ApiKey。

json
{
+  "mcpServers": {
+    "create-http-334df4": {
+      "httpUrl": "https://sd4fc6lpoh486npgcaav0.apigateway-cn-beijing.volceapi.com/mcp/create-http-334df4",
+      "headers": {
+        "Authorization": "Bearer P66l-rpaLbxxxxxxxxxxxxxxo2PQ"
+      }
+    }
+  }
+}

第三步:设置环境环境变量,运行 Agent

环境变量配置

bash
export MCP_ENDPOINT={{第三步中获取的Endpoint}}
+export MCP_AUTH_KEY={{第三步中获取的ApiKey}}
+export API_KEY={{方舟的APIKEY}}

代码示例

代码示例中,我们使用 VeADK 框架,创建了一个简单的智能体,用于调用 MCP 服务。

python
import logging
+
+from veadk import Agent, Runner
+from veadk.config import getenv
+from agentkit.apps import AgentkitSimpleApp
+from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams
+
+logger = logging.getLogger(__name__)
+
+
+url = getenv("MCP_ENDPOINT")
+mcp_auth_key = getenv("MCP_AUTH_KEY")
+apikey = getenv("API_KEY")
+
+mcp_ecs_toolset = MCPToolset(
+        connection_params=StreamableHTTPConnectionParams(
+        url=url,
+        headers={"Authorization": f"Bearer {mcp_auth_key}"}
+    ),
+)
+
+app = AgentkitSimpleApp()
+
+root_agent = Agent(
+    name="ecs_helper",
+    model_name="doubao-1-5-pro-256k-250115",
+    instruction='''
+        Help user find ECS instances and their details.
+    ''',
+    description="ECS Helper Agent",
+    tools=[mcp_ecs_toolset]
+)
+
+runner = Runner(agent=root_agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    
+    # 运行智能体,自动处理工具调用
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+
+    logger.info(f"Run response: {response}")
+    return response
+
+@app.ping
+def ping() -> str:
+    """健康检查接口"""
+    return "pong!"
+
+if __name__ == "__main__":
+    # 启动本地开发服务器
+    app.run(host="0.0.0.0", port=8000)

执行请求

curl
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: veadk-test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "分析下我的ecs实例"}'

运行结果

text
2025-10-24 20:17:33 | INFO | ark_veauth.py:25 - Fetching ARK token...
+2025-10-24 20:17:33 | INFO | agent.py:118 - Model extra config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | DEBUG | agent.py:127 - LiteLLM client created with config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | INFO | agent.py:153 - VeADK version: 0.2.13
+2025-10-24 20:17:33 | INFO | agent.py:155 - Agent \`ecs_helper\` init done.
+2025-10-24 20:17:33 | DEBUG | agent.py:156 - Agent: {'name': 'ecs_helper', 'tools': [<google.adk.tools.mcp_tool.mcp_toolset.MCPToolset object at 0x7f8b4f24b9b0>], 'model_name': 'doubao-1-5-pro-256k-250115', 'model_api_base': 'https://ark.cn-beijing.volces.com/api/v3/'}
+2025-10-24 20:17:33 | WARNING | runner.py:198 - No short term memory or session service provided, use an in-memory one instead.
+2025-10-24 20:17:33 | INFO | runner.py:217 - No long term memory provided.
+INFO:     Started server process [1330124]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+2025-10-24 20:18:35 | INFO | runner.py:250 - Run config: speech_config=None response_modalities=None save_input_blobs_as_artifacts=False support_cfc=False streaming_mode=<StreamingMode.NONE: None> output_audio_transcription=AudioTranscriptionConfig() input_audio_transcription=AudioTranscriptionConfig() realtime_input_config=None enable_affective_dialog=None proactivity=None session_resumption=None context_window_compression=None save_live_audio=False max_llm_calls=100
+2025-10-24 20:18:35 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app
+2025-10-24 20:18:38 | DEBUG | runner.py:280 - Function call: id='call_xbyfcvc86wc26mbxz39vst12' args={'region': 'cn-beijing', 'needNum': 10} name='describe_instances'
+2025-10-24 20:19:14 | DEBUG | runner.py:288 - Event output: 以下是您的ECS实例详情:
+1. **实例1**:
+    - **实例ID**:i-ye7irm2sqobw80cqxd40
+    - **创建时间**:2025-10-23T21:36:31+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+2. **实例2**:
+    - **实例ID**:i-ye7ipm0dtsqc6imh310d
+    - **创建时间**:2025-10-23T21:05:44+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvy72n46nmxzvafi
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+3. **实例3**:
+    - **实例ID**:i-ye7ilsbbpcbw80ca2ymj
+    - **创建时间**:2025-10-23T20:06:54+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+4. **实例4**:
+    - **实例ID**:i-ye7fg1hgqoxjd1utrfy3
+    - **创建时间**:2025-10-22T14:57:49+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+5. **实例5**:
+    - **实例ID**:i-ye5ejwoow0cva4fqydfc
+    - **创建时间**:2025-09-24T14:25:37+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+6. **实例6**:
+    - **实例ID**:i-ye5ejub08wbw80bpd7hr
+    - **创建时间**:2025-09-24T14:24:35+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+7. **实例7**:
+    - **实例ID**:i-ye5e5jyq68bw80c889i5
+    - **创建时间**:2025-09-24T10:44:54+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+8. **实例8**:
+    - **实例ID**:i-ye5c4jbx8gqc6ily6b30
+    - **创建时间**:2025-09-23T16:02:05+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+9. **实例9**:
+    - **实例ID**:i-ye5c4end34xjd1umbfns
+    - **创建时间**:2025-09-23T16:00:05+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvfxhokhx11pdmlv
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+10. **实例10**:
+    - **实例ID**:i-ye5blj0xdsxjd1tk1vfh
+    - **创建时间**:2025-09-23T11:09:46+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvfxhokhx11pdmlv
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+
+以上10个实例均为按量计费,规格为ecs.e-c1m2.xlarge ,且大部分使用Windows Server 2022 Datacenter Edition 64 - bit Chinese操作系统,少数使用Debian 12 64 bit操作系统,目前状态均为运行中,所属可用区为cn - beijing - a 。若您还需要进一步分析或有其他操作需求,可继续向我提问。
`,25)])])}const o=a(e,[["render",l]]);export{E as __pageData,o as default}; diff --git a/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.lean.js b/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.lean.js new file mode 100644 index 0000000..95f0f3e --- /dev/null +++ b/assets/content_8.mcp_2.mcp_quickstart.md.Dl6u5Kgz.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.CA4hJK0u.js";const E=JSON.parse('{"title":"AgentKit MCP Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"content/8.mcp/2.mcp_quickstart.md","filePath":"content/8.mcp/2.mcp_quickstart.md","lastUpdated":1764687855000}'),e={name:"content/8.mcp/2.mcp_quickstart.md"};function l(t,s,h,k,r,c){return i(),n("div",null,[...s[0]||(s[0]=[p("",25)])])}const o=a(e,[["render",l]]);export{E as __pageData,o as default}; diff --git a/assets/en_content_1.introduction_1.overview.md.P6NUNREt.js b/assets/en_content_1.introduction_1.overview.md.P6NUNREt.js new file mode 100644 index 0000000..a129fee --- /dev/null +++ b/assets/en_content_1.introduction_1.overview.md.P6NUNREt.js @@ -0,0 +1 @@ +import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.CA4hJK0u.js";const u=JSON.parse('{"title":"AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/1.overview.md","filePath":"en/content/1.introduction/1.overview.md","lastUpdated":1770735100000}'),i={name:"en/content/1.introduction/1.overview.md"};function r(l,e,s,c,d,g){return a(),n("div",null,[...e[0]||(e[0]=[o('

AgentKit

Product Positioning

AgentKit is an enterprise-grade AI Agent development platform launched by Volcengine. It provides developers with a complete solution for building, deploying, and operating Agents. Through a standardized development toolchain and cloud-native infrastructure, the platform significantly lowers the barrier to developing and deploying complex intelligent agent applications.

Key Advantages

  • Declarative application definition: Define the core components and configuration of an agent application through a concise YAML file, enabling “define once, run anywhere”.
  • Modular and extensible: Includes rich built-in modules such as Tool, Memory, and Knowledge, and provides standardized interfaces to make customization and extension easy.
  • Cloud-native deployment: Seamlessly integrates with AgentKit Platform, supporting one-click deployment to the cloud, with elastic scaling, continuous integration, and high availability guarantees.
  • Multi-agent collaboration: Supports building complex systems where multiple Agents work together, enabling task decomposition, collaboration, and aggregation, and supports the A2A protocol Agent.
  • Full lifecycle management: Provides a complete agentkit CLI toolchain covering project initialization, local debugging, cloud deployment, and online operations.
  • Multi-language support: Supports Python and Golang development to meet different tech stack needs.
  • Rich project templates: Provides multiple prebuilt templates, including basic apps, streaming output, A2A protocol, etc., to kickstart development quickly.

Architecture Concept

AgentKit’s core design concept is to separate the definition and execution of an Agent App.

  • Application definition (Definition): Developers declaratively define application metadata, dependencies, runtime environment, and required platform services (such as knowledge base and memory modules) via the agentkit.yaml file.
  • Application execution (Execution): The agentkit CLI and AgentKit Platform parse the definition file and automatically complete a series of tedious tasks such as environment preparation, code packaging, image building, continuous integration, and cloud deployment.

This separation allows developers to focus on implementing business logic while AgentKit handles complex engineering problems, enabling agile development and fast production delivery.

Applicable Scenarios

  • Intelligent Q&A bots: Quickly build knowledge-base-integrated intelligent Q&A services.
  • Automated workflows: Create automation flows that can execute a series of tasks (such as sending emails, generating reports, calling APIs).
  • Complex data analysis: Build data analysis Agents that understand user intent, query databases, analyze data, and generate visual reports.
  • Multi-agent systems: Design and deploy systems where multiple Agents collaborate to complete complex tasks, such as a “researcher–analyst–reporter” pattern.

Get Started

  • Install AgentKit: Learn how to install AgentKit.
  • Quick Start: Use a simple example to quickly experience the full process from development to deployment.
',13)])])}const h=t(i,[["render",r]]);export{u as __pageData,h as default}; diff --git a/assets/en_content_1.introduction_1.overview.md.P6NUNREt.lean.js b/assets/en_content_1.introduction_1.overview.md.P6NUNREt.lean.js new file mode 100644 index 0000000..c6b572c --- /dev/null +++ b/assets/en_content_1.introduction_1.overview.md.P6NUNREt.lean.js @@ -0,0 +1 @@ +import{_ as t,c as n,o as a,ag as o}from"./chunks/framework.CA4hJK0u.js";const u=JSON.parse('{"title":"AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/1.overview.md","filePath":"en/content/1.introduction/1.overview.md","lastUpdated":1770735100000}'),i={name:"en/content/1.introduction/1.overview.md"};function r(l,e,s,c,d,g){return a(),n("div",null,[...e[0]||(e[0]=[o("",13)])])}const h=t(i,[["render",r]]);export{u as __pageData,h as default}; diff --git a/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.js b/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.js new file mode 100644 index 0000000..305545a --- /dev/null +++ b/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.js @@ -0,0 +1,48 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"Install AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/2.installation.md","filePath":"en/content/1.introduction/2.installation.md","lastUpdated":1770735100000}'),t={name:"en/content/1.introduction/2.installation.md"};function l(h,s,p,o,r,k){return n(),a("div",null,[...s[0]||(s[0]=[e(`

Install AgentKit

This guide will walk you through installing AgentKit and completing the basic configuration.

Environment Requirements

  • Python version: 3.10 or later
  • Operating system: Linux, macOS
  • Package manager: uv or pip recommended

We strongly recommend installing AgentKit in a Python virtual environment to avoid conflicts with system packages.

Installation Methods

Method 1: Install with pip

Stable Version

Recommended for production deployments:

bash
pip install agentkit-sdk-python

Development Version

Includes the latest features and fixes:

bash
pip install --pre agentkit-sdk-python

Install a Specific Version

Install a specific version:

bash
pip install agentkit-sdk-python==0.1.7

We recommend using uv to manage virtual environments and dependencies.

bash
# install uv
+curl -LsSf https://astral.sh/uv/install.sh | sh
+
+# Initialize uv environment
+uv init --no-workspace
+
+# Specify Python version for the environment
+uv venv --python 3.12
+
+# Install AgentKit using uv
+uv add agentkit-sdk-python
+
+# Install veadk (recommended for local debugging)
+uv add veadk-python
+
+# Activate the virtual environment
+source .venv/bin/activate

Method 3: Install from Source

For developers and customization scenarios:

Install from the official Github repository

bash
# clone repo
+git clone git@github.com:volcengine/agentkit-sdk-python.git
+
+cd agentkit-sdk-python
+
+# we use uv to build this project
+uv venv --python 3.12
+
+# only install necessary requirements
+uv sync
+
+# install agentkit-sdk-python with editable mode
+uv pip install -e .
+
+# Activate the virtual environment
+source .venv/bin/activate

If you prefer pip and venv, you can also run:

bash
# Create virtual environment
+python3 -m venv .venv
+
+# Activate virtual environment
+source .venv/bin/activate
+
+# Install AgentKit
+pip install agentkit-sdk-python

Verify Installation

After installation, run the following command to verify that the agentkit CLI is available:

bash
agentkit --version

If the version is printed successfully, AgentKit has been installed.

Authentication Configuration

Before using the agentkit CLI to interact with AgentKit Platform, you need to configure access credentials (AK/SK).

Use AgentKit’s global configuration feature to store your credentials securely:

bash
# Initialize global configuration
+agentkit config --global --init
+
+# Set your access credentials
+agentkit config --global --set volcengine.access_key="YOUR_ACCESS_KEY"
+agentkit config --global --set volcengine.secret_key="YOUR_SECRET_KEY"
+
+# Verify configuration
+agentkit config --global --show

This stores credentials securely in ~/.agentkit/config.yaml, avoiding exposure of sensitive information in shell history.

Environment variables (for development debugging)

For temporary development debugging, you can set environment variables:

bash
export VOLCENGINE_ACCESS_KEY="YOUR_ACCESS_KEY"
+export VOLCENGINE_SECRET_KEY="YOUR_SECRET_KEY"

⚠️ Note: For security reasons, it is not recommended to add export commands containing sensitive information to shell configuration files (such as ~/.bashrc or ~/.zshrc), because this may cause credential leakage.

Next Steps

You have now installed and configured AgentKit, and you can start building your first Agent.

  • Quick Start: Follow our quick start guide to experience the full workflow from development to deployment.
  • Troubleshooting: If you run into issues, see the troubleshooting guide.
`,42)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.lean.js b/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.lean.js new file mode 100644 index 0000000..a76a1ea --- /dev/null +++ b/assets/en_content_1.introduction_2.installation.md.CEZ13i5J.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"Install AgentKit","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/2.installation.md","filePath":"en/content/1.introduction/2.installation.md","lastUpdated":1770735100000}'),t={name:"en/content/1.introduction/2.installation.md"};function l(h,s,p,o,r,k){return n(),a("div",null,[...s[0]||(s[0]=[e("",42)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.js b/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.js new file mode 100644 index 0000000..5615ac0 --- /dev/null +++ b/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.js @@ -0,0 +1,30 @@ +import{_ as n,a as l}from"./chunks/model_apikey.BbUdt8Yv.js";import{_ as o,c as p,o as h,ag as a,j as s,a as e,t as r}from"./chunks/framework.CA4hJK0u.js";const C=JSON.parse('{"title":"Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/3.quickstart.md","filePath":"en/content/1.introduction/3.quickstart.md","lastUpdated":1770735100000}'),d={name:"en/content/1.introduction/3.quickstart.md"};function k(t,i,g,c,u,F){return h(),p("div",null,[i[5]||(i[5]=a(`

Quick Start

This guide will walk you through developing a simple Agent using the “Basic Agent App” template, and quickly experiencing the full AgentKit workflow from development and deployment to testing. AgentKit provides multiple templates, including basic apps, streaming output, and A2A protocol, and supports both Python and Golang development.

Preparation

1. Obtain Volcengine access keys (AK/SK)

First, you need a Volcengine account and to enable the AgentKit service. Please visit the Volcengine Console to complete registration and activation.

Then, create and obtain access keys (AK/SK) on the Access Control page.

After obtaining them, set them as environment variables:

bash
export VOLCENGINE_ACCESS_KEY=<your_access_key>
+export VOLCENGINE_SECRET_KEY=<your_secret_key>

2. Obtain a model inference API Key (Optional)

Your Agent usually needs to call a large language model (LLM) to provide core intelligence. AgentKit Platform supports multiple models from Volcengine Ark. Make sure you have enabled the Volcengine Ark service and obtained the model inference Endpoint and API Key.

  • Get the inference endpoint (Endpoint): On the Ark platform’s “Online Inference” page, you can select a preset inference endpoint or create a custom inference endpoint.

    Inference Endpoint

  • Get the API Key: On the “API Key Management” page, select or create a new API Key.

    API Key Management

Please record your Endpoint ID such as ep-20250520174054-xxxxx (it can also be a model ID such as deepseek-v3-1-terminus) and API Key. You will later configure them for the Agent via the environment variables MODEL_AGENT_NAME and MODEL_AGENT_API_KEY.

If you do not provide this information, AgentKit Platform will automatically inject a built-in doubao-seed-1-6 model for you during cloud deployment.

3. Local debugging credential configuration (Required for Local mode)

If you plan to run and debug the Agent locally (Local mode), because the local environment cannot automatically inject cloud credentials, you must configure the access credentials manually; otherwise, the Agent will not be able to call the LLM.

You can configure credentials in one of the following two ways:

Option 1: Configure Ark model credentials

Directly specify the model endpoint and API Key to use:

bash
# Set via --runtime_envs (-e) during config
+agentkit config -e MODEL_AGENT_NAME=<your_endpoint_id> -e MODEL_AGENT_API_KEY=<your_api_key>

Option 2: Configure Volcengine access keys

If you configure Volcengine AK/SK, veADK will try to automatically obtain your model access permissions:

bash
# Set via --runtime_envs (-e) during config
+agentkit config -e VOLCENGINE_ACCESS_KEY=<your_access_key> -e VOLCENGINE_SECRET_KEY=<your_secret_key>

Note:

  1. In Local mode, directly exporting environment variables in the host shell does not take effect inside the container. You must use agentkit config -e to write them into agentkit.yaml under runtime_envs.
  2. In Cloud mode, the Runtime automatically injects related credentials, and you usually do not need to manually configure the above environment variables.

Getting Started

Step 1: Install AgentKit

Before you begin, ensure you have followed the Install AgentKit guide to complete installation of the agentkit CLI and environment configuration.

Step 2: Initialize a project

Create a project directory and initialize your Agent app using agentkit init:

bash
mkdir simple-agent && cd simple-agent
+agentkit init

After running, a list of available templates will be shown. Select template 1 (Basic Agent App). You can also specify a template directly using the --template parameter:

bash
# Use basic template
+agentkit init --template basic
+
+# Use streaming output template
+agentkit init --template basic_stream
+
+# List all available templates
+agentkit init --list-templates

After the command runs, template code and config files will be generated in the current directory:

txt
.
+├── agentkit.yaml       # Core configuration file for the Agent.
+├── requirements.txt    # Python dependencies for the project.
+└── simple_agent.py     # Entry point for the Agent application.

Step 3: Configure and deploy

You can use agentkit launch to build and deploy the app to the cloud in one command. This command uses the configuration in agentkit.yaml.

If you need custom configuration (for example, specify deployment region, image repository, or provide model keys), you can edit agentkit.yaml manually, or run agentkit config to generate configuration through an interactive wizard.

bash
agentkit config

The configuration wizard will guide you to complete the following settings:

General settings (press Enter to use default values):

  • 1.App name: Agent app name (default is simple_agent, press Enter to accept)
  • 2.Entry file: App entry file (default is simple_agent.py)
  • 3.App description: App description (optional)
  • 4.Programming language: Python or Golang (default Python)
  • 5.Dependency file: default requirements.txt or go.mod
  • 6.Common internal Runtime environment variables for Agent apps:
    • MODEL_AGENT_NAME: Ark model endpoint ID (optional)
    • MODEL_AGENT_API_KEY: Ark model API Key (optional)
  • 7.Deployment mode: choose cloud (cloud build and deployment)

Cloud deployment settings:

`,41)),s("ul",null,[i[3]||(i[3]=s("li",null,[s("strong",null,"1.Service region"),e(": default "),s("code",null,"cn-beijing")],-1)),s("li",null,[i[0]||(i[0]=s("strong",null,"2.Image tag",-1)),i[1]||(i[1]=e(": default ",-1)),s("code",null,r(t.timestamp),1),i[2]||(i[2]=e(", will be rendered as a timestamp in the format 20251218154940",-1))]),i[4]||(i[4]=s("li",null,[s("strong",null,"3.CR image repository"),e(": CLI will automatically generate the CR instance name, CR namespace, and CR repository name. Users can also specify manually (recommended to keep automatic).")],-1))]),i[6]||(i[6]=a(`

After configuration is complete, run the launch command to deploy with one click:

bash
agentkit launch

This command automatically completes the following steps:

  1. Render Dockerfile
  2. Create a project archive and upload it to TOS
  3. Prepare CR (container image repository) resources
  4. Create and run a Pipeline build
  5. Deploy to the Runtime environment

After a successful deployment, you will see output like:

bash
 Runtime created successfully: r-ye9j62wydcn****nhsoa, request_id: 20251120***************5344
+Waiting for Runtime to be Ready...
+💡 Tip: Runtime is initializing, please be patient and do not interrupt the process
+ Runtime status is Ready
+  Runtime status: Releasing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:23
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com
+100% Deployment complete
+ Successfully launched agent: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com
+Built image: agentkit-cli-21076x****-cn-beijing.cr.volces.com/agentkit/myapp:2025112017****
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com

Tip: The first deployment usually takes about 2–3 minutes. Please be patient.

Use the Agent

Invoke the Agent

Test the Agent with the invoke command:

bash
agentkit invoke "Hello"

If you see output similar to the following, congratulations—your first Agent is running successfully!

text
(agentkit) test@localhost:~/workspace/simple-agent$ agentkit invoke "Hello"
+Invoking agent...
+Using default headers: {'user_id': 'agentkit_user', 'session_id': 'agentkit_sample_session'}
+✅ Invocation successful
+📝 Response:
+Hello! I am an AI assistant developed by the **** team, specializing in data science (information gathering, data analysis, etc.), document writing (writing multi-chapter articles, in-depth research reports), and software development (creating websites/applications, solving coding problems, etc.).
+If you have any specific needs, I'd be happy to help!

Next Steps

Congratulations on completing development and deployment of your first Agent!

Next, you can:

  • Explore other app templates (MCP, A2A, etc.)
  • Integrate Platform services like Memory, Knowledge, and Tools to build more powerful Agents
  • Use commands like agentkit memory, agentkit knowledge, and agentkit tools to manage platform services
`,17))])}const b=o(d,[["render",k]]);export{C as __pageData,b as default}; diff --git a/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.lean.js b/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.lean.js new file mode 100644 index 0000000..ec70153 --- /dev/null +++ b/assets/en_content_1.introduction_3.quickstart.md.Ci6oPPk0.lean.js @@ -0,0 +1 @@ +import{_ as n,a as l}from"./chunks/model_apikey.BbUdt8Yv.js";import{_ as o,c as p,o as h,ag as a,j as s,a as e,t as r}from"./chunks/framework.CA4hJK0u.js";const C=JSON.parse('{"title":"Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/3.quickstart.md","filePath":"en/content/1.introduction/3.quickstart.md","lastUpdated":1770735100000}'),d={name:"en/content/1.introduction/3.quickstart.md"};function k(t,i,g,c,u,F){return h(),p("div",null,[i[5]||(i[5]=a("",41)),s("ul",null,[i[3]||(i[3]=s("li",null,[s("strong",null,"1.Service region"),e(": default "),s("code",null,"cn-beijing")],-1)),s("li",null,[i[0]||(i[0]=s("strong",null,"2.Image tag",-1)),i[1]||(i[1]=e(": default ",-1)),s("code",null,r(t.timestamp),1),i[2]||(i[2]=e(", will be rendered as a timestamp in the format 20251218154940",-1))]),i[4]||(i[4]=s("li",null,[s("strong",null,"3.CR image repository"),e(": CLI will automatically generate the CR instance name, CR namespace, and CR repository name. Users can also specify manually (recommended to keep automatic).")],-1))]),i[6]||(i[6]=a("",17))])}const b=o(d,[["render",k]]);export{C as __pageData,b as default}; diff --git a/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.js b/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.js new file mode 100644 index 0000000..9d31664 --- /dev/null +++ b/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.js @@ -0,0 +1,5 @@ +import{_ as i,c as t,o as n,ag as o}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"Troubleshooting Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/4.troubleshooting.md","filePath":"en/content/1.introduction/4.troubleshooting.md","lastUpdated":1770735100000}'),a={name:"en/content/1.introduction/4.troubleshooting.md"};function s(l,e,r,c,d,h){return n(),t("div",null,[...e[0]||(e[0]=[o(`

Troubleshooting Guide

This guide is intended to help you diagnose and resolve common issues you may encounter when using AgentKit. If you cannot find a solution here, feel free to contact us via GitHub Issues.

Installation Issues

1. agentkit command not found

  • Symptom: When running the agentkit command in the terminal, the system reports command not found.
  • Cause: This is usually because the executable path installed by pip has not been added to the system PATH environment variable.
  • Solution:
    • Confirm install location: Run pip show agentkit-sdk-python or uv pip show agentkit-sdk-python and find the install path indicated by the Location field.
    • Locate the executable: Under the install path’s bin directory (for example .../site-packages/bin), you should be able to find the agentkit executable.
    • Add to PATH: Add the absolute path of this bin directory to your ~/.bashrc, ~/.zshrc, or other shell configuration files.
      bash
      export PATH="/path/to/your/python/bin:$PATH"
    • Reload configuration: Run source ~/.bashrc or restart the terminal to apply the changes.

2. Dependency conflicts

  • Symptom: When installing agentkit-sdk-python, pip reports dependency version conflicts.
  • Cause: Your Python environment may already contain library versions that are incompatible with AgentKit.
  • Solution:
    • Use a virtual environment (recommended): We strongly recommend using uv or venv to create a clean virtual environment in your project to avoid conflicts with system-level Python packages.
      bash
      uv venv
      +source .venv/bin/activate
      +uv pip install agentkit-sdk-python
    • Clean and reinstall: If you must use the existing environment, uninstall and reinstall:
      bash
      pip uninstall agentkit-sdk-python
      +pip install agentkit-sdk-python

Configuration Issues

1. Environment variables not taking effect

  • Symptom: Prompts indicate it cannot connect to AgentKit Platform or authentication fails.
  • Cause: Required environment variables may not have been passed in, or incorrect environment variable names were used.
  • Solution:
    • Confirm required environment variables are set
    bash
    echo $VOLCENGINE_ACCESS_KEY
    +echo $VOLCENGINE_SECRET_KEY
    • Ensure there are no extra spaces or quotes
    • Re-export the environment variables in the current shell session

2. Configuration file format error

  • Symptom: When running agentkit launch, it reports configuration file parsing failure.
  • Cause: File format issues
  • Solution:
    • Check whether agentkit.yaml is formatted correctly (pay attention to indentation)
    • Re-run agentkit config to generate configuration

Deployment Issues

1. CR creation failed

  • Symptom:
CreateRegistry: QuotaExceeded.Registry The quota of Registry is exceeded.
  • Cause: Insufficient account quota
  • Solution:
    • Number of CR instances exceeds the quota limit
    • In agentkit config, configure it to use an existing CR instance name
    • Or contact the administrator to increase quota

2. Image build failed

  • Symptom: Pipeline build fails and reports dependency installation errors.
  • Cause: Dependency installation failure
  • Solution:
    • Check whether dependencies in requirements.txt are correct
    • Confirm dependency versions are compatible with Python 3.12
    • Check Pipeline logs for detailed error information (logs will be automatically downloaded to your local root directory; pay attention to prompts in the interactive UI and find a file named like pipeline_failed_****ff20ce223.log in the root directory)

3. Runtime deployment timeout

  • Symptom: Runtime stays in Releasing state for a long time.
  • Cause: The first deployment takes longer, or there may be insufficient resources.
  • Solution:
    • The first deployment usually takes 2–3 minutes; please be patient
    • Use agentkit status to check status
    • If it is still not ready after 5 minutes, resources may be insufficient; try agentkit destroy and then redeploy

4. Runtime status abnormal

  • Symptom: Runtime status is Failed or Error.
  • Cause: Internal Runtime exception
  • Solution:
    • Check whether environment variable configuration is correct (especially the model API Key)
    • Check logs in the AgentKit Platform console
    • Confirm the application code has no startup errors
    • Try cleaning up with agentkit destroy and redeploying

Invocation Issues

1. invoke failed

  • Symptom: When running agentkit invoke, it reports connection failure or timeout.
  • Cause: Network issues or incorrect Endpoint configuration
  • Solution:
    • Use agentkit status to confirm Runtime status is Ready
    • Check network connectivity
    • Confirm the Endpoint address is correct
    • Check firewall or proxy settings

2. Model invocation failed

  • Symptom: The Agent returns an error indicating model access failure.
  • Cause: Incorrect model API Key configuration or exhausted model quota
  • Solution:
    • Confirm the Ark model API Key configuration is correct
    • Check whether the endpoint ID is valid
    • Confirm whether model quota has been exhausted
    • Log in to the Ark platform to check API Key permissions

Permission Issues

1. AK/SK authentication failed

  • Symptom: Reports InvalidAccessKeyId or SignatureDoesNotMatch.
  • Cause: Incorrect AK/SK configuration or insufficient permissions
  • Solution:
    • Confirm AK/SK is correct and valid
    • Check whether you have access permissions for the AgentKit service
    • Confirm AK/SK has not been disabled or expired
    • Contact the administrator to assign the required permissions

2. Resource access denied

  • Symptom: Reports AccessDenied or insufficient permissions.
  • Cause: The account does not have enough permissions to perform the operation
  • Solution:
    • Confirm the account has the required permissions for the relevant resources
    • Check IAM role configuration
    • Contact the administrator to grant necessary permissions

Getting Help

If the above solutions cannot resolve your issue, please:

  1. Check logs:

    • Local logs: Check command line output
    • Platform logs: Visit the AgentKit console to view detailed logs
  2. Contact support:

    • Provide detailed error information and logs
    • Describe reproduction steps
    • Attach relevant configuration files (be sure to redact sensitive data)
    • Contact Volcengine technical support
  3. Read the docs:

`,36)])])}const g=i(a,[["render",s]]);export{p as __pageData,g as default}; diff --git a/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.lean.js b/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.lean.js new file mode 100644 index 0000000..8a61ba2 --- /dev/null +++ b/assets/en_content_1.introduction_4.troubleshooting.md.Rozs1iDL.lean.js @@ -0,0 +1 @@ +import{_ as i,c as t,o as n,ag as o}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"Troubleshooting Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/1.introduction/4.troubleshooting.md","filePath":"en/content/1.introduction/4.troubleshooting.md","lastUpdated":1770735100000}'),a={name:"en/content/1.introduction/4.troubleshooting.md"};function s(l,e,r,c,d,h){return n(),t("div",null,[...e[0]||(e[0]=[o("",36)])])}const g=i(a,[["render",s]]);export{p as __pageData,g as default}; diff --git a/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.js b/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.js new file mode 100644 index 0000000..52a4ea3 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.js @@ -0,0 +1,54 @@ +import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit CLI Overview","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/2.agentkit-cli/1.overview.md","filePath":"en/content/2.agentkit-cli/1.overview.md","lastUpdated":1770735100000}'),n={name:"en/content/2.agentkit-cli/1.overview.md"};function l(o,i,r,d,h,p){return a(),s("div",null,[...i[0]||(i[0]=[t(`

AgentKit CLI Overview

AgentKit CLI is a powerful command-line tool designed for developers to simplify and accelerate the full lifecycle of Agent application development, deployment, and management. Whether you’re rapidly prototyping locally or deploying at scale in production, the agentkit command delivers a consistent and efficient developer experience.

Key Advantages

  • Declarative configuration: Manage all configuration through a single agentkit.yaml file—clear, portable, and easy to version-control.
  • Multi-environment deployment: Seamlessly supports three modes—local development, hybrid deployment, and fully cloud deployment—to fit different scenarios.
  • One-command workflows: High-level commands like agentkit launch combine multiple steps (build, deploy, etc.) into one, dramatically improving efficiency.
  • Templated projects: Built-in application templates help you bootstrap quickly without starting from scratch.
  • Smart interactivity: Interactive wizards such as agentkit config guide you through setup and reduce the learning curve.

Main Commands

The agentkit CLI provides a set of intuitive commands to manage your Agent applications:

Core Commands

CommandDescription
agentkit initInitialize a new Agent project, with optional templates.
agentkit configConfigure agentkit.yaml via an interactive wizard.
agentkit buildBuild your Agent application into a Docker image.
agentkit deployDeploy a built image to the specified environment (local or cloud).
agentkit launchBuild and deploy in one command—the most commonly used command during development.
agentkit invokeInteract with a deployed Agent for quick testing.
agentkit statusView the Agent runtime status and endpoint.
agentkit destroyStop and destroy the Agent instance, releasing related resources.

Platform Service Commands

CommandDescription
agentkit memoryManage AgentKit Memory collections.
agentkit knowledgeManage AgentKit Knowledge bases.
agentkit toolsManage AgentKit Tools and Sessions.
agentkit runtimeManage AgentKit Runtime instances.

Want detailed usage for each command? See Command Reference.

Three Deployment Modes

One of the core features of AgentKit CLI is its flexible deployment model, designed to adapt to different stages from development to production.

1. Local Mode (local)

Build and deploy on your local machine—ideal for fast development and debugging.

  • Workflow: Source codeLocal Docker buildRun local container
  • Benefits: Fast iteration, supports offline work, easy to debug directly.

2. Cloud Mode (cloud)

Fully host build and deployment on the AgentKit Platform—a best practice for production.

  • Workflow: Source codeCloud auto buildCloud image registryProduction-grade Runtime
  • Benefits: No local Docker required, built-in observability, high environment consistency, secure and reliable.

3. Hybrid Mode (hybrid)

Build the image locally, then push it to the cloud AgentKit Platform for deployment. This combines local control with cloud capabilities.

  • Workflow: Source codeLocal Docker buildUpload to cloud image registryProduction-grade Runtime
  • Benefits: Balances local build flexibility with the stability of a cloud runtime—suitable for scenarios that require a custom build process.

Configuration File (agentkit.yaml)

agentkit.yaml is the core of an AgentKit project. It defines all application configuration in a declarative manner. We strongly recommend managing this file with the agentkit config command.

yaml
# General configuration
+common:
+  agent_name: my-agent
+  entry_point: app.py
+  language_version: '3.12'
+  launch_type: cloud # Define the default deployment mode
+
+# Mode-specific configuration
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: latest
+    runtime_envs:
+      MODEL_API_KEY: "your-api-key"

Want detailed explanations of all configuration options? See Configuration Reference.

Quick Start

In just a few minutes, you can deploy your first Agent.

bash
# 1. Initialize a project (choose the Basic App template)
+mkdir my-first-agent && cd my-first-agent
+agentkit init my-first-agent
+
+# Or specify a particular template
+agentkit init my-first-agent --template basic_stream  # Streaming output template
+agentkit init my-first-agent --template a2a           # A2A protocol template
+
+# 2. Configure the app (via the interactive wizard)
+agentkit config
+
+# 3. Deploy to the cloud in one command
+agentkit launch
+
+# 4. Test your Agent
+agentkit invoke "Hello!"
+
+# 5. Check runtime status
+agentkit status
+
+# 6. Clean up resources (optional)
+agentkit destroy

Explore More Features

bash
# List available templates
+agentkit init --list-templates
+
+# Manage platform services
+agentkit memory list      # List memory collections
+agentkit knowledge list   # List knowledge bases
+agentkit tools list       # List tools
+agentkit runtime list     # List runtime instances

Environment Requirements

✅ Basic Requirements (All Modes)

  • Python 3.10 or later
  • pip package manager
  • AgentKit SDK installed

🐍 Python Development Environment

  • Supports Python 3.10, 3.11, 3.12, 3.13
  • Recommended to manage dependencies with requirements.txt

🐹 Golang Development Environment

  • Supports Golang 1.24
  • Manage dependencies with go.mod
  • Suitable for high-performance scenarios

🐳 Local Development (Local/Hybrid Mode)

  • Docker Desktop or Docker Engine 20.10+
  • Ensure the Docker service is running

☁️ Cloud Deployment (Cloud/Hybrid Mode)

  • A Volcengine account
  • Configure access credentials (AK/SK). We recommend using the secure global configuration approach:
    bash
    # Initialize global configuration
    +agentkit config --global --init
    +
    +# Set access credentials
    +agentkit config --global --set volcengine.access_key="your_access_key"
    +agentkit config --global --set volcengine.secret_key="your_secret_key"
    +
    +# (Optional for Byteplus) Set BytePlus as the default cloud provider
    +agentkit config --global --set defaults.cloud_provider=byteplus
    +
    +# (Optional for Byteplus) Set Byteplus access credentials
    +agentkit config --global --set byteplus.access_key="your_byteplus_access_key"
    +agentkit config --global --set byteplus.secret_key="your_byteplus_secret_key"

Next Steps

  • 📖 Command Reference: Dive into parameters and usage for each CLI command.
  • ⚙️ Configuration Reference: Master all configuration options in agentkit.yaml.
  • 🚀 Quick Start: Follow an end-to-end tutorial to build a complete Agent application from scratch.
`,44)])])}const g=e(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.lean.js b/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.lean.js new file mode 100644 index 0000000..e4ecbe9 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_1.overview.md.CkNAYw2y.lean.js @@ -0,0 +1 @@ +import{_ as e,c as s,o as a,ag as t}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit CLI Overview","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/2.agentkit-cli/1.overview.md","filePath":"en/content/2.agentkit-cli/1.overview.md","lastUpdated":1770735100000}'),n={name:"en/content/2.agentkit-cli/1.overview.md"};function l(o,i,r,d,h,p){return a(),s("div",null,[...i[0]||(i[0]=[t("",44)])])}const g=e(n,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.js b/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.js new file mode 100644 index 0000000..a1bdd00 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.js @@ -0,0 +1,637 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"CLI Command Reference","description":"","frontmatter":{"title":"CLI Command Reference"},"headers":[],"relativePath":"en/content/2.agentkit-cli/2.commands.md","filePath":"en/content/2.agentkit-cli/2.commands.md","lastUpdated":1770735100000}'),t={name:"en/content/2.agentkit-cli/2.commands.md"};function l(p,s,h,o,k,d){return n(),a("div",null,[...s[0]||(s[0]=[e(`

CLI Command Reference

AgentKit CLI is the core tool for interacting with the AgentKit Platform. It provides a complete set of commands designed to simplify and automate the full lifecycle of Agent development, deployment, and management. Whether you are initializing a new project, configuring cloud resources, or testing and iterating on your Agent, AgentKit CLI provides strong support.

This document introduces the purpose, parameters/options, and best practices for each command, helping you use AgentKit CLI efficiently to build excellent Agent applications.

Command Overview

AgentKit CLI follows the standard format: agentkit <command> [arguments] [options].

CommandDescriptionCore Use Cases
initInitialize a project: Create a brand-new Agent project or wrap existing code.Start new Agent development; quickly deploy existing code.
configConfigure an app: Manage project configuration interactively or non-interactively.Set deployment mode, environment variables, image tags, etc.
buildBuild an image: Package your Agent code into a portable Docker image.Prepare for deployment; CI/CD integration.
deployDeploy an app: Publish a built image to the target runtime environment.Go live or update an Agent service.
launchOne-command launch: Automatically completes both build and deploy.Fast iteration; simplified release workflow.
invokeTest invocation: Invoke an Agent locally or in the cloud for functional validation.Debug Agent logic; end-to-end validation.
statusView status: Get runtime status and endpoint information for a deployed Agent.Monitor service health; obtain access URL.
destroyClean up resources: Stop and delete deployed Agent instances and related resources.Take a service offline; release cloud resources.

agentkit init

agentkit init guides you through creating a new Agent project. It supports both “start from scratch” and “wrap existing code”, significantly improving bootstrap efficiency.

Modes

  1. Template Mode: Create a project from AgentKit built-in templates. Suitable for developers starting from scratch.
  2. Wrapper Mode: Quickly wrap an existing veadk Agent definition file into a deployable AgentKit project to reuse code.

Syntax

bash
# Template mode: create from a preset template
+agentkit init [project_name] [options]
+
+# Wrapper mode: wrap an existing Agent definition file
+agentkit init [project_name] --from-agent <path_to_agent_file> [options]

Core Parameter

  • project_name (optional):
    • Description: A unique name for your Agent project, such as smart-faq-agent.
    • Default: In template mode, simple_agent; in wrapper mode, auto-generated from the source filename (e.g. agentkit-my_agent).
    • Constraints: Can only contain letters, numbers, underscores (_), and hyphens (-).

Template Mode Options

OptionDescriptionExample
--template, -tSelect a project template such as basic, basic_stream, a2a.--template basic
--agent-nameSet the display name of the Agent.--agent-name "Intelligent Customer Support"
--descriptionDescribe what the Agent does (especially important in multi-agent collaboration).--description "Handle common user questions"
--system-promptDefine the Agent system prompt to shape its role and behavior.--system-prompt "You are a professional customer support agent..."
--model-nameSpecify the model name on Volcengine Ark.--model-name "doubao-pro-32k"
--toolsComma-separated list of tools such as web_search,run_code.--tools "web_search"

Wrapper Mode Options

OptionDescriptionExample
--from-agent, -f(Required) Path to an existing Python file that contains a veadk.Agent definition.--from-agent ./my_existing_agent.py
--agent-varIf auto-detection fails, manually specify the variable name of the Agent object in the file.--agent-var "custom_agent_instance"
--wrapper-typeWrapper type to generate: basic (standard) or stream (streaming).--wrapper-type stream

Common Options

OptionDescriptionDefault
--directoryTarget directory where the project will be created.Current directory (.)

Examples

Template Mode

bash
# Example 1: interactive creation; guides you to choose a template
+agentkit init my-first-agent
+
+# Example 2: create directly using the 'basic' template
+agentkit init weather-report-agent --template basic
+
+# Example 3: create in a specified directory
+agentkit init my_agent --template basic_stream --directory ./my_agents
+
+# Example 4: shorthand
+agentkit init weather -t basic
+
+# Example 5: customize Agent attributes
+agentkit init custom-agent \\
+  --template basic \\
+  --agent-name "Advanced Assistant" \\
+  --description "An agent with web access and code execution" \\
+  --tools "web_search,run_code"
+
+# Example 6: create a streaming output Agent
+agentkit init stream_agent \\
+  --template basic_stream \\
+  --agent-name "Streaming Chat Assistant" \\
+  --model-name "doubao-seed-1-6-250615"

Wrapper Mode

bash
# Example 7: wrap an existing Agent file (auto-detect Agent variable)
+agentkit init --from-agent ./my_agent.py
+
+# Example 8: wrap and specify a project name
+agentkit init weather_bot --from-agent ./weather_agent.py
+
+# Example 9: shorthand and specify Agent variable name
+agentkit init -f ./my_agent.py --agent-var my_custom_agent
+
+# Example 10: generate a streaming wrapper
+agentkit init chat_bot \\
+  --from-agent ./chat_agent.py \\
+  --wrapper-type stream
+
+# Example 11: wrap into a specified directory
+agentkit init deployed_agent \\
+  --from-agent ../agents/production_agent.py \\
+  --agent-var prod_agent \\
+  --wrapper-type basic \\
+  --directory ./deployment
+
+# Example 12: a complete wrapper command
+agentkit init my_deployed_bot \\
+  -f ~/projects/agents/my_bot.py \\
+  --agent-var bot \\
+  --wrapper-type stream \\
+  --directory ./deploy

Best practices

  • Start from templates: For new AgentKit users, start with the basic template; it provides a simple project structure.
  • Leverage wrapper mode: When you already have mature veadk Agent logic, wrapper mode helps you avoid rewriting code and focus on fast deployment.
  • Use clear names: Give your project and Agent descriptive names to support long-term maintenance and teamwork.

Output

Template mode output

After running a template-mode command, you will see output similar to:

     ✨ Build AI Agents with Ease ✨
+
+Available Templates
+┌────┬──────────────────────────┬──────────┬──────────────────────────────────────────────┐
+│ ID │ Name                     │ Type     │ Description                                  │
+├────┼──────────────────────────┼──────────┼──────────────────────────────────────────────┤
+│ 1  │ Basic Agent App          │ Basic App│ Basic Agent app, great for getting started   │
+│ 2  │ Basic Stream Agent App   │ Stream App│ Agent app with streaming output             │
+│ 3  │ A2A Agent App            │ A2A App  │ Multi-agent app supporting the A2A protocol  │
+│ 4  │ Eino A2A Agent App       │ A2A App  │ A2A app based on the Eino framework (Golang) │
+└────┴──────────────────────────┴──────────┴──────────────────────────────────────────────┘
+
+Please select a template by entering the ID (1-2):
+Template ID: 1
+Selected: Basic Agent App
+
+Creating project: my_weather_agent
+Using template: Basic Agent App
+
+✨ Project initialized successfully!
+Template: Basic Agent App
+Entry point: my_weather_agent.py
+Language: Python 3.12
+
+Created files:
+  ✓ my_weather_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

Wrapper mode output 🆕

After running a wrapper-mode command, you will see output similar to:

     ✨ Build AI Agents with Ease ✨
+
+🔄 Wrapping existing Agent file
+
+Project name: agentkit-my_agent
+Agent file: ./my_agent.py
+Wrapper type: basic
+
+✨ Project initialized successfully!
+Template: Agent Wrapper (Basic)
+Entry point: agentkit-my_agent.py
+Language: Python 3.12
+Agent file: my_agent.py
+Agent variable: agent
+
+Created files:
+  ✓ my_agent.py
+  ✓ agentkit-my_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

Wrapper mode deep dive 🆕

Wrapper mode is a powerful feature that lets you quickly deploy an existing Agent definition file to the AgentKit platform without rewriting code.

How it works

  1. Parse the Agent file: Automatically analyzes your Python file and identifies the Agent object definition.
  2. Copy the source file: Copies your Agent file into the project directory.
  3. Generate a wrapper: Creates a new Python file that imports and wraps your Agent.
  4. Configure deployment: Generates agentkit.yaml and other required deployment files.

What the wrapper does

The generated wrapper file is responsible for:

  • Importing your Agent: Imports the Agent object from your file.
  • Creating a Runner: Wraps the Agent using the veadk Runner.
  • Providing deployment interfaces: Implements the @app.entrypoint and @app.ping interfaces required by AgentKit.
  • Handling request/response: Automatically converts HTTP request formats.

Requirements for the Agent file

Your Agent file must meet the following requirements:

Basic requirements:

python
# Must be a Python file (.py)
+# Must contain an Agent object definition
+
+from veadk import Agent
+
+# Agent definition - variable name can be agent, my_agent, etc.
+agent = Agent(
+    model="doubao-seed-1-6-250615",
+    description="My Agent"
+)

Supported Agent variable names:

  • The system auto-detects common names such as: agent, main_agent, my_agent, etc.
  • You can also use a custom name, but you must specify it via --agent-var.

Unsupported cases:

  • ❌ No Agent(...) definition in the file.
  • ❌ Agent definition is inside a function (must be at module level).
  • ❌ Agent object is created via complex logic (must be a direct assignment).

Wrapper type comparison

FeatureBasic wrapperStream wrapper
Response modeReturn the full result onceStreaming return (SSE)
Typical scenariosStandard chat; short responsesLong-form generation; real-time output
Dependenciesveadk-pythonveadk-python + google-adk
Config requirementsNoneAgent must support streaming output
Client UXWait and then show onceToken-by-token display; better interactivity

When to use which

Good scenarios for wrapper mode:

  • ✅ You already have veadk Agent code and want to deploy quickly.
  • ✅ Your Agent is developed and debugged locally and is ready to go live.
  • ✅ Multiple projects share the same Agent definition.
  • ✅ You want to keep Agent code and deployment code separated.

Good scenarios for template mode:

  • ✅ Create a new Agent from scratch.
  • ✅ Learn the AgentKit development workflow.
  • ✅ Need complete example code as a starting point.

Project structure after wrapping

my_project/
+├── my_agent.py              # your original Agent definition
+├── agentkit-my_agent.py     # wrapper generated by AgentKit (entry point)
+├── requirements.txt         # dependencies list (with usage notes)
+├── agentkit.yaml            # deployment config (entry_point points to wrapper)
+└── .dockerignore            # Docker build ignore rules

Wrapper file example (basic type):

python
# Import your Agent
+from my_agent import agent
+
+from veadk import Runner
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id,
+    )
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

FAQ

Q: What if the Agent definition cannot be found?

A: Use --agent-var to explicitly specify the Agent variable name:

bash
agentkit init -f ./my_agent.py --agent-var my_custom_agent_name

Q: Can I modify the generated wrapper?

A: Yes. The wrapper is standard Python code and can be modified as needed. Just make sure @app.entrypoint and @app.ping remain unchanged.

Q: Will the original Agent file be modified?

A: No. The system only copies your file into the target directory; it does not modify the original file.

Q: How do I add extra dependencies in the wrapper project?

A: Edit the generated requirements.txt file and add the dependency packages you need. The file already contains usage notes.


agentkit config

Configure parameters for an Agent application. Three modes are supported: interactive (guided), non-interactive (fast updates), and hybrid (flexible combination).

🆕 Global configuration support: A global configuration file (~/.agentkit/config.yaml) is available to share configuration across projects.

Usage

bash
# Project configuration
+agentkit config [arguments] [options]
+
+# Project level: set the cloud provider (volcengine/byteplus)
+agentkit config --cloud_provider byteplus
+
+# Global configuration 🆕
+agentkit config --global [options]

Three configuration modes

Run with no parameters; the wizard guides you step-by-step:

bash
agentkit config

Interactive flow example:

[1/7] 🤖 Agent name: my_agent
+[2/7] 📝 Entry point: my_agent.py  
+[3/7] 📄 App description: My weather query agent
+[4/7] 🐍 Python version: 3.12
+[5/7] 📦 Dependencies file: requirements.txt
+[6/7] 🚀 Deployment mode (choose one):
+  1. local - build and run locally
+  2. hybrid - build locally, run in the cloud
+  3. cloud - build and run in the cloud (recommended)
+[7/7] 🔐 App-level environment variables (shared by all modes):
+  Variable: MODEL_API_KEY=xxxxx

⚡ Non-interactive mode (fast updates; suitable for scripts/CI/CD)

Configure directly via command-line parameters without manual input:

bash
# Full configuration example
+agentkit config \\
+    --agent_name myAgent \\
+    --entry_point agent.py \\
+    --launch_type cloud \\
+    --cloud_provider byteplus \\
+    --image_tag v1.0.0 \\
+    --runtime_envs API_KEY=xxxxx
bash
# Incremental updates (only modify part of the configuration)
+agentkit config --entry_point new_agent.py
+agentkit config --image_tag v1.0.1

🔀 Hybrid mode

Specify some parameters via the command line and input the rest interactively:

bash
agentkit config --agent_name myAgent --interactive

Main parameters

General configuration parameters

ParameterDescriptionExample
--agent_nameAgent application namemy_weather_bot
--entry_pointEntry file (must end with .py)agent.py
--descriptionApp description"Weather assistant"
--language_versionLanguage version3.12
--dependencies_fileDependencies filerequirements.txt
--launch_typeDeployment modelocal, hybrid, cloud
--cloud_provider / --cloud-providerCloud providervolcengine, byteplus

Environment variable configuration (important ⭐)

AgentKit supports two-level environment variable configuration:

ParameterLevelDescriptionUse cases
--runtime_envs / -eApp levelShared across all deployment modesAPI keys, model endpoints, cross-environment configuration
--workflow-runtime-envsWorkflow levelOnly applies to the current deployment modeDebug flags, mode-specific configuration

Examples:

bash
# App level (shared across all modes)
+agentkit config \\
+    -e API_KEY=shared-key \\
+    -e MODEL_ENDPOINT=https://api.example.com
+
+# Workflow level (current mode only)
+agentkit config \\
+    --workflow-runtime-envs DEBUG=true \\
+    --workflow-runtime-envs LOCAL_CACHE=/tmp
+
+# Mixed usage
+agentkit config \\
+    -e API_KEY=shared \\
+    --workflow-runtime-envs DEBUG=true

Merge rules:

  • App-level environment variables are inherited by all workflows.
  • Workflow-level environment variables only take effect in the current mode.
  • Variables with the same name: workflow-level overrides app-level.

Cloud/Hybrid mode parameters

ParameterDescriptionExample
--regionVolcengine regioncn-beijing
--tos_bucketTOS bucketagentkit-bucket
--image_tagImage tagv1.0.0, latest
--cr_instance_nameCR instance namemy-cr-instance
--cr_namespace_nameCR namespaceagentkit
--cr_repo_nameCR repository namemy-agent

💡 Tip: the --cr_* parameters also support legacy aliases --ve_cr_* for backward compatibility.

Runtime resource bindings (Cloud/Hybrid)

You can use agentkit config to bind (or unbind) runtime resources. When agentkit launch/deploy creates/updates a runtime, the bindings are passed through to the Runtime API.

Supported binding fields:

  • memory_id: bind a Memory
  • knowledge_id: bind a Knowledge
  • tool_id: bind a Tool
  • mcp_toolset_id: bind an MCP Toolset

Command-line examples:

bash
# Bind resources
+agentkit config \\
+  --memory_id mem-xxx \\
+  --knowledge_id kb-xxx \\
+  --tool_id tool-xxx \\
+  --mcp_toolset_id mcp-ts-xxx
+
+# Unbind (set to empty string)
+agentkit config --memory_id ""

YAML persisted location (agentkit.yaml):

yaml
launch_types:
+  cloud:  # or hybrid
+    runtime_bindings:
+      memory_id: mem-xxx
+      knowledge_id: kb-xxx
+      tool_id: tool-xxx
+      mcp_toolset_id: mcp-ts-xxx

💡 Unbind semantics:

  • Omit a key in config: do not change that binding
  • Set to "" or null: clear/unbind (a clear operation will be sent when updating the Runtime)

Runtime network configuration (Cloud/Hybrid)

You can use agentkit config to set runtime networking (VPC/private network, public network, or dual-stack). This configuration takes effect only when creating a runtime for the first time (CreateRuntime).

⚠️ Limitation: If a runtime already exists, agentkit launch/deploy will call UpdateRuntime. UpdateRuntime does not support modifying network_configuration, so this setting will not affect existing runtimes. If you need to change the network, destroy and recreate the runtime.

Command-line example (private network):

bash
agentkit config \\
+  --runtime-network-mode private \\
+  --runtime-vpc-id vpc-xxxxxxxx \\
+  --runtime-subnet-id subnet-aaaaaaaa \\
+  --runtime-enable-shared-internet-access

YAML format (agentkit.yaml):

yaml
launch_types:
+  cloud:  # or hybrid
+    runtime_network:
+      mode: private            # public | private | both
+      vpc_id: vpc-xxxxxxxx     # required for private/both
+      enable_shared_internet_access: true  # only effective for private/both
+      subnet_ids:
+        - subnet-aaaaaaaa

mode values:

  • public: public access only
  • private: private access only (requires vpc_id)
  • both: enable both public and private access (requires vpc_id)

enable_shared_internet_access:

  • Only takes effect when mode is private or both. When enabled, the runtime uses the platform-provided shared public egress to access the public internet.
  • If mode=public and this flag is enabled, AgentKit will error to prevent a misleading “configured but not effective” setup.

Control options

OptionDescription
--config, -cSpecify the configuration file path (default: agentkit.yaml)
--interactive, -iForce interactive mode
--dry-runPreview changes without saving
--show, -sShow current configuration

Global configuration options 🆕

AgentKit supports a global configuration file (~/.agentkit/config.yaml) for sharing configuration across projects.

OptionDescription
--global, -gOperate on the global config instead of the project config
--initInitialize the global config file (create a template)
--setSet a global config field (format: key=value)

Supported global config fields:

FieldDescriptionExample
volcengine.access_keyVolcengine Access KeyAK***
volcengine.secret_keyVolcengine Secret KeySK***
volcengine.regionDefault regioncn-beijing
cr.instance_nameCR instance nameteam-cr-instance
cr.namespace_nameCR namespaceagentkit-team
tos.bucketTOS bucket nameteam-agentkit-builds
tos.prefixTOS object prefixagentkit-builds
tos.regionTOS regioncn-beijing

Configuration precedence:

Environment variables > Project config (agentkit.yaml) > Global config > Defaults

Examples

Example 1: first-time configuration (interactive)

bash
agentkit config

Example 2: quickly update a single field

bash
# Update entry point
+agentkit config --entry_point new_agent.py
+
+# Update image tag
+agentkit config --image_tag v1.0.1
+
+# Add an environment variable
+agentkit config -e NEW_KEY=new_value

Example 3: complete non-interactive configuration

bash
agentkit config \\
+    --agent_name weather-bot \\
+    --entry_point agent.py \\
+    --description "Weather assistant" \\
+    --launch_type cloud \\
+    --image_tag v1.0.0 \\
+    --region cn-beijing \\
+    -e API_KEY=xxxxx \\
+    -e MODEL_ENDPOINT=https://api.example.com

Example 4: configuration preview (dry run)

bash
# Show changes but do not save
+agentkit config --entry_point agent.py --image_tag v2.0 --dry-run

Example output:

General config - changes:
+┌──────────────┬──────────────┬──────────────┐
+│ Config item   │ Old value     │ New value     │
+├──────────────┼──────────────┼──────────────┤
+│ entry_point   │ old_agent.py  │ agent.py      │
+│ image_tag     │ v1.0          │ v2.0          │
+└──────────────┴──────────────┴──────────────┘
+
+🔍 Dry-run: no changes were saved

Example 5: show current configuration

bash
agentkit config --show

Example 6: global configuration management 🆕

Initialize global configuration:

bash
# Create a global config template
+agentkit config --global --init

Output:

✅ Global configuration file created: ~/.agentkit/config.yaml
+
+📝 A template has been generated containing the following fields:
+
+🔐 Volcengine credentials
+  access_key: ''
+  secret_key: ''
+  region: cn-beijing
+
+📦 CR configuration
+  instance_name: ''
+  namespace_name: ''
+
+🗂️  TOS configuration
+  bucket: ''
+  prefix: agentkit-builds
+  region: cn-beijing

Show global configuration:

bash
agentkit config --global --show

Set global configuration:

bash
# Set a single field
+agentkit config --global --set cr.instance_name=team-cr-instance
+agentkit config --global --set tos.bucket=team-bucket
+
+# Set credentials
+agentkit config --global --set volcengine.access_key=AK***
+agentkit config --global --set volcengine.secret_key=SK***

Team collaboration scenario:

bash
# 1. Team admin creates and shares global configuration
+agentkit config --global --init
+vim ~/.agentkit/config.yaml  # fill in team-shared configuration
+
+# 2. Team members automatically use global config when initializing projects
+agentkit init my-agent
+# related fields in agentkit.yaml are left empty; global config is used at runtime
+
+# 3. Special projects can override global configuration in agentkit.yaml
+agentkit config --cr_instance_name special-cr  # override global config

Example 7: CI/CD integration

bash
# Use in CI/CD pipelines
+agentkit config \\
+    --agent_name \${CI_PROJECT_NAME} \\
+    --entry_point agent.py \\
+    --launch_type cloud \\
+    --image_tag \${CI_COMMIT_TAG} \\
+    -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+
+agentkit launch

Interactive input for environment variables

In interactive mode, environment variable configuration supports convenience commands:

🔐 App-level environment variables (enter KEY=VALUE; empty line to finish)
+  
+  Available commands:
+  - Enter KEY=VALUE to add a variable
+  - Enter 'list' to show existing variables
+  - Enter 'del KEY' to delete a variable
+  - Enter 'clear' to clear all
+  - Press Enter on an empty line to finish
+
+Variable: MODEL_API_KEY=xxxxx
+✅ Added: MODEL_API_KEY
+
+Variable: list
+Current variables:
+  MODEL_API_KEY=xxxxx
+
+Variable: [press Enter to finish]
+📋 Configured 1 shared variable

Configuration validation

All configuration is validated automatically:

  • Required fields: Agent name and entry point cannot be empty
  • Format validation: entry point must end with .py
  • Option constraints: launch_type must be local, hybrid, or cloud
  • Naming rules: Agent name can only contain letters, numbers, underscore, hyphen, and dot

Validation failures show detailed errors and exit.

Best practices

  1. Use interactive mode for first-time setup for a guided experience

    bash
    agentkit config
  2. Use non-interactive mode for daily updates for speed and efficiency

    bash
    agentkit config --entry_point new_agent.py
  3. Use non-interactive mode in CI/CD for full automation

    bash
    agentkit config --agent_name $PROJECT --image_tag $TAG
  4. Preview before applying to avoid mistakes

    bash
    agentkit config --entry_point agent.py --dry-run
  5. Manage environment variables by level:

    • App level: shared across environments (API keys, etc.)
    • Workflow level: mode-specific (debug flags, etc.)
  6. Use global config for team collaboration 🆕:

    bash
    # Team admin
    +agentkit config --global --init
    +agentkit config --global --set cr.instance_name=team-cr
    +agentkit config --global --set tos.bucket=team-bucket
    +
    +# Team members
    +agentkit init my-agent  # automatically uses global config
    +agentkit launch         # automatically uses global config at runtime
  7. Understand configuration precedence:

    • Project config can override global config
    • Environment variables have the highest priority
    • Order: Environment variables > Project config > Global config > Defaults

agentkit build

Package your Agent code into a Docker image in preparation for deployment.

Usage

bash
agentkit build [options]

Parameter description

--config-file configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

--platform build platform

  • Specify the target platform/architecture
  • Default: auto (auto-detect)
  • Usually not needed

--regenerate-dockerfile force regenerate Dockerfile

  • Force regenerate Dockerfile even if it already exists
  • Use case: when configuration has changed and you need to refresh the Dockerfile
  • Default: False

Docker build customization 🛠

AgentKit supports customizing Docker image builds via the docker_build section. Add the following to agentkit.yaml.

Configuration fields

base_image - custom base image

Python projects (string form):

yaml
docker_build:
+  base_image: "python:3.12-slim"
+  # Or use an Alpine image
+  base_image: "python:3.12-alpine"

build_script - custom build script

  • Path is relative to the project root
  • Used for installing system dependencies, compiling extensions, etc.
  • The script runs automatically during the build
yaml
docker_build:
+  build_script: "scripts/setup.sh"

Complete example

Python project example:

yaml
agent_name: my-agent
+entry_point: agent.py
+language: Python
+language_version: "3.12"
+dependencies_file: requirements.txt
+launch_type: local
+
+# Docker build customization
+docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/setup.sh"

Build script example (scripts/setup.sh):

bash
#!/bin/bash
+# Install system dependencies
+apt-get update && apt-get install -y gcc g++ libpq-dev
+# Or on Alpine: apk add --no-cache gcc musl-dev postgresql-dev
+
+echo "Custom build script completed"

Use cases

ScenarioConfigurationExample
Use a lightweight imageSpecify an Alpine base imagebase_image: "python:3.12-alpine"
Install system dependenciesWrite a build scriptbuild_script: "scripts/install_deps.sh"
Compile C extensionsInstall a build toolchainInstall gcc, g++, etc. in the script
Configure certificatesUpdate CA certificatesRun update-ca-certificates in the script
Multi-stage buildsSpecify builder and runtime separatelyGolang projects only

Dockerfile auto-management

  • Dockerfile is auto-generated based on configuration and includes a metadata header
  • Automatically updated when configuration changes (old versions are backed up to .agentkit/dockerfile_backups/)
  • If you remove the metadata header, AgentKit will no longer manage the file automatically
  • Use --regenerate-dockerfile to force regeneration

Example metadata header:

dockerfile
# ============================================================================
+# AUTO-GENERATED by AgentKit v1.x.x
+# ============================================================================
+# Source: agentkit.yaml
+# Checksum: sha256:...
+# Generated: 2025-01-17T10:30:00
+# 
+# This file is automatically generated and managed by AgentKit:
+#   - It will be auto-updated when agentkit.yaml config changes
+#   - To fully customize, remove this header comment
+# ============================================================================

Build process

The build strategy is chosen automatically based on launch_type:

🏠 Local mode (build locally)

Build with Docker on your machine:

🔨 Starting local image build...
+[1/3] Generating Dockerfile...
+[2/3] Building Docker image...
+[3/3] Verifying image availability...
+✅ Build succeeded: my-agent:latest

Estimated time: 1–3 minutes.

☁️ Cloud mode (build in the cloud)

Build automatically on Volcengine:

🔨 Starting cloud build...
+[1/6] Generating Dockerfile...
+[2/6] Packaging project code...
+[3/6] Uploading to object storage...
+[4/6] Preparing image registry...
+[5/6] Creating build pipeline...
+[6/6] Executing build task...
+✅ Build succeeded: xxx.cr.volces.com/agentkit/my-agent:latest

Estimated time: 3–5 minutes.

Build result

  • Image name: {agent_name}:{image_tag}
  • Image information: automatically saved into the configuration file
  • Build record: includes timestamp, image ID, etc.

Examples

bash
# Example 1: build with default configuration
+agentkit build
+
+# Example 2: specify config file
+agentkit build --config-file ./prod.yaml
+
+# Example 3: force regenerate Dockerfile
+agentkit build --regenerate-dockerfile
+
+# Example 4: force refresh after config changes
+agentkit build --config-file ./prod.yaml --regenerate-dockerfile

Custom build examples

Example 5: use an Alpine base image

  1. Modify agentkit.yaml:
yaml
docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/alpine-setup.sh"
  1. Create scripts/alpine-setup.sh:
bash
#!/bin/sh
+apk add --no-cache gcc musl-dev postgresql-dev
  1. Build:
bash
agentkit build

Example 6: install system dependencies (C extensions)

  1. Modify agentkit.yaml:
yaml
docker_build:
+  build_script: "scripts/install-deps.sh"
  1. Create scripts/install-deps.sh:
bash
#!/bin/bash
+apt-get update && apt-get install -y \\
+    gcc g++ \\
+    libpq-dev \\
+    libxml2-dev \\
+    libxslt1-dev
  1. Build:
bash
agentkit build

Example 7: Golang multi-stage build

Modify agentkit.yaml:

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:3.19"
+  build_script: "scripts/install-certs.sh"

Build:

bash
agentkit build

Notes

Local mode prerequisites:

  • ✅ Ensure Docker is installed and running
  • ✅ Docker daemon is accessible

Cloud mode prerequisites:

  • ✅ Set AK/SK credentials
  • ✅ Ensure network access to Volcengine

Docker build customization:

  • ✅ Build script path should be relative to the project root
  • ✅ Scripts automatically gain execute permissions
  • ✅ Missing build scripts produce warnings but do not stop the build
  • ✅ Dockerfile is auto-generated and updated when configuration changes
  • ✅ Older Dockerfiles are backed up to .agentkit/dockerfile_backups/
  • ✅ Removing the metadata header disables automatic management

Tip: build metadata will be written back to the config file for use by the deploy command.


agentkit deploy

Deploy the built image and start the Agent to serve requests.

Usage

bash
agentkit deploy [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Deployment Process

Automatically selects the deployment target based on the configured launch_type:

🏠 Local Mode (Local Deployment)

Starts the container on your local machine:

🚀 Starting deployment to local Docker...
+[1/3] Stopping old container version...
+[2/3] Starting new container...
+[3/3] Verifying container status...
+✅ Deployment successful! Container is running
+🌐 Access URL: http://localhost:8000

Estimated time: 10-30 seconds

☁️ Cloud Mode (Cloud Deployment)

Creates a Runtime on Volcengine:

🚀 Starting deployment to cloud platform...
+✅ Generated Runtime name: my-agent-20250120-abc123
+✅ Created Runtime: r-xxxxxx
+⏳ Waiting for Runtime to be ready...
+✅ Runtime is ready!
+🌐 Access URL: http://xxx.apigateway-cn-beijing.volceapi.com

Estimated time: 1-2 minutes

Usage Examples

bash
# Example 1: Deploy to default environment
+agentkit deploy
+
+# Example 2: Deploy to production environment
+agentkit deploy --config-file ./prod.yaml

After Deployment

Local Mode:

  • ✅ Container running locally
  • ✅ Accessible via localhost:port
  • ✅ Automatic health checks

Cloud Mode:

  • ✅ Runtime running in the cloud
  • ✅ Get a publicly accessible URL
  • ✅ Automatic Runtime status verification

agentkit launch

Build + Deploy in one step! Equivalent to automatically running build then deploy.

Usage

bash
agentkit launch [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Execution Flow

🚀 Starting Agent launch...
+
+━━━ Step 1: Build Image ━━━
+🔨 Reading config: agentkit.yaml
+🔨 Starting build...
+✅ Build completed
+
+━━━ Step 2: Deploy Application ━━━
+🚀 Starting deployment...
+✅ Deployment completed
+
+✨ Agent launched successfully!

Usage Examples

bash
# Example 1: One-click launch
+agentkit launch
+
+# Example 2: Launch to production environment
+agentkit launch --config-file ./prod.yaml

Why Use launch

  • Time-saving - One command instead of two
  • 🔒 Version consistency - Ensures build and deploy use the same configuration
  • 🚀 Fast iteration - Test immediately after code changes

agentkit invoke

Send a test request to a deployed Agent to verify functionality.

Usage

bash
agentkit invoke [message content] [options]

⚠️ Important: You must provide either message content or the --payload option, but not both

Parameter Description

Message Content

  • Enter the text you want to send directly after the command, without any option flags
  • Will be automatically wrapped as {"prompt": "your message"}
  • Cannot be used with --payload
  • Example: agentkit invoke "hello" or agentkit invoke "how's the weather today?"

Options

--payload, -p Custom request data

  • Specify complete request content in JSON format
  • Cannot be used with message content
  • Example: --payload '{"prompt": "hello", "context": "greeting"}'

--headers, -h Custom request headers

  • Specify HTTP headers in JSON format
  • Automatically adds user_id and session_id by default
  • Example: --headers '{"user_id": "test123"}'

--raw Output raw response (for debugging)

  • For streaming calls: prints SSE event JSON from server line by line to verify event format
  • For non-streaming calls: outputs compact raw JSON (no pretty indent)
  • Example: agentkit invoke "hello" --raw

--show-reasoning Output reasoning content (for LangChain debugging)

  • When streaming events contain additional_kwargs.reasoning_content, incrementally prints this field
  • Displayed separately from final answer (Reasoning first, then Answer)
  • Example: agentkit invoke "1+1=?" --show-reasoning

--apikey, -ak API Key

  • May be required for cloud deployment (Cloud mode)
  • Used for authentication
  • Optional parameter

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml in current directory

Usage Examples

Example 1: Send message directly (simplest)

bash
agentkit invoke "How's the weather in Hangzhou today?"

Equivalent to sending the following JSON:

json
{
+  "prompt": "How's the weather in Hangzhou today?"
+}

Example 2: Custom request content

bash
agentkit invoke --payload '{"prompt": "Hangzhou weather?", "user_location": "Hangzhou"}'

Example 3: With headers

bash
agentkit invoke \\
+  --payload '{"prompt": "Hangzhou weather?"}' \\
+  --headers '{"user_id": "user123", "session_id": "sess456"}'

Example 4: Cloud deployment (with API Key)

bash
agentkit invoke "hello" --apikey your_api_key_here

Execution Output

💬 Calling Agent...
+✅ Runtime ID: r-xxxxxx
+🌐 Calling address: http://xxx.apigateway-cn-beijing.volceapi.com
+✅ Call successful!
+
+📡 Agent response:
+Hangzhou is sunny today, 22°C, great for going out.

Notes

  • ⚠️ Message content and --payload are mutually exclusive
  • ⚠️ Cloud deployment may require API Key
  • ⚠️ Ensure Agent is deployed before calling (check with agentkit status)

agentkit status

View the Agent's running status, including whether it's online, access URL, and other information.

Usage

bash
agentkit status [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Output Example

🏠 Local Mode

✅ Container name: my-agent
+✅ Running status: running
+🌐 Access URL: http://localhost:8000
+
+Details:
+{
+    "container_id": "abc123...",
+    "status": "running",
+    "ports": ["8000:8000"],
+    "created": "2025-01-20 10:00:00",
+    "health": "healthy"
+}

☁️ Cloud Mode

✅ Runtime ID: r-xxxxxx
+✅ Running status: Ready
+🌐 Access URL: http://xxx.apigateway-cn-beijing.volceapi.com
+
+Details:
+{
+    "runtime_id": "r-xxxxxx",
+    "runtime_name": "my-agent-20250120-abc123",
+    "status": "Ready",
+    "endpoint": "http://xxx.apigateway-cn-beijing.volceapi.com",
+    "image": "xxx.cr.volces.com/agentkit/my-agent:latest",
+    "created_at": "2025-01-20 10:00:00"
+}

Status Description

Local Mode Status:

  • running - Running normally
  • ⏸️ stopped - Stopped
  • 🔄 restarting - Restarting
  • error - Error occurred

Cloud Mode Status:

  • Ready - Ready to receive requests
  • 🔄 Releasing - Deploying
  • Error - Runtime error
  • Failed - Deployment failed

Usage Examples

bash
# Example 1: View current status
+agentkit status
+
+# Example 2: View production environment status
+agentkit status --config-file ./prod.yaml

agentkit destroy

Stop and delete the Agent instance, releasing resources. ⚠️ This operation is irreversible!

Usage

bash
agentkit destroy [options]

Parameter Description

--force Force delete

  • Skip confirmation prompt and delete directly
  • Default is off (will ask for confirmation)
  • Use with caution!

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Safety Confirmation

By default, you will be asked to confirm the operation:

🗑️ Preparing to destroy running Agent...
+⚠️ This operation cannot be undone!
+Are you sure you want to continue? [y/N]: y

Skip confirmation (not recommended):

bash
agentkit destroy --force

What Will Be Deleted

🏠 Local Mode

  • ✅ Stop Docker container
  • ✅ Delete container instance
  • ⚠️ Image will be retained (can be manually deleted)

☁️ Cloud Mode

  • ✅ Delete Runtime instance
  • ✅ Release cloud resources
  • ⚠️ Image will be retained (can be manually deleted in CR)

Execution Output

🗑️ Starting to destroy Agent resources...
+✅ Stopped Runtime: r-xxxxxx
+✅ Runtime deleted successfully
+✅ Resources cleaned up
+
+Tip: Configuration file and images are retained, can redeploy anytime.

Usage Examples

bash
# Example 1: Safe deletion (recommended)
+agentkit destroy
+
+# Example 2: Force deletion
+agentkit destroy --force
+
+# Example 3: Delete specified environment
+agentkit destroy --config-file ./dev.yaml

Important Notes

  • ⚠️ Irreversible: Cannot be undone after deletion, data will be permanently lost
  • Config retained: agentkit.yaml file will not be deleted
  • Image retained: Docker images will not be deleted, can redeploy
  • 💡 Redeploy: Can redeploy anytime with agentkit deploy

Common Options

All commands support these options:

--help View Help

View detailed descriptions and parameters for any command:

bash
# View help for a specific command
+agentkit invoke --help
+agentkit build --help
+
+# View list of all commands
+agentkit --help

--version View Version

Display CLI version information:

bash
agentkit --version
+# or
+agentkit -v

Platform Service Commands

AgentKit CLI provides rich platform service management commands for managing Memory, Knowledge, Tools, and Runtime resources.

agentkit memory

Manage AgentKit Memory collections, supporting create, view, update, and delete operations.

bash
# Create memory collection (default provider-type: MEM0)
+agentkit memory create --name my-memory --description "My memory collection"
+
+# Add external memory collection
+agentkit memory add --provider-collection-id <id> --provider-type VIKINGDB_MEMORY --name my-external-memory
+
+# List all memory collections (supports pagination and filtering)
+agentkit memory list
+agentkit memory list --name-contains "my" --limit 10
+
+# View memory collection details
+agentkit memory show -m <id>
+
+# Update memory collection
+agentkit memory update -m <id> --description "Updated description"
+
+# Delete memory collection
+agentkit memory delete -m <id>
+
+# Get connection information
+agentkit memory conn -m <id>
+
+# View supported Provider types
+agentkit memory provider-types

agentkit knowledge

Manage AgentKit Knowledge bases, supporting CRUD operations.

bash
# Add knowledge base (connect external knowledge base)
+agentkit knowledge add --name my-kb --provider-knowledge-id <id> --provider-type VIKINGDB_KNOWLEDGE
+
+# List all knowledge bases (supports pagination and filtering)
+agentkit knowledge list
+agentkit knowledge list --status Ready
+
+# View knowledge base details
+agentkit knowledge show -k <id>
+
+# Update knowledge base
+agentkit knowledge update -k <id> --description "Updated description"
+
+# Delete knowledge base
+agentkit knowledge delete -k <id>
+
+# Get connection information
+agentkit knowledge conn -k <id>
+
+# View supported Provider types
+agentkit knowledge provider-types

agentkit tools

Manage AgentKit Tools and Sessions, including tool lifecycle management and session operations.

bash
# Tool management
+# Create tool (needs to specify tool-type)
+agentkit tools create --name my-tool --tool-type <type> --description "My tool"
+# List tools (supports pagination and filtering)
+agentkit tools list
+# View tool details
+agentkit tools show -t <id>
+# Update tool
+agentkit tools update -t <id> --description "New description"
+# Delete tool
+agentkit tools delete -t <id>
+
+# Session management
+# Create session
+agentkit tools session create -t <id> --name my-session --ttl 30 --ttl-unit minute
+# List sessions
+agentkit tools session list -t <id>
+# View session details
+agentkit tools session show -t <id> -s <session_id>
+# Get session logs
+agentkit tools session logs -t <id> -s <session_id>
+# Set session TTL
+agentkit tools session set-ttl -t <id> -s <session_id> --ttl 60 --ttl-unit minute
+# Delete session
+agentkit tools session delete -t <id> -s <session_id>

agentkit runtime

Manage AgentKit Runtime instances, supporting runtime create, update, delete, and version management.

bash
# Create runtime (needs to specify artifact info)
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --description "My runtime"
+
+# Create runtime and associate resources
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --memory-id mem-xxx \\
+  --knowledge-id kb-xxx \\
+  --tool-id tool-xxx \\
+  --mcp-toolset-id mcp-ts-xxx
+
+# Create runtime with private network access (VPC)
+agentkit runtime create \\
+  --name my-runtime \\
+  --role-name <role> \\
+  --artifact-type DockerImage \\
+  --artifact-url <url> \\
+  --vpc-id vpc-xxxxxxxx \\
+  --subnet-ids subnet-aaaaaaaa \\
+  --enable-private-network \\
+  --enable-public-network false
+
+# List all runtimes (supports pagination and filtering)
+agentkit runtime list
+
+# View runtime details
+agentkit runtime get -r <id>
+
+# Update runtime
+agentkit runtime update -r <id> --description "New description"
+
+> 💡 Tip: \`agentkit runtime update\` currently only supports updating artifact/description/env/tags and resource binding fields (\`memory-id/knowledge-id/tool-id/mcp-toolset-id\`), network configuration cannot be modified.
+
+# Delete runtime
+agentkit runtime delete -r <id>
+
+# Release new version
+agentkit runtime release -r <id> --version-number <version>
+
+# View specific version details
+agentkit runtime version -r <id> --version-number <version>
+
+# List all versions
+agentkit runtime versions -r <id>

Common Workflows

📝 Complete Development Workflow (Template Mode)

Complete steps from zero to production:

bash
# 1️⃣ Create project
+agentkit init weather_agent --template basic
+cd weather_agent
+
+# 2️⃣ Configure app
+agentkit config
+
+# 3️⃣ One-click deploy
+agentkit launch
+
+# 4️⃣ Test functionality
+agentkit invoke "How's the weather in Hangzhou?"
+
+# 5️⃣ Check status
+agentkit status

🔄 Quick Deploy Existing Agent (Wrapper Mode) 🆕

Quickly deploy an existing Agent:

bash
# 1️⃣ Wrap existing Agent file
+agentkit init --from-agent ~/my_projects/weather_agent.py
+
+# 2️⃣ Enter project directory
+cd agentkit-weather_agent
+
+# 3️⃣ (Optional) Configure app
+agentkit config
+
+# 4️⃣ One-click deploy
+agentkit launch
+
+# 5️⃣ Test functionality
+agentkit invoke "How's the weather today?"
+
+# 6️⃣ Check status
+agentkit status

🔄 Quick Iteration Workflow

Update workflow after code changes:

bash
# Method 1: Step-by-step (recommended for debugging)
+agentkit build        # Rebuild
+agentkit deploy       # Redeploy
+agentkit invoke "test"  # Test validation
+
+# Method 2: One-click update (recommended for daily development)
+agentkit launch       # Auto build+deploy
+agentkit invoke "test"  # Test validation

🌍 Multi-Environment Management

Switch between dev, test, and production environments:

bash
# Development environment
+agentkit launch --config-file agentkit.dev.yaml
+agentkit invoke "test" --config-file agentkit.dev.yaml
+
+# Production environment
+agentkit launch --config-file agentkit.prod.yaml
+agentkit invoke "test" --config-file agentkit.prod.yaml

FAQ

Don't panic when you encounter errors, here are solutions!

❌ Configuration file not found

Error: Configuration file not found: agentkit.yaml

Cause: No configuration file in current directory

Solution:

bash
# If new project
+agentkit init my_agent
+
+# If existing project
+agentkit config

❌ Docker not running (Local Mode)

Error: Docker daemon not running

Cause: Docker service not started

Solution:

  • Windows/Mac: Open Docker Desktop
  • Linux: sudo systemctl start docker

❌ Cloud credentials not configured (Cloud Mode)

Error: VOLC_ACCESSKEY or VOLC_SECRETKEY not set

Cause: Volcengine AK/SK not set

Solution:

bash
# Recommended: Use secure global config
+agentkit config --global --init
+agentkit config --global --set volcengine.access_key="your AccessKey"
+agentkit config --global --set volcengine.secret_key="your SecretKey"
+
+# Or: Temporary environment variables (for dev/debugging)
+export VOLC_ACCESSKEY="your AccessKey"
+export VOLC_SECRETKEY="your SecretKey"

❌ Build failed

❌ Build failed: ...

Possible causes and solutions:

  1. Dependency issues - Check if requirements.txt is correct
  2. Code errors - Check if Python code has syntax errors
  3. Network issues - Check network connection, retry build
  4. Permission issues - Ensure you have Docker/cloud operation permissions

💡 Debugging Tips

1. View detailed logs

bash
# Set verbose log level
+export LOG_LEVEL=DEBUG
+agentkit build

2. Verify configuration file

bash
# Check if configuration is correct
+cat agentkit.yaml

3. Execute step by step

bash
# Execute separately, easier to locate issues
+agentkit build    # Build first
+agentkit deploy   # Then deploy
+# Instead of using launch directly

4. Check running status

bash
# Check if Agent is running normally
+agentkit status

Next Steps

`,435)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.lean.js b/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.lean.js new file mode 100644 index 0000000..745d250 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_2.commands.md.CWvyKhK4.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"CLI Command Reference","description":"","frontmatter":{"title":"CLI Command Reference"},"headers":[],"relativePath":"en/content/2.agentkit-cli/2.commands.md","filePath":"en/content/2.agentkit-cli/2.commands.md","lastUpdated":1770735100000}'),t={name:"en/content/2.agentkit-cli/2.commands.md"};function l(p,s,h,o,k,d){return n(),a("div",null,[...s[0]||(s[0]=[e("",435)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.js b/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.js new file mode 100644 index 0000000..8e8d845 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.js @@ -0,0 +1,345 @@ +import{_ as l,c as p,o as h,ag as t,j as s,t as e,a}from"./chunks/framework.CA4hJK0u.js";const b=JSON.parse('{"title":"Configuration File Reference","description":"","frontmatter":{"title":"Configuration File Reference"},"headers":[],"relativePath":"en/content/2.agentkit-cli/3.configurations.md","filePath":"en/content/2.agentkit-cli/3.configurations.md","lastUpdated":1770735100000}'),d={name:"en/content/2.agentkit-cli/3.configurations.md"},r={tabindex:"0"},k={tabindex:"0"},o={tabindex:"0"};function c(n,i,g,E,u,y){return h(),p("div",null,[i[37]||(i[37]=t(`

Configuration File Reference

agentkit.yaml is the core configuration file for your Agent. It contains all runtime parameters. This document explains what each configuration field does.

Configuration system overview

AgentKit uses a two-level configuration architecture:

Config fileLocationPurpose
Project config./agentkit.yamlProject-level config. Each Agent project is independent.
Global config~/.agentkit/config.yamlUser-level config shared across projects (for example, Volcengine credentials).

Precedence:

Environment variables > Project config > Global config > Defaults

File structure

The project config file has three sections:

yaml
common:
+  # Base config (shared by all launch types)
+  agent_name: my_agent
+  entry_point: my_agent.py
+  language: Python
+  launch_type: cloud
+  runtime_envs: {}           # App-level environment variables
+
+launch_types:
+  local:
+    # Local-only settings
+  hybrid:
+    # Hybrid-only settings
+  cloud:
+    # Cloud-only settings
+
+docker_build:
+  # Docker build config (optional)
+  base_image: python:3.12-slim
+  build_script: scripts/setup.sh

The three sections:

  • common - shared configuration for all deployment modes
  • launch_types - mode-specific configuration for different deployment modes
  • docker_build - optional Docker build customization

common

Base configuration required by all deployment modes.

Example

yaml
common:
+  agent_name: my_weather_agent        # Agent name (required)
+  entry_point: my_weather_agent.py    # Entry file (required)
+  description: Weather query agent    # Description (optional)
+  language: Python                    # Programming language
+  language_version: '3.12'            # Language version
+  dependencies_file: requirements.txt  # Dependency file
+  launch_type: cloud                  # Launch type
+  runtime_envs:                       # App-level env vars (shared by all launch types)
+    LOG_LEVEL: info

Fields

agent_name (required)

The Agent name

  • 📝 What it does: gives your Agent a name
  • Rules: only letters, numbers, _, and -
  • 🎯 Used for:
    • Docker image name
    • prefix for the cloud Runtime name
    • default image repository name

Examples:

yaml
agent_name: weather_agent           # Recommended: simple and clear
+agent_name: financial-analyzer-v2   # OK: includes a version
+agent_name: customer_support_bot    # OK: descriptive

entry_point (required)

The entry file for your Agent code

  • 📝 What it does: specifies which file to run
  • Rules: must end with .py, .go, or .sh
  • 🎯 Used for: the container runs this file on startup

Examples:

yaml
# Python project
+entry_point: app.py
+entry_point: server.py
+
+# Go project
+entry_point: main.go
+entry_point: cmd/server/main.go
+
+# Custom startup script
+entry_point: start.sh

description (optional)

A description of the Agent

  • 📝 What it does: briefly explains what the Agent does
  • Rules: any text
  • 🎯 Used for: helping teammates understand the purpose

Examples:

yaml
description: "Weather query agent for major cities nationwide"
+description: "Customer support assistant for common questions"

language (optional)

Programming language

  • 📝 What it does: declares the language used by the project
  • Options: Python, Golang
  • Default: Python
  • 🎯 Used for: choosing the Dockerfile template and build workflow

Examples:

yaml
language: Python    # Python project
+language: Golang    # Go project

language_version (optional)

Language runtime version

  • 📝 What it does: specifies the language version
  • Python supported: 3.10, 3.11, 3.12, 3.13
  • Golang supported: 1.24
  • Default: Python 3.12, Golang 1.24

Examples:

yaml
# Python project
+language: Python
+language_version: '3.12'
+
+# Go project
+language: Golang
+language_version: '1.24'

⚠️ Note: python_version is deprecated. Use language_version instead.

dependencies_file (optional)

Dependency list file

  • 📝 What it does: sets the path to your dependency file
  • Default: requirements.txt for Python projects; go.mod for Go projects
  • 🎯 Used for: installing dependencies during build

Examples:

yaml
# Python project
+dependencies_file: requirements.txt
+dependencies_file: requirements/prod.txt
+
+# Go project
+dependencies_file: go.mod

launch_type (required)

Deployment and runtime mode

  • 📝 What it does: selects where to build and run
  • Options: local, hybrid, cloud
ModeBest forBuild locationRun location
locallocal development & debuggingyour machineyour machine
hybridtransition phaseyour machinecloud platform
cloudproductioncloud platformcloud platform

Examples:

yaml
launch_type: local   # local development
+launch_type: hybrid  # build locally + deploy to cloud
+launch_type: cloud   # production (recommended)

cloud_provider (optional)

Cloud provider (platform service provider)

  • 📝 What it does: choose whether platform services use Volcano Engine (China) or BytePlus (Overseas)
  • Options: volcengine, byteplus
  • Default: volcengine
  • 🎯 Used for:
    • affects default region, endpoint, and credential namespace
    • affects the default base image used for auto-generated Dockerfiles (when docker_build.base_image is not explicitly set)

Precedence (highest to lowest):

Environment variables > Project config (agentkit.yaml) > Global config (~/.agentkit/config.yaml) > Defaults

How to configure:

yaml
# 1) Project config (recommended: put it in agentkit.yaml)
+common:
+  cloud_provider: byteplus
bash
# 1.1) Project config (write to agentkit.yaml via non-interactive command)
+agentkit config --cloud_provider byteplus
yaml
# 2) Global config (applies across projects)
+defaults:
+  cloud_provider: byteplus
bash
# 3) Environment variables (temporary override)
+export CLOUD_PROVIDER=byteplus

runtime_envs (optional)

App-level environment variables

  • 📝 What it does: defines environment variables shared by all deployment modes
  • 🎯 Used for: common configuration such as log level
  • ⚠️ Precedence: policy-level runtime_envs override variables with the same name defined at the app level

Example:

yaml
common:
+  runtime_envs:
+    LOG_LEVEL: info
+    APP_ENV: production

Local launch type

Build and run on local Docker. Best for development and debugging.

Example

yaml
launch_types:
+  local:
+    image_tag: latest                  # Image tag
+    invoke_port: 8000                  # App port
+    container_name: my_agent           # Container name (optional)
+    runtime_envs:                      # Policy-level env vars
+      MODEL_AGENT_API_KEY: xxx
+    ports:                             # Port mappings
+      - "8000:8000"
+    restart_policy: unless-stopped     # Restart policy
+    memory_limit: 1g                   # Memory limit
+    cpu_limit: '1'                     # CPU limit

Fields

image_tag

Image version tag

  • Default: latest
  • Purpose: distinguishes different image versions
  • Examples: latest, v1.0, dev

invoke_port

The port your Agent listens on

  • Default: 8000
  • Purpose: sets which port the app listens on
  • ❗ Must match the port used in your code

container_name

Docker container name

  • Default: uses agent_name
  • Purpose: assigns a name to the container
  • Can be omitted; a name will be generated automatically

runtime_envs

Policy-level runtime environment variables

Environment variables passed into the container, such as API keys and configuration parameters. They are merged with common.runtime_envs; variables with the same name override the app-level ones.

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: your_api_key  # Model API key
+  DEBUG: 'true'                      # Enable debugging
+  LOG_LEVEL: debug                   # Override LOG_LEVEL from common

ports

Port mappings

Maps container ports to host ports using host_port:container_port.

yaml
ports:
+  - "8080:8000"  # Host 8080 maps to container 8000
+  - "9090:9090"  # Monitoring port

volumes

Volume mounts

Mounts host directories into the container using host_path:container_path.

yaml
volumes:
+  - "./data:/app/data"      # Data directory
+  - "./logs:/app/logs"      # Log directory

restart_policy

Container restart policy

  • Default: unless-stopped
  • Options:
    • no - do not restart
    • on-failure - restart on failures
    • always - always restart
    • unless-stopped - restart unless manually stopped

memory_limit / cpu_limit

Resource limits

Limits the resources a container can use, preventing it from consuming too much.

yaml
memory_limit: 2g    # Limit to 2GB memory
+cpu_limit: '1'      # Limit to 1 CPU core

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

FieldDescription
container_idContainer ID after deployment
image_idImage ID after build
build_timestampBuild time
deploy_timestampDeployment time
full_image_nameFull image name (e.g. my-agent:latest)

Cloud launch type

Build and run on Volcengine. Best for production.

Example

yaml
launch_types:
+  cloud:
+    region: cn-beijing                       # Region
+    image_tag: "{{timestamp}}"               # Image tag (template variables supported)
+
+    # TOS (object storage) settings
+    tos_bucket: Auto                         # Auto-create bucket
+
+    # Container Registry settings
+    cr_instance_name: Auto                   # CR instance name (Auto = auto-create)
+    cr_namespace_name: agentkit              # CR namespace
+    cr_repo_name: ""                         # CR repo name (empty = use agent_name)
+
+    # Runtime settings
+    runtime_name: Auto                       # Runtime name
+    runtime_role_name: Auto                  # IAM role name
+    runtime_apikey_name: Auto                # API key secret name
+
+    # Environment variables
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # Model API key
+      MODEL_AGENT_NAME: ep-xxx               # Model endpoint

Template variables

Cloud mode supports template variables, rendered automatically during build/deploy:

`,114)),s("table",r,[i[4]||(i[4]=s("thead",null,[s("tr",null,[s("th",null,"Variable"),s("th",null,"Description"),s("th",null,"Example value")])],-1)),s("tbody",null,[s("tr",null,[s("td",null,[s("code",null,e(n.timestamp),1)]),i[0]||(i[0]=s("td",null,"Current timestamp (YYYYMMDDHHmmss)",-1)),i[1]||(i[1]=s("td",null,[s("code",null,"20251128153042")],-1))]),s("tr",null,[s("td",null,[s("code",null,e(n.account_id),1)]),i[2]||(i[2]=s("td",null,"Volcengine account ID",-1)),i[3]||(i[3]=s("td",null,[s("code",null,"2100123456")],-1))])])]),i[38]||(i[38]=t('

Examples:

yaml
image_tag: "{{timestamp}}"                               # Unique tag for each build\ncr_instance_name: "agentkit-platform-{{account_id}}"     # Account-isolated CR instance\ntos_bucket: "agentkit-platform-{{account_id}}"           # Account-isolated bucket

The Auto keyword

When a value is Auto, the CLI will automatically create or manage the corresponding resource:

',4)),s("table",k,[i[12]||(i[12]=s("thead",null,[s("tr",null,[s("th",null,"Field"),s("th",null,"Auto behavior")])],-1)),s("tbody",null,[s("tr",null,[i[6]||(i[6]=s("td",null,[s("code",null,"tos_bucket")],-1)),s("td",null,[i[5]||(i[5]=a("Auto-create bucket ",-1)),s("code",null,"agentkit-platform-"+e(n.account_id),1)])]),s("tr",null,[i[8]||(i[8]=s("td",null,[s("code",null,"cr_instance_name")],-1)),s("td",null,[i[7]||(i[7]=a("Auto-create CR instance ",-1)),s("code",null,"agentkit-platform-"+e(n.account_id),1)])]),i[9]||(i[9]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,"Auto-create Runtime")],-1)),i[10]||(i[10]=s("tr",null,[s("td",null,[s("code",null,"runtime_role_name")]),s("td",null,"Auto-create IAM role")],-1)),i[11]||(i[11]=s("tr",null,[s("td",null,[s("code",null,"runtime_apikey_name")]),s("td",null,"Auto-create API key secret")],-1))])]),i[39]||(i[39]=t('

Fields

region

Volcengine region

  • Default: cn-beijing
  • Purpose: selects the geographic location where the service runs
  • Options: cn-beijing (currently only Beijing is supported)

💡 Tip: choose the region closest to your users to reduce latency.

image_tag

Image version tag

',7)),s("ul",null,[s("li",null,[i[13]||(i[13]=a("Default: ",-1)),s("code",null,e(n.timestamp),1),i[14]||(i[14]=a(" (generates a unique tag each build)",-1))]),i[20]||(i[20]=s("li",null,"Purpose: distinguishes different versions",-1)),s("li",null,[i[15]||(i[15]=a("Examples: ",-1)),s("code",null,e(n.timestamp),1),i[16]||(i[16]=a(", ",-1)),i[17]||(i[17]=s("code",null,"latest",-1)),i[18]||(i[18]=a(", ",-1)),i[19]||(i[19]=s("code",null,"v1.0.0",-1))])]),i[40]||(i[40]=t(`
yaml
# Option 1: use a timestamp (recommended; ensures uniqueness)
+image_tag: "{{timestamp}}"
+
+# Option 2: fixed version
+image_tag: v1.0.0
+
+# Option 3: use latest (not recommended for production)
+image_tag: latest

tos_bucket

Object storage bucket

  • Default: Auto (auto-create)
  • Purpose: stores the source code archive (for cloud builds)
  • Security note: tos_bucket must belong to your current account. If you set another person's bucket name (e.g. a public read-write bucket), the CLI will block uploads and ask you to change it.
yaml
# Auto-create (recommended)
+tos_bucket: Auto
+
+# Use an existing bucket
+tos_bucket: my-existing-bucket

cr_instance_name

Container Registry instance name

  • Default: Auto (auto-create)
  • Purpose: selects which CR instance stores your Docker images
yaml
# Auto-create
+cr_instance_name: Auto
+
+# Use an existing instance
+cr_instance_name: my-existing-cr

cr_namespace_name

CR namespace

  • Default: agentkit
  • Purpose: organizes and manages images
  • Auto-create: created automatically if missing

cr_repo_name

CR repository name

  • Default: empty (uses agent_name)
  • Purpose: the repository that stores the image
  • Auto-create: created automatically if missing

runtime_name / runtime_role_name / runtime_apikey_name

Runtime-related settings

  • Default: Auto (auto-create)
  • Purpose: manages the cloud runtime instance and its authentication
yaml
runtime_name: Auto           # Runtime name
+runtime_role_name: Auto      # IAM role
+runtime_apikey_name: Auto    # API key secret name

runtime_envs

Policy-level runtime environment variables

Configuration required by the Agent at runtime. The most important values are model API credentials. They are merged with common.runtime_envs.

Required:

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: xxx  # Volcano Ark API key
+  MODEL_AGENT_NAME: ep-xxx  # Volcano Ark endpoint ID

Optional (enhanced capabilities):

yaml
runtime_envs:
+  # Base settings
+  MODEL_AGENT_API_KEY: xxx
+  MODEL_AGENT_NAME: ep-xxx
+
+  # Observability (logs, metrics, tracing)
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: my_agent
+
+  # Other settings
+  DEBUG: 'true'     # Enable debug mode
+  LOG_LEVEL: info   # Set log level

build_timeout

Build timeout

  • Default: 3600 (seconds)
  • Purpose: maximum wait time for a cloud build

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

TOS storage-related

FieldDescription
tos_prefixObject storage prefix (default agentkit-builds)
tos_regionTOS region
tos_object_keyStorage path for the code package
tos_object_urlURL for the code package

Code Pipeline build-related

FieldDescription
cp_workspace_nameBuild workspace name
cp_pipeline_nameBuild pipeline name
cp_pipeline_idPipeline ID

Image-related

FieldDescription
cr_regionImage registry region
cr_image_full_urlFull image URL

Runtime-related

FieldDescription
runtime_idRuntime instance ID
runtime_endpointApplication access URL
runtime_apikeyRuntime API key
build_timestampBuild time
deploy_timestampDeployment time

Hybrid launch type

Build locally and run in the cloud. This is useful during development and debugging: you can build images quickly on your machine and then run them on the cloud.

Example

yaml
launch_types:
+  hybrid:
+    region: cn-beijing                       # Cloud region
+    image_tag: "{{timestamp}}"               # Image tag (template variables supported)
+
+    # Container Registry settings
+    cr_instance_name: Auto                   # CR instance name
+    cr_namespace_name: agentkit              # CR namespace
+    cr_repo_name: ""                         # CR repo name
+
+    # Runtime settings
+    runtime_name: Auto                       # Runtime name
+    runtime_role_name: Auto                  # IAM role name
+    runtime_apikey_name: Auto                # API key secret name
+
+    # Environment variables
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # Model API key
+      MODEL_AGENT_NAME: ep-xxx               # Model endpoint

Differences from Cloud mode

ItemHybridCloud
Build locationLocal DockerCloud Code Pipeline
TOS settingsNot requiredRequired (stores the code package)
Build speedFast (local)Slower (upload + cloud build)
Best forDevelopment & debuggingProduction

Fields

Hybrid mode is largely the same as Cloud mode, but does not require TOS-related settings (because local builds do not upload a source archive).

region

Volcengine region

  • Default: cn-beijing
  • Purpose: selects the geographic location where the cloud service runs

image_tag

Image version tag

`,53)),s("ul",null,[s("li",null,[i[21]||(i[21]=a("Default: ",-1)),s("code",null,e(n.timestamp),1)]),i[22]||(i[22]=s("li",null,"Purpose: distinguishes different image versions",-1)),i[23]||(i[23]=s("li",null,"Template variables supported",-1))]),i[41]||(i[41]=t(`

cr_instance_name / cr_namespace_name / cr_repo_name

Container Registry settings

Same as Cloud mode. Used to store the locally built image.

yaml
cr_instance_name: Auto          # Auto-create CR instance
+cr_namespace_name: agentkit     # Namespace
+cr_repo_name: ""                # Repo name (empty = use agent_name)

runtime_name / runtime_role_name / runtime_apikey_name

Runtime settings

Same as Cloud mode. Used to manage the cloud runtime instance.

runtime_envs

Policy-level runtime environment variables

Same as Cloud mode. Environment variables passed to the cloud runtime.

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

FieldDescription
image_idImage ID built locally
build_timestampBuild time
full_image_nameFull image name
cr_image_full_urlFull image URL in CR
runtime_idRuntime instance ID
runtime_endpointApplication access URL
runtime_apikeyRuntime API key

docker_build

Customize the Docker build process. Supports custom base images, build scripts, and more.

Example

yaml
docker_build:
+  # Python project - string form
+  base_image: "python:3.12-slim"
+
+  # Custom build script
+  build_script: "scripts/setup.sh"
+
+  # Force regenerate Dockerfile
+  regenerate_dockerfile: false
+
+  # Target platform (cross-platform builds)
+  platform: "linux/amd64"

Multi-stage build for Go projects:

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"    # Builder stage image
+    runtime: "alpine:latest"         # Runtime stage image
+  build_script: "scripts/install_certs.sh"

Fields

base_image

Custom base image

  • Default: chosen automatically based on language
  • Python default: uses AgentKit prebuilt base images and switches automatically according to common.cloud_provider
    • volcengine: agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python<version>-bookworm-slim-latest
    • byteplus: agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python<version>-bookworm-slim-latest
  • Golang default: agentkit-cn-beijing.cr.volces.com/base/compile_basego:1.24 (build) + agentkit-cn-beijing.cr.volces.com/base/runtime_basego:latest (runtime)
yaml
# Python project - string
+base_image: "python:3.12-alpine"
+
+# Go project - mapping (multi-stage build)
+base_image:
+  builder: "golang:1.24-alpine"
+  runtime: "alpine:latest"

build_script

Custom build script

  • Default: none
  • Purpose: runs a custom script during Docker build
  • Path: relative to the project root

Typical use cases:

  • install system dependencies
  • compile C extensions
  • download additional resources
yaml
build_script: "scripts/setup.sh"
+build_script: "docker/install_deps.sh"

regenerate_dockerfile

Force regenerate Dockerfile

  • Default: false
  • Purpose: regenerate even if a Dockerfile already exists
  • CLI flag: --regenerate-dockerfile

platform

Target CPU architecture

  • Default: current system architecture
  • Purpose: cross-platform builds
  • CLI flag: --platform
yaml
platform: "linux/amd64"    # x86_64
+platform: "linux/arm64"    # ARM (e.g. Apple Silicon)

Global configuration

Global configuration is stored in ~/.agentkit/config.yaml and shared across projects.

Location

~/.agentkit/config.yaml

Example

yaml
# Volcengine credentials
+volcengine:
+  access_key: "AKLTxxxxxxxx"
+  secret_key: "xxxxxxxx"
+  region: "cn-beijing"
+
+# Default Container Registry settings
+cr:
+  instance_name: "my-team-cr-instance"
+  namespace_name: "my-team"
+
+# Default TOS settings
+tos:
+  bucket: "my-team-bucket"
+  prefix: "agentkit-builds"
+  region: "cn-beijing"

Precedence

When a project config value is empty or set to Auto, AgentKit will automatically fall back to global config:

1. Explicit values in project config (highest)
+2. Global config (~/.agentkit/config.yaml)
+3. Defaults (lowest)

Typical use cases

Shared team configuration

Teammates can share the same CR instance and TOS bucket:

yaml
# ~/.agentkit/config.yaml
+cr:
+  instance_name: "team-shared-cr"
+  namespace_name: "team-agents"
+
+tos:
+  bucket: "team-shared-bucket"

Then in the project config, set the fields to Auto to reuse the team settings:

yaml
# agentkit.yaml
+launch_types:
+  cloud:
+    cr_instance_name: Auto    # Uses team-shared-cr from global config
+    tos_bucket: Auto          # Uses team-shared-bucket from global config

Best practices

🌍 Multi-environment management

Create separate config files for different environments:

bash
agentkit.dev.yaml   # Development (local)
+agentkit.test.yaml  # Testing (hybrid)
+agentkit.prod.yaml  # Production (cloud)

Usage:

bash
# Development
+agentkit launch --config-file agentkit.dev.yaml
+
+# Production
+agentkit launch --config-file agentkit.prod.yaml

🔐 Secure handling of secrets

❌ Bad practice (hard-coding):

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: c05d49af-1234-5678-abcd-xxxx  # Don't do this!

✅ Recommended approaches:

Option 1: interactive configuration

bash
agentkit config  # Enter sensitive values interactively

Option 2: use .gitignore

bash
# .gitignore
+agentkit.local.yaml    # Don't commit local config
+agentkit.prod.yaml     # Don't commit prod config
+*.secret.yaml          # Any config file containing secrets

Option 3: create a config template

yaml
# agentkit.yaml.template (commit to Git)
+runtime_envs:
+  MODEL_AGENT_API_KEY: <fill in your API key>
+  MODEL_AGENT_NAME: <fill in the endpoint ID>

📝 Add helpful comments

Make config easier for teammates to understand:

yaml
common:
+  agent_name: weather_agent
+  entry_point: app.py
+  launch_type: cloud  # Use cloud deployment for production
+
+launch_types:
+  cloud:
+    region: cn-beijing  # Beijing region, closest to users
+    runtime_envs:
+      # Volcano Ark model access credentials
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx

✅ Validate configuration regularly

Keep your config valid:

bash
# Option 1: run the config command to validate
+agentkit config
+
+# Option 2: inspect the config file
+cat agentkit.yaml
+
+# Option 3: try building (without deploying)
+agentkit build

Full examples

📱 Local development config (Python)

Good for rapid iteration and debugging:

yaml
common:
+  agent_name: dev_weather_agent
+  entry_point: app.py
+  description: Weather query agent for development
+  language: Python
+  language_version: '3.12'
+  launch_type: local
+  runtime_envs:
+    APP_ENV: development
+
+launch_types:
+  local:
+    image_tag: dev
+    invoke_port: 8000
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+      DEBUG: 'true'         # Enable debugging
+      LOG_LEVEL: debug      # Verbose logs
+    ports:
+      - "8000:8000"
+    memory_limit: 512m      # Lower limits for dev
+    cpu_limit: '0.5'

Golang project config

An example configuration for a Go Agent:

yaml
common:
+  agent_name: go_agent
+  entry_point: main.go
+  description: Golang agent
+  language: Golang
+  language_version: '1.24'
+  dependencies_file: go.mod
+  launch_type: hybrid
+
+launch_types:
+  hybrid:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"
+    cr_instance_name: Auto
+    cr_namespace_name: agentkit
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+
+docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:latest"

Production config

Suitable for going live:

yaml
common:
+  agent_name: prod_weather_agent
+  entry_point: server.py
+  description: Weather query agent for production
+  language: Python
+  language_version: '3.12'
+  launch_type: cloud
+  runtime_envs:
+    APP_ENV: production
+    LOG_LEVEL: info
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"    # Use a timestamp to ensure uniqueness
+
+    # CR settings
+    cr_instance_name: Auto
+    cr_namespace_name: production
+    cr_repo_name: weather_agent
+
+    # TOS settings
+    tos_bucket: Auto
+
+    # Runtime settings
+    runtime_name: Auto
+    runtime_role_name: Auto
+    runtime_apikey_name: Auto
+
+    runtime_envs:
+      # Base settings
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx
+
+      # Observability (recommended in production)
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: prod_weather_agent
+
+docker_build:
+  base_image: "python:3.12-slim"

🎯 Minimal configuration examples

Local mode (minimal):

yaml
common:
+  agent_name: simple-agent
+  entry_point: agent.py
+  launch_type: local

Cloud mode (minimal):

yaml
common:
+  agent_name: cloud-agent
+  entry_point: main.py
+  launch_type: cloud
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx

FAQ

❓ Configuration file not found

Error: Configuration file not found

Fix:

bash
agentkit init my_agent  # Create a new project
+# or
+agentkit config         # Create config

❓ Invalid YAML format

Error: Invalid YAML format

Checklist:

`,102)),s("ul",null,[i[25]||(i[25]=s("li",null,"✅ Use spaces for indentation (do not use tabs)",-1)),i[26]||(i[26]=s("li",null,[a("✅ Ensure there is a space after "),s("code",null,":")],-1)),i[27]||(i[27]=s("li",null,"✅ Quote strings containing special characters",-1)),s("li",null,[i[24]||(i[24]=a("✅ Quote template variables: ",-1)),s("code",null,'"'+e(n.timestamp)+'"',1)])]),i[42]||(i[42]=t(`

❓ Missing required fields

Error: agent_name is required

Fix:

bash
agentkit config  # Reconfigure and fill required fields

❓ Template variables failed to render

Error: Config field 'cr_instance_name' template variables were not fully rendered

Possible causes:

  1. Volcengine credentials are not configured
  2. Insufficient AK/SK permissions

Fix:

bash
# Check environment variables
+echo $VOLC_ACCESSKEY
+echo $VOLC_SECRETKEY
+
+# Or check global config
+cat ~/.agentkit/config.yaml

❓ Environment variables not taking effect

Possible causes:

  1. Variable name typo
  2. Config was not saved
  3. Not redeployed
  4. Confusing common.runtime_envs with policy-level runtime_envs

Fix:

bash
# 1) Check config
+cat agentkit.yaml
+
+# 2) Confirm env var placement
+# common.runtime_envs - shared by all modes
+# launch_types.<mode>.runtime_envs - specific to the chosen mode
+
+# 3) Redeploy
+agentkit deploy

❓ Legacy field names are incompatible

If your config uses legacy field names (for example ve_cr_instance_name or python_version), update them to the new names:

Legacy fieldNew field
python_versionlanguage_version
ve_cr_instance_namecr_instance_name
ve_cr_namespace_namecr_namespace_name
ve_cr_repo_namecr_repo_name
ve_runtime_idruntime_id
ve_runtime_nameruntime_name
ve_runtime_endpointruntime_endpoint

💡 Tip: the CLI still supports legacy field names (via aliases), but migration is recommended.


Configuration field quick reference

common fields

FieldRequiredDefaultDescription
agent_name-Agent name
entry_point-Entry file
descriptionemptyDescription
languagePythonProgramming language
language_version3.12/1.24Language version
dependencies_fileauto-detectedDependency file
launch_typelocalLaunch type
runtime_envs{}App-level environment variables

Cloud/Hybrid fields

`,24)),s("table",o,[i[36]||(i[36]=s("thead",null,[s("tr",null,[s("th",null,"Field"),s("th",null,"Default"),s("th",null,"Description")])],-1)),s("tbody",null,[i[30]||(i[30]=s("tr",null,[s("td",null,[s("code",null,"region")]),s("td",null,[s("code",null,"cn-beijing")]),s("td",null,"Volcengine region")],-1)),s("tr",null,[i[28]||(i[28]=s("td",null,[s("code",null,"image_tag")],-1)),s("td",null,[s("code",null,e(n.timestamp),1)]),i[29]||(i[29]=s("td",null,"Image tag",-1))]),i[31]||(i[31]=s("tr",null,[s("td",null,[s("code",null,"cr_instance_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"CR instance name")],-1)),i[32]||(i[32]=s("tr",null,[s("td",null,[s("code",null,"cr_namespace_name")]),s("td",null,[s("code",null,"agentkit")]),s("td",null,"CR namespace")],-1)),i[33]||(i[33]=s("tr",null,[s("td",null,[s("code",null,"cr_repo_name")]),s("td",null,"empty (uses agent_name)"),s("td",null,"CR repository name")],-1)),i[34]||(i[34]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"Runtime name")],-1)),i[35]||(i[35]=s("tr",null,[s("td",null,[s("code",null,"runtime_envs")]),s("td",null,[s("code",null,"{}")]),s("td",null,"Policy-level environment variables")],-1))])]),i[43]||(i[43]=t('

docker_build fields

FieldDefaultDescription
base_imageauto-selectedBase image
build_scriptnoneBuild script
regenerate_dockerfilefalseForce regenerate
platformcurrent archTarget platform

Next steps

  • 📖 CLI Overview - learn the main capabilities and concepts
  • 🎮 Commands - learn how each command works
  • 🚀 Quick Start - follow an end-to-end walkthrough
',5))])}const A=l(d,[["render",c]]);export{b as __pageData,A as default}; diff --git a/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.lean.js b/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.lean.js new file mode 100644 index 0000000..e085e1d --- /dev/null +++ b/assets/en_content_2.agentkit-cli_3.configurations.md.B_ONoSNn.lean.js @@ -0,0 +1 @@ +import{_ as l,c as p,o as h,ag as t,j as s,t as e,a}from"./chunks/framework.CA4hJK0u.js";const b=JSON.parse('{"title":"Configuration File Reference","description":"","frontmatter":{"title":"Configuration File Reference"},"headers":[],"relativePath":"en/content/2.agentkit-cli/3.configurations.md","filePath":"en/content/2.agentkit-cli/3.configurations.md","lastUpdated":1770735100000}'),d={name:"en/content/2.agentkit-cli/3.configurations.md"},r={tabindex:"0"},k={tabindex:"0"},o={tabindex:"0"};function c(n,i,g,E,u,y){return h(),p("div",null,[i[37]||(i[37]=t("",114)),s("table",r,[i[4]||(i[4]=s("thead",null,[s("tr",null,[s("th",null,"Variable"),s("th",null,"Description"),s("th",null,"Example value")])],-1)),s("tbody",null,[s("tr",null,[s("td",null,[s("code",null,e(n.timestamp),1)]),i[0]||(i[0]=s("td",null,"Current timestamp (YYYYMMDDHHmmss)",-1)),i[1]||(i[1]=s("td",null,[s("code",null,"20251128153042")],-1))]),s("tr",null,[s("td",null,[s("code",null,e(n.account_id),1)]),i[2]||(i[2]=s("td",null,"Volcengine account ID",-1)),i[3]||(i[3]=s("td",null,[s("code",null,"2100123456")],-1))])])]),i[38]||(i[38]=t("",4)),s("table",k,[i[12]||(i[12]=s("thead",null,[s("tr",null,[s("th",null,"Field"),s("th",null,"Auto behavior")])],-1)),s("tbody",null,[s("tr",null,[i[6]||(i[6]=s("td",null,[s("code",null,"tos_bucket")],-1)),s("td",null,[i[5]||(i[5]=a("Auto-create bucket ",-1)),s("code",null,"agentkit-platform-"+e(n.account_id),1)])]),s("tr",null,[i[8]||(i[8]=s("td",null,[s("code",null,"cr_instance_name")],-1)),s("td",null,[i[7]||(i[7]=a("Auto-create CR instance ",-1)),s("code",null,"agentkit-platform-"+e(n.account_id),1)])]),i[9]||(i[9]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,"Auto-create Runtime")],-1)),i[10]||(i[10]=s("tr",null,[s("td",null,[s("code",null,"runtime_role_name")]),s("td",null,"Auto-create IAM role")],-1)),i[11]||(i[11]=s("tr",null,[s("td",null,[s("code",null,"runtime_apikey_name")]),s("td",null,"Auto-create API key secret")],-1))])]),i[39]||(i[39]=t("",7)),s("ul",null,[s("li",null,[i[13]||(i[13]=a("Default: ",-1)),s("code",null,e(n.timestamp),1),i[14]||(i[14]=a(" (generates a unique tag each build)",-1))]),i[20]||(i[20]=s("li",null,"Purpose: distinguishes different versions",-1)),s("li",null,[i[15]||(i[15]=a("Examples: ",-1)),s("code",null,e(n.timestamp),1),i[16]||(i[16]=a(", ",-1)),i[17]||(i[17]=s("code",null,"latest",-1)),i[18]||(i[18]=a(", ",-1)),i[19]||(i[19]=s("code",null,"v1.0.0",-1))])]),i[40]||(i[40]=t("",53)),s("ul",null,[s("li",null,[i[21]||(i[21]=a("Default: ",-1)),s("code",null,e(n.timestamp),1)]),i[22]||(i[22]=s("li",null,"Purpose: distinguishes different image versions",-1)),i[23]||(i[23]=s("li",null,"Template variables supported",-1))]),i[41]||(i[41]=t("",102)),s("ul",null,[i[25]||(i[25]=s("li",null,"✅ Use spaces for indentation (do not use tabs)",-1)),i[26]||(i[26]=s("li",null,[a("✅ Ensure there is a space after "),s("code",null,":")],-1)),i[27]||(i[27]=s("li",null,"✅ Quote strings containing special characters",-1)),s("li",null,[i[24]||(i[24]=a("✅ Quote template variables: ",-1)),s("code",null,'"'+e(n.timestamp)+'"',1)])]),i[42]||(i[42]=t("",24)),s("table",o,[i[36]||(i[36]=s("thead",null,[s("tr",null,[s("th",null,"Field"),s("th",null,"Default"),s("th",null,"Description")])],-1)),s("tbody",null,[i[30]||(i[30]=s("tr",null,[s("td",null,[s("code",null,"region")]),s("td",null,[s("code",null,"cn-beijing")]),s("td",null,"Volcengine region")],-1)),s("tr",null,[i[28]||(i[28]=s("td",null,[s("code",null,"image_tag")],-1)),s("td",null,[s("code",null,e(n.timestamp),1)]),i[29]||(i[29]=s("td",null,"Image tag",-1))]),i[31]||(i[31]=s("tr",null,[s("td",null,[s("code",null,"cr_instance_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"CR instance name")],-1)),i[32]||(i[32]=s("tr",null,[s("td",null,[s("code",null,"cr_namespace_name")]),s("td",null,[s("code",null,"agentkit")]),s("td",null,"CR namespace")],-1)),i[33]||(i[33]=s("tr",null,[s("td",null,[s("code",null,"cr_repo_name")]),s("td",null,"empty (uses agent_name)"),s("td",null,"CR repository name")],-1)),i[34]||(i[34]=s("tr",null,[s("td",null,[s("code",null,"runtime_name")]),s("td",null,[s("code",null,"Auto")]),s("td",null,"Runtime name")],-1)),i[35]||(i[35]=s("tr",null,[s("td",null,[s("code",null,"runtime_envs")]),s("td",null,[s("code",null,"{}")]),s("td",null,"Policy-level environment variables")],-1))])]),i[43]||(i[43]=t("",5))])}const A=l(d,[["render",c]]);export{b as __pageData,A as default}; diff --git a/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.js b/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.js new file mode 100644 index 0000000..e048dd3 --- /dev/null +++ b/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.js @@ -0,0 +1,150 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"Logging System","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/2.agentkit-cli/4.logging.md","filePath":"en/content/2.agentkit-cli/4.logging.md","lastUpdated":1770735100000}'),t={name:"en/content/2.agentkit-cli/4.logging.md"};function l(h,s,p,o,k,r){return n(),a("div",null,[...s[0]||(s[0]=[e(`

Logging System

AgentKit CLI comes with a flexible built-in logging system to help you understand command execution, debug issues, and track runtime status.

Default Behavior

AgentKit defaults to the following:

  • Console output: Disabled (no logs displayed)
  • File logging: Disabled (no logs recorded)
  • 💡 Enable on demand: Turn logging on via environment variables as needed
bash
# By default, commands run with no log output
+agentkit status
+
+# If you need logs, enable them via environment variables (see below)

Log example:

[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Loading configuration...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Using launch_type: cloud
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Querying status with cloud strategy...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Status query completed: running

Quick Start

Enable File Logging

If you want to save logs to a file:

bash
# Enable file logging (default INFO level)
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit deploy
+
+# View the generated log file
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log

Enable Console Logging

If you want to view logs in real time in the console:

bash
# Enable console logging
+export AGENTKIT_LOG_CONSOLE=true
+
+# Run a command; now you can see logs in the console
+agentkit status

Enable Both Console and File Logging

bash
# Enable both console and file logging
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit build

Debug Mode

When you need detailed logs to investigate an issue:

bash
# Enable DEBUG-level logging (enable console and file output)
+export AGENTKIT_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command to view detailed debug information
+agentkit build

Environment Variable Configuration

With environment variables, you can fully customize logging behavior.

Basic Configuration

Environment VariableDescriptionDefaultExample
AGENTKIT_LOG_CONSOLEWhether to display logs in the consolefalsetrue / false
AGENTKIT_FILE_ENABLEDWhether to save logs to a filefalsetrue / false
AGENTKIT_LOG_LEVELLog level (console and file)INFODEBUG / INFO / WARNING / ERROR
AGENTKIT_LOG_FILELog file path (takes effect when file logging is enabled).agentkit/logs/agentkit-YYYYMMDD.log/tmp/my-agent.log

Advanced Configuration

Control log levels for console and file separately:

Environment VariableDescriptionDefault
AGENTKIT_CONSOLE_LOG_LEVELConsole log levelINFO
AGENTKIT_FILE_LOG_LEVELFile log levelINFO

Example:

bash
# Show only important errors in the console, but record everything to a file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+
+agentkit launch

Log Levels

AgentKit supports 5 log levels. The higher the level, the fewer messages you see:

LevelDescriptionTypical Use Cases
DEBUGDetailed debugging informationTroubleshooting, development/debugging
INFOGeneral operational information (default)Understanding command execution flow
WARNINGWarning messagesTracking potential issues
ERRORError messagesFocusing on failed operations
CRITICALCritical errorsSeeing only fatal failures

Common Scenarios

Scenario 1: Normal Use (Default Configuration)

Suitable for day-to-day use: no log output to protect sensitive information.

bash
# No configuration needed; just use it
+agentkit status
+agentkit deploy

Effect:

  • ✅ Console: clean and tidy, no log output
  • ✅ Files: no log files generated, protecting sensitive information

Scenario 1.1: Need to Save Log Records

Enable file logging to help trace operational history:

bash
# Enable file logging
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit deploy

Effect:

  • ✅ Console: clean and tidy
  • ✅ Logs: automatically saved to .agentkit/logs/ at INFO level by default

Scenario 2: Debugging Issues

When encountering errors or abnormal behavior, enable detailed logs:

bash
# Enable DEBUG logs for both console and file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# Run a command
+agentkit build

Effect:

  • ✅ Console: shows detailed execution steps
  • ✅ Log file: records full DEBUG details for post-incident analysis

Scenario 3: CI/CD Environment

In CI, you typically want logs in the console and also keep a full record:

bash
# Set in your CI configuration file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_FILE=/var/log/agentkit/build-\${BUILD_ID}.log
+
+# Run the build
+agentkit launch

Effect:

  • ✅ Console: shows key information for CI log review
  • ✅ Log file: keeps detailed information for later analysis

Scenario 4: Production Environment

In production, record only warnings and errors to a file:

bash
export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_FILE_LOG_LEVEL=WARNING
+export AGENTKIT_LOG_FILE=/var/log/agentkit/production.log
+
+# Run a command
+agentkit deploy

Effect:

  • ✅ Console: no output, stays clean
  • ✅ Log file: records only warnings and errors, focusing on issues

Scenario 5: Fully Silent

When you don’t need any logs (default behavior):

bash
# Default configuration is fully silent; no environment variables needed
+agentkit status
+
+# Or set explicitly (to ensure previous env vars do not affect)
+unset AGENTKIT_LOG_CONSOLE
+unset AGENTKIT_FILE_ENABLED

Effect:

  • ✅ Console: no log output
  • ✅ Files: no log files generated

Log File Management

Log File Location

When file logging is enabled (AGENTKIT_FILE_ENABLED=true), logs are stored under .agentkit/logs/ in the project root:

your-project/
+├── .agentkit/
+│   └── logs/
+│       ├── agentkit-20251120.log  # Today's logs
+│       ├── agentkit-20251119.log  # Yesterday's logs
+│       └── agentkit-20251118.log  # The day before yesterday's logs
+├── agentkit.yaml
+└── my_agent.py

Automatic Cleanup of Old Logs

Log files accumulate over time; it’s recommended to clean them up periodically:

bash
# Delete logs older than 7 days
+find .agentkit/logs -name "agentkit-*.log" -mtime +7 -delete
+
+# Or delete manually
+rm .agentkit/logs/agentkit-20251101.log

Custom Log Path

bash
# Save to a specific location
+export AGENTKIT_LOG_FILE=/tmp/my-custom-agent.log
+
+# Or save to a user directory
+export AGENTKIT_LOG_FILE=$HOME/.agentkit-logs/agent.log
+
+agentkit deploy

Configuration Precedence

When multiple configuration methods are present, the precedence is (high to low):

  1. Dedicated environment variables - AGENTKIT_CONSOLE_LOG_LEVEL
  2. General environment variables - AGENTKIT_LOG_LEVEL
  3. Default value - INFO

Example:

bash
# Set the general level to INFO
+export AGENTKIT_LOG_LEVEL=INFO
+
+# Set a dedicated console level to WARNING (higher priority)
+export AGENTKIT_CONSOLE_LOG_LEVEL=WARNING
+
+# Result: console shows WARNING, file records INFO
+agentkit status

Troubleshooting

No Log File Created

Possible causes:

  • File logging is disabled
  • Insufficient directory permissions

How to fix:

bash
# 1. Check whether file logging is disabled
+echo $AGENTKIT_FILE_ENABLED  # should be true or empty
+
+# 2. Check directory permissions
+ls -la .agentkit/logs/
+
+# 3. Create the directory manually
+mkdir -p .agentkit/logs
+
+# 4. Ensure environment variables are correct
+unset AGENTKIT_FILE_ENABLED  # reset to default

No Console Log Output

Possible causes:

  • Console logging is disabled by default
  • Log level is set too high

How to fix:

bash
# 1. Enable console logging
+export AGENTKIT_LOG_CONSOLE=true
+
+# 2. Set an appropriate log level
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+
+# 3. Run a command
+agentkit status

Too Many or Too Few Logs

Adjust the log level:

bash
# Too many logs - show only important information
+export AGENTKIT_LOG_LEVEL=WARNING
+
+# Too few logs - view detailed information
+export AGENTKIT_LOG_LEVEL=DEBUG

Best Practices

Optionally add to your .bashrc or .zshrc:

bash
# AgentKit development environment configuration (choose as needed)
+# Option 1: Enable console logs only
+export AGENTKIT_LOG_CONSOLE=true
+
+# Option 2: Enable both console and file logs
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

Recommendations:

  • Keep it unconfigured by default to stay clean
  • Enable temporarily when debugging
  • Avoid accidentally recording sensitive information

Team Collaboration

Create a .env.example file in the project root:

bash
# AgentKit logging configuration example
+# Copy to .env and modify as needed
+
+# === Recommended dev configuration ===
+# Enable console logs (for real-time viewing)
+AGENTKIT_LOG_CONSOLE=true
+
+# Enable file logging (optional; useful for tracing issues)
+# AGENTKIT_FILE_ENABLED=true
+
+# Set log level
+AGENTKIT_LOG_LEVEL=INFO
+
+# Custom log path (optional)
+# AGENTKIT_LOG_FILE=./logs/my-agent.log

Reminder:

  • Team members should adjust based on their needs
  • .env should be in .gitignore to avoid committing personal configuration
  • Keep file logging disabled by default to protect sensitive information

Production Deployment Recommendations

bash
# Production configuration
+export AGENTKIT_LOG_CONSOLE=false          # Disable console
+export AGENTKIT_FILE_ENABLED=true          # Enable file logging
+export AGENTKIT_FILE_LOG_LEVEL=WARNING     # Record warnings and errors only
+export AGENTKIT_LOG_FILE=/var/log/agentkit/prod.log  # Unified path

Benefits:

  • Reduces unnecessary output
  • Focuses on important issues
  • Easier log management and monitoring

Summary

AgentKit logging system design principles:

  • 🔒 Security first - no logs by default to avoid information leaks
  • 🎯 Enable on demand - turn on via environment variables when needed
  • 🔧 Flexible configuration - control console and file independently
  • 📊 Level-based control - use different log levels for different scenarios
  • 📁 Automatic management - split by date for easier lookup once enabled

Quick reference:

bash
# 1. Enable file logging
+export AGENTKIT_FILE_ENABLED=true
+
+# 2. Enable console debugging
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 3. View log file (file logging must be enabled first)
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log
+
+# 4. Use different levels for console and file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

If you run into issues, refer to the Troubleshooting section or contact technical support.

`,130)])])}const c=i(t,[["render",l]]);export{g as __pageData,c as default}; diff --git a/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.lean.js b/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.lean.js new file mode 100644 index 0000000..4eb57df --- /dev/null +++ b/assets/en_content_2.agentkit-cli_4.logging.md.CKu1hSf7.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"Logging System","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/2.agentkit-cli/4.logging.md","filePath":"en/content/2.agentkit-cli/4.logging.md","lastUpdated":1770735100000}'),t={name:"en/content/2.agentkit-cli/4.logging.md"};function l(h,s,p,o,k,r){return n(),a("div",null,[...s[0]||(s[0]=[e("",130)])])}const c=i(t,[["render",l]]);export{g as __pageData,c as default}; diff --git a/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.js b/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.js new file mode 100644 index 0000000..ec47f75 --- /dev/null +++ b/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.js @@ -0,0 +1,67 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit SDK Overview","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/3.agentkit-sdk/1.overview.md","filePath":"en/content/3.agentkit-sdk/1.overview.md","lastUpdated":1770735100000}'),t={name:"en/content/3.agentkit-sdk/1.overview.md"};function l(p,s,h,r,o,k){return n(),a("div",null,[...s[0]||(s[0]=[e(`

AgentKit SDK Overview

AgentKit SDK is a Python development toolkit for rapidly building Agent applications that comply with AgentKit Platform standards. The SDK provides a concise set of decorators and client interfaces, allowing developers to focus on implementing Agent business logic.

Core Architecture

AgentKit SDK adopts a modular design, consisting of the following primary modules:

1. Runtime Application Framework

Provides multiple application patterns, encapsulating user code into HTTP services that comply with Platform standards:

AgentkitSimpleApp

The most commonly used application framework, suitable for standard Agent applications.

Core Decorators:

  • @app.entrypoint - Defines the main entry function for the Agent
  • @app.ping - Defines the health check function
  • @app.async_task - Defines asynchronous tasks (planned)

Standard Routes:

  • /invoke - Agent invocation endpoint
  • /ping - Health check
  • /health, /readiness, /liveness - Kubernetes readiness probes

AgentkitMCPApp

An application framework based on the MCP (Model Context Protocol) protocol, used to encapsulate tools as MCP services.

Core Decorators:

  • @app.tool - Registers a function as an MCP tool
  • @app.agent_as_a_tool - Encapsulates an Agent as an MCP tool

AgentkitA2aApp

An application framework based on the A2A (Agent-to-Agent) protocol, used to build Agents that can communicate with each other.

Core Decorators:

  • @app.agent_executor - Registers an Agent executor
  • @app.task_store - Registers task storage (optional)

2. Platform Service Clients

Provides convenient client interfaces for accessing various services of the AgentKit Platform.

AgentkitMemory

Memory service client for managing long-term and short-term memory of Agents.

Main Functions:

  • create_memory_collection() - Creates a memory collection
  • list_memory_collections() - Lists memory collections
  • get_memory_collection() - Gets memory collection details
  • update_memory_collection() - Updates memory collection configuration
  • delete_memory_collection() - Deletes a memory collection
  • get_memory_connection_info() - Gets connection information

Design Philosophy: Decoupling of control plane and data plane

  • Control Plane (provided by SDK): Manages creation, configuration, and retrieval of connection information for memory collections
  • Data Plane (implemented by ADK): Performs actual memory read/write operations through MemoryBase or Mem0 protocols

AgentkitKnowledge

Knowledge base service client for managing vectorized knowledge bases of Agents.

Main Functions:

  • list_knowledge_bases() - Lists knowledge bases
  • add_knowledge_base() - Adds a knowledge base
  • get_knowledge_connection_info() - Gets knowledge base connection information
  • delete_knowledge_base() - Deletes a knowledge base

Use Cases:

  • RAG (Retrieval-Augmented Generation) applications
  • Document Q&A systems
  • Knowledge graph integration

AgentkitMCP

MCP Gateway client for managing and routing a large number of MCP tools.

Main Functions:

  • Registers and manages MCP services
  • Tool aggregation and intelligent routing
  • Reduces tool integration complexity

AgentkitRuntime

Runtime management client for managing Agent runtime environments.

Main Functions:

  • Creates and manages Runtime instances
  • Queries Runtime status
  • Configures environment variables and resources

3. Infrastructure Modules

BaseAgentkitClient

Base class for all clients, providing unified configuration and HTTP request capabilities.

Configuration Items:

  • API endpoint configuration
  • Authentication credential management
  • Request retry and timeout
  • Logging and monitoring

Context Management

Uses contextvars to manage context information for each request, including:

  • User identity
  • Session ID
  • Request metadata
  • Tracing information

Module Dependencies

AgentKit SDK
+
+├── Runtime Apps (Application Framework Layer)
+│   ├── AgentkitSimpleApp
+│   ├── AgentkitMCPApp
+│   ├── AgentkitA2aApp
+│   └── AgentkitAgentServerApp
+
+├── Platform Clients (Service Client Layer)
+│   ├── AgentkitMemory
+│   ├── AgentkitKnowledge
+│   ├── AgentkitMCP
+│   └── AgentkitRuntime
+
+└── Infrastructure (Infrastructure Layer)
+    ├── BaseAgentkitClient
+    ├── Context
+    └── Telemetry (Observability)

Key Features

1. Decorator-Driven

Uses Python decorators to simplify application development; developers only need to focus on business logic:

python
from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    # Business logic
+    return response

2. Framework-Agnostic

The SDK does not restrict the use of specific Agent frameworks; it supports:

  • Volcengine ADK (veadk)
  • Google ADK (gadk)
  • LangChain
  • Custom frameworks

3. Automated Observability

Built-in OpenTelemetry support, automatically collects:

  • Traces
  • Metrics
  • Logging

4. Production-Ready

Provides complete production environment support:

  • Health check endpoints
  • Graceful shutdown
  • Error handling
  • Request retry

5. Type Safety

Full Python type annotations provide:

  • IDE autocomplete
  • Type checking
  • Better code maintainability

Quick Start

Installation

bash
pip install agentkit-sdk-python

Create a Simple Agent

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Use Platform Services

python
from agentkit.sdk.memory import AgentkitMemory
+from agentkit.base_client import ApiConfig
+
+# Initialize client
+config = ApiConfig(
+    access_key="your_ak",
+    secret_key="your_sk"
+)
+memory_client = AgentkitMemory(config)
+
+# Create memory collection
+response = memory_client.create_memory_collection(
+    name="my-memory",
+    short_term_configuration={...},
+    long_term_configuration={...}
+)
+print(f"Memory ID: {response.id}")

Next Steps

  • Check the Annotation Usage Guide for detailed usage of various decorators
  • Refer to complete examples in the samples/ directory
  • Read the API documentation for Platform service clients
`,77)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.lean.js b/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.lean.js new file mode 100644 index 0000000..e6c881d --- /dev/null +++ b/assets/en_content_3.agentkit-sdk_1.overview.md.BdtJKqB6.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const c=JSON.parse('{"title":"AgentKit SDK Overview","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/3.agentkit-sdk/1.overview.md","filePath":"en/content/3.agentkit-sdk/1.overview.md","lastUpdated":1770735100000}'),t={name:"en/content/3.agentkit-sdk/1.overview.md"};function l(p,s,h,r,o,k){return n(),a("div",null,[...s[0]||(s[0]=[e("",77)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default}; diff --git a/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.js b/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.js new file mode 100644 index 0000000..9105a12 --- /dev/null +++ b/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.js @@ -0,0 +1,340 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"Annotation Usage Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/3.agentkit-sdk/2.annotation.md","filePath":"en/content/3.agentkit-sdk/2.annotation.md","lastUpdated":1770735100000}'),h={name:"en/content/3.agentkit-sdk/2.annotation.md"};function l(p,s,e,k,r,E){return n(),a("div",null,[...s[0]||(s[0]=[t(`

Annotation Usage Guide

AgentKit SDK provides a concise set of decorators (annotations) for rapidly building different types of Agent applications. This document details the usage and best practices for various annotations.

Simple Agent Annotations

AgentkitSimpleApp is the most commonly used application framework, providing standard HTTP service endpoints.

@app.entrypoint

Defines the main entry function for the Agent, handling invocation requests from the Platform.

Function Signature

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    pass

Parameter Description

  • payload (dict): Request body, containing user input and configuration

    • prompt (str): User input prompt
    • Other custom fields
  • headers (dict): Request headers, containing context information

    • user_id (str): User ID
    • session_id (str): Session ID
    • request_id (str): Request trace ID
    • Other custom headers
  • Return Value (str): Agent's response result

Complete Example

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    """Agent main entry function"""
+    # 1. Extract input parameters
+    prompt = payload.get("prompt", "")
+    user_id = headers.get("user_id", "anonymous")
+    session_id = headers.get("session_id", "default")
+
+    # 2. Invoke Agent execution
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+
+    # 3. Return result
+    return response

Notes

  1. Must be async function: Use async def to define
  2. Fixed parameter order: First parameter is payload, second is headers
  3. Return string: Return value is automatically encapsulated as JSON response
  4. Error handling: Recommended to handle exceptions within the function

Error Handling Example

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        prompt = payload["prompt"]
+        response = await runner.run(messages=prompt)
+        return response
+    except KeyError as e:
+        logger.error(f"Missing required field: {e}")
+        return f"Error: Missing required field {e}"
+    except Exception as e:
+        logger.error(f"Agent execution failed: {e}")
+        return f"Error: {str(e)}"

@app.ping

Defines the health check function, used for Platform and Kubernetes health probes.

Function Signature

python
@app.ping
+def ping() -> str:
+    pass

Parameter Description

  • No parameters: Health check function does not accept any parameters
  • Return Value (str): Health status information, usually returns "pong" or "ok"

Basic Example

python
@app.ping
+def ping() -> str:
+    """Health check"""
+    return "pong!"

Advanced Example: Including Dependency Checks

python
import redis
+from sqlalchemy import create_engine
+
+# Initialize dependencies
+redis_client = redis.Redis(host='localhost', port=6379)
+db_engine = create_engine('postgresql://...')
+
+@app.ping
+def ping() -> str:
+    """Health check, including dependency service detection"""
+    try:
+        # Check Redis connection
+        redis_client.ping()
+
+        # Check database connection
+        with db_engine.connect() as conn:
+            conn.execute("SELECT 1")
+
+        return "ok - all services healthy"
+    except Exception as e:
+        logger.error(f"Health check failed: {e}")
+        return f"degraded - {str(e)}"

Notes

  1. No parameters: Function signature must be def ping() -> str:
  2. Synchronous function: Use def rather than async def
  3. Quick response: Should return within 1 second to avoid timeout
  4. Lightweight check: Avoid performing time-consuming operations

Available Endpoints

Health check functions are automatically registered to the following endpoints:

  • GET /ping - Basic health check
  • GET /health - Health status
  • GET /readiness - Kubernetes readiness probe
  • GET /liveness - Kubernetes liveness probe

@app.async_task (Planned)

Used to define asynchronous tasks, supporting long-running operations.

python
@app.async_task
+async def process_long_task(task_id: str, data: dict) -> dict:
+    """Process long-running tasks"""
+    # Long-running logic
+    result = await heavy_computation(data)
+    return result

Note: This feature is planned and not yet implemented.

MCP Agent Annotations

AgentkitMCPApp is used to build MCP (Model Context Protocol) services, encapsulating functions as standard MCP tools.

@app.tool

Registers a function as an MCP tool for LLM invocation.

Function Signature

python
@app.tool
+def tool_name(param1: str, param2: int) -> dict:
+    pass

Parameter Description

  • Function parameters: Tool input parameters, must have type annotations
  • Return Value: Tool execution result, recommended to return dict type
  • Docstring: Used as tool description for LLM to understand tool purpose

Basic Example

python
from agentkit.apps import AgentkitMCPApp
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.tool
+def get_city_weather(city: str) -> dict[str, str]:
+    """Get city weather information
+
+    Args:
+        city: City name (must be in English)
+
+    Returns:
+        Dictionary containing weather conditions and temperature
+    """
+    weather_data = {
+        "beijing": {"condition": "Sunny", "temperature": 25},
+        "shanghai": {"condition": "Cloudy", "temperature": 22},
+    }
+
+    city = city.lower().strip()
+    if city in weather_data:
+        info = weather_data[city]
+        return {"result": f"{info['condition']}, {info['temperature']}°C"}
+    else:
+        return {"result": f"Weather information not found for {city}"}

Async Tool Example

python
import aiohttp
+
+@mcp_app.tool
+async def fetch_web_content(url: str) -> dict:
+    """Fetch web page content
+
+    Args:
+        url: Web page URL
+
+    Returns:
+        Dictionary containing web page content
+    """
+    async with aiohttp.ClientSession() as session:
+        async with session.get(url) as response:
+            content = await response.text()
+            return {
+                "status": response.status,
+                "content": content[:1000]  # Extract first 1000 characters
+            }

Notes

  1. Type annotations required: All parameters must have type annotations; MCP needs this information to generate tool schema
  2. Detailed docstrings: Docstrings serve as tool descriptions to help LLM understand tool purpose
  3. Sync and async both supported: Supports def and async def
  4. Return structured data: Recommended to return dict type for easy LLM parsing
  5. Error handling: Handle exceptions within the function to avoid tool call failures

Complex Parameter Example

python
from typing import List, Optional
+from pydantic import BaseModel
+
+class SearchQuery(BaseModel):
+    keywords: List[str]
+    max_results: int = 10
+    filters: Optional[dict] = None
+
+@mcp_app.tool
+def search_documents(query: SearchQuery) -> dict:
+    """Search documents
+
+    Args:
+        query: Search query object, containing keywords, result count, and filter conditions
+
+    Returns:
+        Search results list
+    """
+    # Implement search logic
+    results = perform_search(
+        keywords=query.keywords,
+        max_results=query.max_results,
+        filters=query.filters
+    )
+    return {"results": results, "count": len(results)}

@app.agent_as_a_tool

Encapsulates the entire Agent as an MCP tool, enabling Agent composition and collaboration.

Function Signature

python
@app.agent_as_a_tool
+async def agent_tool(prompt: str) -> str:
+    pass

Usage Example

python
from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+# Create a dedicated weather Agent
+weather_agent = Agent(tools=[get_city_weather])
+weather_runner = Runner(agent=weather_agent)
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(prompt: str) -> str:
+    """Weather assistant Agent
+
+    An Agent specifically designed to handle weather-related queries, capable of querying weather information for cities worldwide.
+
+    Args:
+        prompt: User's weather query
+
+    Returns:
+        Weather query result
+    """
+    response = await weather_runner.run(messages=prompt)
+    return response

Multi-Agent Collaboration Example

python
# Create multiple dedicated Agents
+weather_agent = Agent(tools=[get_city_weather])
+news_agent = Agent(tools=[get_latest_news])
+calendar_agent = Agent(tools=[check_schedule])
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(query: str) -> str:
+    """Weather assistant"""
+    return await Runner(agent=weather_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def news_assistant(query: str) -> str:
+    """News assistant"""
+    return await Runner(agent=news_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def calendar_assistant(query: str) -> str:
+    """Calendar assistant"""
+    return await Runner(agent=calendar_agent).run(messages=query)

Notes

  1. Single Agent responsibility: Each Agent should focus on a specific domain
  2. Clear descriptions: Docstrings should clearly define the Agent's capability boundaries
  3. Async execution: Usually an async function
  4. Reasonable timeout: Set a reasonable execution timeout

A2A Agent Annotations

AgentkitA2aApp is used to build A2A (Agent-to-Agent) applications, supporting communication and collaboration between Agents.

@app.agent_executor

Registers an Agent executor, defining the Agent's execution logic.

Function Signature

python
@app.agent_executor(runner=runner, **kwargs)
+class MyAgentExecutor(A2aAgentExecutor):
+    pass

Parameter Description

  • runner: Agent runner instance
  • kwargs: Other configuration parameters

Basic Example

python
from agentkit.apps import AgentkitA2aApp
+from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor
+from veadk import Agent, Runner
+from veadk.a2a.agent_card import get_agent_card
+from veadk.tools.demo_tools import get_city_weather
+
+# Create A2A application
+a2a_app = AgentkitA2aApp()
+
+# Create Agent
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+# Register executor
+@a2a_app.agent_executor(runner=runner)
+class WeatherAgentExecutor(A2aAgentExecutor):
+    """Weather query Agent executor"""
+    pass
+
+# Run application
+if __name__ == "__main__":
+    a2a_app.run(
+        agent_card=get_agent_card(agent=agent, url="http://127.0.0.1:8000"),
+        host="127.0.0.1",
+        port=8000,
+    )

Custom Executor Example

python
from a2a.server.agent_execution import AgentExecutor
+from a2a.server.agent_execution.context import RequestContext
+from a2a.server.events.event_queue import EventQueue
+
+@a2a_app.agent_executor(runner=runner)
+class CustomAgentExecutor(AgentExecutor):
+    """Custom Agent executor"""
+
+    async def execute(
+        self,
+        context: RequestContext,
+        event_queue: EventQueue
+    ) -> str:
+        """Execute Agent logic
+
+        Args:
+            context: Request context, containing input messages and history
+            event_queue: Event queue, used for sending intermediate results
+
+        Returns:
+            Agent's response result
+        """
+        # Extract input from context
+        user_message = context.current_input
+
+        # Send intermediate events (optional)
+        await event_queue.put({
+            "type": "thinking",
+            "content": "Thinking..."
+        })
+
+        # Execute Agent
+        response = await self.runner.run(messages=user_message)
+
+        return response

Notes

  1. Inherit AgentExecutor: Must inherit from AgentExecutor or its subclasses
  2. Provide runner: Must pass runner instance through parameters
  3. Implement execute method: To customize logic, override the execute method
  4. Use event_queue: Send intermediate states through the event queue

@app.task_store

Registers task storage for persisting A2A task states.

Function Signature

python
@app.task_store(**kwargs)
+class MyTaskStore(TaskStore):
+    pass

Using Default Storage

python
# Without specifying task_store, in-memory storage (InMemoryTaskStore) will be used
+a2a_app = AgentkitA2aApp()
+
+@a2a_app.agent_executor(runner=runner)
+class MyExecutor(A2aAgentExecutor):
+    pass

Custom Task Storage Example

python
from a2a.server.tasks.task_store import TaskStore
+from a2a.types import Task
+import redis
+
+@a2a_app.task_store(redis_url="redis://localhost:6379")
+class RedisTaskStore(TaskStore):
+    """Redis-based task storage"""
+
+    def __init__(self, redis_url: str):
+        self.redis_client = redis.from_url(redis_url)
+
+    async def save_task(self, task: Task) -> None:
+        """Save task"""
+        task_data = task.model_dump_json()
+        self.redis_client.set(f"task:{task.id}", task_data)
+
+    async def get_task(self, task_id: str) -> Task | None:
+        """Get task"""
+        task_data = self.redis_client.get(f"task:{task_id}")
+        if task_data:
+            return Task.model_validate_json(task_data)
+        return None
+
+    async def delete_task(self, task_id: str) -> None:
+        """Delete task"""
+        self.redis_client.delete(f"task:{task_id}")

Notes

  1. Optional decorator: If not specified, in-memory storage is used
  2. Inherit TaskStore: Must inherit from TaskStore
  3. Implement required methods: Implement save_task, get_task, delete_task, and other methods
  4. Persistent storage: For production environments, persistent storage (Redis, database, etc.) is recommended

Best Practices

1. Error Handling

All decorated functions should have good error handling:

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        # Business logic
+        result = await process(payload)
+        return result
+    except ValueError as e:
+        logger.warning(f"Invalid input: {e}")
+        return f"Invalid input: {str(e)}"
+    except Exception as e:
+        logger.error(f"Unexpected error: {e}", exc_info=True)
+        return "An error occurred. Please try again later."

2. Logging

Add appropriate logs for problem tracking:

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    request_id = headers.get("request_id", "unknown")
+    logger.info(f"[{request_id}] Processing request: {payload}")
+
+    try:
+        response = await runner.run(messages=payload["prompt"])
+        logger.info(f"[{request_id}] Request completed successfully")
+        return response
+    except Exception as e:
+        logger.error(f"[{request_id}] Request failed: {e}")
+        raise

3. Type Annotations

Use complete type annotations to improve code quality:

python
from typing import Dict, Any
+
+@app.entrypoint
+async def run(payload: Dict[str, Any], headers: Dict[str, str]) -> str:
+    prompt: str = payload["prompt"]
+    user_id: str = headers.get("user_id", "anonymous")
+    # ...

4. Docstrings

Add detailed docstrings for all functions:

python
@mcp_app.tool
+def calculate_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> dict:
+    """Calculate the distance between two geographic coordinates
+
+    Uses the Haversine formula to calculate the great-circle distance between two points on the Earth's surface.
+
+    Args:
+        lat1: Starting latitude (degrees)
+        lon1: Starting longitude (degrees)
+        lat2: Ending latitude (degrees)
+        lon2: Ending longitude (degrees)
+
+    Returns:
+        Dictionary containing distance information, distance unit is kilometers
+
+    Example:
+        >>> calculate_distance(39.9, 116.4, 31.2, 121.5)
+        {"distance_km": 1067.5}
+    """
+    # Implementation logic

5. Performance Optimization

Avoid performing time-consuming initialization in decorated functions:

python
# ❌ Bad practice
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    agent = Agent(tools=[...])  # Created on every request
+    runner = Runner(agent=agent)
+    return await runner.run(messages=payload["prompt"])
+
+# ✅ Good practice
+agent = Agent(tools=[...])  # Created only once
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    return await runner.run(messages=payload["prompt"])

Next Steps

  • Check the complete example code in the samples/ directory
  • Read the SDK Overview to understand the overall architecture
  • Deploy the application to AgentKit Platform
`,103)])])}const o=i(h,[["render",l]]);export{g as __pageData,o as default}; diff --git a/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.lean.js b/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.lean.js new file mode 100644 index 0000000..20bdf10 --- /dev/null +++ b/assets/en_content_3.agentkit-sdk_2.annotation.md.W70VjxIS.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"Annotation Usage Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/3.agentkit-sdk/2.annotation.md","filePath":"en/content/3.agentkit-sdk/2.annotation.md","lastUpdated":1770735100000}'),h={name:"en/content/3.agentkit-sdk/2.annotation.md"};function l(p,s,e,k,r,E){return n(),a("div",null,[...s[0]||(s[0]=[t("",103)])])}const o=i(h,[["render",l]]);export{g as __pageData,o as default}; diff --git a/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.js b/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.js new file mode 100644 index 0000000..5a67d94 --- /dev/null +++ b/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.js @@ -0,0 +1,146 @@ +import{_ as i,c as n,o as a,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Runtime: From Local Development to Cloud Deployment","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/4.runtime/1.runtime_quickstart.md","filePath":"en/content/4.runtime/1.runtime_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/4.runtime/1.runtime_quickstart.md"};function l(p,s,h,r,k,o){return a(),n("div",null,[...s[0]||(s[0]=[e(`

AgentKit Runtime: From Local Development to Cloud Deployment

AgentKit Runtime is a unified, managed Agent execution environment designed to provide you with a secure, efficient, and scalable serverless platform, allowing you to focus on Agent business logic rather than tedious infrastructure operations.

What Does AgentKit Runtime Solve for You?

  • Heavy Operational Burden: Have you ever spent significant time on environment setup, network configuration, dependency installation, manual scaling, and troubleshooting?
  • Lack of Unified Management Platform: Does creating and managing separate environments for different Agents or sessions make scheduling chaotic and maintenance difficult?
  • Security and Isolation Challenges: Are you concerned about permission conflicts, data leakage, or malicious access risks in multi-user or multi-Agent scenarios?
  • Missing Monitoring and Logs: Do you need to spend extra resources configuring logging systems, metrics collection, and alerting rules to monitor Agent health in real-time?

AgentKit Runtime systematically addresses all these problems by providing a serverless managed environment.

Core Advantages

1. Serverless Architecture: Simplified Operations, Optimized Costs

  • Zero Infrastructure Management: No need to worry about underlying servers and complex environment configurations, achieving true "code as a service."
  • Unified Runtime Platform: Efficiently run and schedule multiple Agent instances (Sessions) in the same environment, with unified access points.
  • Automated Lifecycle Management: Automatically scale from zero to large-scale concurrency based on real-time traffic, enabling unattended elastic scaling.
  • Pay-as-You-Go: Only incur costs when Agents are running; resources automatically scale to zero when there's no traffic, maximizing cloud cost savings.
  • Built-in Monitoring and Logs: Out-of-the-box real-time monitoring and logging systems make it easy to track Agent status and quickly locate issues.

2. Enterprise-Grade Security Isolation

  • Multiple Isolation Safeguards: Based on mature cloud vendor virtualization and container technologies, ensuring each Agent Runtime runs in an independent, protected environment.
  • Fine-Grained Access Control: Deep integration with Identity and gateway authentication, strictly isolating session context and access permissions, effectively preventing data cross-contamination and unauthorized access risks.

3. Framework-Agnostic Quick Integration

  • Broad Framework Support: Deeply integrated with veADK while compatible with mainstream Python Agent frameworks, requiring minimal adaptation for quick onboarding.
  • Multi-Protocol Support: Native support for HTTP, MCP, A2A, and other communication protocols to meet diverse application scenario needs.
  • One-Click Deployment: Through AgentKit SDK, you can easily achieve one-click deployment from your local IDE to the cloud Runtime.

Three-Step Guide: From Local Development to Cloud Deployment

This guide will walk you through the complete process from environment configuration and local development debugging to ultimately deploying your Agent to a production environment.

Prerequisites

Before starting, please ensure you have:

  1. A Volcengine account with AgentKit service activated, and obtain your AccessKey & SecretKey.

    Note: Please ensure your AccessKey has AgentKitFullAccess permissions.

  2. Python 3.10+ installed locally.

Step 1: Environment Configuration

We recommend using uv or python3 -m venv to manage your Python virtual environment. The following examples will use uv.

For uv installation instructions, please refer to: uv installation

1. Create and Activate Virtual Environment

bash
mkdir agentkit-runtime-quickstart
+cd agentkit-runtime-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

2. Install Core Dependencies

You can specify a mirror source via the --index parameter to speed up installation.

bash
uv add veadk-python
+uv add agentkit-sdk-python

Step 2: Create and Debug Agent Locally

1. Initialize Agent Project

We strongly recommend using agentkit-cli to quickly bootstrap your project. The init command creates a well-structured Agent project with streaming support from a template.

bash
# Use agentkit-cli to create project from template
+agentkit init

This automatically generates a project structure containing simple_agent.py and requirements.txt, allowing you to start development immediately.

2. Agent Code Overview

The core code of simple_agent.py generated using the basic_stream template is shown below. It demonstrates how to wrap a veADK Agent with AgentkitSimpleApp, execute it through Runner, and return results as SSE (Server-Sent Events) streams.

python
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import logging
+
+from google.adk.agents import RunConfig
+from google.adk.agents.run_config import StreamingMode
+from google.genai.types import Content, Part
+from veadk import Agent, Runner
+
+from agentkit.apps import AgentkitSimpleApp
+from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+
+app = AgentkitSimpleApp()
+
+app_name = "simple_streamable_app"
+
+agent_name = "Agent"
+description = DEFAULT_DESCRIPTION
+system_prompt = DEFAULT_INSTRUCTION
+
+
+tools = []
+
+# from veadk.tools.builtin_tools.web_search import web_search
+# tools.append(web_search)
+
+
+agent = Agent(
+    name=agent_name,
+    description=description,
+    instruction=system_prompt,
+    tools=tools,
+)
+agent.model._additional_args["stream_options"] = {"include_usage": True}
+runner = Runner(agent=agent, app_name=app_name)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict):
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+
+    session_service = runner.short_term_memory.session_service  # type: ignore
+
+    # prevent session recreation
+    session = await session_service.get_session(
+        app_name=app_name, user_id=user_id, session_id=session_id
+    )
+    if not session:
+        await session_service.create_session(
+            app_name=app_name, user_id=user_id, session_id=session_id
+        )
+
+    new_message = Content(role="user", parts=[Part(text=prompt)])
+    try:
+        async for event in runner.run_async(
+            user_id=user_id,
+            session_id=session_id,
+            new_message=new_message,
+            run_config=RunConfig(streaming_mode=StreamingMode.SSE),
+        ):
+            # Format as SSE data
+            sse_event = event.model_dump_json(exclude_none=True, by_alias=True)
+            logger.debug("Generated event in agent run streaming: %s", sse_event)
+            yield sse_event
+    except Exception as e:
+        logger.exception("Error in event_generator: %s", e)
+        # You might want to yield an error event here
+        error_data = json.dumps({"error": str(e)})
+        yield error_data
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Code Highlights:

  • Uses Volcengine Ark Doubao model by default and automatically handles model API Key retrieval.
  • Built-in session management logic ensures multi-turn conversation continuity.
  • Achieves seamless integration with AgentKit Runtime through AgentkitSimpleApp.

3. Configure Environment Variables

Before starting the Agent service, you need to configure Volcengine access credentials:

bash
# Required: Configure your Volcengine access credentials
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

Important: Please replace your_ak and your_sk with your actual credentials.

4. Start and Invoke Service Locally

Once everything is ready, run the following command to start the Agent service:

bash
python simple_agent.py

The service will listen on http://0.0.0.0:8000. Now, open another terminal and test your Agent using curl:

bash
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "Tell me a joke!"}'

Parameter Reference:

  • user_id: User identifier
  • session_id: Session identifier
  • prompt: User's natural language request

Sample Execution Log:

After successful invocation, the console will output detailed execution logs:

INFO:     Started server process [38120]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+INFO:     127.0.0.1:60807 - "POST /invoke HTTP/1.1" 200 OK
+INFO:__main__:Running agent with prompt: Tell me a joke!, user_id: test, session_id: local_session
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output: Why
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  did
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  AI
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  apply
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  for
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  a
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  job
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  at
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  bakery
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ?
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Because
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  it
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  wanted
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  to
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  work
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  on
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  its
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: d
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ough
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  processing
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  skills
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: !
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  😄
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Why did the AI apply for a job at the bakery?
+
+Because it wanted to work on its **dough** processing skills! 😄

Step 3: Deploy to Production Environment

After completing local development and testing, you can deploy your agent to the AgentKit platform:

  1. Package Code: Ensure all dependencies are correctly configured in requirements.txt. The code generated using the template already includes all necessary dependencies.
  2. Platform Deployment: Following the Quick Start guide, use the agentkit config and agentkit launch commands to configure and deploy your application.
  3. Invoke Application: After deployment, you can invoke your agent through the platform's API or SDK. Example invocation:
    bash
    agentkit invoke "Tell me a joke!"

You have now successfully completed the entire process from local development to cloud deployment!

`,53)])])}const c=i(t,[["render",l]]);export{g as __pageData,c as default}; diff --git a/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.lean.js b/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.lean.js new file mode 100644 index 0000000..831a0c2 --- /dev/null +++ b/assets/en_content_4.runtime_1.runtime_quickstart.md.CFRmDDBm.lean.js @@ -0,0 +1 @@ +import{_ as i,c as n,o as a,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Runtime: From Local Development to Cloud Deployment","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/4.runtime/1.runtime_quickstart.md","filePath":"en/content/4.runtime/1.runtime_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/4.runtime/1.runtime_quickstart.md"};function l(p,s,h,r,k,o){return a(),n("div",null,[...s[0]||(s[0]=[e("",53)])])}const c=i(t,[["render",l]]);export{g as __pageData,c as default}; diff --git a/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.js b/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.js new file mode 100644 index 0000000..4746e96 --- /dev/null +++ b/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.js @@ -0,0 +1,63 @@ +import{_ as i,c as n,o as a,ag as e}from"./chunks/framework.CA4hJK0u.js";const k=JSON.parse('{"title":"AgentKit Built-in Tools Quick Start Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/5.tools/1.sandbox_quickstart.md","filePath":"en/content/5.tools/1.sandbox_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/5.tools/1.sandbox_quickstart.md"};function l(o,s,p,r,h,d){return a(),n("div",null,[...s[0]||(s[0]=[e(`

AgentKit Built-in Tools Quick Start Guide

Built-in Tools provide Agents with standardized sandbox runtime environments and tool interfaces. The all-in-one sandbox image integrates core capabilities including code execution, browser automation, and terminal operations, supporting standardized integration and API calls.

Core Capabilities

  • Code Sandbox: Enables Agents to safely "run code"
  • Browser Sandbox: Enables Agents to "interact with web pages like humans"
  • Terminal Sandbox: Enables Agents to "operate the operating system console (Terminal) like humans"
  • File System: Enables Agents to upload and download files

This document provides detailed instructions on how to integrate and use Built-in Tools in your Agent code, with a focus on the code execution sandbox functionality. By following this guide, you will learn how to create, configure, and invoke sandbox tools.

Prerequisites: Creating a Sandbox Tool

Before writing code, you need to create a sandbox tool instance in the Volcengine console:

  1. Visit the AgentKit Built-in Tools Console
  2. Create a new sandbox tool instance
  3. Record the generated TOOL_ID for use in subsequent configuration

Agent Code Example

The following code demonstrates how to use VeADK to build an Agent with code execution capabilities. By integrating the Built-in Tools run_code tool, your Agent will be able to execute code safely within a sandbox environment.

We recommend using agentkit-cli to create a project from the Basic Agent template. After the template is created, you need to make the following modifications:

  • Add the code execution tool run_code to your Agent
  • Configure the environment variable AGENTKIT_TOOL_ID with your sandbox tool instance ID

Your final code file should look like this:

Complete Code

Save the code as simple_agent_tool.py:

python
from veadk import Agent, Runner
+from veadk.tools.builtin_tools.run_code import run_code
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+agent: Agent = Agent(
+    tools=[run_code],
+)
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Code Explanation

  • run_code Tool: Provides a secure code execution environment supporting multiple programming languages including Python and JavaScript
  • session_id: Used to identify user sessions; requests with the same session_id will share the same sandbox instance
  • Asynchronous Processing: Uses async/await syntax to support high-concurrency requests

Local Debugging

1. Install VeADK from Official Source

You can install veadk-python directly using the Python package manager pip from the PyPI platform:

bash
pip install veadk-python

Note: The veadk-python version that supports calling built-in tools is 0.2.15 and above.

2. Configure Environment Variables

Before starting the Agent, you need to configure the following environment variables:

bash
# Required: Sandbox tool ID (obtained from the console)
+export AGENTKIT_TOOL_ID=t-ye7fhfmghsc1kdxxxxxx
+
+# Required: Volcengine access credentials
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

📝 Important Notes:

  • Replace placeholders like your_ak, your_sk with your actual configuration values
  • AGENTKIT_TOOL_ID is obtained after creating the sandbox tool in the Volcengine console

3. Start the Agent Service Locally

After configuring the environment variables, run the following command to start the Agent:

bash
python simple_agent_tool.py

Once the service starts successfully, it will listen on http://0.0.0.0:8000, and you can invoke the Agent through this address.

4. Invoke the Agent

Tool Instance Invocation Mechanism

Tool instances support intelligent session-based scheduling management:

  • Automatic Creation: When you first use a specific session_id to invoke, the system will automatically create the corresponding sandbox session instance
  • Session Reuse: Multiple requests with the same session_id will share the same sandbox instance, maintaining continuity of code execution context
  • Lifecycle: Each session instance has a default validity period of 30 minutes, after which it will be automatically destroyed
  • Isolation: Requests with different session_id values use independent sandbox environments with no interference between them

Invocation Example

Use the following curl command to test the Agent's code execution capability:

bash
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: veadk-test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "Give me a random prime number between 50 and 100"}'

Parameter Description:

  • user_id: User identifier
  • session_id: Session identifier, used to associate with the sandbox instance
  • prompt: User's natural language request

Execution Log Example

After a successful invocation, the console will output detailed execution logs:

2025-11-23 21:10:24 | DEBUG | runner.py:578 - Function call: id='call_jwrcwdayjj8xnlgalyzzcoqq' args={'code': 'import random\\n\\ndef is_prime(n):\\n    if n <= 1:\\n        return False\\n    if n == 2:\\n        return True\\n    if n % 2 == 0:\\n        return False\\n    for i in range(3, int(n**0.5) + 1, 2):\\n        if n % i == 0:\\n            return False\\n    return True\\n\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\nrandom_prime = random.choice(primes_between)\\nprint(random_prime)', 'language': 'python3'} name='run_code'
+2025-11-23 21:10:24 | DEBUG | run_code.py:48 - tools endpoint: agentkit.cn-beijing.volces.com
+2025-11-23 21:10:24 | DEBUG | run_code.py:54 - tool_user_session_id: veAgent_veadk-test_local_session
+2025-11-23 21:10:24 | DEBUG | run_code.py:56 - Running code in language: python3, session_id=local_session, code=import random
+
+def is_prime(n):
+    if n <= 1:
+        return False
+    if n == 2:
+        return True
+    if n % 2 == 0:
+        return False
+    for i in range(3, int(n**0.5) + 1, 2):
+        if n % i == 0:
+            return False
+    return True
+
+primes_between = [p for p in range(50, 101) if is_prime(p)]
+random_prime = random.choice(primes_between)
+print(random_prime), tool_id=t-ye7yhff668o2eybtfvr0, host=agentkit.cn-beijing.volces.com, service=agentkit, region=cn-beijing
+2025-11-23 21:10:24 | DEBUG | run_code.py:65 - Get AK/SK from tool context failed.
+2025-11-23 21:10:24 | DEBUG | run_code.py:77 - Successfully get AK/SK from environment variables.
+2025-11-23 21:10:25 | DEBUG | run_code.py:103 - Invoke run code response: {'ResponseMetadata': {'RequestId': '****', 'Action': 'InvokeTool', 'Version': '2025-10-30', 'Service': 'agentkit', 'Region': 'cn-beijing'}, 'Result': {'ToolId': 't-****', 'UserSessionId': '****', 'SessionId': 's-****', 'Endpoint': '', 'InternalEndpoint': '', 'Result': '{\\n  "success": true,\\n  "message": "Code executed successfully",\\n  "data": {\\n    "kernel_name": "python3",\\n    "session_id": "****",\\n    "status": "ok",\\n    "execution_count": 1,\\n    "outputs": [\\n      {\\n        "output_type": "stream",\\n        "name": "stdout",\\n        "text": "67\\\\n",\\n        "data": null,\\n        "metadata": {},\\n        "execution_count": null,\\n        "ename": null,\\n        "evalue": null,\\n        "traceback": null\\n      }\\n    ],\\n    "code": "import random\\\\n\\\\ndef is_prime(n):\\\\n    if n \\\\u003c= 1:\\\\n        return False\\\\n    if n == 2:\\\\n        return True\\\\n    if n % 2 == 0:\\\\n        return False\\\\n    for i in range(3, int(n**0.5) + 1, 2):\\\\n        if n % i == 0:\\\\n            return False\\\\n    return True\\\\n\\\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\\\nrandom_prime = random.choice(primes_between)\\\\nprint(random_prime)",\\n    "msg_id": "****"\\n  }\\n}'}}
+2025-11-23 21:10:38 | DEBUG | runner.py:586 - Event output: The random prime number between 50 and 100 is: 67
+2025-11-23 21:10:38 | WARNING | runner.py:652 - No tracer is configured in the agent, no trace id provided.
+INFO:     127.0.0.1:52785 - "POST /invoke HTTP/1.1" 200 OK

Deploying to Production

After completing local development and testing, you can deploy your Agent to the AgentKit platform:

  1. Package Code: Ensure all dependencies are properly configured in requirements.txt
  2. Platform Deployment: Refer to the Quick Start section in Runtime to deploy the tool. The main steps are:
    • Run the agentkit init command in the project root directory to initialize the project, which will generate the agentkit.yaml file (skip this step if already executed)
    • Ensure the agentkit.yaml file is configured with the application entry point set to your working application code simple_agent_tool.py:
      yaml
      entry_point: simple_agent_tool.py
    • Ensure all dependencies are properly configured in requirements.txt
    • Follow the Quick Start guide and use the agentkit config and agentkit launch commands to configure and deploy the application
  3. Invoke Application: After deployment, you can invoke the Agent through the API or SDK provided by the platform. Example invocation:
    bash
    agentkit invoke "Give me a random prime number between 50 and 100"
`,47)])])}const u=i(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.lean.js b/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.lean.js new file mode 100644 index 0000000..65fd834 --- /dev/null +++ b/assets/en_content_5.tools_1.sandbox_quickstart.md.CMivIjEK.lean.js @@ -0,0 +1 @@ +import{_ as i,c as n,o as a,ag as e}from"./chunks/framework.CA4hJK0u.js";const k=JSON.parse('{"title":"AgentKit Built-in Tools Quick Start Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/5.tools/1.sandbox_quickstart.md","filePath":"en/content/5.tools/1.sandbox_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/5.tools/1.sandbox_quickstart.md"};function l(o,s,p,r,h,d){return a(),n("div",null,[...s[0]||(s[0]=[e("",47)])])}const u=i(t,[["render",l]]);export{k as __pageData,u as default}; diff --git a/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.js b/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.js new file mode 100644 index 0000000..5bd3a34 --- /dev/null +++ b/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.js @@ -0,0 +1,85 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Memory Quick Start Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/6.memory/1.memory_quickstart.md","filePath":"en/content/6.memory/1.memory_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/6.memory/1.memory_quickstart.md"};function l(p,s,h,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[e(`

AgentKit Memory Quick Start Guide

AI Agents face increasingly complex multi-turn tasks and context window limitations during operation. They require memory capabilities for context retention and personalization. AgentKit Memory provides a unified memory store interface and integrates with mainstream frameworks, offering cross-session, context-aware, and personalized interactions for Agents, enabling continuous learning and evolution. This chapter guides you through installing dependencies and implementing long-term memory functionality.

Usage Examples

The following example demonstrates how to use AgentKit Memory to implement long-term memory functionality.

Steps:

  • Create a memory resource with semantic policies
  • Write events (conversation history) to the memory resource
  • Retrieve memory records from long-term memory

Creating a Memory Store

Create a memory store for your agent through the Volcano Engine Console: Agentkit-Memory

Obtaining Memory Resource Connection Information

On the Memory Details - Integration Code page, obtain the connection information.

  • For Mem0-type memory resources, you will see environment variables similar to:
DATABASE_MEM0_BASE_URL="https://mem0-your-mem-url.mem0.volces.com:8000"
+DATABASE_MEM0_API_KEY="xxxxxx-xxxxxxx"
  • For VikingDB-type memory resources, you will see environment variables similar to:
DATABASE_VIKINGMEM_COLLECTION=<collection_name of your vikingdb memory> #index
+DATABASE_VIKINGMEM_MEMORY_TYPE=memory_summary_04uyfx # memory type, separate multiple by comma, e.g. event_v1,event_v2

Building an Agent with Long-Term Memory

VeADK is an open-source agent development framework that provides development, execution, and debugging capabilities for agents, maintained by the Volcano Engine team. The following example demonstrates how to use VeADK to build an agent with long-term memory capabilities, using mem0 as the memory store backend. The agent can store user preferences, conversation summaries, and other personalized interaction information using long-term memory based on user input.

You don't need to build a VeADK project from scratch. We recommend using agentkit-cli to create a project from the Basic Agent App template (the template uses the VeADK framework). After the template is created, you need to make the following modifications:

  • Add LongTermMemory to the Agent
  • Configure the environment variables obtained in the previous section to agentkit.yaml
  • Add mem0ai==0.1.118 to requirements.txt
  • Explicitly call runner.save_session_to_long_term_memory after each round of conversation to save the dialogue results to long-term memory

Finally, your code file should look like this:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.memory.long_term_memory import LongTermMemory
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+index = "simple_app" # required for viking backend, arbitrary for mem0 backend
+
+backend = "mem0" # one of "mem0", "viking_mem"
+if backend == "viking_mem":
+    collection_name = os.getenv("DATABASE_VIKINGMEM_COLLECTION")
+    if not collection_name:
+        raise ValueError("DATABASE_VIKINGMEM_COLLECTION environment variable is not set")
+    index = collection_name
+
+app = AgentkitSimpleApp()
+long_term_memory = LongTermMemory(
+  backend=backend,
+  index=index
+)
+
+agent = Agent(
+  name="simple_app_agent",
+  instruction="You are a helpful assistant.",
+  long_term_memory=long_term_memory
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+
+    # save the teaching prompt and answer in long term memory
+    await runner.save_session_to_long_term_memory(session_id=session_id, user_id=user_id)
+
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Environment Configuration

Please add the following configuration to your agentkit.yaml file:

# When the long-term memory backend is mem0, add the following configuration
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_MEM0_BASE_URL: <your mem0 url>
+      DATABASE_MEM0_API_KEY: <your mem0 api key>
+
+# When the long-term memory backend is VikingDB, add the following configuration
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKINGMEM_COLLECTION: <your vikingdb collection name>
+      DATABASE_VIKINGMEM_MEMORY_TYPE: <your vikingdb memory type, defaults to "event_v1", separate multiple by comma, e.g. event_v1,event_v2>

Starting the Service

Run agentkit launch. The Runtime connection information will be automatically saved to the agentkit.yaml file.

How to Invoke

Execute the following command to invoke:

agentkit invoke "My secret is 0xabcd"

This will automatically use user_id="agentkit_user", session_id="agentkit_sample_session" to invoke the agent.

Verifying Memory Store Functionality

In the first invocation, you saved the password. We need to change the session_id to verify whether the Agent can correctly read information from the memory store. We recommend waiting approximately 1 minute for the long-term memory extraction to complete before invoking again.

agentkit invoke \\
+  --payload '{"prompt": "What is my secret?"}' \\
+  --headers '{"user_id": "agentkit_user", "session_id": "s123"}'

You will see that the Agent successfully reads information from the memory store and tells you the password is 0xabcd.

`,33)])])}const E=i(t,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.lean.js b/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.lean.js new file mode 100644 index 0000000..fce3b71 --- /dev/null +++ b/assets/en_content_6.memory_1.memory_quickstart.md.BRTeGBGS.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Memory Quick Start Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/6.memory/1.memory_quickstart.md","filePath":"en/content/6.memory/1.memory_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/6.memory/1.memory_quickstart.md"};function l(p,s,h,k,r,o){return n(),a("div",null,[...s[0]||(s[0]=[e("",33)])])}const E=i(t,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.js b/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.js new file mode 100644 index 0000000..002a8b7 --- /dev/null +++ b/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.js @@ -0,0 +1,103 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Knowledge Quickstart Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/7.knowledge/1.knowledge_quickstart.md","filePath":"en/content/7.knowledge/1.knowledge_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/7.knowledge/1.knowledge_quickstart.md"};function l(h,s,p,k,o,r){return n(),a("div",null,[...s[0]||(s[0]=[e(`

AgentKit Knowledge Quickstart Guide

AgentKit Knowledge provides one-click configuration and import capabilities for mainstream knowledge bases, enabling easy association with knowledge bases on the AgentKit platform. It offers unified knowledge base interfaces and framework integration, enhancing the convenience of using different knowledge bases for Agents.

Usage Example

The steps are as follows:

  • Create a knowledge base resource
  • Add template files to the knowledge base
  • Retrieve records from the knowledge base

Creating a Knowledge Base

Through the Volcano Engine Console, create a knowledge base for your agent using VikingDB-Knowledge, and add the following content as qa.md to the customer_support knowledge base.

md
# Intelligent Customer Service Knowledge Base
+
+## 1. Company Introduction
+
+VE Technology is a high-tech company specializing in intelligent customer service and knowledge management. Our core product is the **Intelligent Customer Service System**, which provides efficient and intelligent automated customer service solutions for enterprise clients through natural language processing and knowledge base retrieval.
+
+## 2. Product Features
+
+- **Automatic Q&A**: Quickly respond to common questions based on the knowledge base.
+- **Multi-channel Access**: Support for web, App, WeChat, Feishu, and other channels.
+- **Intelligent Recommendations**: Recommend relevant answers based on context.
+- **Data Analytics**: Provide user question statistics and customer service performance reports.
+- **Self-service Knowledge Base Management**: Support for non-technical personnel to quickly edit knowledge content.
+
+---
+
+## 3. Frequently Asked Questions (FAQ)
+
+### Q1: What languages does the Intelligent Customer Service System support?
+
+A1: Currently supports **Chinese** and **English**, with Japanese, Korean, and other multi-language support to be added gradually.
+
+### Q2: Can the system integrate with existing CRMs?
+
+A2: Yes. Our system supports seamless integration with mainstream CRM systems (such as Salesforce, Zoho, Kingdee) through APIs.
+
+### Q3: What happens if the bot cannot answer a user's question?
+
+A3: The system will automatically transfer the question to a human customer service agent and record the question in the backend for administrators to add to the knowledge base.
+
+### Q4: How often is the knowledge base content updated?
+
+A4: The knowledge base supports **real-time updates**, taking effect immediately after administrators submit changes.
+
+## 4. Contact Us
+
+- Website: [https://www.example.com](https://www.example.com)
+- Support Email: support@volcengine.com
+- Service Hotline: 400-123-4567

Importing the Knowledge Base

Through the Volcano Engine Console, import the knowledge base for your agent using Agentkit-Knowledge

Obtaining Connection Information for Memory Resources

On the memory details - integration code page, obtain the connection information.

  • For VikingDB Knowledge type memory resources, you will see environment variables similar to the following:
bash
export DATABASE_VIKING_COLLECTION=customer_support
+export DATABASE_VIKING_PROJECT=default
+export DATABASE_VIKING_REGION=cn-beijing

Building an Agent with Knowledge Base Capabilities

VeADK is an open-source agent development framework that provides development, runtime, and debugging capabilities for agents, maintained by the Volcano Engine team.

The following example demonstrates how to use VeADK to build an agent with knowledge base capabilities, using VikingDB Knowledge as the knowledge base backend. The agent can answer user questions based on the knowledge base according to user input.

You don't need to build a veadk project from scratch. It is recommended to use agentkit-cli to create a project from the Basic Agent App template (the template uses the VeADK framework). After the template is created, you need to make the following modifications:

  • Add Knowledgebase to the Agent
  • Configure the environment variables obtained in the previous section to agentkit.yaml

Finally, your code file should look like this:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.knowledgebase import KnowledgeBase
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+collection_name = os.getenv("DATABASE_VIKING_COLLECTION")
+if not collection_name:
+    raise ValueError("DATABASE_VIKING_COLLECTION environment variable is not set")
+
+model_name = "doubao-seed-1-6-250615"
+
+app = AgentkitSimpleApp()
+knowledgebase = KnowledgeBase(backend="viking", index=collection_name)
+
+
+agent = Agent(
+    instruction="Answer customer's questions according to your knowledgebase.",
+    model_name=model_name,
+    knowledgebase=knowledgebase
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Environment Configuration

Please add the following configuration to your agentkit.yaml file:

launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKING_COLLECTION: <your viking collection name>

Starting the Service

Run agentkit launch. The built Runtime connection information will be automatically saved in the agentkit.yaml file.

How to Initiate a Call

Execute the following to initiate a call:

agentkit invoke "What products do you have?"

You will see the Agent successfully retrieve information from the knowledge base and reorganize the language from qa.md to answer you.

`,30)])])}const E=i(t,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.lean.js b/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.lean.js new file mode 100644 index 0000000..00d159b --- /dev/null +++ b/assets/en_content_7.knowledge_1.knowledge_quickstart.md.8Q5YYw7O.lean.js @@ -0,0 +1 @@ +import{_ as i,c as a,o as n,ag as e}from"./chunks/framework.CA4hJK0u.js";const g=JSON.parse('{"title":"AgentKit Knowledge Quickstart Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/7.knowledge/1.knowledge_quickstart.md","filePath":"en/content/7.knowledge/1.knowledge_quickstart.md","lastUpdated":1770735100000}'),t={name:"en/content/7.knowledge/1.knowledge_quickstart.md"};function l(h,s,p,k,o,r){return n(),a("div",null,[...s[0]||(s[0]=[e("",30)])])}const E=i(t,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_content_8.mcp_1.overview.md.4fEofmMb.js b/assets/en_content_8.mcp_1.overview.md.4fEofmMb.js new file mode 100644 index 0000000..6b82e3e --- /dev/null +++ b/assets/en_content_8.mcp_1.overview.md.4fEofmMb.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as a,ag as o}from"./chunks/framework.CA4hJK0u.js";const h=JSON.parse('{"title":"AgentKit MCP","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/8.mcp/1.overview.md","filePath":"en/content/8.mcp/1.overview.md","lastUpdated":1770735100000}'),n={name:"en/content/8.mcp/1.overview.md"};function s(r,e,l,c,d,u){return a(),i("div",null,[...e[0]||(e[0]=[o('

AgentKit MCP

AgentKit MCP provides a unified MCP gateway and tool governance hub. Through shared instances, pre-built authentication plugins, and automatic search capabilities, it lowers the barrier to entry, reduces token costs, improves tool hit rates and reliability—allowing teams to focus on business logic and user experience refinement.

Core Positioning: Unified entry point, low-barrier access, and a governable tool ecosystem. It handles MCP access and session persistence, combined with OAuth2 and API-Key authentication plugins, as well as cross-tool semantic search capabilities, forming an engineering backbone that is "easy to integrate, governable, and low-cost."

AgentKit MCP Features

AgentKit MCP mainly includes MCP Services and MCP Toolsets.

MCP Services

Supports quickly bringing enterprise existing Web/HTTP services and third-party interfaces into Agents. AgentKit supports two paths:

  1. Direct MCP Server forwarding – For backends that already have MCP capabilities
  2. HTTP-to-MCP conversion – Upload Swagger definitions and rule validations to automatically generate tools and parameter descriptions, allowing historical assets to quickly enter the MCP capability set

Applicable Scenarios:

  • Targeting specific backends (MCP Server or HTTP)
  • Providing access domains and session persistence
  • Authentication pre-configured at the service level (API-Key, OAuth)
  • Suitable for scenarios with controllable and well-defined tool scale

MCP Toolsets

As the number of tools grows or when clients have tool limits (e.g., Trae supports up to 50 tools), automatic search condenses the exposure of the "full tool set" to the LLM into two encapsulated tools: search and use. Vector retrieval selects high-match tools, reducing context redundancy and latency while improving call accuracy.

Applicable Scenarios:

  • Combining tool collections from multiple MCP services
  • Selecting optimal tools through semantic retrieval
  • Exposing only two tools, search and use, to the LLM
  • Suitable for scenarios with large tool quantities or client tool limits

Authentication & Security

AgentKit MCP authentication primarily adopts the OAuth2 Client Credentials pattern, suitable for frontend applications accessing Agent runtime, server-side tasks accessing Agent runtime, and Agents accessing MCP Servers. It also provides API-Key as a low-dependency alternative, with rotation and hosting planned for future releases.

Authentication Mode Distinctions:

  • Inbound: Agent and MCP inbound authentication (OAuth2, API-Key), refined to individual authorization codes and client credentials
  • Outbound: Gateway credential pass-through or transformation when accessing MCP Servers (API-Key, OAuth client)
',18)])])}const g=t(n,[["render",s]]);export{h as __pageData,g as default}; diff --git a/assets/en_content_8.mcp_1.overview.md.4fEofmMb.lean.js b/assets/en_content_8.mcp_1.overview.md.4fEofmMb.lean.js new file mode 100644 index 0000000..8b95d7f --- /dev/null +++ b/assets/en_content_8.mcp_1.overview.md.4fEofmMb.lean.js @@ -0,0 +1 @@ +import{_ as t,c as i,o as a,ag as o}from"./chunks/framework.CA4hJK0u.js";const h=JSON.parse('{"title":"AgentKit MCP","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/8.mcp/1.overview.md","filePath":"en/content/8.mcp/1.overview.md","lastUpdated":1770735100000}'),n={name:"en/content/8.mcp/1.overview.md"};function s(r,e,l,c,d,u){return a(),i("div",null,[...e[0]||(e[0]=[o("",18)])])}const g=t(n,[["render",s]]);export{h as __pageData,g as default}; diff --git a/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.js b/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.js new file mode 100644 index 0000000..d65b077 --- /dev/null +++ b/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.js @@ -0,0 +1,211 @@ +import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.CA4hJK0u.js";const d=JSON.parse('{"title":"AgentKit MCP Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/8.mcp/2.mcp_quickstart.md","filePath":"en/content/8.mcp/2.mcp_quickstart.md","lastUpdated":1770735100000}'),e={name:"en/content/8.mcp/2.mcp_quickstart.md"};function t(l,s,h,k,r,o){return i(),n("div",null,[...s[0]||(s[0]=[p(`

AgentKit MCP Quick Start

Prerequisites

Before you begin, you need to prepare:

  1. AccessKey & SecretKey from a Volcengine account with AgentKit enabled

    Tip: Make sure the AccessKey has AgentKitFullAccess permission.

  2. MCP Service (can be deployed on VeFaaS or publicly accessible locations)

    • Existing backend services that support MCP
    • Existing HTTP services with Swagger API definition JSON. See Swagger for details.
  3. Python 3.10+ installed

  4. Ark API Key

Step 1: Configure Local Environment

You can use uv or python3 -m venv for virtual environment management. Below we'll use uv as an example.

uv installation reference: uv install

Virtual Environment Setup

bash
mkdir agentkit-mcp-quickstart
+cd agentkit-mcp-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

Install Dependencies

You can specify a mirror source with --index to speed up installation.

bash
uv pip install veadk-python
+uv pip install google-adk
+pip install agentkit-sdk-python

Step 2: Create AgentKit MCP

  1. Log in to the AgentKit Console on Volcengine.

  2. Create an MCP Service for your prepared backend.

  3. Obtain the MCP Service Endpoint and ApiKey after creation. You will see output similar to:

    httpUrl is the MCP Service Endpoint, Authorization is the ApiKey.

json
{
+  "mcpServers": {
+    "create-http-334df4": {
+      "httpUrl": "https://sd4fc6lpoh486npgcaav0.apigateway-cn-beijing.volceapi.com/mcp/create-http-334df4",
+      "headers": {
+        "Authorization": "Bearer P66l-rpaLbxxxxxxxxxxxxxxo2PQ"
+      }
+    }
+  }
+}

Step 3: Set Environment Variables and Run Agent

Environment Variable Configuration

bash
export MCP_ENDPOINT={{Endpoint obtained in Step 2}}
+export MCP_AUTH_KEY={{ApiKey obtained in Step 2}}
+export API_KEY={{Ark API Key}}

Code Example

In the code example below, we use the VeADK framework to create a simple agent for calling MCP services.

python
import logging
+
+from veadk import Agent, Runner
+from veadk.config import getenv
+from agentkit.apps import AgentkitSimpleApp
+from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams
+
+logger = logging.getLogger(__name__)
+
+
+url = getenv("MCP_ENDPOINT")
+mcp_auth_key = getenv("MCP_AUTH_KEY")
+apikey = getenv("API_KEY")
+
+mcp_ecs_toolset = MCPToolset(
+        connection_params=StreamableHTTPConnectionParams(
+        url=url,
+        headers={"Authorization": f"Bearer {mcp_auth_key}"}
+    ),
+)
+
+app = AgentkitSimpleApp()
+
+root_agent = Agent(
+    name="ecs_helper",
+    model_name="doubao-1-5-pro-256k-250115",
+    instruction='''
+        Help user find ECS instances and their details.
+    ''',
+    description="ECS Helper Agent",
+    tools=[mcp_ecs_toolset]
+)
+
+runner = Runner(agent=root_agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    
+    # Run agent, automatically handling tool calls
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+
+    logger.info(f"Run response: {response}")
+    return response
+
+@app.ping
+def ping() -> str:
+    """Health check endpoint"""
+    return "pong!"
+
+if __name__ == "__main__":
+    # Start local development server
+    app.run(host="0.0.0.0", port=8000)

Execute Request

bash
curl --location 'http://localhost:8000/invoke' \\
+  --header 'Content-Type: application/json' \\
+  --header 'user_id: veadk-test' \\
+  --header 'session_id: local_session' \\
+  --data '{"prompt": "Analyze my ECS instances"}'

Execution Result

text
2025-10-24 20:17:33 | INFO | ark_veauth.py:25 - Fetching ARK token...
+2025-10-24 20:17:33 | INFO | agent.py:118 - Model extra config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | DEBUG | agent.py:127 - LiteLLM client created with config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | INFO | agent.py:153 - VeADK version: 0.2.13
+2025-10-24 20:17:33 | INFO | agent.py:155 - Agent \`ecs_helper\` init done.
+2025-10-24 20:17:33 | DEBUG | agent.py:156 - Agent: {'name': 'ecs_helper', 'tools': [<google.adk.tools.mcp_tool.mcp_toolset.MCPToolset object at 0x7f8b4f24b9b0>], 'model_name': 'doubao-1-5-pro-256k-250115', 'model_api_base': 'https://ark.cn-beijing.volces.com/api/v3/'}
+2025-10-24 20:17:33 | WARNING | runner.py:198 - No short term memory or session service provided, use an in-memory one instead.
+2025-10-24 20:17:33 | INFO | runner.py:217 - No long term memory provided.
+INFO:     Started server process [1330124]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+2025-10-24 20:18:35 | INFO | runner.py:250 - Run config: speech_config=None response_modalities=None save_input_blobs_as_artifacts=False support_cfc=False streaming_mode=<StreamingMode.NONE: None> output_audio_transcription=AudioTranscriptionConfig() input_audio_transcription=AudioTranscriptionConfig() realtime_input_config=None enable_affective_dialog=None proactivity=None session_resumption=None context_window_compression=None save_live_audio=False max_llm_calls=100
+2025-10-24 20:18:35 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app
+2025-10-24 20:18:38 | DEBUG | runner.py:280 - Function call: id='call_xbyfcvc86wc26mbxz39vst12' args={'region': 'cn-beijing', 'needNum': 10} name='describe_instances'
+2025-10-24 20:19:14 | DEBUG | runner.py:288 - Event output: Here are your ECS instance details:
+1. **Instance 1**:
+    - **Instance ID**: i-ye7irm2sqobw80cqxd40
+    - **Creation Time**: 2025-10-23T21:36:31+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+2. **Instance 2**:
+    - **Instance ID**: i-ye7ipm0dtsqc6imh310d
+    - **Creation Time**: 2025-10-23T21:05:44+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvy72n46nmxzvafi
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+3. **Instance 3**:
+    - **Instance ID**: i-ye7ilsbbpcbw80ca2ymj
+    - **Creation Time**: 2025-10-23T20:06:54+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+4. **Instance 4**:
+    - **Instance ID**: i-ye7fg1hgqoxjd1utrfy3
+    - **Creation Time**: 2025-10-22T14:57:49+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+5. **Instance 5**:
+    - **Instance ID**: i-ye5ejwoow0cva4fqydfc
+    - **Creation Time**: 2025-09-24T14:25:37+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+6. **Instance 6**:
+    - **Instance ID**: i-ye5ejub08wbw80bpd7hr
+    - **Creation Time**: 2025-09-24T14:24:35+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+7. **Instance 7**:
+    - **Instance ID**: i-ye5e5jyq68bw80c889i5
+    - **Creation Time**: 2025-09-24T10:44:54+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+8. **Instance 8**:
+    - **Instance ID**: i-ye5c4jbx8gqc6ily6b30
+    - **Creation Time**: 2025-09-23T16:02:05+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+9. **Instance 9**:
+    - **Instance ID**: i-ye5c4end34xjd1umbfns
+    - **Creation Time**: 2025-09-23T16:00:05+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvfxhokhx11pdmlv
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+10. **Instance 10**:
+    - **Instance ID**: i-ye5blj0xdsxjd1tk1vfh
+    - **Creation Time**: 2025-09-23T11:09:46+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvfxhokhx11pdmlv
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+
+All 10 instances are pay-as-you-go with type ecs.e-c1m2.xlarge. Most use Windows Server 2022 Datacenter Edition 64-bit Chinese, with a few using Debian 12 64-bit. All are currently running in availability zone cn-beijing-a. If you need further analysis or have other operation requirements, feel free to ask.
`,24)])])}const g=a(e,[["render",t]]);export{d as __pageData,g as default}; diff --git a/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.lean.js b/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.lean.js new file mode 100644 index 0000000..4a00846 --- /dev/null +++ b/assets/en_content_8.mcp_2.mcp_quickstart.md.-pvhzRBs.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as i,ag as p}from"./chunks/framework.CA4hJK0u.js";const d=JSON.parse('{"title":"AgentKit MCP Quick Start","description":"","frontmatter":{},"headers":[],"relativePath":"en/content/8.mcp/2.mcp_quickstart.md","filePath":"en/content/8.mcp/2.mcp_quickstart.md","lastUpdated":1770735100000}'),e={name:"en/content/8.mcp/2.mcp_quickstart.md"};function t(l,s,h,k,r,o){return i(),n("div",null,[...s[0]||(s[0]=[p("",24)])])}const g=a(e,[["render",t]]);export{d as __pageData,g as default}; diff --git a/assets/en_index.md.CcuX5I5M.js b/assets/en_index.md.CcuX5I5M.js new file mode 100644 index 0000000..f91aa0d --- /dev/null +++ b/assets/en_index.md.CcuX5I5M.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as i}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"AgentKit","text":"Python SDK & CLI","tagline":"Quickly build and deploy Agent applications to the Volcengine AgentKit Platform","actions":[{"theme":"brand","text":"Quick Start","link":"/en/content/1.introduction/3.quickstart"},{"theme":"alt","text":"View Docs","link":"/en/content/1.introduction/1.overview"}]},"features":[{"icon":"🚀","title":"Quick Initialization","details":"Use the agentkit init command to generate a project template with one click, with multiple built-in app types (Basic App, Stream App, etc.)"},{"icon":"🛠️","title":"Simple SDK","details":"Elegant decorator-based API; define the entry function with @app.entrypoint and focus on business logic development"},{"icon":"☁️","title":"Multiple Deployment Modes","details":"Supports three deployment modes—Local, Hybrid, and Cloud—flexibly meeting different scenario requirements"},{"icon":"🔧","title":"Interactive Configuration","details":"Use the agentkit config command for guided configuration of deployment parameters, environment variables, and image registry"},{"icon":"📦","title":"One-Click Build & Deploy","details":"The agentkit launch command combines build and deploy to automatically build the image and deploy to Runtime"},{"icon":"🔌","title":"Platform Integration","details":"Seamlessly integrates platform services such as Memory, Knowledge, and MCP Gateway—ready to use out of the box"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1770735100000}'),n={name:"en/index.md"};function a(o,l,r,d,c,s){return i(),t("div")}const u=e(n,[["render",a]]);export{p as __pageData,u as default}; diff --git a/assets/en_index.md.CcuX5I5M.lean.js b/assets/en_index.md.CcuX5I5M.lean.js new file mode 100644 index 0000000..f91aa0d --- /dev/null +++ b/assets/en_index.md.CcuX5I5M.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as i}from"./chunks/framework.CA4hJK0u.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"AgentKit","text":"Python SDK & CLI","tagline":"Quickly build and deploy Agent applications to the Volcengine AgentKit Platform","actions":[{"theme":"brand","text":"Quick Start","link":"/en/content/1.introduction/3.quickstart"},{"theme":"alt","text":"View Docs","link":"/en/content/1.introduction/1.overview"}]},"features":[{"icon":"🚀","title":"Quick Initialization","details":"Use the agentkit init command to generate a project template with one click, with multiple built-in app types (Basic App, Stream App, etc.)"},{"icon":"🛠️","title":"Simple SDK","details":"Elegant decorator-based API; define the entry function with @app.entrypoint and focus on business logic development"},{"icon":"☁️","title":"Multiple Deployment Modes","details":"Supports three deployment modes—Local, Hybrid, and Cloud—flexibly meeting different scenario requirements"},{"icon":"🔧","title":"Interactive Configuration","details":"Use the agentkit config command for guided configuration of deployment parameters, environment variables, and image registry"},{"icon":"📦","title":"One-Click Build & Deploy","details":"The agentkit launch command combines build and deploy to automatically build the image and deploy to Runtime"},{"icon":"🔌","title":"Platform Integration","details":"Seamlessly integrates platform services such as Memory, Knowledge, and MCP Gateway—ready to use out of the box"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1770735100000}'),n={name:"en/index.md"};function a(o,l,r,d,c,s){return i(),t("div")}const u=e(n,[["render",a]]);export{p as __pageData,u as default}; diff --git a/assets/index.md.BmbdQK4h.js b/assets/index.md.BmbdQK4h.js new file mode 100644 index 0000000..7e53e50 --- /dev/null +++ b/assets/index.md.BmbdQK4h.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as i}from"./chunks/framework.CA4hJK0u.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"AgentKit","text":"Python SDK & CLI","tagline":"快速构建和部署 Agent 应用到火山引擎 AgentKit Platform","actions":[{"theme":"brand","text":"快速开始","link":"/content/1.introduction/3.quickstart"},{"theme":"alt","text":"查看文档","link":"/content/1.introduction/1.overview"}]},"features":[{"icon":"🚀","title":"快速初始化","details":"使用 agentkit init 命令,一键生成项目模板,内置多种应用类型(Basic App、Stream App等)"},{"icon":"🛠️","title":"简洁的 SDK","details":"基于装饰器的优雅 API,使用 @app.entrypoint 定义入口函数,专注业务逻辑开发"},{"icon":"☁️","title":"多种部署模式","details":"支持 Local、Hybrid、Cloud 三种部署模式,灵活满足不同场景需求"},{"icon":"🔧","title":"交互式配置","details":"使用 agentkit config 命令,引导式配置部署参数、环境变量和镜像仓库"},{"icon":"📦","title":"一键构建部署","details":"agentkit launch 命令组合 build 和 deploy,自动完成构建镜像和部署到 Runtime"},{"icon":"🔌","title":"Platform 集成","details":"无缝集成 Memory、Knowledge、MCP Gateway 等 Platform 服务,开箱即用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1770735100000}'),n={name:"index.md"};function a(o,l,r,c,d,s){return i(),e("div")}const f=t(n,[["render",a]]);export{m as __pageData,f as default}; diff --git a/assets/index.md.BmbdQK4h.lean.js b/assets/index.md.BmbdQK4h.lean.js new file mode 100644 index 0000000..7e53e50 --- /dev/null +++ b/assets/index.md.BmbdQK4h.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as i}from"./chunks/framework.CA4hJK0u.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"AgentKit","text":"Python SDK & CLI","tagline":"快速构建和部署 Agent 应用到火山引擎 AgentKit Platform","actions":[{"theme":"brand","text":"快速开始","link":"/content/1.introduction/3.quickstart"},{"theme":"alt","text":"查看文档","link":"/content/1.introduction/1.overview"}]},"features":[{"icon":"🚀","title":"快速初始化","details":"使用 agentkit init 命令,一键生成项目模板,内置多种应用类型(Basic App、Stream App等)"},{"icon":"🛠️","title":"简洁的 SDK","details":"基于装饰器的优雅 API,使用 @app.entrypoint 定义入口函数,专注业务逻辑开发"},{"icon":"☁️","title":"多种部署模式","details":"支持 Local、Hybrid、Cloud 三种部署模式,灵活满足不同场景需求"},{"icon":"🔧","title":"交互式配置","details":"使用 agentkit config 命令,引导式配置部署参数、环境变量和镜像仓库"},{"icon":"📦","title":"一键构建部署","details":"agentkit launch 命令组合 build 和 deploy,自动完成构建镜像和部署到 Runtime"},{"icon":"🔌","title":"Platform 集成","details":"无缝集成 Memory、Knowledge、MCP Gateway 等 Platform 服务,开箱即用"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1770735100000}'),n={name:"index.md"};function a(o,l,r,c,d,s){return i(),e("div")}const f=t(n,[["render",a]]);export{m as __pageData,f as default}; diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 0000000..b6b603d Binary files /dev/null and b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 0000000..def40a4 Binary files /dev/null and b/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 0000000..e070c3d Binary files /dev/null and b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 0000000..a3c16ca Binary files /dev/null and b/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 0000000..2210a89 Binary files /dev/null and b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 0000000..790d62d Binary files /dev/null and b/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 0000000..1eec077 Binary files /dev/null and b/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 0000000..2cfe615 Binary files /dev/null and b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 0000000..e3886dd Binary files /dev/null and b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 0000000..36d6748 Binary files /dev/null and b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 0000000..2bed1e8 Binary files /dev/null and b/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 0000000..9a8d1e2 Binary files /dev/null and b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 0000000..07d3c53 Binary files /dev/null and b/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 0000000..57bdc22 Binary files /dev/null and b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/docs/public/images/model_apikey.jpg b/assets/model_apikey.L4dqV6qA.jpg similarity index 100% rename from docs/public/images/model_apikey.jpg rename to assets/model_apikey.L4dqV6qA.jpg diff --git a/docs/public/images/select_or_create_model_endpoint.jpg b/assets/select_or_create_model_endpoint.CMTjcEUl.jpg similarity index 100% rename from docs/public/images/select_or_create_model_endpoint.jpg rename to assets/select_or_create_model_endpoint.CMTjcEUl.jpg diff --git a/assets/style.DiVYHiP2.css b/assets/style.DiVYHiP2.css new file mode 100644 index 0000000..b0facd1 --- /dev/null +++ b/assets/style.DiVYHiP2.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/agentkit-sdk-python/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: #3c3c43;--vp-c-text-2: #67676c;--vp-c-text-3: #929295}.dark{--vp-c-text-1: #dfdfd6;--vp-c-text-2: #98989f;--vp-c-text-3: #6a6a71}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:lang(es),:lang(pt){--vp-code-copy-copied-text-content: "Copiado"}:lang(fa){--vp-code-copy-copied-text-content: "کپی شد"}:lang(ko){--vp-code-copy-copied-text-content: "복사됨"}:lang(ru){--vp-code-copy-copied-text-content: "Скопировано"}:lang(zh){--vp-code-copy-copied-text-content: "已复制"}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(:is(.no-icon,svg a,:has(img,svg))):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(:is(.no-icon,svg a,:has(img,svg))):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-54a304ca]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-54a304ca],.VPBackdrop.fade-leave-to[data-v-54a304ca]{opacity:0}.VPBackdrop.fade-leave-active[data-v-54a304ca]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-54a304ca]{display:none}}.NotFound[data-v-6ff51ddd]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-6ff51ddd]{padding:96px 32px 168px}}.code[data-v-6ff51ddd]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-6ff51ddd]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-6ff51ddd]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-6ff51ddd]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-6ff51ddd]{padding-top:20px}.link[data-v-6ff51ddd]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-6ff51ddd]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-53c99d69]{position:relative;z-index:1}.nested[data-v-53c99d69]{padding-right:16px;padding-left:16px}.outline-link[data-v-53c99d69]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-53c99d69]:hover,.outline-link.active[data-v-53c99d69]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-53c99d69]{padding-left:13px}.VPDocAsideOutline[data-v-f610f197]{display:none}.VPDocAsideOutline.has-outline[data-v-f610f197]{display:block}.content[data-v-f610f197]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-f610f197]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-f610f197]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-cb998dce]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-cb998dce]{flex-grow:1}.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-cb998dce] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-1bb0c8a8]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-1bb0c8a8]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-1bcd8184]{margin-top:64px}.edit-info[data-v-1bcd8184]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-1bcd8184]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-1bcd8184]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-1bcd8184]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-1bcd8184]{margin-right:8px}.prev-next[data-v-1bcd8184]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-1bcd8184]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-1bcd8184]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-1bcd8184]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-1bcd8184]{margin-left:auto;text-align:right}.desc[data-v-1bcd8184]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-1bcd8184]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-e6f2a212]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-e6f2a212]{display:flex;justify-content:center}.VPDoc .aside[data-v-e6f2a212]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{max-width:1104px}}.container[data-v-e6f2a212]{margin:0 auto;width:100%}.aside[data-v-e6f2a212]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-e6f2a212]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-e6f2a212]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-e6f2a212]::-webkit-scrollbar{display:none}.aside-curtain[data-v-e6f2a212]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-e6f2a212]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-e6f2a212]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-e6f2a212]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-e6f2a212]{order:1;margin:0;min-width:640px}}.content-container[data-v-e6f2a212]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-e6f2a212]{max-width:688px}.VPButton[data-v-93dc4167]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-93dc4167]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-93dc4167]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-93dc4167]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-93dc4167]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-93dc4167]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-93dc4167]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-93dc4167]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-93dc4167]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-93dc4167]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-93dc4167]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-93dc4167]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-93dc4167]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-ab19afbb]{display:none}.dark .VPImage.light[data-v-ab19afbb]{display:none}.VPHero[data-v-dd8814ff]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-dd8814ff]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-dd8814ff]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-dd8814ff]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-dd8814ff]{flex-direction:row}}.main[data-v-dd8814ff]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-dd8814ff]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-dd8814ff]{text-align:left}}@media (min-width: 960px){.main[data-v-dd8814ff]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-dd8814ff]{max-width:592px}}.heading[data-v-dd8814ff]{display:flex;flex-direction:column}.name[data-v-dd8814ff],.text[data-v-dd8814ff]{width:fit-content;max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-dd8814ff],.VPHero.has-image .text[data-v-dd8814ff]{margin:0 auto}.name[data-v-dd8814ff]{color:var(--vp-home-hero-name-color)}.clip[data-v-dd8814ff]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-dd8814ff],.text[data-v-dd8814ff]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-dd8814ff],.text[data-v-dd8814ff]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-dd8814ff],.VPHero.has-image .text[data-v-dd8814ff]{margin:0}}.tagline[data-v-dd8814ff]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-dd8814ff]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-dd8814ff]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-dd8814ff]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-dd8814ff]{margin:0}}.actions[data-v-dd8814ff]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-dd8814ff]{justify-content:center}@media (min-width: 640px){.actions[data-v-dd8814ff]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-dd8814ff]{justify-content:flex-start}}.action[data-v-dd8814ff]{flex-shrink:0;padding:6px}.image[data-v-dd8814ff]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-dd8814ff]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-dd8814ff]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-dd8814ff]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-dd8814ff]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-dd8814ff]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-dd8814ff]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-dd8814ff]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-dd8814ff]{width:320px;height:320px}}[data-v-dd8814ff] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-dd8814ff] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-dd8814ff] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-bd37d1a2]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-bd37d1a2]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-bd37d1a2]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-bd37d1a2]>.VPImage{margin-bottom:20px}.icon[data-v-bd37d1a2]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-bd37d1a2]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-bd37d1a2]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-bd37d1a2]{padding-top:8px}.link-text-value[data-v-bd37d1a2]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-bd37d1a2]{margin-left:6px}.VPFeatures[data-v-b1eea84a]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-b1eea84a]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-b1eea84a]{padding:0 64px}}.container[data-v-b1eea84a]{margin:0 auto;max-width:1152px}.items[data-v-b1eea84a]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-b1eea84a]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a]{width:50%}.item.grid-3[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-b1eea84a]{width:25%}}.container[data-v-c141a4bd]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-c141a4bd]{padding:0 48px}}@media (min-width: 960px){.container[data-v-c141a4bd]{width:100%;padding:0 64px}}.vp-doc[data-v-c141a4bd] .VPHomeSponsors,.vp-doc[data-v-c141a4bd] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-c141a4bd] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-c141a4bd] .VPHomeSponsors a,.vp-doc[data-v-c141a4bd] .VPTeamPage a{text-decoration:none}.VPHome[data-v-e07eaea7]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-e07eaea7]{margin-bottom:128px}}.VPContent[data-v-9a6c75ad]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-9a6c75ad]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:0}@media (min-width: 960px){.VPContent[data-v-9a6c75ad]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-9a6c75ad]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-566314d4]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-566314d4]{display:none}.VPFooter[data-v-566314d4] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-566314d4] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-566314d4]{padding:32px}}.container[data-v-566314d4]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-566314d4],.copyright[data-v-566314d4]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-6b867909]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-6b867909]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-6b867909]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-6b867909]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-6b867909]{color:var(--vp-c-text-1)}.icon[data-v-6b867909]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-6b867909]{font-size:14px}.icon[data-v-6b867909]{font-size:16px}}.open>.icon[data-v-6b867909]{transform:rotate(90deg)}.items[data-v-6b867909]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-6b867909]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-6b867909]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-6b867909]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-6b867909]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-6b867909]{transition:all .2s ease-out}.flyout-leave-active[data-v-6b867909]{transition:all .15s ease-in}.flyout-enter-from[data-v-6b867909],.flyout-leave-to[data-v-6b867909]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-2488c25a]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-2488c25a]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-2488c25a]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-2488c25a]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-2488c25a]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-2488c25a]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-2488c25a]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-2488c25a]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-2488c25a]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-2488c25a]{display:none}}.menu-icon[data-v-2488c25a]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-2488c25a]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-2488c25a]{padding:12px 32px 11px}}.VPSwitch[data-v-b4ccac88]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-b4ccac88]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-b4ccac88]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-b4ccac88]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-b4ccac88] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-b4ccac88] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-be9742d9]{opacity:1}.moon[data-v-be9742d9],.dark .sun[data-v-be9742d9]{opacity:0}.dark .moon[data-v-be9742d9]{opacity:1}.dark .VPSwitchAppearance[data-v-be9742d9] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-3f90c1a5]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-3f90c1a5]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-7eeeb2dc]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-7eeeb2dc]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-7eeeb2dc]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-7eeeb2dc]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-a6b0397c]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-a6b0397c]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-a6b0397c]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-a6b0397c]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-20ed86d6]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-20ed86d6] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-20ed86d6] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-20ed86d6] .group:last-child{padding-bottom:0}.VPMenu[data-v-20ed86d6] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-20ed86d6] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-20ed86d6] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-20ed86d6] .action{padding-left:24px}.VPFlyout[data-v-bfe7971f]{position:relative}.VPFlyout[data-v-bfe7971f]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-bfe7971f]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-bfe7971f]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-bfe7971f]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-bfe7971f]{color:var(--vp-c-brand-2)}.button[aria-expanded=false]+.menu[data-v-bfe7971f]{opacity:0;visibility:hidden;transform:translateY(0)}.VPFlyout:hover .menu[data-v-bfe7971f],.button[aria-expanded=true]+.menu[data-v-bfe7971f]{opacity:1;visibility:visible;transform:translateY(0)}.button[data-v-bfe7971f]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-bfe7971f]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-bfe7971f]{margin-right:0;font-size:16px}.text-icon[data-v-bfe7971f]{margin-left:4px;font-size:14px}.icon[data-v-bfe7971f]{font-size:20px;transition:fill .25s}.menu[data-v-bfe7971f]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-60a9a2d3]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-60a9a2d3]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-60a9a2d3]>svg,.VPSocialLink[data-v-60a9a2d3]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-e71e869c]{display:flex;justify-content:center}.VPNavBarExtra[data-v-f953d92f]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-f953d92f]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-f953d92f]{display:none}}.trans-title[data-v-f953d92f]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-f953d92f],.item.social-links[data-v-f953d92f]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-f953d92f]{min-width:176px}.appearance-action[data-v-f953d92f]{margin-right:-2px}.social-links-list[data-v-f953d92f]{margin:-4px -8px}.VPNavBarHamburger[data-v-6bee1efd]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-6bee1efd]{display:none}}.container[data-v-6bee1efd]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-6bee1efd]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-6bee1efd]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-6bee1efd],.VPNavBarHamburger.active:hover .middle[data-v-6bee1efd],.VPNavBarHamburger.active:hover .bottom[data-v-6bee1efd]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-6bee1efd],.middle[data-v-6bee1efd],.bottom[data-v-6bee1efd]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-6bee1efd]{top:0;left:0;transform:translate(0)}.middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-815115f5]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-815115f5],.VPNavBarMenuLink[data-v-815115f5]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-afb2845e]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-afb2845e]{display:flex}}/*! @docsearch/css 3.8.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-ef6192dc]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-ef6192dc]{display:flex;align-items:center}}.title[data-v-9f43907a]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-9f43907a]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-9f43907a]{border-bottom-color:var(--vp-c-divider)}}[data-v-9f43907a] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-acee064b]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-acee064b]{display:flex;align-items:center}}.title[data-v-acee064b]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-9fd4d1dd]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-9fd4d1dd]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:transparent}.VPNavBar[data-v-9fd4d1dd]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-9fd4d1dd]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-9fd4d1dd]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-9fd4d1dd]{padding:0}}.container[data-v-9fd4d1dd]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-9fd4d1dd],.container>.content[data-v-9fd4d1dd]{pointer-events:none}.container[data-v-9fd4d1dd] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-9fd4d1dd]{max-width:100%}}.title[data-v-9fd4d1dd]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-9fd4d1dd]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-9fd4d1dd]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-9fd4d1dd]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-9fd4d1dd]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-9fd4d1dd]{column-gap:.5rem}}.menu+.translations[data-v-9fd4d1dd]:before,.menu+.appearance[data-v-9fd4d1dd]:before,.menu+.social-links[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before,.appearance+.social-links[data-v-9fd4d1dd]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before{margin-right:16px}.appearance+.social-links[data-v-9fd4d1dd]:before{margin-left:16px}.social-links[data-v-9fd4d1dd]{margin-right:-8px}.divider[data-v-9fd4d1dd]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-9fd4d1dd]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-a3e2920d]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-a3e2920d]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-fa963d97]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-fa963d97]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-e04f3e85]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-e04f3e85]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-f60dbfa7]{display:block}.title[data-v-f60dbfa7]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-d99bfeec]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-d99bfeec]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-d99bfeec]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-d99bfeec]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-d99bfeec]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-d99bfeec]{transform:rotate(45deg)}.button[data-v-d99bfeec]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-d99bfeec]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-d99bfeec]{transition:transform .25s}.group[data-v-d99bfeec]:first-child{padding-top:0}.group+.group[data-v-d99bfeec],.group+.item[data-v-d99bfeec]{padding-top:4px}.VPNavScreenTranslations[data-v-516e4bc3]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-516e4bc3]{height:auto}.title[data-v-516e4bc3]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-516e4bc3]{font-size:16px}.icon.lang[data-v-516e4bc3]{margin-right:8px}.icon.chevron[data-v-516e4bc3]{margin-left:4px}.list[data-v-516e4bc3]{padding:4px 0 0 24px}.link[data-v-516e4bc3]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-2dd6d0c7]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active[data-v-2dd6d0c7]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active .container[data-v-2dd6d0c7]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to[data-v-2dd6d0c7]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to .container[data-v-2dd6d0c7]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-2dd6d0c7]{display:none}}.container[data-v-2dd6d0c7]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-2dd6d0c7],.menu+.appearance[data-v-2dd6d0c7],.translations+.appearance[data-v-2dd6d0c7]{margin-top:24px}.menu+.social-links[data-v-2dd6d0c7]{margin-top:16px}.appearance+.social-links[data-v-2dd6d0c7]{margin-top:16px}.VPNav[data-v-7ad780c2]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-7ad780c2]{position:fixed}}.VPSidebarItem.level-0[data-v-0009425e]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-0009425e]{padding-bottom:10px}.item[data-v-0009425e]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-0009425e]{cursor:pointer}.indicator[data-v-0009425e]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-0009425e],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-0009425e],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-0009425e],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-0009425e]{background-color:var(--vp-c-brand-1)}.link[data-v-0009425e]{display:flex;align-items:center;flex-grow:1}.text[data-v-0009425e]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-0009425e]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-0009425e],.VPSidebarItem.level-2 .text[data-v-0009425e],.VPSidebarItem.level-3 .text[data-v-0009425e],.VPSidebarItem.level-4 .text[data-v-0009425e],.VPSidebarItem.level-5 .text[data-v-0009425e]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-0009425e],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-0009425e],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-0009425e],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-0009425e],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-0009425e],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-0009425e]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-1.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-2.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-3.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-4.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-5.has-active>.item>.text[data-v-0009425e],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-0009425e],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-0009425e],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-0009425e],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-0009425e],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-0009425e],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-0009425e]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-0009425e],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-0009425e],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-0009425e],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-0009425e],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-0009425e],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-0009425e]{color:var(--vp-c-brand-1)}.caret[data-v-0009425e]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-0009425e]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-0009425e]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-0009425e]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-0009425e]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-0009425e],.VPSidebarItem.level-2 .items[data-v-0009425e],.VPSidebarItem.level-3 .items[data-v-0009425e],.VPSidebarItem.level-4 .items[data-v-0009425e],.VPSidebarItem.level-5 .items[data-v-0009425e]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-0009425e]{display:none}.no-transition[data-v-51288d80] .caret-icon{transition:none}.group+.group[data-v-51288d80]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-51288d80]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-42c4c606]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-42c4c606]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-42c4c606]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-42c4c606]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-42c4c606]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-42c4c606]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-42c4c606]{outline:0}.VPSkipLink[data-v-fcbfc0e0]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-fcbfc0e0]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-fcbfc0e0]{top:14px;left:16px}}.Layout[data-v-d8b57b2d]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3dc26e1d]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3dc26e1d]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{margin:128px 0}}.VPHomeSponsors[data-v-3dc26e1d]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 64px}}.container[data-v-3dc26e1d]{margin:0 auto;max-width:1152px}.love[data-v-3dc26e1d]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3dc26e1d]{display:inline-block}.message[data-v-3dc26e1d]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3dc26e1d]{padding-top:32px}.action[data-v-3dc26e1d]{padding-top:40px;text-align:center}.VPTeamMembersItem[data-v-acff304e]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-acff304e]{padding:32px}.VPTeamMembersItem.small .data[data-v-acff304e]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-acff304e]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-acff304e]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-acff304e]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-acff304e]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-acff304e]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-acff304e]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-acff304e]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-acff304e]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-acff304e]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-acff304e]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-acff304e]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-acff304e]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-acff304e]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-acff304e]{text-align:center}.avatar[data-v-acff304e]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-acff304e]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-acff304e]{margin:0;font-weight:600}.affiliation[data-v-acff304e]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-acff304e]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-acff304e]:hover{color:var(--vp-c-brand-1)}.desc[data-v-acff304e]{margin:0 auto}.desc[data-v-acff304e] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-acff304e]{display:flex;justify-content:center;height:56px}.sp-link[data-v-acff304e]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-acff304e]:hover,.sp .sp-link.link[data-v-acff304e]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-acff304e]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-bf782009]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-bf782009]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-bf782009]{max-width:876px}.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-bf782009]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-bf782009]{max-width:760px}.container[data-v-bf782009]{display:grid;gap:24px;margin:0 auto;max-width:1152px}.VPTeamPage[data-v-a5329171]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-a5329171]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-a5329171-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-a5329171-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-a5329171-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:96px}}.VPTeamMembers[data-v-a5329171-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-a5329171-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-a5329171-s]{padding:0 64px}}.VPTeamPageSection[data-v-3bf2e850]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 64px}}.title[data-v-3bf2e850]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-3bf2e850]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-3bf2e850]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-3bf2e850]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-3bf2e850]{padding-top:40px}.VPTeamPageTitle[data-v-46c5e327]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-46c5e327]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-46c5e327]{padding:80px 64px 48px}}.title[data-v-46c5e327]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-46c5e327]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-46c5e327]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-46c5e327]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPLocalSearchBox[data-v-68e678c9]{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;display:flex}.backdrop[data-v-68e678c9]{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-backdrop-bg-color);transition:opacity .5s}.shell[data-v-68e678c9]{position:relative;padding:12px;margin:64px auto;display:flex;flex-direction:column;gap:16px;background:var(--vp-local-search-bg);width:min(100vw - 60px,900px);height:min-content;max-height:min(100vh - 128px,900px);border-radius:6px}@media (max-width: 767px){.shell[data-v-68e678c9]{margin:0;width:100vw;height:100vh;max-height:none;border-radius:0}}.search-bar[data-v-68e678c9]{border:1px solid var(--vp-c-divider);border-radius:4px;display:flex;align-items:center;padding:0 12px;cursor:text}@media (max-width: 767px){.search-bar[data-v-68e678c9]{padding:0 8px}}.search-bar[data-v-68e678c9]:focus-within{border-color:var(--vp-c-brand-1)}.local-search-icon[data-v-68e678c9]{display:block;font-size:18px}.navigate-icon[data-v-68e678c9]{display:block;font-size:14px}.search-icon[data-v-68e678c9]{margin:8px}@media (max-width: 767px){.search-icon[data-v-68e678c9]{display:none}}.search-input[data-v-68e678c9]{padding:6px 12px;font-size:inherit;width:100%}@media (max-width: 767px){.search-input[data-v-68e678c9]{padding:6px 4px}}.search-actions[data-v-68e678c9]{display:flex;gap:4px}@media (any-pointer: coarse){.search-actions[data-v-68e678c9]{gap:8px}}@media (min-width: 769px){.search-actions.before[data-v-68e678c9]{display:none}}.search-actions button[data-v-68e678c9]{padding:8px}.search-actions button[data-v-68e678c9]:not([disabled]):hover,.toggle-layout-button.detailed-list[data-v-68e678c9]{color:var(--vp-c-brand-1)}.search-actions button.clear-button[data-v-68e678c9]:disabled{opacity:.37}.search-keyboard-shortcuts[data-v-68e678c9]{font-size:.8rem;opacity:75%;display:flex;flex-wrap:wrap;gap:16px;line-height:14px}.search-keyboard-shortcuts span[data-v-68e678c9]{display:flex;align-items:center;gap:4px}@media (max-width: 767px){.search-keyboard-shortcuts[data-v-68e678c9]{display:none}}.search-keyboard-shortcuts kbd[data-v-68e678c9]{background:#8080801a;border-radius:4px;padding:3px 6px;min-width:24px;display:inline-block;text-align:center;vertical-align:middle;border:1px solid rgba(128,128,128,.15);box-shadow:0 2px 2px #0000001a}.results[data-v-68e678c9]{display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.result[data-v-68e678c9]{display:flex;align-items:center;gap:8px;border-radius:4px;transition:none;line-height:1rem;border:solid 2px var(--vp-local-search-result-border);outline:none}.result>div[data-v-68e678c9]{margin:12px;width:100%;overflow:hidden}@media (max-width: 767px){.result>div[data-v-68e678c9]{margin:8px}}.titles[data-v-68e678c9]{display:flex;flex-wrap:wrap;gap:4px;position:relative;z-index:1001;padding:2px 0}.title[data-v-68e678c9]{display:flex;align-items:center;gap:4px}.title.main[data-v-68e678c9]{font-weight:500}.title-icon[data-v-68e678c9]{opacity:.5;font-weight:500;color:var(--vp-c-brand-1)}.title svg[data-v-68e678c9]{opacity:.5}.result.selected[data-v-68e678c9]{--vp-local-search-result-bg: var(--vp-local-search-result-selected-bg);border-color:var(--vp-local-search-result-selected-border)}.excerpt-wrapper[data-v-68e678c9]{position:relative}.excerpt[data-v-68e678c9]{opacity:50%;pointer-events:none;max-height:140px;overflow:hidden;position:relative;margin-top:4px}.result.selected .excerpt[data-v-68e678c9]{opacity:1}.excerpt[data-v-68e678c9] *{font-size:.8rem!important;line-height:130%!important}.titles[data-v-68e678c9] mark,.excerpt[data-v-68e678c9] mark{background-color:var(--vp-local-search-highlight-bg);color:var(--vp-local-search-highlight-text);border-radius:2px;padding:0 2px}.excerpt[data-v-68e678c9] .vp-code-group .tabs{display:none}.excerpt[data-v-68e678c9] .vp-code-group div[class*=language-]{border-radius:8px!important}.excerpt-gradient-bottom[data-v-68e678c9]{position:absolute;bottom:-1px;left:0;width:100%;height:8px;background:linear-gradient(transparent,var(--vp-local-search-result-bg));z-index:1000}.excerpt-gradient-top[data-v-68e678c9]{position:absolute;top:-1px;left:0;width:100%;height:8px;background:linear-gradient(var(--vp-local-search-result-bg),transparent);z-index:1000}.result.selected .titles[data-v-68e678c9],.result.selected .title-icon[data-v-68e678c9]{color:var(--vp-c-brand-1)!important}.no-results[data-v-68e678c9]{font-size:.9rem;text-align:center;padding:12px}svg[data-v-68e678c9]{flex:none} diff --git a/content/1.introduction/1.overview.html b/content/1.introduction/1.overview.html new file mode 100644 index 0000000..dd2f88f --- /dev/null +++ b/content/1.introduction/1.overview.html @@ -0,0 +1,26 @@ + + + + + + AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit

产品定位

AgentKit 是火山引擎推出的企业级 AI Agent 开发平台,为开发者提供完整的 Agent 构建、部署和运维解决方案。平台通过标准化的开发工具链和云原生基础设施,显著降低复杂智能体应用的开发部署门槛。

核心优势

  • 声明式应用定义:通过简洁的 YAML 文件定义智能体应用的核心组件和配置,实现"一次定义,处处运行"。
  • 模块化与可扩展:内置丰富的 Tool(工具)、Memory(记忆)、Knowledge(知识库)等模块,并提供标准化的接口,方便开发者自定义和扩展。
  • 云原生部署:与 AgentKit Platform 无缝集成,支持一键将应用部署到云端,并提供弹性伸缩、持续集成和高可用保障。
  • 多智能体协作:支持构建多个 Agent 协同工作的复杂系统,实现任务的分解、协作和汇总,支持 A2A 协议 Agent。
  • 全面的生命周期管理:提供从项目初始化、本地调试、云端部署到线上运维的全套 agentkit CLI 工具链。
  • 多语言支持:支持 Python 和 Golang 开发,满足不同技术栈需求。
  • 丰富的项目模板:提供多种预置模板,包括基础应用、流式输出、A2A 协议等,快速启动开发。

架构理念

AgentKit 的核心设计理念是将 Agent App定义执行分离。

  • 应用定义(Definition):开发者通过 agentkit.yaml 文件声明式地定义应用的元数据、依赖、运行时环境和所需使用的平台服务(如知识库、记忆模块等)。
  • 应用执行(Execution)agentkit CLI 和 AgentKit Platform 负责解析定义文件,并自动完成环境准备、代码打包、镜像构建、持续集成和云端部署等一系列繁琐工作。

这种分离的设计使得开发者可以专注于业务逻辑的实现,而将复杂的工程化问题交给 AgentKit 来处理,敏捷构建,快速生产级落地。

适用场景

  • 智能问答机器人:快速构建集成知识库的智能问答服务。
  • 自动化工作流:创建能够自动执行一系列任务(如发送邮件、生成报告、调用 API)的自动化流程。
  • 复杂数据分析:构建能够理解用户意图、查询数据库、分析数据并生成可视化报告的数据分析 Agent
  • 多智能体系统:设计和部署多个 Agent 协同完成复杂任务的系统,例如"研究员-分析师-报告员"模式。

开始使用

  • 安装 AgentKit:了解如何安装 AgentKit。
  • 快速开始:通过一个简单的示例,快速体验从开发到部署的全过程。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/1.introduction/2.installation.html b/content/1.introduction/2.installation.html new file mode 100644 index 0000000..7e5b9ef --- /dev/null +++ b/content/1.introduction/2.installation.html @@ -0,0 +1,73 @@ + + + + + + 安装 AgentKit | AgentKit + + + + + + + + + + + + + + + +
Skip to content

安装 AgentKit

本指南将引导您完成 AgentKit 的安装和基本配置。

环境要求

  • Python 版本: 3.10 或更高版本
  • 操作系统: Linux, macOS
  • 包管理器: 推荐使用 uvpip

我们强烈建议在 Python 虚拟环境 中安装 AgentKit,以避免与系统包产生冲突。

安装方法

方法一:pip 安装

稳定版本

适用于生产环境部署:

bash
pip install agentkit-sdk-python

开发版本

包含最新功能和修复:

bash
pip install --pre agentkit-sdk-python

指定版本

安装特定版本:

bash
pip install agentkit-sdk-python==0.1.7

方法二:uv 安装(推荐)

我们推荐使用 uv 来管理虚拟环境和依赖。

bash
# install uv
+curl -LsSf https://astral.sh/uv/install.sh | sh
+
+# Initialize uv environment
+uv init --no-workspace
+
+# Specify Python version for the environment
+uv venv --python 3.12
+
+# Activate the virtual environment
+source .venv/bin/activate
+
+# Install AgentKit using uv
+uv pip install agentkit-sdk-python
+
+# Install veadk (recommended for local debugging)
+uv pip install veadk-python

方法三:源码安装

适用于开发者和需要定制化场景:

从官方Github仓库安装

bash
# clone repo
+git clone git@github.com:volcengine/agentkit-sdk-python.git
+
+cd agentkit-sdk-python
+
+# we use uv to build this project
+uv venv --python 3.12
+
+# Activate the virtual environment
+source .venv/bin/activate
+
+# only install necessary requirements
+uv sync
+
+# install agentkit-sdk-python with editable mode
+uv pip install -e .

如果您习惯使用 pipvenv,也可以执行以下命令:

bash
# Create virtual environment
+python3 -m venv .venv
+
+# Activate virtual environment
+source .venv/bin/activate
+
+# Install AgentKit
+pip install agentkit-sdk-python

3. 验证安装

安装完成后,执行以下命令验证 agentkit CLI 是否可用:

bash
agentkit --version

如果成功输出版本号,则说明 AgentKit 已成功安装。

认证配置

在使用 agentkit CLI 与 AgentKit Platform 交互之前,您需要配置访问凭证(AK/SK)。

推荐方式:使用全局配置

使用 AgentKit 的全局配置功能来安全地存储您的凭证:

bash
# 初始化全局配置
+agentkit config --global --init
+
+# 设置您的访问凭证
+agentkit config --global --set volcengine.access_key="YOUR_ACCESS_KEY"
+agentkit config --global --set volcengine.secret_key="YOUR_SECRET_KEY"
+
+# 验证配置
+agentkit config --global --show

这种方式将凭证安全地存储在 ~/.agentkit/config.yaml 文件中,避免在 shell 历史记录中暴露敏感信息。

环境变量方式(开发调试)

对于临时开发调试,您可以设置环境变量:

bash
export VOLCENGINE_ACCESS_KEY="YOUR_ACCESS_KEY"
+export VOLCENGINE_SECRET_KEY="YOUR_SECRET_KEY"

⚠️ 注意:出于安全考虑,不建议将包含敏感信息的 export 命令添加到 shell 配置文件(如 ~/.bashrc~/.zshrc)中,因为这可能导致凭证泄露。

下一步

现在您已经成功安装并配置了 AgentKit,可以开始构建您的第一个 Agent 了。

  • 快速开始: 跟随我们的快速开始指南,体验从开发到部署的全过程。
  • 故障排除: 如果遇到问题,可以查阅故障排除指南。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/1.introduction/3.quickstart.html b/content/1.introduction/3.quickstart.html new file mode 100644 index 0000000..daaa236 --- /dev/null +++ b/content/1.introduction/3.quickstart.html @@ -0,0 +1,56 @@ + + + + + + 快速入门 | AgentKit + + + + + + + + + + + + + + + + +
Skip to content

快速入门

本指南将引导您使用 “Basic Agent App” 模板开发一个简单的 Agent,快速体验 AgentKit 从开发、部署到测试的全流程。AgentKit 提供多种模板,包括基础应用、流式输出、A2A 协议等,支持 Python 和 Golang 开发。

准备工作

1. 获取火山引擎访问密钥 (AK/SK)

首先,您需要一个火山引擎账号并开通 AgentKit 服务。请访问 火山引擎控制台 完成注册和开通。

然后,在 访问控制 页面创建并获取访问密钥 (AK/SK)。

获取后,请将其设置为环境变量:

bash
export VOLCENGINE_ACCESS_KEY=<your_access_key>
+export VOLCENGINE_SECRET_KEY=<your_secret_key>

2. 获取模型推理 API Key (可选)

您的 Agent 通常需要调用大语言模型 (LLM) 来提供核心智能。AgentKit Platform 支持火山方舟的多种模型。请确保您已开通 火山方舟 服务,并获取模型推理的 EndpointAPI Key

  • 获取推理接入点 (Endpoint): 在方舟平台的「在线推理」页面,您可以选择预置的推理接入点,或创建自定义推理接入点。

    推理接入点

  • 获取 API Key: 在「API Key 管理」页面,选择或创建一个新的 API Key。

    API Key管理

请记录下您的 Endpoint IDep-20250520174054-xxxxx(也可以是模型ID如 deepseek-v3-1-terminus)和 API Key,后续将通过环境变量MODEL_AGENT_NAMEMODEL_AGENT_API_KEY配置给 Agent

如果您不提供这些信息,AgentKit Platform 将在云端部署时自动为您注入一个内置的 doubao-seed-1-6 模型。

3. 本地调试凭证配置 (Local 模式必读)

如果您计划在本地 (Local 模式) 运行和调试 Agent,由于本地环境无法自动注入云端凭证,您必须手动配置访问凭证,否则 Agent 将无法调用大模型。

您可以通过以下两种方式之一配置凭证:

方式一:配置方舟模型凭证

直接指定要使用的模型接入点和 API Key:

bash
# 在 config 时通过 --runtime_envs (-e) 设置
+agentkit config -e MODEL_AGENT_NAME=<your_endpoint_id> -e MODEL_AGENT_API_KEY=<your_api_key>

方式二:配置火山引擎访问密钥

如果配置了火山引擎的 AK/SK,veADK 会尝试自动获取您的模型访问权限:

bash
# 在 config 时通过 --runtime_envs (-e) 设置
+agentkit config -e VOLCENGINE_ACCESS_KEY=<your_access_key> -e VOLCENGINE_SECRET_KEY=<your_secret_key>

注意

  1. 在 Local 模式下,直接在宿主机 shell 中 export 环境变量对容器内无效,必须使用 agentkit config -e 将其写入 agentkit.yamlruntime_envs 中。
  2. 在 Cloud 模式下,Runtime 会自动注入相关凭证,通常无需手动配置上述环境变量。

开始使用

步骤 1: 安装 AgentKit

在开始之前,请确保您已遵循 安装 AgentKit 指南完成 agentkit CLI 的安装和环境配置。

步骤 2: 初始化项目

创建一个项目目录,并使用 agentkit init 命令初始化您的 Agent 应用:

bash
mkdir simple-agent && cd simple-agent
+agentkit init

执行后会显示可用模板列表,选择模板 1 (Basic Agent App)。您也可以使用 --template 参数直接指定模板:

bash
# 使用基础模板
+agentkit init --template basic
+
+# 使用流式输出模板
+agentkit init --template basic_stream
+
+# 查看所有可用模板
+agentkit init --list-templates

命令执行后,将在当前目录生成模板代码和配置文件:

txt
.
+├── agentkit.yaml       # **Agent** 的核心配置文件。
+├── requirements.txt    # 项目的 Python 依赖。
+└── simple_agent.py     # **Agent** 应用的入口文件。

步骤 3: 配置与部署

您可以使用 agentkit launch 命令一键完成应用的构建和云端部署。该命令会使用 agentkit.yaml 文件中的配置。

如果需要自定义配置(例如,指定部署区域、镜像仓库或传入模型密钥),可以手动编辑 agentkit.yaml,或运行 agentkit config 命令,通过交互式向导生成配置。

bash
agentkit config

配置向导会引导您完成以下设置:

通用配置(按 回车 使用默认值):

  • 1.应用名称:Agent 应用名称(默认值为 simple_agent,可直接按回车使用默认值)
  • 2.入口文件:应用入口文件(默认值为 simple_agent.py
  • 3.应用描述:应用描述信息(可选)
  • 4.编程语言:Python 或 Golang(默认 Python)
  • 5.依赖文件:默认 requirements.txtgo.mod
  • 6.Agent应用内部Runtime常用环境变量
    • MODEL_AGENT_NAME:方舟模型接入点 ID(可选)
    • MODEL_AGENT_API_KEY:方舟模型 API Key(可选)
  • 7.部署模式:选择 cloud(云端构建和部署)

云端部署配置

  • 1.服务区域:默认 cn-beijing
  • 2.镜像标签:默认 , 会自动渲染为时间戳,格式如20251218154940
  • 3.CR 镜像仓库:CLI 会自动生成CR实例名称、CR命名空间和CR仓库名,用户也可手动指定(建议自动即可)

完成配置后,执行 launch 命令即可一键部署:

bash
agentkit launch

该命令会自动完成以下步骤:

  1. 渲染 Dockerfile
  2. 创建项目压缩包并上传到 TOS
  3. 准备 CR(容器镜像仓库)资源
  4. 创建 Pipeline 并执行构建
  5. 部署到 Runtime 环境

部署成功会显示:

bash
 创建Runtime成功: r-ye9j62wydcn****nhsoa, request_id: 20251120***************5344
+等待Runtime状态为Ready...
+💡 提示:Runtime初始化中,请耐心等待,不要中断进程
+ Runtime状态为Ready
+  Runtime状态: Releasing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:23
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com
+100% 部署完成
+ Successfully launched agent: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com
+Built image: agentkit-cli-21076x****-cn-beijing.cr.volces.com/agentkit/myapp:2025112017****
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com

提示:首次部署大约需要 2-3 分钟,请耐心等待。

使用 Agent

调用 Agent

使用 invoke 命令测试 Agent:

bash
agentkit invoke "你好"

如果看到类似下面的输出,恭喜您,第一个 Agent 已成功运行!

text
(agentkit) test@localhost:~/workspace/simple-agent$ agentkit invoke "你好"
+Invoking agent...
+Using default headers: {'user_id': 'agentkit_user', 'session_id': 'agentkit_sample_session'}
+✅ Invocation successful
+📝 Response:
+你好!我是由****团队开发的AI助手,擅长数据科学(信息收集、数据分析等)、文档编写(撰写多章节文章、深度研究报告)以及软件开发(创建网站/应用、解决代码问题等)
+。有什么具体需求,我很乐意为你提供帮助!

下一步

恭喜您完成了第一个 Agent 的开发和部署!

接下来您可以:

  • 探索其他应用模板(MCP、A2A 等)
  • 集成 Memory、Knowledge、Tools 等 Platform 服务,开发更强大的 Agent
  • 使用 agentkit memoryagentkit knowledgeagentkit tools 等命令管理平台服务

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/1.introduction/4.troubleshooting.html b/content/1.introduction/4.troubleshooting.html new file mode 100644 index 0000000..b65f901 --- /dev/null +++ b/content/1.introduction/4.troubleshooting.html @@ -0,0 +1,30 @@ + + + + + + 故障排除指南 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

故障排除指南

本指南旨在帮助您诊断和解决在使用 AgentKit 过程中可能遇到的常见问题。如果您在此处未找到解决方案,请随时通过 GitHub Issues 与我们联系。

安装问题

1. agentkit 命令未找到

  • 现象: 在终端中执行 agentkit 命令时,系统提示 command not found
  • 原因: 这通常是由于 pip 安装的可执行文件路径未被添加到系统的 PATH 环境变量中。
  • 解决方案:
    • 确认安装路径: 执行 pip show agentkit-sdk-pythonuv pip show agentkit-sdk-python,找到 Location 字段指示的安装路径。
    • 找到可执行文件: 在安装路径下的 bin 目录中(例如 .../site-packages/bin),应该能找到 agentkit 可执行文件。
    • 添加到 PATH: 将此 bin 目录的绝对路径添加到您的 ~/.bashrc~/.zshrc 或其他 Shell 配置文件中。
      bash
      export PATH="/path/to/your/python/bin:$PATH"
    • 重新加载配置: 执行 source ~/.bashrc 或重启终端以使更改生效。

2. 依赖冲突

  • 现象: 在安装 agentkit-sdk-python 时,pip 报告依赖版本冲突。
  • 原因: 您的 Python 环境中可能已存在与 AgentKit 不兼容的库版本。
  • 解决方案:
    • 使用虚拟环境(推荐): 强烈建议在项目中使用 uvvenv 创建一个干净的虚拟环境,以避免与系统级的 Python 包产生冲突。
      bash
      uv venv
      +source .venv/bin/activate
      +uv pip install agentkit-sdk-python
    • 清理环境重新安装: 如果必须使用现有环境,建议先卸载再重新安装:
      bash
      pip uninstall agentkit-sdk-python
      +pip install agentkit-sdk-python

配置问题

1. 环境变量未生效

  • 现象:提示无法连接到 AgentKit Platform 或认证失败。
  • 原因:可能未传入环境变量或传入了错误的环境变量名称
  • 解决方案
    • 确认已设置必需的环境变量
    bash
    echo $VOLCENGINE_ACCESS_KEY
    +echo $VOLCENGINE_SECRET_KEY
    • 确保没有多余的空格或引号
    • 在当前 shell 会话中重新 export 环境变量

2. 配置文件格式错误

  • 现象:执行 agentkit launch 时提示配置文件解析失败。
  • 原因:文件格式问题
  • 解决方案
    • 检查 agentkit.yaml 格式是否正确(注意缩进)
    • 重新运行 agentkit config 生成配置

部署问题

1. CR 创建失败

  • 现象
CreateRegistry: QuotaExceeded.Registry The quota of Registry is exceeded.
  • 原因:账号配额不足
  • 解决方案
    • CR 实例数量超出配额限制
    • agentkit config 中配置为已有的 CR 实例名称
    • 或联系管理员提高配额

2. 镜像构建失败

  • 现象:Pipeline 构建失败,提示依赖安装错误。
  • 原因:依赖安装失败
  • 解决方案
    • 检查 requirements.txt 中的依赖是否正确
    • 确认依赖版本是否兼容 Python 3.12
    • 查看 Pipeline 日志获取详细错误信息 (日志会自动下载到您本地根目录下,您可以注意交互界面的提示,在根目录找到一个类似命名的文件pipeline_failed_****ff20ce223.log)

3. Runtime 部署超时

  • 现象:Runtime 长时间处于 Releasing 状态。
  • 原因:首次部署耗时久,或可能存在资源不足
  • 解决方案
    • 首次部署通常需要 2-3 分钟,请耐心等待
    • 使用 agentkit status 检查状态
    • 如果超过 5 分钟仍未就绪,可能是资源不足,尝试 agentkit destroy 后重新部署

4. Runtime 状态异常

  • 现象:Runtime 状态为 FailedError
  • 原因:Runtime 内部异常
  • 解决方案
    • 检查环境变量配置是否正确(特别是模型 API Key)
    • 查看 AgentKit Platform 控制台的日志
    • 确认应用代码没有启动时错误
    • 尝试使用 agentkit destroy 清理后重新部署

调用问题

1. invoke 调用失败

  • 现象:执行 agentkit invoke 时提示连接失败或超时。
  • 原因:网络问题或 Endpoint 配置错误
  • 解决方案
    • 使用 agentkit status 确认 Runtime 状态为 Ready
    • 检查网络连接
    • 确认 Endpoint 地址正确
    • 检查防火墙或代理设置

2. 模型调用失败

  • 现象:Agent 返回错误,提示模型访问失败。
  • 原因:模型 API Key 配置错误或模型配额用尽
  • 解决方案
    • 确认方舟模型 API Key 配置是否正确
    • 检查接入点 ID 是否有效
    • 确认模型配额是否用尽
    • 登录方舟平台检查 API Key 权限

权限问题

1. AK/SK 认证失败

  • 现象:提示 InvalidAccessKeyIdSignatureDoesNotMatch
  • 原因:AK/SK 配置错误或权限不足
  • 解决方案
    • 确认 AK/SK 正确且有效
    • 检查是否有 AgentKit 服务的访问权限
    • 确认 AK/SK 没有被禁用或过期
    • 联系管理员分配相关权限

2. 资源访问被拒绝

  • 现象:提示 AccessDenied 或权限不足。
  • 原因:账号没有足够的权限执行操作
  • 解决方案
    • 确认账号有相应资源的操作权限
    • 检查 IAM 角色配置
    • 联系管理员授予必要权限

获取帮助

如果以上方案无法解决您的问题,请:

  1. 查看日志

    • 本地日志:检查命令行输出
    • Platform 日志:访问 AgentKit 控制台查看详细日志
  2. 联系支持

    • 提供详细的错误信息和日志
    • 说明复现步骤
    • 附上相关配置文件(注意脱敏)
    • 联系火山引擎技术支持
  3. 查阅文档

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/2.agentkit-cli/1.overview.html b/content/2.agentkit-cli/1.overview.html new file mode 100644 index 0000000..4439a7c --- /dev/null +++ b/content/2.agentkit-cli/1.overview.html @@ -0,0 +1,79 @@ + + + + + + AgentKit CLI 概览 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit CLI 概览

AgentKit CLI 是一个为开发者设计的强大命令行工具,旨在简化和加速 Agent 应用的开发、部署和管理全生命周期。无论您是进行本地快速原型验证,还是在生产环境中进行规模化部署,agentkit 命令都能提供一致且高效的开发体验。

核心优势

  • 声明式配置:所有配置通过一个 agentkit.yaml 文件管理,清晰、可移植且易于版本控制。
  • 多环境部署:无缝支持本地开发、混合部署和纯云端部署三种模式,满足不同场景需求。
  • 一键式操作:通过 agentkit launch 等高级命令,将构建、部署等多个步骤合而为一,极大提升效率。
  • 模板化项目:内置多种应用模板,帮助您快速启动项目,无需从零开始。
  • 智能交互:提供 agentkit config 等交互式向导,引导您完成配置,降低学习成本。

主要命令

agentkit CLI 提供了一系列直观的命令来管理您的 Agent 应用:

核心命令

命令功能描述
agentkit init初始化一个新的 Agent 项目,可选择不同的模板。
agentkit config通过交互式向导配置 agentkit.yaml 文件。
agentkit build将您的 Agent 应用构建为 Docker 镜像。
agentkit deploy将已构建的镜像部署到指定环境 (本地或云端)。
agentkit launch一键完成构建和部署,是开发中最常用的命令。
agentkit invoke与已部署的 Agent 进行交互,用于快速测试。
agentkit status查看 Agent 的运行状态和 Endpoint。
agentkit destroy停止并销毁 Agent 实例,释放相关资源。

平台服务命令

命令功能描述
agentkit memory管理 AgentKit Memory 记忆集合。
agentkit knowledge管理 AgentKit Knowledge 知识库。
agentkit tools管理 AgentKit Tools 工具和 Sessions 会话。
agentkit runtime管理 AgentKit Runtime 运行时实例。

想要了解每个命令的详细用法?请查阅 命令详解

三种部署模式

AgentKit CLI 的核心特性之一是其灵活的部署模型,旨在适应从开发到生产的不同阶段。

1. 本地模式 (local)

在您的本地机器上完成构建和部署,非常适合快速开发和调试。

  • 工作流: 源代码本地 Docker 构建本地容器运行
  • 优势: 迭代速度快,支持离线工作,便于直接调试。

2. 云端模式 (cloud)

将代码的构建和部署完全托管在 AgentKit Platform 上,是生产环境的最佳实践。

  • 工作流: 源代码云端自动构建云端镜像仓库生产级 Runtime
  • 优势: 无需本地 Docker 环境,内置可观测性,环境一致性高,安全可靠。

3. 混合模式 (hybrid)

在本地构建镜像,然后将其推送到云端 AgentKit Platform 进行部署。这种模式结合了本地控制和云端能力的优点。

  • 工作流: 源代码本地 Docker 构建上传至云端镜像仓库生产级 Runtime
  • 优势: 兼顾本地构建的灵活性和云端运行环境的稳定性,适合需要自定义构建流程的场景。

配置文件 (agentkit.yaml)

agentkit.yamlAgentKit 项目的核心,它以声明式的方式定义了应用的所有配置。我们强烈建议使用 agentkit config 命令来管理此文件。

yaml
# 通用配置
+common:
+  agent_name: my-agent
+  entry_point: app.py
+  python_version: '3.12'
+  launch_type: cloud # 定义默认的部署模式
+
+# 不同部署模式的特定配置
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: latest
+    runtime_envs:
+      MODEL_API_KEY: "your-api-key"

想要了解所有配置项的详细说明?请查阅 配置详解

快速上手

只需几分钟,即可完成您的第一个 Agent 的部署。

bash
# 1. 初始化项目 (选择 Basic App 模板)
+mkdir my-first-agent && cd my-first-agent
+agentkit init my-first-agent
+
+# 或者指定特定模板
+agentkit init my-first-agent --template basic_stream  # 流式输出模板
+agentkit init my-first-agent --template a2a           # A2A 协议模板
+
+# 2. 配置应用 (通过交互式向导)
+agentkit config
+
+# 3. 一键部署到云端
+agentkit launch
+
+# 4. 测试您的 Agent
+agentkit invoke "你好!"
+
+# 5. 查看运行状态
+agentkit status
+
+# 6. 清理资源(可选)
+agentkit destroy

探索更多功能

bash
# 查看可用模板
+agentkit init --list-templates
+
+# 管理平台服务
+agentkit memory list      # 查看记忆集合
+agentkit knowledge list   # 查看知识库
+agentkit tools list       # 查看工具列表
+agentkit runtime list     # 查看运行时实例

环境要求

✅ 基础环境(所有模式)

  • Python 3.10 或更高版本
  • pip 包管理器
  • 已安装 AgentKit SDK

🐍 Python 开发环境

  • Python 3.10, 3.11, 3.12, 3.13 版本支持
  • 推荐使用 requirements.txt 管理依赖

🐹 Golang 开发环境

  • Golang 1.24 版本支持
  • 使用 go.mod 管理依赖
  • 适用于高性能场景

🐳 本地开发(Local/Hybrid 模式)

  • Docker Desktop 或 Docker Engine 20.10+
  • 确保 Docker 服务已启动

☁️ 云端部署(Cloud/Hybrid 模式)

  • 火山引擎账号
  • 配置访问凭证(AK/SK),推荐使用安全的全局配置方式:
    bash
    # 初始化全局配置
    +agentkit config --global --init
    +
    +# 设置访问凭证
    +agentkit config --global --set volcengine.access_key="your_access_key"
    +agentkit config --global --set volcengine.secret_key="your_secret_key"
    +
    +# (Byteplus 可选)设置默认云服务为 BytePlus
    +agentkit config --global --set defaults.cloud_provider=byteplus
    +
    +# (Byteplus 可选)设置Byteplus访问凭证
    +agentkit config --global --set byteplus.access_key="your_byteplus_access_key"
    +agentkit config --global --set byteplus.secret_key="your_byteplus_secret_key"

下一步

  • 📖 命令详解: 深入了解每个 CLI 命令的参数和用法。
  • ⚙️ 配置详解: 掌握 agentkit.yaml 的所有配置项。
  • 🚀 快速入门: 跟随端到端的教程,从零开始构建一个完整的 Agent 应用。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/2.agentkit-cli/2.commands.html b/content/2.agentkit-cli/2.commands.html new file mode 100644 index 0000000..60e4f1f --- /dev/null +++ b/content/2.agentkit-cli/2.commands.html @@ -0,0 +1,659 @@ + + + + + + CLI 命令详解 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

CLI 命令详解

AgentKit CLI 是您与 AgentKit Platform 交互的核心工具,提供了一套完整的命令集,旨在简化和自动化 Agent 开发、部署和管理的整个生命周期。无论您是初始化新项目、配置云端资源,还是测试和迭代您的 AgentAgentKit CLI 都能提供强大支持。

本篇文档将详细介绍每个命令的功能、参数选项和最佳实践,帮助您高效利用 AgentKit CLI 构建卓越的 Agent 应用。

命令总览

AgentKit CLI 遵循标准的 agentkit <command> [arguments] [options] 格式。

命令功能描述核心应用场景
init初始化项目:创建全新的 Agent 项目或包装现有代码。启动新 Agent 开发、快速部署已有代码。
config配置应用:以交互或非交互方式管理项目配置。设置部署模式、环境变量、镜像标签等。
build构建镜像:将您的 Agent 代码打包成可移植的 Docker 镜像。准备部署、CI/CD 集成。
deploy部署应用:将已构建的镜像发布到目标运行环境。上线或更新 Agent 服务。
launch一键启动:自动完成构建和部署两个步骤。快速迭代、简化上线流程。
invoke测试调用:在本地或云端直接调用 Agent,进行功能验证。调试 Agent 逻辑、验证端到端功能。
status查看状态:获取已部署 Agent 的运行状态和端点信息。监控服务健康状况、获取访问地址。
destroy清理资源:停止并删除已部署的 Agent 实例及相关资源。下线服务、释放云资源。

agentkit init

agentkit init 命令用于引导一个新的 Agent 项目,支持从零开始和基于现有代码两种模式,极大提升了项目启动效率。

使用模式

  1. 模板模式 (Template Mode):从 AgentKit 提供的内置模板创建项目,适合从零开始的开发者。
  2. 包装模式 (Wrapper Mode):将您已有的 veadk Agent 定义文件快速包装成可部署的 AgentKit 项目,实现代码复用。

命令格式

bash
# 模板模式:从预设模板创建
+agentkit init [project_name] [options]
+
+# 包装模式:包装现有的 Agent 定义文件
+agentkit init [project_name] --from-agent <path_to_agent_file> [options]

核心参数

  • project_name (可选):
    • 描述:为您的 Agent 项目指定一个唯一的名称,如 smart-faq-agent
    • 默认值:模板模式下为 simple_agent;包装模式下根据源文件名自动生成 (例如 agentkit-my_agent)。
    • 约束:只能包含字母、数字、下划线 (_) 和中划线 (-)。

模板模式选项

选项描述示例
--template, -t选择项目模板,如 basicbasic_streama2a--template basic
--agent-name设置 Agent 的显示名称。--agent-name "智能客服"
--descriptionAgent 的功能描述,在多 Agent 协作场景中尤为重要。--description "处理常见的用户问题"
--system-prompt定义 Agent 的系统提示词,塑造其角色和行为。--system-prompt "你是一个专业的客服..."
--model-name指定火山引擎方舟平台上的模型名称。--model-name "doubao-pro-32k"
--tools以逗号分隔的工具列表,如 web_search,run_code--tools "web_search"

包装模式选项

选项描述示例
--from-agent, -f(必需) 指定包含 veadk.Agent 定义的现有 Python 文件路径。--from-agent ./my_existing_agent.py
--agent-var当自动检测失败时,手动指定 Agent 对象在文件中的变量名。--agent-var "custom_agent_instance"
--wrapper-type生成的包装器类型,basic (标准) 或 stream (流式)。--wrapper-type stream

通用选项

选项描述默认值
--directory指定创建项目的目标目录。当前目录 (.)

使用示例

模板模式

bash
# 示例 1: 交互式创建,引导您选择模板
+agentkit init my-first-agent
+
+# 示例 2: 直接使用 'basic' 模板创建
+agentkit init weather-report-agent --template basic
+
+# 示例 3:在指定目录创建
+agentkit init my_agent --template basic_stream --directory ./my_agents
+
+# 示例 4:使用简写
+agentkit init weather -t basic
+
+# 示例 5: 自定义 Agent 属性
+agentkit init custom-agent \
+  --template basic \
+  --agent-name "高级助理" \
+  --description "一个具备联网和代码执行能力的 Agent" \
+  --tools "web_search,run_code"
+
+# 示例 6:创建流式输出的 Agent
+agentkit init stream_agent \
+  --template basic_stream \
+  --agent-name "流式对话助手" \
+  --model-name "doubao-seed-1-6-250615"

包装模式

bash
# 示例 7:包装现有 Agent 文件(自动检测 Agent 变量)
+agentkit init --from-agent ./my_agent.py
+
+# 示例 8:包装并指定项目名称
+agentkit init weather_bot --from-agent ./weather_agent.py
+
+# 示例 9:使用简写和指定 Agent 变量名
+agentkit init -f ./my_agent.py --agent-var my_custom_agent
+
+# 示例 10:生成流式输出包装器
+agentkit init chat_bot \
+  --from-agent ./chat_agent.py \
+  --wrapper-type stream
+
+# 示例 11:在指定目录包装
+agentkit init deployed_agent \
+  --from-agent ../agents/production_agent.py \
+  --agent-var prod_agent \
+  --wrapper-type basic \
+  --directory ./deployment
+
+# 示例 12:完整的包装命令
+agentkit init my_deployed_bot \
+  -f ~/projects/agents/my_bot.py \
+  --agent-var bot \
+  --wrapper-type stream \
+  --directory ./deploy

最佳实践

  • 从模板开始:对于 AgentKit 新用户,建议从 basic 模板开始,它提供了简洁的项目结构。
  • 利用包装模式:当您已经拥有成熟的 veadk Agent 逻辑时,使用包装模式可以避免重写代码,专注于快速部署。
  • 明确命名:为您的项目和 Agent 取一个描述性的名称,有助于长期维护和团队协作。

运行效果

模板模式输出

当你运行模板模式命令后,会看到类似这样的输出:

     ✨ Build AI Agents with Ease ✨
+
+Available Templates
+┌────┬──────────────────────────┬──────────┬──────────────────────────────────┐
+│ ID │ Name                     │ Type     │ Description                      │
+├────┼──────────────────────────┼──────────┼──────────────────────────────────┤
+│ 1  │ Basic Agent App          │ Basic App│ 基础Agent应用,适合快速入门        │
+│ 2  │ Basic Stream Agent App   │ Stream App│ 支持流式输出的Agent应用           │
+│ 3  │ A2A Agent App            │ A2A App  │ 支持A2A协议的多智能体应用         │
+│ 4  │ Eino A2A Agent App       │ A2A App  │ 基于Eino框架的A2A应用(Golang)  │
+└────┴──────────────────────────┴──────────┴──────────────────────────────────┘
+
+Please select a template by entering the ID (1-2):
+Template ID: 1
+Selected: Basic Agent App
+
+Creating project: my_weather_agent
+Using template: Basic Agent App
+
+✨ Project initialized successfully!
+Template: Basic Agent App
+Entry point: my_weather_agent.py
+Language: Python 3.12
+
+Created files:
+  ✓ my_weather_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

包装模式输出 🆕

当你运行包装模式命令后,会看到类似这样的输出:

     ✨ Build AI Agents with Ease ✨
+
+🔄 Wrapping existing Agent file
+
+Project name: agentkit-my_agent
+Agent file: ./my_agent.py
+Wrapper type: basic
+
+✨ Project initialized successfully!
+Template: Agent Wrapper (Basic)
+Entry point: agentkit-my_agent.py
+Language: Python 3.12
+Agent file: my_agent.py
+Agent variable: agent
+
+Created files:
+  ✓ my_agent.py
+  ✓ agentkit-my_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

包装模式详解 🆕

包装模式是一个强大的功能,让你能够快速将已有的 Agent 定义文件部署到 AgentKit 平台,无需重写代码。

工作原理

  1. 解析 Agent 文件:自动分析你的 Python 文件,识别 Agent 对象定义
  2. 复制源文件:将你的 Agent 文件复制到项目目录
  3. 生成包装器:创建一个新的 Python 文件,导入并包装你的 Agent
  4. 配置部署:生成 agentkit.yaml 和其他必要的部署文件

包装器的作用

生成的包装器文件负责:

  • 导入你的 Agent:从你的文件中导入 Agent 对象
  • 创建 Runner:使用 veadk 的 Runner 包装 Agent
  • 提供部署接口:实现 AgentKit 要求的 @app.entrypoint@app.ping 接口
  • 处理请求/响应:自动处理 HTTP 请求格式转换

Agent 文件要求

你的 Agent 文件需要满足以下条件:

基本要求

python
# 必须是 Python 文件 (.py)
+# 必须包含 Agent 对象定义
+
+from veadk import Agent
+
+# Agent 定义 - 变量名可以是 agent、my_agent 等
+agent = Agent(
+    model="doubao-seed-1-6-250615",
+    description="我的 Agent"
+)

支持的 Agent 变量名

  • 系统会自动检测常见命名:agent, main_agent, my_agent
  • 也可以使用自定义命名,但需要用 --agent-var 参数指定

不支持的情况

  • ❌ 文件中没有 Agent(...) 定义
  • ❌ Agent 定义在函数内部(必须在模块级别)
  • ❌ Agent 对象通过复杂的逻辑生成(需要直接赋值)

包装器类型对比

特性Basic 包装器Stream 包装器
响应方式一次性返回完整结果流式返回(SSE)
适用场景标准对话、短响应长文本生成、实时输出
依赖包veadk-pythonveadk-python + google-adk
配置要求无特殊要求Agent 需要支持流式输出
客户端体验等待后一次性显示逐字显示,更好的交互体验

使用场景

适合使用包装模式的场景

  • ✅ 已有 veadk Agent 代码,想快速部署
  • ✅ 在本地开发调试好的 Agent,准备上线
  • ✅ 多个项目共享同一个 Agent 定义
  • ✅ 想要保持 Agent 代码和部署代码分离

适合使用模板模式的场景

  • ✅ 从零开始创建新 Agent
  • ✅ 学习 AgentKit 开发流程
  • ✅ 需要完整的示例代码作为起点

包装后的项目结构

my_project/
+├── my_agent.py              # 你的原始 Agent 定义
+├── agentkit-my_agent.py     # AgentKit 生成的包装器(入口文件)
+├── requirements.txt         # 依赖列表(含使用提示)
+├── agentkit.yaml           # 部署配置(entry_point 指向包装器)
+└── .dockerignore           # Docker 构建忽略规则

包装器文件示例 (basic 类型):

python
# 导入你的 Agent
+from my_agent import agent
+
+from veadk import Runner
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

常见问题

Q: 找不到 Agent 定义怎么办?

A: 使用 --agent-var 参数明确指定 Agent 变量名:

bash
agentkit init -f ./my_agent.py --agent-var my_custom_agent_name

Q: 可以修改生成的包装器吗?

A: 可以!包装器是标准的 Python 代码,你可以根据需要自由修改。但要注意保持 @app.entrypoint@app.ping 接口不变。

Q: 原始 Agent 文件会被修改吗?

A: 不会!系统只会复制你的文件到目标目录,不会修改原文件。

Q: 如何在包装器中添加额外的依赖?

A: 编辑生成的 requirements.txt 文件,添加你需要的依赖包。文件中已经包含了使用提示。


agentkit config

配置 Agent 应用的参数。支持三种模式:交互式(友好引导)、非交互式(快速更新)和混合模式(灵活组合)。

🆕 全局配置支持:新增全局配置功能(~/.agentkit/config.yaml),可跨项目共享配置。

使用方法

bash
# 项目配置
+agentkit config [参数] [选项]
+
+# 项目级:设置云平台(volcengine/byteplus)
+agentkit config --cloud_provider byteplus
+
+# 全局配置 🆕
+agentkit config --global [选项]

三种配置模式

🎯 交互式模式(默认,推荐首次配置)

无参数运行,系统会一步步引导你填写各项参数:

bash
agentkit config

交互流程示例

[1/7] 🤖 Agent 名称: my_agent
+[2/7] 📝 入口文件: my_agent.py  
+[3/7] 📄 应用描述: 我的天气查询 Agent
+[4/7] 🐍 Python 版本: 3.12
+[5/7] 📦 依赖文件: requirements.txt
+[6/7] 🚀 部署模式(选一个):
+  1. local - 本地构建和运行
+  2. hybrid - 本地构建,云端运行
+  3. cloud - 云端构建和运行(推荐)
+[7/7] 🔐 应用级环境变量(所有模式共享):
+  变量: MODEL_API_KEY=xxxxx

⚡ 非交互式模式(快速更新,适合脚本/CI/CD)

通过命令行参数直接配置,无需手动输入:

bash
# 完整配置示例
+agentkit config \
+    --agent_name myAgent \
+    --entry_point agent.py \
+    --launch_type cloud \
+    --cloud_provider byteplus \
+    --image_tag v1.0.0 \
+    --runtime_envs API_KEY=xxxxx
bash
# 增量更新(只修改部分配置)
+agentkit config --entry_point new_agent.py
+agentkit config --image_tag v1.0.1

🔀 混合模式

部分参数通过命令行指定,其他参数交互式输入:

bash
agentkit config --agent_name myAgent --interactive

主要参数

通用配置参数

参数说明示例
--agent_nameAgent应用名称my_weather_bot
--entry_point入口文件(必须 .py)agent.py
--description应用描述"天气查询助手"
--python_versionPython版本3.12
--dependencies_file依赖文件requirements.txt
--launch_type部署模式local, hybrid, cloud
--cloud_provider / --cloud-provider云平台volcengine, byteplus

环境变量配置(重要⭐)

AgentKit 支持两级环境变量配置:

参数级别说明使用场景
--runtime_envs / -e应用级所有部署模式共享API密钥、模型端点等跨环境配置
--workflow-runtime-envsWorkflow级仅当前部署模式使用调试标志、特定环境配置

使用示例

bash
# 应用级(所有模式共享)
+agentkit config \
+    -e API_KEY=shared-key \
+    -e MODEL_ENDPOINT=https://api.example.com
+
+# Workflow级(仅当前模式)
+agentkit config \
+    --workflow-runtime-envs DEBUG=true \
+    --workflow-runtime-envs LOCAL_CACHE=/tmp
+
+# 混合使用
+agentkit config \
+    -e API_KEY=shared \
+    --workflow-runtime-envs DEBUG=true

配置合并规则

  • 应用级环境变量被所有 workflow 继承
  • Workflow 级环境变量只在当前模式下生效
  • 同名变量:Workflow 级覆盖应用级

Cloud/Hybrid 模式参数

参数说明示例
--region火山引擎区域cn-beijing
--tos_bucketTOS存储桶agentkit-bucket
--image_tag镜像标签v1.0.0, latest
--cr_instance_nameCR实例名称my-cr-instance
--cr_namespace_nameCR命名空间agentkit
--cr_repo_nameCR仓库名称my-agent

💡 提示--cr_* 参数也支持旧的 --ve_cr_* 别名,保持向后兼容。

Runtime 关联资源(Cloud/Hybrid)

你可以通过 agentkit config 把 Runtime 与资源组件进行关联(或解绑),在 agentkit launch/deploy 创建/更新 Runtime 时自动透传到 Runtime API。

支持的关联字段:

  • memory_id:关联 Memory
  • knowledge_id:关联 Knowledge
  • tool_id:关联 Tool
  • mcp_toolset_id:关联 MCP Toolset

命令行配置示例

bash
# 绑定资源
+agentkit config \
+  --memory_id mem-xxx \
+  --knowledge_id kb-xxx \
+  --tool_id tool-xxx \
+  --mcp_toolset_id mcp-ts-xxx
+
+# 解绑(设置为空字符串)
+agentkit config --memory_id ""

YAML 落盘位置agentkit.yaml):

yaml
launch_types:
+  cloud:  # 或 hybrid
+    runtime_bindings:
+      memory_id: mem-xxx
+      knowledge_id: kb-xxx
+      tool_id: tool-xxx
+      mcp_toolset_id: mcp-ts-xxx

💡 解绑语义说明

  • 配置里 不写某个 key:表示不变更该绑定
  • 配置为 ""null:表示清空/解绑(会在更新 Runtime 时下发清空)

Runtime 网络配置(Cloud/Hybrid)

你可以通过 agentkit config 为 Runtime 设置网络(VPC/私网、公网或双栈)。该配置会在 首次创建 Runtime(CreateRuntime) 时生效。

⚠️ 限制:Runtime 已存在时,agentkit launch/deploy 会走 UpdateRuntime, 而 UpdateRuntime 不支持修改 network_configuration,所以该配置不会影响已有 Runtime 的网络。 如果你需要变更网络,请销毁并重新创建 Runtime。

命令行配置示例(私网)

bash
agentkit config \
+  --runtime-network-mode private \
+  --runtime-vpc-id vpc-xxxxxxxx \
+  --runtime-subnet-id subnet-aaaaaaaa \
+  --runtime-enable-shared-internet-access

YAML 配置格式agentkit.yaml):

yaml
launch_types:
+  cloud:  # 或 hybrid
+    runtime_network:
+      mode: private            # public | private | both
+      vpc_id: vpc-xxxxxxxx     # private/both 必填
+      enable_shared_internet_access: true  # 仅对 private/both 生效
+      subnet_ids:
+        - subnet-aaaaaaaa

mode 取值说明:

  • public:仅公网访问
  • private:仅私网访问(需要 vpc_id
  • both:同时开启公网与私网(需要 vpc_id

enable_shared_internet_access 说明:

  • 仅当 modeprivateboth 时生效;开启后 Runtime 将使用平台提供的共享公网出口访问公网
  • mode=public 且开启该开关,AgentKit 会报错以避免“看似配置但实际不生效”的误用

控制选项

选项说明
--config, -c指定配置文件路径(默认 agentkit.yaml
--interactive, -i强制使用交互式模式
--dry-run预览模式,显示变更但不保存
--show, -s显示当前配置

全局配置选项 🆕

AgentKit 支持全局配置文件(~/.agentkit/config.yaml),用于跨项目共享配置。

选项说明
--global, -g操作全局配置而非项目配置
--init初始化全局配置文件(创建模板)
--set设置全局配置字段(格式:key=value

支持的全局配置字段

字段说明示例
volcengine.access_key火山引擎 Access KeyAK***
volcengine.secret_key火山引擎 Secret KeySK***
volcengine.region默认区域cn-beijing
cr.instance_nameCR 实例名称team-cr-instance
cr.namespace_nameCR 命名空间agentkit-team
tos.bucketTOS Bucket 名称team-agentkit-builds
tos.prefixTOS 对象前缀agentkit-builds
tos.regionTOS 区域cn-beijing

配置优先级

环境变量 > 项目配置(agentkit.yaml) > 全局配置 > 默认值

使用示例

示例 1:首次配置(交互式)

bash
agentkit config

示例 2:快速更新单个配置项

bash
# 更新入口文件
+agentkit config --entry_point new_agent.py
+
+# 更新镜像标签
+agentkit config --image_tag v1.0.1
+
+# 添加环境变量
+agentkit config -e NEW_KEY=new_value

示例 3:完整的非交互式配置

bash
agentkit config \
+    --agent_name weather-bot \
+    --entry_point agent.py \
+    --description "天气查询助手" \
+    --launch_type cloud \
+    --image_tag v1.0.0 \
+    --region cn-beijing \
+    -e API_KEY=xxxxx \
+    -e MODEL_ENDPOINT=https://api.example.com

示例 4:配置预览

bash
# 查看配置变更但不保存
+agentkit config --entry_point agent.py --image_tag v2.0 --dry-run

输出示例:

通用配置 - 变更项:
+┌───────────────┬──────────────┬──────────────┐
+│ 配置项        │ 原值         │ 新值         │
+├───────────────┼──────────────┼──────────────┤
+│ entry_point   │ old_agent.py │ agent.py     │
+│ image_tag     │ v1.0         │ v2.0         │
+└───────────────┴──────────────┴──────────────┘
+
+🔍 预览模式:未保存任何更改

示例 5:查看当前配置

bash
agentkit config --show

示例 6:全局配置管理 🆕

初始化全局配置:

bash
# 创建全局配置模板
+agentkit config --global --init

输出:

✅ 全局配置文件已创建: ~/.agentkit/config.yaml
+
+📝 配置模板已生成,包含以下配置项:
+
+🔐 Volcengine 凭证
+  access_key: ''
+  secret_key: ''
+  region: cn-beijing
+
+📦 CR 配置
+  instance_name: ''
+  namespace_name: ''
+
+🗂️  TOS 配置
+  bucket: ''
+  prefix: agentkit-builds
+  region: cn-beijing

查看全局配置:

bash
agentkit config --global --show

设置全局配置:

bash
# 设置单个字段
+agentkit config --global --set cr.instance_name=team-cr-instance
+agentkit config --global --set tos.bucket=team-bucket
+
+# 设置凭证
+agentkit config --global --set volcengine.access_key=AK***
+agentkit config --global --set volcengine.secret_key=SK***

团队协作场景:

bash
# 1. 团队管理员创建并分享全局配置
+agentkit config --global --init
+vim ~/.agentkit/config.yaml  # 填入团队共享的配置
+
+# 2. 团队成员初始化项目时自动使用全局配置
+agentkit init my-agent
+# agentkit.yaml 中相关字段自动留空,运行时使用全局配置
+
+# 3. 特殊项目可以在 agentkit.yaml 中覆盖全局配置
+agentkit config --cr_instance_name special-cr  # 覆盖全局配置

示例 7:CI/CD 集成

bash
# 在CI/CD流水线中使用
+agentkit config \
+    --agent_name ${CI_PROJECT_NAME} \
+    --entry_point agent.py \
+    --launch_type cloud \
+    --image_tag ${CI_COMMIT_TAG} \
+    -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+    
+agentkit launch

环境变量交互式输入

在交互式模式中,环境变量配置支持便捷命令:

🔐 应用级环境变量(输入 KEY=VALUE,空行结束)
+  
+  可用命令:
+  - 输入 KEY=VALUE 添加变量
+  - 输入 'list' 查看已有变量
+  - 输入 'del KEY' 删除某个变量
+  - 输入 'clear' 清空所有
+  - 直接按回车结束输入
+
+变量: MODEL_API_KEY=xxxxx
+✅ 已添加: MODEL_API_KEY
+
+变量: list
+当前变量:
+  MODEL_API_KEY=xxxxx
+
+变量: [回车结束]
+📋 共配置 1 个变量

配置验证

所有配置都会自动验证:

  • 必填项检查:Agent名称、入口文件不能为空
  • 格式验证:入口文件必须以 .py 结尾
  • 选项约束:launch_type 必须是 localhybridcloud
  • 命名规范:Agent名称只能包含字母、数字、下划线、中划线和点

验证失败会显示详细错误信息并退出。

最佳实践

  1. 首次配置用交互式:更友好的引导体验

    bash
    agentkit config
  2. 日常修改用非交互式:快速高效

    bash
    agentkit config --entry_point new_agent.py
  3. CI/CD用非交互式:完全自动化

    bash
    agentkit config --agent_name $PROJECT --image_tag $TAG
  4. 修改前先预览:避免错误

    bash
    agentkit config --entry_point agent.py --dry-run
  5. 环境变量分级管理

    • 应用级:API密钥等跨环境共享
    • Workflow级:调试开关等特定环境配置
  6. 团队协作使用全局配置 🆕:

    bash
    # 团队管理员设置
    +agentkit config --global --init
    +agentkit config --global --set cr.instance_name=team-cr
    +agentkit config --global --set tos.bucket=team-bucket
    +
    +# 团队成员直接使用
    +agentkit init my-agent  # 自动使用全局配置
    +agentkit launch         # 运行时自动使用全局配置
  7. 配置优先级理解

    • 项目配置可以覆盖全局配置
    • 环境变量优先级最高
    • 顺序:环境变量 > 项目配置 > 全局配置 > 默认值

agentkit build

将你的 Agent 代码打包成 Docker 镜像,为部署做准备。

使用方法

bash
agentkit build [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

--platform 构建平台

  • 指定目标平台架构
  • 默认:auto(自动识别)
  • 一般不需要手动设置

--regenerate-dockerfile 强制重新生成 Dockerfile

  • 强制重新生成 Dockerfile,即使已存在
  • 适用场景:配置更新后需要强制刷新 Dockerfile
  • 默认:False

Docker 构建自定义配置 🔧

AgentKit 支持通过 docker_build 配置段自定义 Docker 镜像构建过程。在 agentkit.yaml 中添加以下配置:

配置参数

base_image - 自定义基础镜像

Python 项目(字符串格式):

yaml
docker_build:
+  base_image: "python:3.12-slim"
+  # 或使用 Alpine 镜像
+  base_image: "python:3.12-alpine"

build_script - 自定义构建脚本

  • 路径相对于项目根目录
  • 用于安装系统依赖、编译扩展等
  • 脚本会在构建过程中自动执行
yaml
docker_build:
+  build_script: "scripts/setup.sh"

完整配置示例

Python 项目示例

yaml
agent_name: my-agent
+entry_point: agent.py
+language: Python
+language_version: "3.12"
+dependencies_file: requirements.txt
+launch_type: local
+
+# Docker 构建自定义配置
+docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/setup.sh"

构建脚本示例 (scripts/setup.sh):

bash
#!/bin/bash
+# 安装系统依赖
+apt-get update && apt-get install -y gcc g++ libpq-dev
+# 或 Alpine 系统使用:apk add --no-cache gcc musl-dev postgresql-dev
+
+echo "Custom build script completed"

使用场景

场景配置方式示例
使用轻量级镜像指定 Alpine 基础镜像base_image: "python:3.12-alpine"
安装系统依赖编写构建脚本build_script: "scripts/install_deps.sh"
编译 C 扩展安装编译工具在脚本中安装 gcc、g++ 等
配置证书更新 CA 证书在脚本中运行 update-ca-certificates
多阶段构建分别指定 builder 和 runtime仅 Golang 项目支持

Dockerfile 自动管理

  • Dockerfile 会根据配置自动生成,包含元数据头
  • 配置变化时自动更新(旧版本备份到 .agentkit/dockerfile_backups/
  • 删除元数据头后,AgentKit 不再自动管理该文件
  • 使用 --regenerate-dockerfile 强制重新生成

元数据头示例:

dockerfile
# ============================================================================
+# AUTO-GENERATED by AgentKit v1.x.x
+# ============================================================================
+# Source: agentkit.yaml
+# Checksum: sha256:...
+# Generated: 2025-01-17T10:30:00
+# 
+# This file is automatically generated and managed by AgentKit:
+#   - It will be auto-updated when agentkit.yaml config changes
+#   - To fully customize, remove this header comment
+# ============================================================================

构建过程

根据配置的 launch_type 自动选择构建方式:

🏠 Local 模式(本地构建)

在你的电脑上用 Docker 构建:

🔨 开始构建本地镜像...
+[1/3] 生成 Dockerfile...
+[2/3] Docker 构建镜像...
+[3/3] 验证镜像可用性...
+✅ 构建成功: my-agent:latest

预计耗时:1-3 分钟

☁️ Cloud 模式(云端构建)

在火山引擎上自动构建:

🔨 开始云端构建...
+[1/6] 生成 Dockerfile...
+[2/6] 打包项目代码...
+[3/6] 上传到对象存储...
+[4/6] 准备镜像仓库...
+[5/6] 创建构建流水线...
+[6/6] 执行构建任务...
+✅ 构建成功: xxx.cr.volces.com/agentkit/my-agent:latest

预计耗时:3-5 分钟

构建结果

  • 镜像名称{agent_name}:{image_tag}
  • 镜像信息:自动保存到配置文件
  • 构建记录:包含时间戳、镜像 ID 等

使用示例

bash
# 示例 1:使用默认配置
+agentkit build
+
+# 示例 2:指定配置文件
+agentkit build --config-file ./prod.yaml
+
+# 示例 3:强制重新生成 Dockerfile
+agentkit build --regenerate-dockerfile
+
+# 示例 4:配置更新后强制刷新
+agentkit build --config-file ./prod.yaml --regenerate-dockerfile

自定义构建示例

示例 5:使用 Alpine 基础镜像

  1. 修改 agentkit.yaml
yaml
docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/alpine-setup.sh"
  1. 创建 scripts/alpine-setup.sh
bash
#!/bin/sh
+apk add --no-cache gcc musl-dev postgresql-dev
  1. 构建:
bash
agentkit build

示例 6:安装系统依赖(C 扩展)

  1. 修改 agentkit.yaml
yaml
docker_build:
+  build_script: "scripts/install-deps.sh"
  1. 创建 scripts/install-deps.sh
bash
#!/bin/bash
+apt-get update && apt-get install -y \
+    gcc g++ \
+    libpq-dev \
+    libxml2-dev \
+    libxslt1-dev
  1. 构建:
bash
agentkit build

示例 7:Golang 多阶段构建

修改 agentkit.yaml

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:3.19"
+  build_script: "scripts/install-certs.sh"

构建:

bash
agentkit build

注意事项

Local 模式前提

  • ✅ 确保 Docker 已安装并运行
  • ✅ Docker daemon 可正常访问

Cloud 模式前提

  • ✅ 设置 AK/SK 环境变量
  • ✅ 确保网络能访问火山引擎

Docker 构建自定义

  • ✅ 构建脚本的路径,请填写相对于项目根目录的相对路径
  • ✅ 脚本会自动获得执行权限
  • ✅ 构建脚本不存在会记录警告但不会中断构建
  • ✅ Dockerfile 自动生成,配置变化时自动更新
  • ✅ 旧版本 Dockerfile 会备份到 .agentkit/dockerfile_backups/
  • ✅ 删除 Dockerfile 元数据头后不再自动管理

提示:构建信息会自动更新到配置文件,供 deploy 命令使用


agentkit deploy

将构建好的镜像启动运行,让 Agent 对外提供服务。

使用方法

bash
agentkit deploy [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

部署过程

根据配置的 launch_type 自动选择部署目标:

🏠 Local 模式(本地部署)

在你的电脑上启动容器:

🚀 开始部署到本地 Docker...
+[1/3] 停止旧版本容器...
+[2/3] 启动新容器...
+[3/3] 验证容器状态...
+✅ 部署成功!容器正在运行
+🌐 访问地址: http://localhost:8000

预计耗时:10-30 秒

☁️ Cloud 模式(云端部署)

在火山引擎上创建 Runtime:

🚀 开始部署到云端平台...
+✅ 生成 Runtime 名称: my-agent-20250120-abc123
+✅ 创建 Runtime: r-xxxxxx
+⏳ 等待 Runtime 就绪...
+✅ Runtime 已就绪!
+🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com

预计耗时:1-2 分钟

使用示例

bash
# 示例 1:部署到默认环境
+agentkit deploy
+
+# 示例 2:部署到生产环境
+agentkit deploy --config-file ./prod.yaml

部署完成后

Local 模式

  • ✅ 容器在本地运行
  • ✅ 可通过 localhost:端口 访问
  • ✅ 自动进行健康检查

Cloud 模式

  • ✅ Runtime 在云端运行
  • ✅ 获得一个公网可访问的 URL
  • ✅ 自动验证 Runtime 状态

agentkit launch

构建 + 部署,一步完成!相当于自动执行 build 再执行 deploy

使用方法

bash
agentkit launch [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

执行流程

🚀 开始启动 Agent...
+
+━━━ 第一步:构建镜像 ━━━
+🔨 读取配置: agentkit.yaml
+🔨 开始构建...
+✅ 构建完成
+
+━━━ 第二步:部署应用 ━━━
+🚀 开始部署...
+✅ 部署完成
+
+✨ Agent 已成功启动!

使用示例

bash
# 示例 1:一键启动
+agentkit launch
+
+# 示例 2:启动到生产环境
+agentkit launch --config-file ./prod.yaml

为什么用 launch

  • 省时省力 - 一个命令代替两个
  • 🔒 版本一致 - 确保构建和部署使用同一配置
  • 🚀 快速迭代 - 改完代码立即测试

agentkit invoke

向已部署的 Agent 发送测试请求,验证功能是否正常。

使用方法

bash
agentkit invoke [消息内容] [选项]

⚠️ 重要:必须提供消息内容或 --payload 选项之一,两者不能同时使用

参数说明

消息内容

  • 直接在命令后面输入要发送的文字,不需要加任何选项标记
  • 会自动包装成 {"prompt": "你的消息"}
  • 不能和 --payload 同时使用
  • 示例:agentkit invoke "你好"agentkit invoke "今天天气怎么样?"

选项

--payload, -p 自定义请求数据

  • 用 JSON 格式指定完整的请求内容
  • 不能和消息内容同时使用
  • 示例:--payload '{"prompt": "你好", "context": "greeting"}'

--headers, -h 自定义请求头

  • 用 JSON 格式指定 HTTP 请求头
  • 默认会自动添加 user_idsession_id
  • 示例:--headers '{"user_id": "test123"}'

--raw 输出原始响应(调试用)

  • 流式调用时:逐条打印服务端推送的 SSE 事件 JSON,便于确认事件格式
  • 非流式调用时:输出紧凑的原始 JSON(不做 pretty indent)
  • 示例:agentkit invoke "你好" --raw

--show-reasoning 输出推理内容(LangChain 调试用)

  • 当流式事件包含 additional_kwargs.reasoning_content 时,增量打印该字段
  • 与最终回答分开显示(先 Reasoning 后 Answer)
  • 示例:agentkit invoke "1+1=?" --show-reasoning

--apikey, -ak API 密钥

  • 云端部署(Cloud 模式)时可能需要
  • 用于身份验证
  • 可选参数

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:当前目录的 agentkit.yaml

使用示例

示例 1:直接发送消息(最简单)

bash
agentkit invoke "今天杭州天气如何?"

等同于发送以下 JSON:

json
{
+  "prompt": "今天杭州天气如何?"
+}

示例 2:自定义请求内容

bash
agentkit invoke --payload '{"prompt": "杭州天气?", "user_location": "杭州"}'

示例 3:带请求头

bash
agentkit invoke \
+  --payload '{"prompt": "杭州天气?"}' \
+  --headers '{"user_id": "user123", "session_id": "sess456"}'

示例 4:云端部署(带 API Key)

bash
agentkit invoke "你好" --apikey your_api_key_here

运行效果

💬 正在调用 Agent...
+✅ Runtime ID: r-xxxxxx
+🌐 调用地址: http://xxx.apigateway-cn-beijing.volceapi.com
+✅ 调用成功!
+
+📡 Agent 响应:
+杭州今天天气晴,温度 22°C,适合出行。

注意事项

  • ⚠️ 消息内容和 --payload 只能选一个
  • ⚠️ 云端部署可能需要 API Key
  • ⚠️ 调用前确保 Agent 已部署(用 agentkit status 检查)

agentkit status

查看 Agent 的运行状态,包括是否在线、访问地址等信息。

使用方法

bash
agentkit status [选项]

参数说明

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

输出示例

🏠 Local 模式

✅ 容器名称: my-agent
+✅ 运行状态: running
+🌐 访问地址: http://localhost:8000
+
+详细信息:
+{
+    "container_id": "abc123...",
+    "status": "running",
+    "ports": ["8000:8000"],
+    "created": "2025-01-20 10:00:00",
+    "health": "healthy"
+}

☁️ Cloud 模式

✅ Runtime ID: r-xxxxxx
+✅ 运行状态: Ready
+🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com
+
+详细信息:
+{
+    "runtime_id": "r-xxxxxx",
+    "runtime_name": "my-agent-20250120-abc123",
+    "status": "Ready",
+    "endpoint": "http://xxx.apigateway-cn-beijing.volceapi.com",
+    "image": "xxx.cr.volces.com/agentkit/my-agent:latest",
+    "created_at": "2025-01-20 10:00:00"
+}

状态说明

Local 模式状态

  • running - 正常运行中
  • ⏸️ stopped - 已停止
  • 🔄 restarting - 重启中
  • error - 出现错误

Cloud 模式状态

  • Ready - 就绪,可接收请求
  • 🔄 Releasing - 正在部署
  • Error - 运行错误
  • Failed - 部署失败

使用示例

bash
# 示例 1:查看当前状态
+agentkit status
+
+# 示例 2:查看生产环境状态
+agentkit status --config-file ./prod.yaml

agentkit destroy

停止并删除 Agent 实例,释放资源。⚠️ 这是不可逆操作!

使用方法

bash
agentkit destroy [选项]

参数说明

--force 强制删除

  • 跳过确认提示,直接删除
  • 默认不开启(会要求确认)
  • 谨慎使用!

--config-file 配置文件路径

  • 指定配置文件位置
  • 默认:agentkit.yaml

安全确认

默认会要求你确认操作:

🗑️ 准备销毁运行中的 Agent...
+⚠️ 此操作不可恢复!
+确定要继续吗?[y/N]: y

跳过确认(不推荐):

bash
agentkit destroy --force

会删除什么

🏠 Local 模式

  • ✅ 停止 Docker 容器
  • ✅ 删除容器实例
  • ⚠️ 镜像会保留(可手动删除)

☁️ Cloud 模式

  • ✅ 删除 Runtime 实例
  • ✅ 释放云端资源
  • ⚠️ 镜像会保留(可在 CR 中手动删除)

运行效果

🗑️ 开始销毁 Agent 资源...
+✅ 停止 Runtime: r-xxxxxx
+✅ 删除 Runtime 成功
+✅ 资源已清理完成
+
+提示:配置文件和镜像已保留,可随时重新部署。

使用示例

bash
# 示例 1:安全删除(推荐)
+agentkit destroy
+
+# 示例 2:强制删除
+agentkit destroy --force
+
+# 示例 3:删除指定环境
+agentkit destroy --config-file ./dev.yaml

重要提示

  • ⚠️ 不可恢复:删除后无法撤销,数据将永久丢失
  • 配置保留agentkit.yaml 文件不会被删除
  • 镜像保留:Docker 镜像不会被删除,可重新部署
  • 💡 重新部署:随时可以用 agentkit deploy 重新部署

通用选项

所有命令都支持这些选项:

--help 查看帮助

查看任何命令的详细说明和参数:

bash
# 查看某个命令的帮助
+agentkit invoke --help
+agentkit build --help
+
+# 查看所有命令列表
+agentkit --help

--version 查看版本

显示 CLI 版本信息:

bash
agentkit --version
+# 或
+agentkit -v

平台服务命令

AgentKit CLI 提供了丰富的平台服务管理命令,用于管理 Memory、Knowledge、Tools 和 Runtime 等资源。

agentkit memory

管理 AgentKit Memory 记忆集合,支持创建、查看、更新和删除记忆集合。

bash
# 创建记忆集合 (默认 provider-type: MEM0)
+agentkit memory create --name my-memory --description "我的记忆集合"
+
+# 添加外部记忆集合
+agentkit memory add --provider-collection-id <id> --provider-type VIKINGDB_MEMORY --name my-external-memory
+
+# 列出所有记忆集合 (支持分页和过滤)
+agentkit memory list
+agentkit memory list --name-contains "my" --limit 10
+
+# 查看记忆集合详情
+agentkit memory show -m <id>
+
+# 更新记忆集合
+agentkit memory update -m <id> --description "更新后的描述"
+
+# 删除记忆集合
+agentkit memory delete -m <id>
+
+# 获取连接信息
+agentkit memory conn -m <id>
+
+# 查看支持的 Provider 类型
+agentkit memory provider-types

agentkit knowledge

管理 AgentKit Knowledge 知识库,支持知识库的增删改查操作。

bash
# 添加知识库 (连接外部知识库)
+agentkit knowledge add --name my-kb --provider-knowledge-id <id> --provider-type VIKINGDB_KNOWLEDGE
+
+# 列出所有知识库 (支持分页和过滤)
+agentkit knowledge list
+agentkit knowledge list --status Ready
+
+# 查看知识库详情
+agentkit knowledge show -k <id>
+
+# 更新知识库
+agentkit knowledge update -k <id> --description "更新后的描述"
+
+# 删除知识库
+agentkit knowledge delete -k <id>
+
+# 获取连接信息
+agentkit knowledge conn -k <id>
+
+# 查看支持的 Provider 类型
+agentkit knowledge provider-types

agentkit tools

管理 AgentKit Tools 工具和 Sessions 会话,包括工具的生命周期管理和会话操作。

bash
# 工具管理
+# 创建工具 (需要指定 tool-type)
+agentkit tools create --name my-tool --tool-type <type> --description "我的工具"
+# 列出工具 (支持分页和过滤)
+agentkit tools list
+# 查看工具详情
+agentkit tools show -t <id>
+# 更新工具
+agentkit tools update -t <id> --description "新描述"
+# 删除工具
+agentkit tools delete -t <id>
+
+# 会话管理
+# 创建会话
+agentkit tools session create -t <id> --name my-session --ttl 30 --ttl-unit minute
+# 列出会话
+agentkit tools session list -t <id>
+# 查看会话详情
+agentkit tools session show -t <id> -s <session_id>
+# 获取会话日志
+agentkit tools session logs -t <id> -s <session_id>
+# 设置会话 TTL
+agentkit tools session set-ttl -t <id> -s <session_id> --ttl 60 --ttl-unit minute
+# 删除会话
+agentkit tools session delete -t <id> -s <session_id>

agentkit runtime

管理 AgentKit Runtime 运行时实例,支持运行时的创建、更新、删除和版本管理。

bash
# 创建运行时 (需要指定 artifact 信息)
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --description "我的运行时"
+
+# 创建运行时并关联资源
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --memory-id mem-xxx \
+  --knowledge-id kb-xxx \
+  --tool-id tool-xxx \
+  --mcp-toolset-id mcp-ts-xxx
+
+# 创建运行时并开启私网访问(VPC)
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --vpc-id vpc-xxxxxxxx \
+  --subnet-ids subnet-aaaaaaaa \
+  --enable-private-network \
+  --enable-public-network false
+
+# 列出所有运行时 (支持分页和过滤)
+agentkit runtime list
+
+# 查看运行时详情
+agentkit runtime get -r <id>
+
+# 更新运行时
+agentkit runtime update -r <id> --description "新描述"
+
+> 💡 提示:`agentkit runtime update` 目前仅支持更新 artifact/description/env/tags 以及资源绑定字段(`memory-id/knowledge-id/tool-id/mcp-toolset-id`),不支持修改网络配置。
+
+# 删除运行时
+agentkit runtime delete -r <id>
+
+# 发布新版本
+agentkit runtime release -r <id> --version-number <version>
+
+# 查看特定版本详情
+agentkit runtime version -r <id> --version-number <version>
+
+# 列出所有版本
+agentkit runtime versions -r <id>

常用工作流

📝 完整开发流程(模板模式)

从零开始到上线的完整步骤:

bash
# 1️⃣ 创建项目
+agentkit init weather_agent --template basic
+cd weather_agent
+
+# 2️⃣ 配置应用
+agentkit config
+
+# 3️⃣ 一键部署
+agentkit launch
+
+# 4️⃣ 测试功能
+agentkit invoke "杭州天气怎么样?"
+
+# 5️⃣ 查看状态
+agentkit status

🔄 快速部署已有 Agent(包装模式)🆕

将现有的 Agent 快速部署上线:

bash
# 1️⃣ 包装现有 Agent 文件
+agentkit init --from-agent ~/my_projects/weather_agent.py
+
+# 2️⃣ 进入项目目录
+cd agentkit-weather_agent
+
+# 3️⃣ (可选)配置应用
+agentkit config
+
+# 4️⃣ 一键部署
+agentkit launch
+
+# 5️⃣ 测试功能
+agentkit invoke "今天天气如何?"
+
+# 6️⃣ 查看状态
+agentkit status

🔄 快速迭代流程

修改代码后的更新流程:

bash
# 方式 1:分步执行(推荐调试时使用)
+agentkit build        # 重新构建
+agentkit deploy       # 重新部署
+agentkit invoke "测试"  # 测试验证
+
+# 方式 2:一键更新(推荐日常开发)
+agentkit launch       # 自动构建+部署
+agentkit invoke "测试"  # 测试验证

🌍 多环境管理

在开发、测试、生产环境间切换:

bash
# 开发环境
+agentkit launch --config-file agentkit.dev.yaml
+agentkit invoke "测试" --config-file agentkit.dev.yaml
+
+# 生产环境
+agentkit launch --config-file agentkit.prod.yaml
+agentkit invoke "测试" --config-file agentkit.prod.yaml

常见问题

遇到错误不要慌,这里有解决方案!

❌ 配置文件找不到

Error: Configuration file not found: agentkit.yaml

原因:当前目录没有配置文件

解决

bash
# 如果是新项目
+agentkit init my_agent
+
+# 如果已有项目
+agentkit config

❌ Docker 没有运行(Local 模式)

Error: Docker daemon not running

原因:Docker 服务未启动

解决

  • Windows/Mac:打开 Docker Desktop
  • Linux:sudo systemctl start docker

❌ 云端凭证未配置(Cloud 模式)

Error: VOLC_ACCESSKEY or VOLC_SECRETKEY not set

原因:没有设置火山引擎 AK/SK

解决

bash
# 推荐:使用安全的全局配置
+agentkit config --global --init
+agentkit config --global --set volcengine.access_key="你的AccessKey"
+agentkit config --global --set volcengine.secret_key="你的SecretKey"
+
+# 或者:临时环境变量(开发调试用)
+export VOLC_ACCESSKEY="你的AccessKey"
+export VOLC_SECRETKEY="你的SecretKey"

❌ 构建失败

❌ 构建失败: ...

可能原因和解决方案

  1. 依赖问题 - 检查 requirements.txt 是否正确
  2. 代码错误 - 检查 Python 代码是否有语法错误
  3. 网络问题 - 检查网络连接,重试构建
  4. 权限问题 - 确保有 Docker/云端的操作权限

💡 调试技巧

1. 查看详细日志

bash
# 设置详细日志级别
+export LOG_LEVEL=DEBUG
+agentkit build

2. 验证配置文件

bash
# 检查配置是否正确
+cat agentkit.yaml

3. 分步执行

bash
# 分开执行,更容易定位问题
+agentkit build    # 先构建
+agentkit deploy   # 再部署
+# 而不是直接用 launch

4. 检查运行状态

bash
# 查看 Agent 是否正常运行
+agentkit status

下一步

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/2.agentkit-cli/3.configurations.html b/content/2.agentkit-cli/3.configurations.html new file mode 100644 index 0000000..a7070cc --- /dev/null +++ b/content/2.agentkit-cli/3.configurations.html @@ -0,0 +1,372 @@ + + + + + + 配置文件详解 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

配置文件详解

agentkit.yaml 是配置 Agent 的核心文件,包含了所有运行参数。本文档帮你理解每个配置项的作用。

配置系统概览

AgentKit 采用两级配置架构:

配置文件位置作用
项目配置./agentkit.yaml项目级配置,每个 Agent 项目独立
全局配置~/.agentkit/config.yaml用户级配置,跨项目共享(如火山引擎凭证)

配置优先级

环境变量 > 项目配置 > 全局配置 > 默认值

文件结构

项目配置文件由三部分组成:

yaml
common:
+  # 基础配置(所有模式通用)
+  agent_name: my_agent
+  entry_point: my_agent.py
+  language: Python
+  launch_type: cloud
+  runtime_envs: {}           # 应用级环境变量
+
+launch_types:
+  local:
+    # Local 模式的专属配置
+  hybrid:
+    # Hybrid 模式的专属配置
+  cloud:
+    # Cloud 模式的专属配置
+
+docker_build:
+  # Docker 构建配置(可选)
+  base_image: python:3.12-slim
+  build_script: scripts/setup.sh

三个部分

  • common - 通用配置,适用于所有部署模式
  • launch_types - 针对不同部署模式的特定配置
  • docker_build - Docker 构建自定义配置(可选)

common 配置

所有部署模式都需要的基础配置。

配置示例

yaml
common:
+  agent_name: my_weather_agent        # Agent 名称(必填)
+  entry_point: my_weather_agent.py    # 入口文件(必填)
+  description: 天气查询 Agent          # 描述(可选)
+  language: Python                    # 编程语言
+  language_version: '3.12'            # 语言版本
+  dependencies_file: requirements.txt  # 依赖文件
+  launch_type: cloud                  # 部署模式
+  runtime_envs:                       # 应用级环境变量(所有模式共享)
+    LOG_LEVEL: info

配置项详解

agent_name(必填)

Agent 的名字

  • 📝 作用:给你的 Agent 起个名字
  • 规则:只能用字母、数字、_-
  • 🎯 用途
    • Docker 镜像的名字
    • 云端 Runtime 的名字前缀
    • 默认的镜像仓库名

示例

yaml
agent_name: weather_agent           # 推荐:简单清晰
+agent_name: financial-analyzer-v2   # 可以:带版本号
+agent_name: customer_support_bot    # 可以:描述性强

entry_point(必填)

Agent 代码的入口文件

  • 📝 作用:指定运行哪个文件
  • 规则:必须是 .py.go.sh 结尾
  • 🎯 用途:容器启动时运行这个文件

示例

yaml
# Python 项目
+entry_point: app.py
+entry_point: server.py
+
+# Go 项目
+entry_point: main.go
+entry_point: cmd/server/main.go
+
+# 自定义启动脚本
+entry_point: start.sh

description(可选)

Agent 的描述信息

  • 📝 作用:简单描述 Agent 是做什么的
  • 规则:任意文字
  • 🎯 用途:帮助团队成员理解用途

示例

yaml
description: "天气查询 Agent,支持全国主要城市"
+description: "客服助手,处理常见问题"

language(可选)

编程语言

  • 📝 作用:指定项目使用的编程语言
  • 选项PythonGolang
  • 默认Python
  • 🎯 用途:决定 Dockerfile 模板和构建流程

示例

yaml
language: Python    # Python 项目
+language: Golang    # Go 项目

language_version(可选)

语言运行版本

  • 📝 作用:指定语言版本
  • Python 支持3.103.113.123.13
  • Golang 支持1.24
  • 默认:Python 3.12,Golang 1.24

示例

yaml
# Python 项目
+language: Python
+language_version: '3.12'
+
+# Go 项目
+language: Golang
+language_version: '1.24'

⚠️ 注意python_version 已废弃,请使用 language_version

dependencies_file(可选)

依赖包列表文件

  • 📝 作用:指定依赖文件位置
  • 默认:Python 项目为 requirements.txt,Go 项目为 go.mod
  • 🎯 用途:构建时安装这些依赖

示例

yaml
# Python 项目
+dependencies_file: requirements.txt
+dependencies_file: requirements/prod.txt
+
+# Go 项目
+dependencies_file: go.mod

launch_type(必填)

部署和运行模式

  • 📝 作用:选择在哪里构建和运行
  • 选项localhybridcloud
模式适合场景构建位置运行位置
local本地开发调试本地电脑本地电脑
hybrid过渡阶段本地电脑云端平台
cloud生产环境云端平台云端平台

示例

yaml
launch_type: local   # 本地开发
+launch_type: hybrid  # 本地构建 + 云端部署
+launch_type: cloud   # 生产环境(推荐)

cloud_provider(可选)

云厂商(平台服务提供方)

  • 📝 作用:选择平台服务使用 Volcano Engine(CN)或 BytePlus(Overseas)
  • 选项volcenginebyteplus
  • 默认volcengine
  • 🎯 用途
    • 影响默认 region、endpoint、credential 命名空间
    • 影响自动生成 Dockerfile 的默认 base 镜像选择(当未显式配置 docker_build.base_image 时)

优先级(从高到低)

环境变量 > 项目配置(agentkit.yaml) > 全局配置(~/.agentkit/config.yaml) > 默认值

配置方式

yaml
# 1) 项目配置(推荐:写进 agentkit.yaml)
+common:
+  cloud_provider: byteplus
bash
# 1.1) 项目配置(非交互命令写入 agentkit.yaml)
+agentkit config --cloud_provider byteplus
yaml
# 2) 全局配置(跨项目生效)
+defaults:
+  cloud_provider: byteplus
bash
# 3) 环境变量(临时覆盖)
+export CLOUD_PROVIDER=byteplus

runtime_envs(可选)

应用级环境变量

  • 📝 作用:定义所有部署模式共享的环境变量
  • 🎯 用途:传递通用配置,如日志级别
  • ⚠️ 优先级:策略级 runtime_envs 会覆盖应用级同名变量

示例

yaml
common:
+  runtime_envs:
+    LOG_LEVEL: info
+    APP_ENV: production

Local 模式配置

在本地 Docker 上构建和运行,适合开发调试。

配置示例

yaml
launch_types:
+  local:
+    image_tag: latest                  # 镜像标签
+    invoke_port: 8000                  # 应用端口
+    container_name: my_agent           # 容器名称(可选)
+    runtime_envs:                      # 策略级环境变量
+      MODEL_AGENT_API_KEY: xxx
+    ports:                             # 端口映射
+      - "8000:8000"
+    restart_policy: unless-stopped     # 重启策略
+    memory_limit: 1g                   # 内存限制
+    cpu_limit: '1'                     # CPU 限制

配置项详解

image_tag

镜像版本标签

  • 默认:latest
  • 作用:区分不同版本的镜像
  • 示例:latestv1.0dev

invoke_port

Agent 监听的端口

  • 默认:8000
  • 作用:指定应用监听哪个端口
  • ❗ 必须与代码中的端口一致

container_name

Docker 容器名称

  • 默认:使用 agent_name
  • 作用:给容器起个名字
  • 可以留空,自动生成

runtime_envs

策略级运行时环境变量

传递给容器的环境变量,如 API Key、配置参数等。会与 common.runtime_envs 合并,同名变量会覆盖。

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: your_api_key  # 模型 API Key
+  DEBUG: 'true'                      # 开启调试
+  LOG_LEVEL: debug                   # 覆盖 common 中的日志级别

ports

端口映射

将容器内部端口映射到主机端口,格式:主机端口:容器端口

yaml
ports:
+  - "8080:8000"  # 主机 8080 映射到容器 8000
+  - "9090:9090"  # 监控端口

volumes

卷挂载

将主机目录挂载到容器内,格式:主机路径:容器路径

yaml
volumes:
+  - "./data:/app/data"      # 数据目录
+  - "./logs:/app/logs"      # 日志目录

restart_policy

容器重启策略

  • 默认:unless-stopped
  • 选项:
    • no - 不重启
    • on-failure - 失败时重启
    • always - 总是重启
    • unless-stopped - 除非手动停止,否则重启

memory_limit / cpu_limit

资源限制

限制容器使用的资源,防止占用过多。

yaml
memory_limit: 2g    # 限制 2GB 内存
+cpu_limit: '1'      # 限制 1 个 CPU 核

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

字段说明
container_id部署后的容器 ID
image_id构建后的镜像 ID
build_timestamp构建时间
deploy_timestamp部署时间
full_image_name完整镜像名(如 my-agent:latest

Cloud 模式配置

在火山引擎上构建和运行,适合生产环境。

配置示例

yaml
launch_types:
+  cloud:
+    region: cn-beijing                       # 区域
+    image_tag: "{{timestamp}}"               # 镜像标签(支持模板变量)
+    
+    # TOS 对象存储配置
+    tos_bucket: Auto                         # 自动创建存储桶
+    
+    # Container Registry 配置
+    cr_instance_name: Auto                   # CR 实例名(Auto = 自动创建)
+    cr_namespace_name: agentkit              # CR 命名空间
+    cr_repo_name: ""                         # CR 仓库名(空 = 使用 agent_name)
+    
+    # Runtime 配置
+    runtime_name: Auto                       # Runtime 名称
+    runtime_role_name: Auto                  # 授权角色名
+    runtime_apikey_name: Auto                # API Key 密钥名
+    
+    # 环境变量
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # 模型 API Key
+      MODEL_AGENT_NAME: ep-xxx               # 模型接入点

模板变量

Cloud 模式支持模板变量,在构建/部署时自动渲染:

变量说明示例值
当前时间戳(YYYYMMDDHHmmss)20251128153042
火山引擎账号 ID2100123456

使用示例

yaml
image_tag: "{{timestamp}}"                          # 每次构建唯一 tag
+cr_instance_name: "agentkit-platform-{{account_id}}"     # 账号隔离的 CR 实例
+tos_bucket: "agentkit-platform-{{account_id}}"           # 账号隔离的存储桶

Auto 关键字

当配置值为 Auto 时,CLI 会自动创建或管理对应资源:

字段Auto 行为
tos_bucket自动创建存储桶 agentkit-platform-
cr_instance_name自动创建 CR 实例 agentkit-platform-
runtime_name自动创建 Runtime
runtime_role_name自动创建授权角色
runtime_apikey_name自动创建 API Key 密钥

配置项详解

region

火山引擎区域

  • 默认:cn-beijing
  • 作用:选择服务运行的地理位置
  • 可选:cn-beijing(目前仅支持北京区域)

💡 建议:选择离用户最近的区域,降低延迟

image_tag

镜像版本标签

  • 默认:(每次构建生成唯一标签)
  • 作用:区分不同版本
  • 示例:latestv1.0.0
yaml
# 方式 1:使用时间戳(推荐,确保每次构建唯一)
+image_tag: "{{timestamp}}"
+
+# 方式 2:固定版本
+image_tag: v1.0.0
+
+# 方式 3:使用 latest(不推荐用于生产)
+image_tag: latest

tos_bucket

对象存储桶

  • 默认:Auto(自动创建)
  • 作用:存储代码压缩包(用于云端构建)
  • 安全说明:tos_bucket 必须为当前账号名下的桶;如果填写了他人(例如公共读写)桶名,工具会阻止上传并提示更换
yaml
# 自动创建(推荐)
+tos_bucket: Auto
+
+# 使用已有存储桶
+tos_bucket: my-existing-bucket

cr_instance_name

Container Registry 实例名

  • 默认:Auto(自动创建)
  • 作用:Docker 镜像存储在哪个 CR 实例
yaml
# 自动创建
+cr_instance_name: Auto
+
+# 使用已有实例
+cr_instance_name: my-existing-cr

cr_namespace_name

CR 命名空间

  • 默认:agentkit
  • 作用:组织和管理镜像
  • 自动创建:不存在时自动创建

cr_repo_name

CR 仓库名称

  • 默认:空(使用 agent_name
  • 作用:存储镜像的仓库
  • 自动创建:不存在时自动创建

runtime_name / runtime_role_name / runtime_apikey_name

Runtime 相关配置

  • 默认:Auto(自动创建)
  • 作用:管理云端运行时实例及其认证
yaml
runtime_name: Auto           # Runtime 名称
+runtime_role_name: Auto      # IAM 授权角色
+runtime_apikey_name: Auto    # API Key 密钥名

runtime_envs

策略级运行时环境变量

Agent 运行时需要的配置,最重要的是模型 API 凭证。会与 common.runtime_envs 合并。

必须配置

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: xxx  # 火山方舟 API Key
+  MODEL_AGENT_NAME: ep-xxx  # 火山方舟接入点 ID

可选配置(增强功能):

yaml
runtime_envs:
+  # 基础配置
+  MODEL_AGENT_API_KEY: xxx
+  MODEL_AGENT_NAME: ep-xxx
+  
+  # 可观测性(日志、监控、链路追踪)
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: my_agent
+  
+  # 其他配置
+  DEBUG: 'true'     # 开启调试模式
+  LOG_LEVEL: info   # 设置日志级别

build_timeout

构建超时时间

  • 默认:3600(秒)
  • 作用:云端构建的最大等待时间

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

TOS 存储相关

字段说明
tos_prefix对象存储前缀(默认 agentkit-builds
tos_regionTOS 服务区域
tos_object_key代码包的存储路径
tos_object_url代码包的访问地址

Code Pipeline 构建相关

字段说明
cp_workspace_name构建工作区名称
cp_pipeline_name构建流水线名称
cp_pipeline_id流水线 ID

镜像相关

字段说明
cr_region镜像仓库区域
cr_image_full_url完整的镜像 URL

Runtime 运行时相关

字段说明
runtime_idRuntime 实例 ID
runtime_endpoint应用访问地址
runtime_apikeyRuntime API 密钥
build_timestamp构建时间
deploy_timestamp部署时间

Hybrid 模式配置

本地构建,云端运行。适合开发调试阶段,本地快速构建镜像后推送到云端运行。

配置示例

yaml
launch_types:
+  hybrid:
+    region: cn-beijing                       # 云端区域
+    image_tag: "{{timestamp}}"               # 镜像标签(支持模板变量)
+    
+    # Container Registry 配置
+    cr_instance_name: Auto                   # CR 实例名
+    cr_namespace_name: agentkit              # CR 命名空间
+    cr_repo_name: ""                         # CR 仓库名
+    
+    # Runtime 配置
+    runtime_name: Auto                       # Runtime 名称
+    runtime_role_name: Auto                  # 授权角色名
+    runtime_apikey_name: Auto                # API Key 密钥名
+    
+    # 环境变量
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # 模型 API Key
+      MODEL_AGENT_NAME: ep-xxx               # 模型接入点

与 Cloud 模式的区别

对比项Hybrid 模式Cloud 模式
构建位置本地 Docker云端 Code Pipeline
TOS 配置不需要需要(存储代码包)
构建速度快(本地)较慢(上传+云端构建)
适用场景开发调试生产环境

配置项详解

Hybrid 模式的配置项与 Cloud 模式基本一致,但不需要 TOS 相关配置(因为本地构建不需要上传代码包)。

region

火山引擎区域

  • 默认:cn-beijing
  • 作用:选择云端服务运行的地理位置

image_tag

镜像版本标签

  • 默认:
  • 作用:区分不同版本的镜像
  • 支持模板变量

cr_instance_name / cr_namespace_name / cr_repo_name

Container Registry 配置

与 Cloud 模式相同,用于存储本地构建的镜像。

yaml
cr_instance_name: Auto          # 自动创建 CR 实例
+cr_namespace_name: agentkit     # 命名空间
+cr_repo_name: ""                # 仓库名(空 = 使用 agent_name)

runtime_name / runtime_role_name / runtime_apikey_name

Runtime 配置

与 Cloud 模式相同,管理云端运行时实例。

runtime_envs

策略级运行时环境变量

与 Cloud 模式相同,传递给云端运行时的环境变量。

自动管理的字段

以下字段由 CLI 自动生成和管理,不需要手动配置

字段说明
image_id本地构建的镜像 ID
build_timestamp构建时间
full_image_name完整镜像名
cr_image_full_urlCR 中的完整镜像 URL
runtime_idRuntime 实例 ID
runtime_endpoint应用访问地址
runtime_apikeyRuntime API 密钥

docker_build 配置

自定义 Docker 构建过程,支持自定义基础镜像、构建脚本等。

配置示例

yaml
docker_build:
+  # Python 项目 - 字符串格式
+  base_image: "python:3.12-slim"
+  
+  # 自定义构建脚本
+  build_script: "scripts/setup.sh"
+  
+  # 强制重新生成 Dockerfile
+  regenerate_dockerfile: false
+  
+  # 目标平台(跨平台构建)
+  platform: "linux/amd64"

Go 项目多阶段构建

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"    # 构建阶段镜像
+    runtime: "alpine:latest"         # 运行时镜像
+  build_script: "scripts/install_certs.sh"

配置项详解

base_image

自定义基础镜像

  • 默认:根据语言自动选择
  • Python 默认:使用 AgentKit 预置 base 镜像,并随 common.cloud_provider 自动切换
    • volcengine:agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python<version>-bookworm-slim-latest
    • byteplus:agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python<version>-bookworm-slim-latest
  • Golang 默认:agentkit-cn-beijing.cr.volces.com/base/compile_basego:1.24(构建)+ agentkit-cn-beijing.cr.volces.com/base/runtime_basego:latest(运行)
yaml
# Python 项目 - 字符串
+base_image: "python:3.12-alpine"
+
+# Go 项目 - 字典(多阶段构建)
+base_image:
+  builder: "golang:1.24-alpine"
+  runtime: "alpine:latest"

build_script

自定义构建脚本

  • 默认:无
  • 作用:在 Docker 构建过程中执行自定义脚本
  • 路径:相对于项目根目录

使用场景

  • 安装系统依赖
  • 编译 C 扩展
  • 下载额外资源
yaml
build_script: "scripts/setup.sh"
+build_script: "docker/install_deps.sh"

regenerate_dockerfile

强制重新生成 Dockerfile

  • 默认:false
  • 作用:即使 Dockerfile 已存在,也重新生成
  • CLI 参数:--regenerate-dockerfile

platform

目标 CPU 架构

  • 默认:当前系统架构
  • 作用:跨平台构建
  • CLI 参数:--platform
yaml
platform: "linux/amd64"    # x86_64 架构
+platform: "linux/arm64"    # ARM 架构(如 Apple Silicon)

全局配置

全局配置存储在 ~/.agentkit/config.yaml,跨项目共享。

配置文件位置

~/.agentkit/config.yaml

配置示例

yaml
# 火山引擎凭证
+volcengine:
+  access_key: "AKLTxxxxxxxx"
+  secret_key: "xxxxxxxx"
+  region: "cn-beijing"
+
+# Container Registry 默认配置
+cr:
+  instance_name: "my-team-cr-instance"
+  namespace_name: "my-team"
+
+# TOS 默认配置
+tos:
+  bucket: "my-team-bucket"
+  prefix: "agentkit-builds"
+  region: "cn-beijing"

配置优先级

当项目配置为空或 Auto 时,会自动使用全局配置:

1. 项目配置明确设置的值(最高优先级)
+2. 全局配置 (~/.agentkit/config.yaml)
+3. 默认值(最低优先级)

使用场景

团队共享配置

团队成员可以共享相同的 CR 实例和 TOS 存储桶:

yaml
# ~/.agentkit/config.yaml
+cr:
+  instance_name: "team-shared-cr"
+  namespace_name: "team-agents"
+
+tos:
+  bucket: "team-shared-bucket"

项目配置只需设置 Auto,即可自动使用团队配置:

yaml
# agentkit.yaml
+launch_types:
+  cloud:
+    cr_instance_name: Auto    # 使用全局配置中的 team-shared-cr
+    tos_bucket: Auto          # 使用全局配置中的 team-shared-bucket

最佳实践

🌍 多环境管理

为不同环境创建独立配置文件:

bash
agentkit.dev.yaml   # 开发环境(local 模式)
+agentkit.test.yaml  # 测试环境(hybrid 模式)
+agentkit.prod.yaml  # 生产环境(cloud 模式)

使用方式

bash
# 开发
+agentkit launch --config-file agentkit.dev.yaml
+
+# 生产
+agentkit launch --config-file agentkit.prod.yaml

🔐 安全管理敏感信息

❌ 错误做法(硬编码):

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: c05d49af-1234-5678-abcd-xxxx  # 不要这样!

✅ 正确做法

方案 1:交互式配置

bash
agentkit config  # 运行时输入敏感信息

方案 2:使用 .gitignore

bash
# .gitignore 文件
+agentkit.local.yaml    # 本地配置不提交
+agentkit.prod.yaml     # 生产配置不提交
+*.secret.yaml          # 所有包含密钥的配置

方案 3:创建配置模板

yaml
# agentkit.yaml.template (提交到 Git)
+runtime_envs:
+  MODEL_AGENT_API_KEY: <请填写你的 API Key>
+  MODEL_AGENT_NAME: <请填写接入点 ID>

📝 添加配置注释

让团队成员更容易理解配置:

yaml
common:
+  agent_name: weather_agent
+  entry_point: app.py
+  launch_type: cloud  # 生产环境使用云端部署
+
+launch_types:
+  cloud:
+    region: cn-beijing  # 北京区域,离用户最近
+    runtime_envs:
+      # 火山方舟的模型访问凭证
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx

✅ 定期验证配置

确保配置文件始终有效:

bash
# 方式 1:运行配置命令检查
+agentkit config
+
+# 方式 2:查看配置内容
+cat agentkit.yaml
+
+# 方式 3:尝试构建(不部署)
+agentkit build

完整示例

📱 本地开发配置(Python)

适合快速开发和调试:

yaml
common:
+  agent_name: dev_weather_agent
+  entry_point: app.py
+  description: 开发环境的天气查询 Agent
+  language: Python
+  language_version: '3.12'
+  launch_type: local
+  runtime_envs:
+    APP_ENV: development
+
+launch_types:
+  local:
+    image_tag: dev
+    invoke_port: 8000
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+      DEBUG: 'true'         # 开启调试
+      LOG_LEVEL: debug      # 详细日志
+    ports:
+      - "8000:8000"
+    memory_limit: 512m      # 开发环境资源限制小一些
+    cpu_limit: '0.5'

� Golang 项目配置

Go 语言 Agent 的配置示例:

yaml
common:
+  agent_name: go_agent
+  entry_point: main.go
+  description: Go 语言 Agent
+  language: Golang
+  language_version: '1.24'
+  dependencies_file: go.mod
+  launch_type: hybrid
+
+launch_types:
+  hybrid:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"
+    cr_instance_name: Auto
+    cr_namespace_name: agentkit
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+
+docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:latest"

� 生产环境配置

适合正式上线:

yaml
common:
+  agent_name: prod_weather_agent
+  entry_point: server.py
+  description: 生产环境的天气查询 Agent
+  language: Python
+  language_version: '3.12'
+  launch_type: cloud
+  runtime_envs:
+    APP_ENV: production
+    LOG_LEVEL: info
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"    # 使用时间戳确保唯一
+    
+    # CR 配置
+    cr_instance_name: Auto
+    cr_namespace_name: production
+    cr_repo_name: weather_agent
+    
+    # TOS 配置
+    tos_bucket: Auto
+    
+    # Runtime 配置
+    runtime_name: Auto
+    runtime_role_name: Auto
+    runtime_apikey_name: Auto
+    
+    runtime_envs:
+      # 基础配置
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx
+      
+      # 可观测性(生产环境推荐开启)
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: prod_weather_agent
+
+docker_build:
+  base_image: "python:3.12-slim"

🎯 最小配置示例

Local 模式(最简配置):

yaml
common:
+  agent_name: simple-agent
+  entry_point: agent.py
+  launch_type: local

Cloud 模式(最简配置):

yaml
common:
+  agent_name: cloud-agent
+  entry_point: main.py
+  launch_type: cloud
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx

常见问题

❓ 配置文件找不到

Error: Configuration file not found

解决

bash
agentkit init my_agent  # 创建新项目
+# 或
+agentkit config         # 创建配置

❓ YAML 格式错误

Error: Invalid YAML format

检查清单

  • ✅ 使用空格缩进(不要用 Tab)
  • ✅ 检查冒号后面有空格
  • ✅ 字符串包含特殊字符要加引号
  • ✅ 模板变量用引号包裹:""

❓ 必填项缺失

Error: agent_name is required

解决

bash
agentkit config  # 重新配置,填写必填项

❓ 模板变量渲染失败

Error: Config field 'cr_instance_name' template variables were not fully rendered

可能原因

  1. 火山引擎凭证未配置
  2. AK/SK 权限不足

解决方法

bash
# 检查环境变量
+echo $VOLC_ACCESSKEY
+echo $VOLC_SECRETKEY
+
+# 或检查全局配置
+cat ~/.agentkit/config.yaml

❓ 环境变量不生效

可能原因

  1. 变量名拼写错误
  2. 配置没有保存
  3. 没有重新部署
  4. common.runtime_envs 和策略级 runtime_envs 混淆

解决方法

bash
# 1. 检查配置
+cat agentkit.yaml
+
+# 2. 确认环境变量位置正确
+# common.runtime_envs - 所有模式共享
+# launch_types.<mode>.runtime_envs - 该模式专用
+
+# 3. 重新部署
+agentkit deploy

❓ 旧配置字段名不兼容

如果你的配置文件使用旧版字段名(如 ve_cr_instance_namepython_version),请更新为新名称:

旧字段名新字段名
python_versionlanguage_version
ve_cr_instance_namecr_instance_name
ve_cr_namespace_namecr_namespace_name
ve_cr_repo_namecr_repo_name
ve_runtime_idruntime_id
ve_runtime_nameruntime_name
ve_runtime_endpointruntime_endpoint

💡 提示:CLI 仍然支持旧字段名(通过 aliases),但建议迁移到新名称。


配置字段速查表

common 字段

字段必填默认值说明
agent_name-Agent 名称
entry_point-入口文件
description描述信息
languagePython编程语言
language_version3.12/1.24语言版本
dependencies_file自动检测依赖文件
launch_typelocal部署模式
runtime_envs{}应用级环境变量

Cloud/Hybrid 模式字段

字段默认值说明
regioncn-beijing火山引擎区域
image_tag镜像标签
cr_instance_nameAutoCR 实例名
cr_namespace_nameagentkitCR 命名空间
cr_repo_name空(用 agent_name)CR 仓库名
runtime_nameAutoRuntime 名称
runtime_envs{}策略级环境变量

docker_build 字段

字段默认值说明
base_image自动选择基础镜像
build_script构建脚本
regenerate_dockerfilefalse强制重新生成
platform当前架构目标平台

下一步

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/2.agentkit-cli/4.logging.html b/content/2.agentkit-cli/4.logging.html new file mode 100644 index 0000000..5ad24e6 --- /dev/null +++ b/content/2.agentkit-cli/4.logging.html @@ -0,0 +1,175 @@ + + + + + + 日志系统 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

日志系统

AgentKit CLI 内置了灵活的日志系统,帮助你了解命令执行过程、调试问题和追踪运行状态。

默认行为

AgentKit 默认配置如下:

  • 控制台输出:关闭(不显示日志)
  • 文件日志:关闭(不记录日志)
  • 💡 按需开启:根据需要通过环境变量开启日志功能
bash
# 默认情况下,命令运行时无任何日志输出
+agentkit status
+
+# 如需日志,请通过环境变量开启(见下文)

日志示例

[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Loading configuration...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Using launch_type: cloud
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Querying status with cloud strategy...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Status query completed: running

快速开始

开启文件日志

如果需要将日志保存到文件:

bash
# 开启文件日志(默认 INFO 级别)
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit deploy
+
+# 查看生成的日志文件
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log

开启控制台日志

如果你想在控制台实时查看日志:

bash
# 开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 运行命令,现在可以在控制台看到日志了
+agentkit status

同时开启控制台和文件日志

bash
# 同时开启控制台和文件日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit build

调试模式

遇到问题需要详细日志时:

bash
# 开启 DEBUG 级别日志(自动开启控制台和文件输出)
+export AGENTKIT_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令,查看详细的调试信息
+agentkit build

环境变量配置

通过环境变量,你可以完全自定义日志行为。

基础配置

环境变量说明默认值示例
AGENTKIT_LOG_CONSOLE是否在控制台显示日志falsetrue / false
AGENTKIT_FILE_ENABLED是否保存日志到文件falsetrue / false
AGENTKIT_LOG_LEVEL日志级别(控制台和文件)INFODEBUG / INFO / WARNING / ERROR
AGENTKIT_LOG_FILE日志文件路径(开启文件日志时生效).agentkit/logs/agentkit-YYYYMMDD.log/tmp/my-agent.log

高级配置

分别控制控制台和文件的日志级别:

环境变量说明默认值
AGENTKIT_CONSOLE_LOG_LEVEL控制台日志级别INFO
AGENTKIT_FILE_LOG_LEVEL文件日志级别INFO

使用示例

bash
# 控制台只看重要的错误,文件记录所有信息
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+
+agentkit launch

日志级别说明

AgentKit 支持 5 种日志级别,级别越高,信息越少:

级别说明适用场景
DEBUG详细的调试信息问题排查、开发调试
INFO常规操作信息(默认)了解命令执行过程
WARNING警告信息关注潜在问题
ERROR错误信息只看失败的操作
CRITICAL严重错误只看致命错误

常用场景

场景 1:正常使用(默认配置)

适合日常使用,无日志输出,保护信息安全。

bash
# 无需任何配置,直接使用
+agentkit status
+agentkit deploy

效果

  • ✅ 控制台:干净整洁,无日志输出
  • ✅ 文件:无日志文件生成,保护信息安全

场景 1.1:需要保存日志记录

开启文件日志,便于追溯操作历史:

bash
# 开启文件日志
+export AGENTKIT_FILE_ENABLED=true
+
+# 运行命令
+agentkit deploy

效果

  • ✅ 控制台:干净整洁
  • ✅ 日志:自动保存到 .agentkit/logs/,默认 INFO 级别

场景 2:调试问题

遇到错误或异常行为时,开启详细日志:

bash
# 开启控制台和文件的 DEBUG 日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 运行命令
+agentkit build

效果

  • ✅ 控制台:显示详细的执行过程
  • ✅ 日志文件:保存完整 DEBUG 信息,便于事后分析

场景 3:CI/CD 环境

在持续集成环境中,需要在控制台看到日志,同时保存完整记录:

bash
# 在 CI 配置文件中设置
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_FILE=/var/log/agentkit/build-${BUILD_ID}.log
+
+# 运行构建
+agentkit launch

效果

  • ✅ 控制台:显示关键信息,便于查看 CI 日志
  • ✅ 日志文件:保存详细信息,便于事后分析

场景 4:生产环境

生产环境只记录警告和错误到文件:

bash
export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_FILE_LOG_LEVEL=WARNING
+export AGENTKIT_LOG_FILE=/var/log/agentkit/production.log
+
+# 运行命令
+agentkit deploy

效果

  • ✅ 控制台:无输出,保持清爽
  • ✅ 日志文件:只记录警告和错误,聚焦问题

场景 5:完全静默

不需要任何日志时(默认行为):

bash
# 默认配置即为完全静默,无需设置环境变量
+agentkit status
+
+# 或者显式设置(确保之前的环境变量不影响)
+unset AGENTKIT_LOG_CONSOLE
+unset AGENTKIT_FILE_ENABLED

效果

  • ✅ 控制台:无日志输出
  • ✅ 文件:无日志文件生成

日志文件管理

日志文件位置

当开启文件日志后(AGENTKIT_FILE_ENABLED=true),日志保存在项目根目录的 .agentkit/logs/ 文件夹中:

your-project/
+├── .agentkit/
+│   └── logs/
+│       ├── agentkit-20251120.log  # 今天的日志
+│       ├── agentkit-20251119.log  # 昨天的日志
+│       └── agentkit-20251118.log  # 前天的日志
+├── agentkit.yaml
+└── my_agent.py

自动清理旧日志

日志文件会随时间增多,建议定期清理:

bash
# 删除 7 天前的日志
+find .agentkit/logs -name "agentkit-*.log" -mtime +7 -delete
+
+# 或者手动删除
+rm .agentkit/logs/agentkit-20251101.log

自定义日志路径

bash
# 保存到指定位置
+export AGENTKIT_LOG_FILE=/tmp/my-custom-agent.log
+
+# 或保存到用户目录
+export AGENTKIT_LOG_FILE=$HOME/.agentkit-logs/agent.log
+
+agentkit deploy

配置优先级

当多种配置方式同时存在时,优先级如下(从高到低):

  1. 专用环境变量 - AGENTKIT_CONSOLE_LOG_LEVEL
  2. 通用环境变量 - AGENTKIT_LOG_LEVEL
  3. 默认值 - INFO

示例

bash
# 设置通用级别为 INFO
+export AGENTKIT_LOG_LEVEL=INFO
+
+# 设置控制台专用级别为 WARNING(优先级更高)
+export AGENTKIT_CONSOLE_LOG_LEVEL=WARNING
+
+# 结果:控制台显示 WARNING,文件记录 INFO
+agentkit status

故障排查

日志文件没有创建

可能原因

  • 文件日志被禁用了
  • 目录权限不足

解决方法

bash
# 1. 检查是否禁用了文件日志
+echo $AGENTKIT_FILE_ENABLED  # 应该是 true 或为空
+
+# 2. 检查目录权限
+ls -la .agentkit/logs/
+
+# 3. 手动创建目录
+mkdir -p .agentkit/logs
+
+# 4. 确保环境变量正确
+unset AGENTKIT_FILE_ENABLED  # 重置为默认值

控制台没有日志输出

可能原因

  • 控制台日志默认是关闭的
  • 日志级别设置过高

解决方法

bash
# 1. 开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 2. 设置合适的日志级别
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+
+# 3. 运行命令
+agentkit status

日志太多或太少

调整日志级别

bash
# 日志太多 - 只看重要信息
+export AGENTKIT_LOG_LEVEL=WARNING
+
+# 日志太少 - 查看详细信息
+export AGENTKIT_LOG_LEVEL=DEBUG

最佳实践

开发环境推荐配置

在你的 .bashrc.zshrc 中添加(可选):

bash
# AgentKit 开发环境配置(根据需要选择)
+# 选项1:只开启控制台日志
+export AGENTKIT_LOG_CONSOLE=true
+
+# 选项2:同时开启控制台和文件日志
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

推荐

  • 默认不配置,保持干净
  • 需要调试时临时开启
  • 避免敏感信息意外记录

团队协作

在项目根目录创建 .env.example 文件:

bash
# AgentKit 日志配置示例
+# 根据需要复制到 .env 并修改
+
+# === 开发环境建议配置 ===
+# 开启控制台日志(便于实时查看)
+AGENTKIT_LOG_CONSOLE=true
+
+# 开启文件日志(便于问题追溯,可选)
+# AGENTKIT_FILE_ENABLED=true
+
+# 设置日志级别
+AGENTKIT_LOG_LEVEL=INFO
+
+# 自定义日志路径(可选)
+# AGENTKIT_LOG_FILE=./logs/my-agent.log

提醒

  • 团队成员根据需求自行调整
  • .env 文件应该在 .gitignore 中,避免提交个人配置
  • 默认不开启文件日志,保护信息安全

生产部署建议

bash
# 生产环境配置
+export AGENTKIT_LOG_CONSOLE=false          # 关闭控制台
+export AGENTKIT_FILE_ENABLED=true          # 开启文件日志
+export AGENTKIT_FILE_LOG_LEVEL=WARNING     # 只记录警告和错误
+export AGENTKIT_LOG_FILE=/var/log/agentkit/prod.log  # 统一路径

优点

  • 减少不必要的输出
  • 聚焦重要问题
  • 便于日志管理和监控

总结

AgentKit 的日志系统设计原则:

  • 🔒 安全优先 - 默认不输出日志,避免信息泄露
  • 🎯 按需启用 - 通过环境变量灵活开启
  • 🔧 灵活配置 - 控制台和文件可独立控制
  • 📊 分级控制 - 不同场景使用不同日志级别
  • 📁 自动管理 - 开启后按日期分割,便于查找

快速参考

bash
# 1. 开启文件日志
+export AGENTKIT_FILE_ENABLED=true
+
+# 2. 开启控制台调试
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 3. 查看日志文件(需要先开启文件日志)
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log
+
+# 4. 控制台和文件使用不同级别
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

如有问题,请参考 故障排查 章节或联系技术支持。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/3.agentkit-sdk/1.overview.html b/content/3.agentkit-sdk/1.overview.html new file mode 100644 index 0000000..7e9a4ae --- /dev/null +++ b/content/3.agentkit-sdk/1.overview.html @@ -0,0 +1,92 @@ + + + + + + AgentKit SDK 概览 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit SDK 概览

AgentKit SDK 是一个 Python 开发工具包,用于快速构建符合 AgentKit Platform 标准的 Agent 应用。SDK 提供了一套简洁的装饰器和客户端接口,帮助开发者专注于 Agent 业务逻辑的实现。

核心架构

AgentKit SDK 采用模块化设计,主要包含以下模块:

1. Runtime 应用框架

提供多种应用模式,将用户代码封装为符合 Platform 标准的 HTTP 服务:

AgentkitSimpleApp

最常用的应用框架,适用于标准的 Agent 应用。

核心装饰器

  • @app.entrypoint - 定义 Agent 的主入口函数
  • @app.ping - 定义健康检查函数
  • @app.async_task - 定义异步任务(规划中)

标准路由

  • /invoke - Agent 调用端点
  • /ping - 健康检查
  • /health/readiness/liveness - Kubernetes 就绪探针

AgentkitMCPApp

基于 MCP (Model Context Protocol) 协议的应用框架,用于将工具封装为 MCP 服务。

核心装饰器

  • @app.tool - 将函数注册为 MCP 工具
  • @app.agent_as_a_tool - 将 Agent 封装为 MCP 工具

AgentkitA2aApp

基于 A2A (Agent-to-Agent) 协议的应用框架,用于构建可互相通信的 Agent。

核心装饰器

  • @app.agent_executor - 注册 Agent 执行器
  • @app.task_store - 注册任务存储(可选)

2. Platform 服务客户端

提供便捷的客户端接口,用于访问 AgentKit Platform 的各项服务。

AgentkitMemory

记忆服务客户端,管理 Agent 的长期和短期记忆。

主要功能

  • create_memory_collection() - 创建记忆库
  • list_memory_collections() - 列举记忆库
  • get_memory_collection() - 获取记忆库详情
  • update_memory_collection() - 更新记忆库配置
  • delete_memory_collection() - 删除记忆库
  • get_memory_connection_info() - 获取连接信息

设计理念:控制面和数据面解耦

  • 控制面(SDK 提供):管理记忆库的创建、配置和获取连接信息
  • 数据面(ADK 实现):通过 MemoryBase 或 Mem0 协议进行实际的记忆读写

AgentkitKnowledge

知识库服务客户端,管理 Agent 的向量化知识库。

主要功能

  • list_knowledge_bases() - 列举知识库
  • add_knowledge_base() - 添加知识库
  • get_knowledge_connection_info() - 获取知识库连接信息
  • delete_knowledge_base() - 删除知识库

使用场景

  • RAG(检索增强生成)应用
  • 文档问答系统
  • 知识图谱集成

AgentkitMCP

MCP Gateway 客户端,用于管理和路由大量 MCP 工具。

主要功能

  • 注册和管理 MCP 服务
  • 工具聚合和智能路由
  • 降低工具集成复杂度

AgentkitRuntime

Runtime 管理客户端,用于管理 Agent 的运行时环境。

主要功能

  • 创建和管理 Runtime 实例
  • 查询 Runtime 状态
  • 配置环境变量和资源

3. 基础设施模块

BaseAgentkitClient

所有客户端的基类,提供统一的配置和 HTTP 请求能力。

配置项

  • API 端点配置
  • 认证凭证管理
  • 请求重试和超时
  • 日志和监控

Context 管理

使用 contextvars 管理每个请求的上下文信息,包括:

  • 用户身份
  • 会话 ID
  • 请求元数据
  • 链路追踪信息

模块依赖关系

AgentKit SDK
+
+├── Runtime Apps (应用框架层)
+│   ├── AgentkitSimpleApp
+│   ├── AgentkitMCPApp
+│   ├── AgentkitA2aApp
+│   └── AgentkitAgentServerApp
+
+├── Platform Clients (服务客户端层)
+│   ├── AgentkitMemory
+│   ├── AgentkitKnowledge
+│   ├── AgentkitMCP
+│   └── AgentkitRuntime
+
+└── Infrastructure (基础设施层)
+    ├── BaseAgentkitClient
+    ├── Context
+    └── Telemetry (可观测性)

主要特性

1. 装饰器驱动

使用 Python 装饰器简化应用开发,开发者只需关注业务逻辑:

python
from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    # 业务逻辑
+    return response

2. 框架无关

SDK 不限制使用特定的 Agent 框架,支持:

  • Volcengine ADK (veadk)
  • Google ADK (gadk)
  • LangChain
  • 自定义框架

3. 自动化的可观测性

内置 OpenTelemetry 支持,自动收集:

  • 链路追踪(Tracing)
  • 性能指标(Metrics)
  • 日志(Logging)

4. 生产就绪

提供完整的生产环境支持:

  • 健康检查端点
  • 优雅关闭
  • 错误处理
  • 请求重试

5. 类型安全

完整的 Python 类型注解,提供:

  • IDE 自动补全
  • 类型检查
  • 更好的代码可维护性

快速开始

安装

bash
pip install agentkit-sdk-python

创建一个简单的 Agent

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

使用 Platform 服务

python
from agentkit.sdk.memory import AgentkitMemory
+from agentkit.base_client import ApiConfig
+
+# 初始化客户端
+config = ApiConfig(
+    access_key="your_ak",
+    secret_key="your_sk"
+)
+memory_client = AgentkitMemory(config)
+
+# 创建记忆库
+response = memory_client.create_memory_collection(
+    name="my-memory",
+    short_term_configuration={...},
+    long_term_configuration={...}
+)
+print(f"Memory ID: {response.id}")

下一步

  • 查看注解使用文档了解各种装饰器的详细用法
  • 参考 samples/ 目录下的完整示例
  • 阅读 Platform 服务客户端的 API 文档

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/3.agentkit-sdk/2.annotation.html b/content/3.agentkit-sdk/2.annotation.html new file mode 100644 index 0000000..1e1a4c1 --- /dev/null +++ b/content/3.agentkit-sdk/2.annotation.html @@ -0,0 +1,365 @@ + + + + + + 注解使用指南 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

注解使用指南

AgentKit SDK 提供了一套简洁的装饰器(注解),用于快速构建不同类型的 Agent 应用。本文档详细介绍各种注解的使用方法和最佳实践。

Simple Agent 注解

AgentkitSimpleApp 是最常用的应用框架,提供标准的 HTTP 服务端点。

@app.entrypoint

定义 Agent 的主入口函数,处理来自 Platform 的调用请求。

函数签名

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    pass

参数说明

  • payload (dict): 请求体,包含用户输入和配置

    • prompt (str): 用户输入的提示词
    • 其他自定义字段
  • headers (dict): 请求头,包含上下文信息

    • user_id (str): 用户 ID
    • session_id (str): 会话 ID
    • request_id (str): 请求追踪 ID
    • 其他自定义头部
  • 返回值 (str): Agent 的响应结果

完整示例

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    """Agent 主入口函数"""
+    # 1. 提取输入参数
+    prompt = payload.get("prompt", "")
+    user_id = headers.get("user_id", "anonymous")
+    session_id = headers.get("session_id", "default")
+    
+    # 2. 调用 Agent 运行
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    
+    # 3. 返回结果
+    return response

注意事项

  1. 必须是异步函数:使用 async def 定义
  2. 参数顺序固定:第一个参数是 payload,第二个是 headers
  3. 返回字符串:返回值会被自动封装为 JSON 响应
  4. 错误处理:建议在函数内部处理异常

错误处理示例

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        prompt = payload["prompt"]
+        response = await runner.run(messages=prompt)
+        return response
+    except KeyError as e:
+        logger.error(f"Missing required field: {e}")
+        return f"Error: Missing required field {e}"
+    except Exception as e:
+        logger.error(f"Agent execution failed: {e}")
+        return f"Error: {str(e)}"

@app.ping

定义健康检查函数,用于 Platform 和 Kubernetes 的健康探测。

函数签名

python
@app.ping
+def ping() -> str:
+    pass

参数说明

  • 无参数:健康检查函数不接收任何参数
  • 返回值 (str): 健康状态信息,通常返回 "pong" 或 "ok"

基本示例

python
@app.ping
+def ping() -> str:
+    """健康检查"""
+    return "pong!"

高级示例:包含依赖检查

python
import redis
+from sqlalchemy import create_engine
+
+# 初始化依赖
+redis_client = redis.Redis(host='localhost', port=6379)
+db_engine = create_engine('postgresql://...')
+
+@app.ping
+def ping() -> str:
+    """健康检查,包含依赖服务检测"""
+    try:
+        # 检查 Redis 连接
+        redis_client.ping()
+        
+        # 检查数据库连接
+        with db_engine.connect() as conn:
+            conn.execute("SELECT 1")
+        
+        return "ok - all services healthy"
+    except Exception as e:
+        logger.error(f"Health check failed: {e}")
+        return f"degraded - {str(e)}"

注意事项

  1. 无参数:函数签名必须为 def ping() -> str:
  2. 同步函数:使用 def 而非 async def
  3. 快速响应:应在 1 秒内返回,避免超时
  4. 轻量级检查:避免执行耗时操作

可用端点

健康检查函数会自动注册到以下端点:

  • GET /ping - 基础健康检查
  • GET /health - 健康状态
  • GET /readiness - Kubernetes 就绪探针
  • GET /liveness - Kubernetes 存活探针

@app.async_task(规划中)

用于定义异步任务,支持长时间运行的操作。

python
@app.async_task
+async def process_long_task(task_id: str, data: dict) -> dict:
+    """处理长时间运行的任务"""
+    # 长时间运行的逻辑
+    result = await heavy_computation(data)
+    return result

注意:此功能正在规划中,暂未实现。

MCP Agent 注解

AgentkitMCPApp 用于构建 MCP (Model Context Protocol) 服务,将函数封装为标准的 MCP 工具。

@app.tool

将函数注册为 MCP 工具,供 LLM 调用。

函数签名

python
@app.tool
+def tool_name(param1: str, param2: int) -> dict:
+    pass

参数说明

  • 函数参数:工具的输入参数,必须有类型注解
  • 返回值:工具的执行结果,建议返回 dict 类型
  • 文档字符串:会作为工具描述,供 LLM 理解工具用途

基本示例

python
from agentkit.apps import AgentkitMCPApp
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.tool
+def get_city_weather(city: str) -> dict[str, str]:
+    """获取城市天气信息
+    
+    Args:
+        city: 城市名称(必须为英文)
+        
+    Returns:
+        包含天气状况和温度的字典
+    """
+    weather_data = {
+        "beijing": {"condition": "Sunny", "temperature": 25},
+        "shanghai": {"condition": "Cloudy", "temperature": 22},
+    }
+    
+    city = city.lower().strip()
+    if city in weather_data:
+        info = weather_data[city]
+        return {"result": f"{info['condition']}, {info['temperature']}°C"}
+    else:
+        return {"result": f"Weather information not found for {city}"}

异步工具示例

python
import aiohttp
+
+@mcp_app.tool
+async def fetch_web_content(url: str) -> dict:
+    """获取网页内容
+    
+    Args:
+        url: 网页 URL
+        
+    Returns:
+        包含网页内容的字典
+    """
+    async with aiohttp.ClientSession() as session:
+        async with session.get(url) as response:
+            content = await response.text()
+            return {
+                "status": response.status,
+                "content": content[:1000]  # 截取前 1000 字符
+            }

注意事项

  1. 类型注解必需:所有参数必须有类型注解,MCP 需要此信息生成工具模式
  2. 详细的文档字符串:文档字符串会作为工具描述,帮助 LLM 理解工具用途
  3. 同步和异步均可:支持 defasync def
  4. 返回结构化数据:建议返回 dict 类型,便于 LLM 解析
  5. 错误处理:在函数内部处理异常,避免工具调用失败

复杂参数示例

python
from typing import List, Optional
+from pydantic import BaseModel
+
+class SearchQuery(BaseModel):
+    keywords: List[str]
+    max_results: int = 10
+    filters: Optional[dict] = None
+
+@mcp_app.tool
+def search_documents(query: SearchQuery) -> dict:
+    """搜索文档
+    
+    Args:
+        query: 搜索查询对象,包含关键词、结果数量和过滤条件
+        
+    Returns:
+        搜索结果列表
+    """
+    # 实现搜索逻辑
+    results = perform_search(
+        keywords=query.keywords,
+        max_results=query.max_results,
+        filters=query.filters
+    )
+    return {"results": results, "count": len(results)}

@app.agent_as_a_tool

将整个 Agent 封装为 MCP 工具,实现 Agent 的组合和协作。

函数签名

python
@app.agent_as_a_tool
+async def agent_tool(prompt: str) -> str:
+    pass

使用示例

python
from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+# 创建一个专门的天气 Agent
+weather_agent = Agent(tools=[get_city_weather])
+weather_runner = Runner(agent=weather_agent)
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(prompt: str) -> str:
+    """天气助手 Agent
+    
+    专门处理天气相关查询的 Agent,可以查询全球城市的天气信息。
+    
+    Args:
+        prompt: 用户的天气查询
+        
+    Returns:
+        天气查询结果
+    """
+    response = await weather_runner.run(messages=prompt)
+    return response

多 Agent 协作示例

python
# 创建多个专门的 Agent
+weather_agent = Agent(tools=[get_city_weather])
+news_agent = Agent(tools=[get_latest_news])
+calendar_agent = Agent(tools=[check_schedule])
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(query: str) -> str:
+    """天气助手"""
+    return await Runner(agent=weather_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def news_assistant(query: str) -> str:
+    """新闻助手"""
+    return await Runner(agent=news_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def calendar_assistant(query: str) -> str:
+    """日程助手"""
+    return await Runner(agent=calendar_agent).run(messages=query)

注意事项

  1. Agent 职责单一:每个 Agent 应专注于特定领域
  2. 清晰的描述:文档字符串要明确 Agent 的能力边界
  3. 异步执行:通常是异步函数
  4. 合理的超时:设置合理的执行超时时间

A2A Agent 注解

AgentkitA2aApp 用于构建 A2A (Agent-to-Agent) 应用,支持 Agent 之间的通信和协作。

@app.agent_executor

注册 Agent 执行器,定义 Agent 的执行逻辑。

函数签名

python
@app.agent_executor(runner=runner, **kwargs)
+class MyAgentExecutor(A2aAgentExecutor):
+    pass

参数说明

  • runner: Agent 的运行器实例
  • kwargs: 其他配置参数

基本示例

python
from agentkit.apps import AgentkitA2aApp
+from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor
+from veadk import Agent, Runner
+from veadk.a2a.agent_card import get_agent_card
+from veadk.tools.demo_tools import get_city_weather
+
+# 创建 A2A 应用
+a2a_app = AgentkitA2aApp()
+
+# 创建 Agent
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+# 注册执行器
+@a2a_app.agent_executor(runner=runner)
+class WeatherAgentExecutor(A2aAgentExecutor):
+    """天气查询 Agent 执行器"""
+    pass
+
+# 运行应用
+if __name__ == "__main__":
+    a2a_app.run(
+        agent_card=get_agent_card(agent=agent, url="http://127.0.0.1:8000"),
+        host="127.0.0.1",
+        port=8000,
+    )

自定义执行器示例

python
from a2a.server.agent_execution import AgentExecutor
+from a2a.server.agent_execution.context import RequestContext
+from a2a.server.events.event_queue import EventQueue
+
+@a2a_app.agent_executor(runner=runner)
+class CustomAgentExecutor(AgentExecutor):
+    """自定义 Agent 执行器"""
+    
+    async def execute(
+        self,
+        context: RequestContext,
+        event_queue: EventQueue
+    ) -> str:
+        """执行 Agent 逻辑
+        
+        Args:
+            context: 请求上下文,包含输入消息和历史
+            event_queue: 事件队列,用于发送中间结果
+            
+        Returns:
+            Agent 的响应结果
+        """
+        # 从上下文提取输入
+        user_message = context.current_input
+        
+        # 发送中间事件(可选)
+        await event_queue.put({
+            "type": "thinking",
+            "content": "正在思考..."
+        })
+        
+        # 执行 Agent
+        response = await self.runner.run(messages=user_message)
+        
+        return response

注意事项

  1. 继承 AgentExecutor:必须继承自 AgentExecutor 或其子类
  2. 提供 runner:必须通过参数传入 runner 实例
  3. 实现 execute 方法:如需自定义逻辑,重写 execute 方法
  4. 使用 event_queue:通过事件队列发送中间状态

@app.task_store

注册任务存储,用于持久化 A2A 任务状态。

函数签名

python
@app.task_store(**kwargs)
+class MyTaskStore(TaskStore):
+    pass

使用默认存储

python
# 不指定 task_store,会使用内存存储(InMemoryTaskStore)
+a2a_app = AgentkitA2aApp()
+
+@a2a_app.agent_executor(runner=runner)
+class MyExecutor(A2aAgentExecutor):
+    pass

自定义任务存储示例

python
from a2a.server.tasks.task_store import TaskStore
+from a2a.types import Task
+import redis
+
+@a2a_app.task_store(redis_url="redis://localhost:6379")
+class RedisTaskStore(TaskStore):
+    """基于 Redis 的任务存储"""
+    
+    def __init__(self, redis_url: str):
+        self.redis_client = redis.from_url(redis_url)
+    
+    async def save_task(self, task: Task) -> None:
+        """保存任务"""
+        task_data = task.model_dump_json()
+        self.redis_client.set(f"task:{task.id}", task_data)
+    
+    async def get_task(self, task_id: str) -> Task | None:
+        """获取任务"""
+        task_data = self.redis_client.get(f"task:{task_id}")
+        if task_data:
+            return Task.model_validate_json(task_data)
+        return None
+    
+    async def delete_task(self, task_id: str) -> None:
+        """删除任务"""
+        self.redis_client.delete(f"task:{task_id}")

注意事项

  1. 可选装饰器:如不指定,使用内存存储
  2. 继承 TaskStore:必须继承自 TaskStore
  3. 实现必需方法:实现 save_taskget_taskdelete_task 等方法
  4. 持久化存储:生产环境建议使用持久化存储(Redis、数据库等)

最佳实践

1. 错误处理

所有装饰的函数都应该有良好的错误处理:

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        # 业务逻辑
+        result = await process(payload)
+        return result
+    except ValueError as e:
+        logger.warning(f"Invalid input: {e}")
+        return f"Invalid input: {str(e)}"
+    except Exception as e:
+        logger.error(f"Unexpected error: {e}", exc_info=True)
+        return "An error occurred. Please try again later."

2. 日志记录

添加适当的日志以便追踪问题:

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    request_id = headers.get("request_id", "unknown")
+    logger.info(f"[{request_id}] Processing request: {payload}")
+    
+    try:
+        response = await runner.run(messages=payload["prompt"])
+        logger.info(f"[{request_id}] Request completed successfully")
+        return response
+    except Exception as e:
+        logger.error(f"[{request_id}] Request failed: {e}")
+        raise

3. 类型注解

使用完整的类型注解提高代码质量:

python
from typing import Dict, Any
+
+@app.entrypoint
+async def run(payload: Dict[str, Any], headers: Dict[str, str]) -> str:
+    prompt: str = payload["prompt"]
+    user_id: str = headers.get("user_id", "anonymous")
+    # ...

4. 文档字符串

为所有函数添加详细的文档字符串:

python
@mcp_app.tool
+def calculate_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> dict:
+    """计算两个地理坐标之间的距离
+    
+    使用 Haversine 公式计算地球表面两点间的大圆距离。
+    
+    Args:
+        lat1: 起点纬度(度)
+        lon1: 起点经度(度)
+        lat2: 终点纬度(度)
+        lon2: 终点经度(度)
+        
+    Returns:
+        包含距离信息的字典,距离单位为公里
+        
+    Example:
+        >>> calculate_distance(39.9, 116.4, 31.2, 121.5)
+        {"distance_km": 1067.5}
+    """
+    # 实现逻辑

5. 性能优化

避免在装饰的函数中执行耗时初始化:

python
# ❌ 不好的做法
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    agent = Agent(tools=[...])  # 每次请求都创建
+    runner = Runner(agent=agent)
+    return await runner.run(messages=payload["prompt"])
+
+# ✅ 好的做法
+agent = Agent(tools=[...])  # 只创建一次
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    return await runner.run(messages=payload["prompt"])

下一步

  • 查看 samples/ 目录下的完整示例代码
  • 阅读 SDK 概览 了解整体架构
  • 部署应用到 AgentKit Platform

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/4.runtime/1.runtime_quickstart.html b/content/4.runtime/1.runtime_quickstart.html new file mode 100644 index 0000000..c1a9e58 --- /dev/null +++ b/content/4.runtime/1.runtime_quickstart.html @@ -0,0 +1,171 @@ + + + + + + AgentKit Runtime:从本地到云端的 Agent 部署利器 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Runtime:从本地到云端的 Agent 部署利器

AgentKit Runtime 是一个统一的、托管式的 Agent 运行环境,旨在为您提供一个安全、高效、可扩展的 Serverless 平台,让您能专注于 Agent 的业务逻辑,而非繁琐的底层运维。

AgentKit Runtime 为您解决什么?

  • 运维负担重:您是否曾为环境搭建、网络配置、依赖安装、手动扩缩容和故障排查而耗费大量精力?
  • 缺乏统一管理平台:为不同的 Agent 或会话创建和管理独立的运行环境,是否让您感到调度混乱、难以维护?
  • 安全与隔离挑战:您是否担心多用户或多 Agent 场景下的权限冲突、数据泄露或恶意访问风险?
  • 监控与日志缺失:您是否需要花费额外成本来配置日志系统、指标收集和告警规则,以便实时监控 Agent 的健康状况?

AgentKit Runtime 通过提供一个 Serverless 的托管环境,系统性地解决了以上所有问题。

核心优势

1. Serverless 架构:极致简化运维,优化成本

  • 零基础设施管理:无需关心底层服务器和复杂的环境配置,实现真正的“代码即服务”。
  • 统一运行时平台:在同一环境中高效运行和调度多个 Agent 实例(Session),并提供统一的接入点。
  • 自动化生命周期管理:根据实时流量从零自动扩展到大规模并发,实现无人值守的弹性伸缩。
  • 按量付费:仅在 Agent 运行时产生费用,无流量时资源自动缩减至零,最大限度节省云成本。
  • 内建监控与日志:提供开箱即用的实时监控和日志系统,轻松追踪 Agent 运行状态,快速定位问题。

2. 企业级安全隔离

  • 多重隔离保障:基于云厂商成熟的虚拟化和容器技术,确保每个 Agent Runtime 都在独立、受保护的环境中运行。
  • 精细化权限控制:与 Identity 和网关鉴权深度集成,严格隔离会话上下文与访问权限,有效防止数据串扰和越权风险。

3. 框架无关的快速集成

  • 广泛的框架支持:深度融合 veADK,同时兼容主流的 Python Agent 框架,仅需少量适配即可快速接入。
  • 多协议支持:原生支持 HTTP、MCP、A2A 等多种通信协议,满足不同应用场景的需求。
  • 一键部署:通过 AgentKit SDK,您可以轻松实现从本地 IDE 到云端 Runtime 的一键部署。

三步上手:从本地开发到云端部署

本指南将引导您完成从环境配置、本地开发调试,到最终将 Agent 部署到生产环境的全过程。

前提条件

在开始之前,请确保您已准备好:

  1. 一个已开通 AgentKit 服务的火山引擎账号,并获取其 AccessKey & SecretKey

    提示:请确保您的 AccessKey 拥有 AgentKitFullAccess 权限。

  2. 本地已安装 Python 3.10+

第 1 步:环境配置

我们推荐使用 uvpython3 -m venv 来管理您的 Python 虚拟环境。以下示例将使用 uv

uv 安装指南请参考:uv installation

1. 创建并激活虚拟环境

bash
mkdir agentkit-runtime-quickstart
+cd agentkit-runtime-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

2. 安装核心依赖

您可以通过 --index 参数指定镜像源以加快安装速度。

bash
uv pip install veadk-python
+uv pip install agentkit-sdk-python

第 2 步:创建并本地调试 Agent

1. 初始化 Agent 项目

我们强烈推荐您使用 agentkit-cli 来快速启动项目。init 命令可以从模板创建一个结构完整的、支持流式输出的 Agent 项目。

bash
# 使用 agentkit-cli 从模板创建项目
+agentkit init

这会自动生成一个包含 simple_agent.pyrequirements.txt 的项目结构,让您能立即开始开发。

2. 智能体代码概览

使用 basic_stream 模板生成的 simple_agent.py 核心代码如下。它展示了如何基于 AgentkitSimpleApp 包装一个 veADKAgent,并通过 Runner 执行,最终以 SSE(Server-Sent Events)事件流返回结果。

python
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import logging
+
+from google.adk.agents import RunConfig
+from google.adk.agents.run_config import StreamingMode
+from google.genai.types import Content, Part
+from veadk import Agent, Runner
+
+from agentkit.apps import AgentkitSimpleApp
+from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+
+app = AgentkitSimpleApp()
+
+app_name = "simple_streamable_app"
+
+agent_name = "Agent"
+description = DEFAULT_DESCRIPTION
+system_prompt = DEFAULT_INSTRUCTION
+
+
+tools = []
+
+# from veadk.tools.builtin_tools.web_search import web_search
+# tools.append(web_search)
+
+
+agent = Agent(
+    name=agent_name,
+    description=description,
+    instruction=system_prompt,
+    tools=tools,
+)
+agent.model._additional_args["stream_options"] = {"include_usage": True}
+runner = Runner(agent=agent, app_name=app_name)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict):
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+
+    session_service = runner.short_term_memory.session_service  # type: ignore
+
+    # prevent session recreation
+    session = await session_service.get_session(
+        app_name=app_name, user_id=user_id, session_id=session_id
+    )
+    if not session:
+        await session_service.create_session(
+            app_name=app_name, user_id=user_id, session_id=session_id
+        )
+
+    new_message = Content(role="user", parts=[Part(text=prompt)])
+    try:
+        async for event in runner.run_async(
+            user_id=user_id,
+            session_id=session_id,
+            new_message=new_message,
+            run_config=RunConfig(streaming_mode=StreamingMode.SSE),
+        ):
+            # Format as SSE data
+            sse_event = event.model_dump_json(exclude_none=True, by_alias=True)
+            logger.debug("Generated event in agent run streaming: %s", sse_event)
+            yield sse_event
+    except Exception as e:
+        logger.exception("Error in event_generator: %s", e)
+        # You might want to yield an error event here
+        error_data = json.dumps({"error": str(e)})
+        yield error_data
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

代码亮点

  • 默认使用火山方舟的豆包模型,并自动处理模型 API Key 的获取。
  • 内置了会话管理逻辑,确保多轮对话的连续性。
  • 通过 AgentkitSimpleApp 实现了与 AgentKit Runtime 的无缝集成。

3. 配置环境变量

在启动 Agent 服务之前,您需要配置火山引擎的访问凭证:

bash
# 必需:配置您的火山引擎访问凭证
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

重要提示:请务必将 your_akyour_sk 替换为您的真实凭证。

4. 本地启动并调用服务

一切就绪后,运行以下命令启动 Agent 服务:

bash
python simple_agent.py

服务将监听 http://0.0.0.0:8000。现在,打开另一个终端,使用 curl 来测试您的 Agent

bash
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "讲一个笑话!"}'

参数说明:

  • user_id:用户标识符
  • session_id:会话标识符
  • prompt:用户的自然语言请求

**执行日志示例: **

调用成功后,控制台会输出详细的执行日志:

INFO:     Started server process [38120]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+INFO:     127.0.0.1:60807 - "POST /invoke HTTP/1.1" 200 OK
+INFO:__main__:Running agent with prompt: 讲一个笑话!, user_id: test, session_id: local_session
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output: Why
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  did
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  AI
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  apply
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  for
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  a
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  job
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  at
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  bakery
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ?
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Because
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  it
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  wanted
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  to
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  work
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  on
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  its
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: d
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ough
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  processing
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  skills
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: !
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  😄
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Why did the AI apply for a job at the bakery?
+
+Because it wanted to work on its **dough** processing skills! 😄

第 3 步:部署到生产环境

完成本地开发和测试后,您可以将智能体部署到 AgentKit 平台:

  1. 打包代码:确保所有依赖都已正确配置在 requirements.txt 中,使用模版生成的代码默认已经包含了所有必要的依赖。
  2. 平台部署:根据[快速开始]指南,通过agentkit configagentkit launch命令,配置和部署应用。
  3. 调用应用:部署完成后,您可以通过平台提供的 API 或 SDK 调用智能体。调用示例:
    bash
    agentkit invoke "讲一个笑话!"

至此,您已成功完成了从本地开发到云端部署的全过程!

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/5.tools/1.sandbox_quickstart.html b/content/5.tools/1.sandbox_quickstart.html new file mode 100644 index 0000000..3bf6ed5 --- /dev/null +++ b/content/5.tools/1.sandbox_quickstart.html @@ -0,0 +1,87 @@ + + + + + + AgentKit Built-in Tools 快速开始指南 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Built-in Tools 快速开始指南

Built-in Tools为Agent提供标准化的沙箱运行环境和工具接口。提供的All-in-one sandbox镜像集成了代码执行、浏览器自动化、终端操作等核心能力,支持标准化集成与API调用。

核心能力

  • 提供code sandbox能力,让Agent安全地“运行代码”
  • 提供browser sandbox能力:让Agent“像人一样操作网页”
  • 提供terminal sandbox能力:让Agent“像人一样操作操作系统控制台(Terminal)”
  • 提供文件系统能力:让Agent上传、下载文件

本文档将详细介绍如何在智能体代码中集成和使用 Built-in Tools,特别是代码执行沙箱功能。通过本指南,您将学会如何创建、配置和调用沙箱工具。

前置准备:创建沙箱工具

在开始编写代码之前,您需要先在火山引擎控制台创建一个沙箱工具实例:

  1. 访问 AgentKit Built-in Tools 控制台
  2. 创建新的沙箱工具实例
  3. 记录生成的 TOOL_ID,后续配置中会用到

智能体代码示例

以下代码展示了如何使用 VeADK 构建一个具备代码执行能力的智能体。通过集成 Built-in Tools 的 run_code 工具,您的智能体将能够在沙箱环境中安全地执行代码。 我们推荐您使用agentkit-cli,从Basic Agent模版来创建项目。在模版创建完成后,你需要做以下修改:

  • 为智能体添加代码执行工具 run_code
  • 配置环境变量 AGENTKIT_TOOL_ID 为您的沙箱工具实例 ID 最终,您的代码文件应该如下:

完整代码

将代码保存为simple_agent_tool.py

python
from veadk import Agent, Runner
+from veadk.tools.builtin_tools.run_code import run_code
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+agent: Agent = Agent(
+    tools=[run_code],
+)
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+    return response
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

代码说明

  • run_code 工具:提供安全的代码执行环境,支持 Python、JavaScript 等多种编程语言
  • session_id:用于标识用户会话,同一 session_id 的请求将共享沙箱实例
  • 异步处理:使用 async/await 语法支持高并发请求

本地调试

1. 官方源安装VeADK

您可以直接使用 Python 包管理工具 pip 从 PyPI 平台 来安装 veadk-python

bash
pip install veadk-python

说明:支持调用built-in-tools的veadk-python版本为0.2.15及以上。

1. 配置环境变量

在启动智能体之前,需要配置以下环境变量:

bash
# 必需配置:沙箱工具 ID(从控制台获取)
+export AGENTKIT_TOOL_ID=t-ye7fhfmghsc1kdxxxxxx
+
+# 必需配置:火山引擎访问凭证
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

📝 注意事项:

  • 请将 your_akyour_sk 等占位符替换为您的实际配置值
  • AGENTKIT_TOOL_ID 从火山引擎控制台创建沙箱工具后获取

2. 本地启动智能体服务

配置完环境变量后,运行以下命令启动智能体:

bash
python simple_agent_tool.py

服务启动成功后,将监听 http://0.0.0.0:8000,您可以通过该地址调用智能体。

3. 调用智能体

工具实例调用机制

工具实例支持基于会话的智能调度管理:

  • 自动创建:首次使用某个 session_id 调用时,系统会自动创建对应的沙箱会话实例
  • 会话复用:相同 session_id 的多次请求将共享同一个沙箱实例,保持代码执行的上下文连续性
  • 生命周期:每个会话实例默认有效期为 30 分钟,超时后自动销毁
  • 隔离性:不同 session_id 的请求使用独立的沙箱环境,互不干扰

调用示例

使用以下 curl 命令测试智能体的代码执行能力:

bash
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: veadk-test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "给我在50和100之间一个随机的质数"}'

参数说明:

  • user_id:用户标识符
  • session_id:会话标识符,用于关联沙箱实例
  • prompt:用户的自然语言请求

执行日志示例

调用成功后,控制台会输出详细的执行日志:

2025-11-23 21:10:24 | DEBUG | runner.py:578 - Function call: id='call_jwrcwdayjj8xnlgalyzzcoqq' args={'code': 'import random\n\ndef is_prime(n):\n    if n <= 1:\n        return False\n    if n == 2:\n        return True\n    if n % 2 == 0:\n        return False\n    for i in range(3, int(n**0.5) + 1, 2):\n        if n % i == 0:\n            return False\n    return True\n\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\nrandom_prime = random.choice(primes_between)\nprint(random_prime)', 'language': 'python3'} name='run_code'
+2025-11-23 21:10:24 | DEBUG | run_code.py:48 - tools endpoint: agentkit.cn-beijing.volces.com
+2025-11-23 21:10:24 | DEBUG | run_code.py:54 - tool_user_session_id: veAgent_veadk-test_local_session
+2025-11-23 21:10:24 | DEBUG | run_code.py:56 - Running code in language: python3, session_id=local_session, code=import random
+
+def is_prime(n):
+    if n <= 1:
+        return False
+    if n == 2:
+        return True
+    if n % 2 == 0:
+        return False
+    for i in range(3, int(n**0.5) + 1, 2):
+        if n % i == 0:
+            return False
+    return True
+
+primes_between = [p for p in range(50, 101) if is_prime(p)]
+random_prime = random.choice(primes_between)
+print(random_prime), tool_id=t-ye7yhff668o2eybtfvr0, host=agentkit.cn-beijing.volces.com, service=agentkit, region=cn-beijing
+2025-11-23 21:10:24 | DEBUG | run_code.py:65 - Get AK/SK from tool context failed.
+2025-11-23 21:10:24 | DEBUG | run_code.py:77 - Successfully get AK/SK from environment variables.
+2025-11-23 21:10:25 | DEBUG | run_code.py:103 - Invoke run code response: {'ResponseMetadata': {'RequestId': '****', 'Action': 'InvokeTool', 'Version': '2025-10-30', 'Service': 'agentkit', 'Region': 'cn-beijing'}, 'Result': {'ToolId': 't-****', 'UserSessionId': '****', 'SessionId': 's-****', 'Endpoint': '', 'InternalEndpoint': '', 'Result': '{\n  "success": true,\n  "message": "Code executed successfully",\n  "data": {\n    "kernel_name": "python3",\n    "session_id": "****",\n    "status": "ok",\n    "execution_count": 1,\n    "outputs": [\n      {\n        "output_type": "stream",\n        "name": "stdout",\n        "text": "67\\n",\n        "data": null,\n        "metadata": {},\n        "execution_count": null,\n        "ename": null,\n        "evalue": null,\n        "traceback": null\n      }\n    ],\n    "code": "import random\\n\\ndef is_prime(n):\\n    if n \\u003c= 1:\\n        return False\\n    if n == 2:\\n        return True\\n    if n % 2 == 0:\\n        return False\\n    for i in range(3, int(n**0.5) + 1, 2):\\n        if n % i == 0:\\n            return False\\n    return True\\n\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\nrandom_prime = random.choice(primes_between)\\nprint(random_prime)",\n    "msg_id": "****"\n  }\n}'}}
+2025-11-23 21:10:38 | DEBUG | runner.py:586 - Event output: 在50到100之间的随机质数为:67
+2025-11-23 21:10:38 | WARNING | runner.py:652 - No tracer is configured in the agent, no trace id provided.
+INFO:     127.0.0.1:52785 - "POST /invoke HTTP/1.1" 200 OK

部署到生产环境

完成本地开发和测试后,您可以将智能体部署到 AgentKit 平台:

  1. 打包代码:确保所有依赖都已正确配置在 requirements.txt
  2. 平台部署:参考Runtime 快速开始 部分部署tool,主要有以下几步:
    • 在项目根目录运行 agentkit init 命令,初始化项目,会生成 agentkit.yaml 文件(如果前面已执行,跳过此步)
    • 确保agentkit.yaml文件配置,应用入口设置为您刚才已经调通的应用代码simple_agent_tool.py,即:
    yaml
    entry_point: simple_agent_tool.py
    • 确保所有依赖都已正确配置在 requirements.txt
    • 根据[快速开始]指南,通过agentkit configagentkit launch命令,配置和部署应用。
  3. 调用应用:部署完成后,您可以通过平台提供的 API 或 SDK 调用智能体。调用示例:
    bash
    agentkit invoke "给我在50和100之间一个随机的质数"

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/6.memory/1.memory_quickstart.html b/content/6.memory/1.memory_quickstart.html new file mode 100644 index 0000000..8cd15eb --- /dev/null +++ b/content/6.memory/1.memory_quickstart.html @@ -0,0 +1,110 @@ + + + + + + AgentKit Memory 快速开始指南 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Memory 快速开始指南

AI Agent 运行过程中面临多轮任务日益复杂、上下文窗口不足的问题,需要有记忆能力来进行上下文保持与个性化定制。Agentkit Memory 提供统一的记忆库使用接口并与主流框架进行对接,为 Agent 运行记忆库支持提供跨会话、上下文感知和个性化交互,实现 Agent 的持续学习与演进。本章节将指导您安装依赖项并实现长期记忆功能。

使用示例

以下示例展示了如何使用 Agentkit Memory 实现长期记忆功能。

步骤如下

  • 创建包含语义策略的记忆资源
  • 将事件(对话历史)写入记忆资源
  • 从长期记忆中检索记忆记录

创建记忆库

通过火山引擎控制台,为智能体创建记忆库Agentkit-Memory

获取记忆资源的连接信息

在记忆详情-集成代码页面,获取连接信息。

  • 对于 Mem0 类型的记忆资源,您可以看到类似如下的环境变量:
DATABASE_MEM0_BASE_URL="https://mem0-your-mem-url.mem0.volces.com:8000"
+DATABASE_MEM0_API_KEY="xxxxxx-xxxxxxx"
  • 对于 VikingDB 类型的记忆资源,您可以看到类似如下的环境变量:
DATABASE_VIKINGMEM_COLLECTION=<collection_name of your vikingdb memory> #index
+DATABASE_VIKINGMEM_MEMORY_TYPE=memory_summary_04uyfx # memory type, separate multiple by comma, e.g. event_v1,event_v2

构建一个带长期记忆能力的智能体

VeADK是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。 以下示例展示了如何使用 VeADK 构建一个带长期记忆能力的智能体,记忆库后端采用 mem0。智能体可以根据用户输入的问题,使用长期记忆来存储用户偏好、会话摘要等个性化交互信息。

您无需从 0-1 构建 veadk 项目,我们推荐您使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改:

  • 为 Agent 添加LongTermMemory
  • 配置上个章节获取的环境变量到agentkit.yaml
  • 增加mem0ai==0.1.118requirements.txt
  • 在每一轮对话结束后显式调用runner.save_session_to_long_term_memory,将对话结果保存到长期记忆库

最终,您的代码文件应该如下:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.memory.long_term_memory import LongTermMemory
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+index = "simple_app" # required for viking backend, arbitrary for mem0 backend
+
+backend = "mem0" # one of "mem0", "viking_mem"
+if backend == "viking_mem":
+    collection_name = os.getenv("DATABASE_VIKINGMEM_COLLECTION")
+    if not collection_name:
+        raise ValueError("DATABASE_VIKINGMEM_COLLECTION environment variable is not set")
+    index = collection_name
+
+app = AgentkitSimpleApp()
+long_term_memory = LongTermMemory(
+  backend=backend,
+  index=index
+)
+
+agent = Agent(
+  name="simple_app_agent",
+  instruction="You are a helpful assistant.",
+  long_term_memory=long_term_memory
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+
+    # save the teaching prompt and answer in long term memory
+    await runner.save_session_to_long_term_memory(session_id=session_id, user_id=user_id)
+
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

环境配置

请为您的 agentkit.yaml 文件添加如下配置

# 当长期记忆后端为 mem0 时,添加如下配置
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_MEM0_BASE_URL: <your mem0 url>
+      DATABASE_MEM0_API_KEY: <your mem0 api key>
+
+# 当长期记忆后端为 VikingDB 时,添加如下配置
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKINGMEM_COLLECTION: <your vikingdb collection name>
+      DATABASE_VIKINGMEM_MEMORY_TYPE: <your vikingdb memory type, defaults to "event_v1", separate multiple by comma, e.g. event_v1,event_v2>

启动服务

运行 agentkit launch。构建好 Runtime 链接信息将被自动保存在 agentkit.yaml 文件中。

如何发起调用

执行如下发起调用

agentkit invoke "My secret is 0xabcd"

将自动使用 user_id="agentkit_user", session_id="agentkit_sample_session"来发起调用。

校验记忆库是否生效

在首轮调用中,您保存了密码。我们需要更换session_id,来验证 Agent 是否能正确读取到记忆库中的信息。建议您等待约 1 分钟,待长期记忆抽取完成后,再发起调用。

agentkit invoke \
+  --payload '{"prompt": "What is my secret?"}' \
+  --headers '{"user_id": "agentkit_user", "session_id": "s123"}'

您将看到 Agent 成功读取到记忆库中的信息,并告诉你密码是 0xabcd

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/7.knowledge/1.knowledge_quickstart.html b/content/7.knowledge/1.knowledge_quickstart.html new file mode 100644 index 0000000..e68c393 --- /dev/null +++ b/content/7.knowledge/1.knowledge_quickstart.html @@ -0,0 +1,128 @@ + + + + + + AgentKit Knowledge 快速开始指南 | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Knowledge 快速开始指南

Agentkit Knowledge 提供主流的知识库的一键配置导入能力,实现在 AgentKit 平台轻松关联知识库,并提供统一的知识库接口与框架对接,提升 Agent 使用不同知识库的便利性。

使用示例

步骤如下

  • 创建知识库资源
  • 将模版文件添加到知识库
  • 从知识库中检索记忆记录

创建知识库

通过火山引擎控制台,为智能体创建知识库VikingDB-Knowledge,并添加下面内容作为qa.md到知识库customer_support中。

md
# 智能客服知识库
+
+## 1. 公司简介
+
+VE 科技是一家专注于智能客服与知识管理的高科技公司。我们的核心产品是 **智能客服系统**,通过自然语言处理与知识库检索,为企业客户提供高效、智能的自动化客服解决方案。
+
+## 2. 产品功能说明
+
+- **自动问答**:基于知识库,快速响应常见问题。
+- **多渠道接入**:支持网页、App、微信、飞书等渠道。
+- **智能推荐**:根据上下文推荐相关答案。
+- **数据分析**:提供用户问题统计与客服绩效报告。
+- **自助知识库管理**:支持非技术人员快速编辑知识内容。
+
+---
+
+## 3. 常见问题 (FAQ)
+
+### Q1: 智能客服系统支持哪些语言?
+
+A1: 目前支持 **中文****英文**,后续将逐步增加日语、韩语等多语言支持。
+
+### Q2: 系统可以接入现有的 CRM 吗?
+
+A2: 可以。我们的系统支持通过 API 与主流 CRM 系统(如 Salesforce、Zoho、金蝶)进行无缝集成。
+
+### Q3: 如果机器人无法回答用户问题,会怎么办?
+
+A3: 系统会自动将问题转接至人工客服,并在后台记录该问题,方便管理员补充到知识库。
+
+### Q4: 知识库内容多久更新一次?
+
+## A4: 知识库支持 **实时更新**,管理员提交后即可立即生效。
+
+## 4. 联系我们
+
+- 官网:[https://www.example.com](https://www.example.com)
+- 客服邮箱:support@ve
+- 服务热线:400-123-4567

导入知识库

通过火山引擎控制台,为智能体导入知识库Agentkit-Knowledge

获取记忆资源的连接信息

在记忆详情-集成代码页面,获取连接信息。

  • 对于 VikingDB Knowledge 类型的记忆资源,您可以看到类似如下的环境变量:
bash
export DATABASE_VIKING_COLLECTION=customer_support
+export DATABASE_VIKING_PROJECT=default
+export DATABASE_VIKING_REGION=cn-beijing

构建一个带知识库能力的智能体

VeADK是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。

以下示例展示了如何使用 VeADK 构建一个带知识库能力的智能体,知识库后端采用 VikingDB Knowledge。智能体可以根据用户输入的问题,使用知识库来回答用户的问题。

您无需从 0-1 构建 veadk 项目,推荐使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改:

  • 为 Agent 添加Knowledgebase
  • 配置上个章节获取的环境变量到agentkit.yaml

最终,您的代码文件应该如下:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.knowledgebase import KnowledgeBase
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+collection_name = os.getenv("DATABASE_VIKING_COLLECTION")
+if not collection_name:
+    raise ValueError("DATABASE_VIKING_COLLECTION environment variable is not set")
+
+model_name = "doubao-seed-1-6-250615"
+
+app = AgentkitSimpleApp()
+knowledgebase = KnowledgeBase(backend="viking", index=collection_name)
+
+
+agent = Agent(
+    instruction="Answer customer's questions according to your knowledgebase.",
+    model_name=model_name,
+    knowledgebase=knowledgebase
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

环境配置

请为您的 agentkit.yaml 文件添加如下配置

launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKING_COLLECTION: <your viking collection name>

启动服务

运行 agentkit launch。构建好 Runtime 链接信息将被自动保存在 agentkit.yaml 文件中。

如何发起调用

执行如下发起调用

agentkit invoke "你们有什么产品?"

您将看到 Agent 成功读取到知识库中的信息,并将qa.md中的信息重新组织语言后回答您。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/8.mcp/1.overview.html b/content/8.mcp/1.overview.html new file mode 100644 index 0000000..c384fdf --- /dev/null +++ b/content/8.mcp/1.overview.html @@ -0,0 +1,26 @@ + + + + + + AgentKit MCP | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit MCP

AgentKit MCP 提供统一的 MCP 网关与工具治理中枢。以共享实例、预制认证插件与自动搜索能力,降低接入门槛、减少 Token 成本、提升工具命中与可靠性,让团队可以专注在业务逻辑与体验打磨。 核心定位:统一入口、轻障碍接入、可治理的工具体系。承载 MCP 访问与会话保持,结合 OAuth2 与 API-Key 的认证插件,以及跨工具的语义搜索能力,形成“易接入、可治理、低成本”的工程骨架。

AgentKit MCP 功能点

AgentKit MCP 主要包括 MCP 服务和 MCP 工具集

MCP 服务

支持将企业既有 Web/HTTP 服务与第三方接口需要快速进入 Agent。AgentKit 支持两条路径:

  1. 直接转发 MCP Server,面向已具备 MCP 的后端
  2. 将 HTTP 转换为 MCP,通过上传 Swagger 与规则校验自动生成工具与参数描述,使历史资产快速纳入 MCP 能力集。

适用场景

  • 面向具体后端(MCP Server 或 HTTP)
  • 提供访问域名与会话保持
  • 认证在服务级别预制(API-Key、OAuth)
  • 适合工具规模可控与明确场景

MCP 工具集

随着工具数量膨胀或客户端存在工具上限(如 Trae 最多 50 个),自动搜索将“工具全集”对 LLM 的暴露收敛为 search/use 两个封装工具,以向量检索选择高匹配度工具,降低上下文冗余与延迟,并提升调用准确率。

适用场景:

  • 组合多个 MCP 服务的工具集合
  • 以语义检索选择最优工具
  • 对 LLM 暴露为 search/use 两个工具
  • 适合工具数量大、客户端有工具上限的场景

认证与安全

AgentKit MCP 认证链路优先采用 OAuth2 客户端凭证 模式,适用于前端应用访问 Agent runtime、服务端任务访问 Agent runtime,以及 Agent 访问 MCP Server。同时提供 API-Key 作为低依赖的补充方案,并规划后续的轮转与托管。

认证模式的区分:

  • Inbound:Agent 与 MCP 入站认证(OAuth2、API-Key),细化到自然人授权码与客户端凭证。
  • Outbound:网关访问 MCP Server 的凭证透传或转换(API-Key、OAuth client)。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/content/8.mcp/2.mcp_quickstart.html b/content/8.mcp/2.mcp_quickstart.html new file mode 100644 index 0000000..49fb4a5 --- /dev/null +++ b/content/8.mcp/2.mcp_quickstart.html @@ -0,0 +1,236 @@ + + + + + + AgentKit MCP Quick Start | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit MCP Quick Start

环境要求

开始前你需要准备:

  1. 一个开通了 AgentKit 的火山账号的 AccessKey & SecretKey

    Tips: 需要确保 AccessKey 有 AgentKitFullAccess 权限。

  2. MCP 服务(可以部署在 VeFaas 或公网可访问的位置)

    • 现存支持 MCP 的服务后端
    • 现存的 HTTP 服务和服务的 Swagger 接口定义Json,具体可以参考Swagger
  3. Python 3.10+ installed

  4. 方舟APIKEY

第一步:配置本地环境

可以使用 uv 或者 python3 -m venv 进行虚拟环境管理,下文将以 uv做为示例

uv 安装参考:uv install

虚拟环境配置

bash
mkdir agentkit-mcp-quickstart
+cd agentkit-mcp-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

安装依赖

可以通过 --index 指定源,加快安装速度

bash
uv pip install veadk-python
+uv pip install google-adk
+pip install agentkit-sdk-python

第二步:创建 AgentKit MCP

  1. 登录火山引擎 AgentKit 控制台

  2. 为准备好的后端 创建 MCP 服务

  3. 获取到创建后的 MCP 服务 Endpoint 和 ApiKey。会看到以下类似的输出:

httpUrl即为 MCP 服务的 Endpoint,Authorization 即为 ApiKey。

json
{
+  "mcpServers": {
+    "create-http-334df4": {
+      "httpUrl": "https://sd4fc6lpoh486npgcaav0.apigateway-cn-beijing.volceapi.com/mcp/create-http-334df4",
+      "headers": {
+        "Authorization": "Bearer P66l-rpaLbxxxxxxxxxxxxxxo2PQ"
+      }
+    }
+  }
+}

第三步:设置环境环境变量,运行 Agent

环境变量配置

bash
export MCP_ENDPOINT={{第三步中获取的Endpoint}}
+export MCP_AUTH_KEY={{第三步中获取的ApiKey}}
+export API_KEY={{方舟的APIKEY}}

代码示例

代码示例中,我们使用 VeADK 框架,创建了一个简单的智能体,用于调用 MCP 服务。

python
import logging
+
+from veadk import Agent, Runner
+from veadk.config import getenv
+from agentkit.apps import AgentkitSimpleApp
+from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams
+
+logger = logging.getLogger(__name__)
+
+
+url = getenv("MCP_ENDPOINT")
+mcp_auth_key = getenv("MCP_AUTH_KEY")
+apikey = getenv("API_KEY")
+
+mcp_ecs_toolset = MCPToolset(
+        connection_params=StreamableHTTPConnectionParams(
+        url=url,
+        headers={"Authorization": f"Bearer {mcp_auth_key}"}
+    ),
+)
+
+app = AgentkitSimpleApp()
+
+root_agent = Agent(
+    name="ecs_helper",
+    model_name="doubao-1-5-pro-256k-250115",
+    instruction='''
+        Help user find ECS instances and their details.
+    ''',
+    description="ECS Helper Agent",
+    tools=[mcp_ecs_toolset]
+)
+
+runner = Runner(agent=root_agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    
+    # 运行智能体,自动处理工具调用
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+
+    logger.info(f"Run response: {response}")
+    return response
+
+@app.ping
+def ping() -> str:
+    """健康检查接口"""
+    return "pong!"
+
+if __name__ == "__main__":
+    # 启动本地开发服务器
+    app.run(host="0.0.0.0", port=8000)

执行请求

curl
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: veadk-test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "分析下我的ecs实例"}'

运行结果

text
2025-10-24 20:17:33 | INFO | ark_veauth.py:25 - Fetching ARK token...
+2025-10-24 20:17:33 | INFO | agent.py:118 - Model extra config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | DEBUG | agent.py:127 - LiteLLM client created with config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | INFO | agent.py:153 - VeADK version: 0.2.13
+2025-10-24 20:17:33 | INFO | agent.py:155 - Agent `ecs_helper` init done.
+2025-10-24 20:17:33 | DEBUG | agent.py:156 - Agent: {'name': 'ecs_helper', 'tools': [<google.adk.tools.mcp_tool.mcp_toolset.MCPToolset object at 0x7f8b4f24b9b0>], 'model_name': 'doubao-1-5-pro-256k-250115', 'model_api_base': 'https://ark.cn-beijing.volces.com/api/v3/'}
+2025-10-24 20:17:33 | WARNING | runner.py:198 - No short term memory or session service provided, use an in-memory one instead.
+2025-10-24 20:17:33 | INFO | runner.py:217 - No long term memory provided.
+INFO:     Started server process [1330124]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+2025-10-24 20:18:35 | INFO | runner.py:250 - Run config: speech_config=None response_modalities=None save_input_blobs_as_artifacts=False support_cfc=False streaming_mode=<StreamingMode.NONE: None> output_audio_transcription=AudioTranscriptionConfig() input_audio_transcription=AudioTranscriptionConfig() realtime_input_config=None enable_affective_dialog=None proactivity=None session_resumption=None context_window_compression=None save_live_audio=False max_llm_calls=100
+2025-10-24 20:18:35 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app
+2025-10-24 20:18:38 | DEBUG | runner.py:280 - Function call: id='call_xbyfcvc86wc26mbxz39vst12' args={'region': 'cn-beijing', 'needNum': 10} name='describe_instances'
+2025-10-24 20:19:14 | DEBUG | runner.py:288 - Event output: 以下是您的ECS实例详情:
+1. **实例1**:
+    - **实例ID**:i-ye7irm2sqobw80cqxd40
+    - **创建时间**:2025-10-23T21:36:31+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+2. **实例2**:
+    - **实例ID**:i-ye7ipm0dtsqc6imh310d
+    - **创建时间**:2025-10-23T21:05:44+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvy72n46nmxzvafi
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+3. **实例3**:
+    - **实例ID**:i-ye7ilsbbpcbw80ca2ymj
+    - **创建时间**:2025-10-23T20:06:54+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+4. **实例4**:
+    - **实例ID**:i-ye7fg1hgqoxjd1utrfy3
+    - **创建时间**:2025-10-22T14:57:49+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+5. **实例5**:
+    - **实例ID**:i-ye5ejwoow0cva4fqydfc
+    - **创建时间**:2025-09-24T14:25:37+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+6. **实例6**:
+    - **实例ID**:i-ye5ejub08wbw80bpd7hr
+    - **创建时间**:2025-09-24T14:24:35+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+7. **实例7**:
+    - **实例ID**:i-ye5e5jyq68bw80c889i5
+    - **创建时间**:2025-09-24T10:44:54+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+8. **实例8**:
+    - **实例ID**:i-ye5c4jbx8gqc6ily6b30
+    - **创建时间**:2025-09-23T16:02:05+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese
+    - **镜像ID**:image-ye5907jc6ikhx1exow93
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+9. **实例9**:
+    - **实例ID**:i-ye5c4end34xjd1umbfns
+    - **创建时间**:2025-09-23T16:00:05+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvfxhokhx11pdmlv
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+10. **实例10**:
+    - **实例ID**:i-ye5blj0xdsxjd1tk1vfh
+    - **创建时间**:2025-09-23T11:09:46+08:00
+    - **计费方式**:PostPaid(按量计费)
+    - **实例规格**:ecs.e-c1m2.xlarge
+    - **CPU**:4核(核心数2,每核心线程数2)
+    - **内存**:8192MB
+    - **操作系统**:Debian 12 64 bit
+    - **镜像ID**:image-ydzwsvfxhokhx11pdmlv
+    - **状态**:RUNNING(运行中)
+    - **所属可用区**:cn - beijing - a
+
+以上10个实例均为按量计费,规格为ecs.e-c1m2.xlarge ,且大部分使用Windows Server 2022 Datacenter Edition 64 - bit Chinese操作系统,少数使用Debian 12 64 bit操作系统,目前状态均为运行中,所属可用区为cn - beijing - a 。若您还需要进一步分析或有其他操作需求,可继续向我提问。

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 323a283..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -.vitepress/cache -.vitepress/dist -package-lock.json -package.json diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js deleted file mode 100644 index c01fb76..0000000 --- a/docs/.vitepress/config.js +++ /dev/null @@ -1,574 +0,0 @@ -export default { - title: 'AgentKit', - description: 'Python SDK and CLI for building Agent applications on Volcengine', - base: '/', - - head: [ - ['link', { rel: 'icon', href: '/favicon.ico' }] - ], - - themeConfig: { - logo: '/logo.png', - - nav: [ - { text: '首页', link: '/' } - ], - - sidebar: { - '/content/1.introduction/': [ - { - text: '📖 概述', - collapsed: false, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - - '/content/2.agentkit-cli/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: false, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - - '/content/3.agentkit-sdk/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: false, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - - '/content/4.runtime/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: false, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - '/content/5.tools/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: false, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - '/content/6.memory/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: false, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - '/content/7.knowledge/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: false, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: true, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ], - '/content/8.mcp/': [ - { - text: '📖 概述', - collapsed: true, - items: [ - { text: 'AgentKit 概述', link: '/content/1.introduction/1.overview' }, - { text: '安装指南', link: '/content/1.introduction/2.installation' }, - { text: '快速开始', link: '/content/1.introduction/3.quickstart' }, - { text: '常见问题', link: '/content/1.introduction/4.troubleshooting' } - ] - }, - { - text: '⚡ CLI', - collapsed: true, - items: [ - { text: 'CLI 概览', link: '/content/2.agentkit-cli/1.overview' }, - { text: '命令详解', link: '/content/2.agentkit-cli/2.commands' }, - { text: '配置文件说明', link: '/content/2.agentkit-cli/3.configurations' } - ] - }, - { - text: '🔧 SDK', - collapsed: true, - items: [ - { text: 'SDK 概览', link: '/content/3.agentkit-sdk/1.overview' }, - { text: 'Anotation 使用指南', link: '/content/3.agentkit-sdk/2.annotation' } - ] - }, - { - text: '🚀 Runtime', - collapsed: true, - items: [ - { text: 'Runtime 概览', link: '/content/4.runtime/1.overview' } - ] - }, - { - text: '🛠️ Tools', - collapsed: true, - items: [ - { text: 'Tools 快速开始', link: '/content/5.tools/1.sandbox_quickstart' } - ] - }, - { - text: '💾 Memory', - collapsed: true, - items: [ - { text: 'Memory 快速开始', link: '/content/6.memory/1.memory_quickstart' } - ] - }, - { - text: '📚 Knowledge', - collapsed: true, - items: [ - { text: 'Knowledge 快速开始', link: '/content/7.knowledge/1.knowledge_quickstart' } - ] - }, - { - text: '🔌 MCP', - collapsed: false, - items: [ - { text: 'MCP 概览', link: '/content/8.mcp/1.overview' }, - { text: 'MCP 快速开始', link: '/content/8.mcp/2.mcp_quickstart' } - ] - } - ] - }, - - socialLinks: [ - { icon: 'github', link: 'https://github.com/volcengine/agentkit-sdk-python' } - ], - - footer: { - message: 'Released under the Apache-2.0 License.', - copyright: 'Copyright © 2025 Volcengine' - }, - - search: { - provider: 'local' - }, - - outline: { - level: [2, 3], - label: '目录' - }, - - docFooter: { - prev: '上一页', - next: '下一页' - }, - - lastUpdated: { - text: '最后更新于', - formatOptions: { - dateStyle: 'short', - timeStyle: 'medium' - } - } - } -} \ No newline at end of file diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 506b964..0000000 --- a/docs/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# AgentKit 文档 - -本目录包含 AgentKit SDK 和 CLI 的完整文档。 - -## 本地开发 - -### 安装依赖 - -```bash -npm install -``` - -### 启动开发服务器 - -```bash -npm run docs:dev -``` - -访问 http://localhost:5173 查看文档站点。 - -### 构建生产版本 - -```bash -npm run docs:build -``` - -构建结果位于 `.vitepress/dist` 目录。 - -### 预览生产版本 - -```bash -npm run docs:preview -``` - -## 目录结构 - -``` -docs/ -├── .vitepress/ # VitePress 配置 -│ └── config.js # 站点配置文件 -├── content/ # 文档内容 -│ ├── 1.introduction/ # 入门指南 -│ ├── 2.agentkit-sdk/ # SDK 文档 -│ └── 3.agentkit-cli/ # CLI 文档 -├── public/ # 静态资源 -│ └── images/ # 图片文件 -├── index.md # 首页 -└── package.json # 项目配置 -``` - -## 文档规范 - -- 所有 Markdown 文件使用中文编写 -- 代码示例使用英文注释 -- 图片存放在 `public/images/` 目录 -- 使用相对路径引用图片:`![描述](../../public/images/xxx.png)` diff --git a/docs/config_non_interactive.md b/docs/config_non_interactive.md deleted file mode 100644 index 86c204c..0000000 --- a/docs/config_non_interactive.md +++ /dev/null @@ -1,326 +0,0 @@ -# AgentKit 非交互式配置指南 - -## 概述 - -AgentKit 现在支持三种配置模式: -- **交互式模式**:通过问答式界面逐步配置(默认) -- **非交互式模式**:通过命令行参数直接配置 -- **混合模式**:部分参数通过命令行指定,其他交互式输入 - -## 使用场景 - -### 交互式模式(适合首次配置) - -```bash -# 无参数运行,进入交互式配置向导 -agentkit config -``` - -### 非交互式模式(适合脚本化/自动化) - -#### 1. 完整配置示例 - -```bash -# 配置 Cloud 部署模式 -agentkit config \ - --agent_name myAgent \ - --entry_point agent.py \ - --dependencies_file requirements.txt \ - --launch_type cloud \ - --region cn-beijing \ - --tos_bucket agentkit \ - --image_tag 0.0.1 \ - --runtime_envs VOLCENGINE_ACCESS_KEY=xxxxx-key \ - --runtime_envs VOLCENGINE_SECRET_KEY=xxxxx-key \ - --runtime_envs AGENTKIT_TOOL_ID=xxxxx-id -``` - -#### 2. 增量更新(只修改部分配置) - -```bash -# 只修改入口文件 -agentkit config --entry_point new_agent.py - -# 只添加/更新环境变量 -agentkit config \ - --runtime_envs NEW_KEY=new_value \ - --runtime_envs ANOTHER_KEY=another_value - -# 修改多个配置项 -agentkit config \ - --entry_point agent.py \ - --description "Updated description" \ - --image_tag 0.0.2 -``` - -#### 3. 配置预览(Dry-run) - -```bash -# 预览配置变更但不保存 -agentkit config --entry_point agent.py --dry-run -``` - -### 混合模式 - -```bash -# 部分参数通过命令行指定,其他交互式输入 -agentkit config --agent_name myAgent --interactive -``` - -### 查看当前配置 - -```bash -# 显示当前配置 -agentkit config --show -``` - -## 参数说明 - -### 通用配置参数(CommonConfig) - -| 参数 | 说明 | 示例 | -|------|------|------| -| `--agent_name` | Agent应用名称 | `myAgent` | -| `--entry_point` | 入口文件 | `agent.py` | -| `--description` | 应用描述 | `"My AI Agent"` | -| `--python_version` | Python版本 | `3.12` | -| `--dependencies_file` | 依赖文件 | `requirements.txt` | -| `--launch_type` | 部署模式 | `local`, `hybrid`, `cloud` | - -### Workflow 配置参数 - -#### 环境变量配置(重要改进 ⭐) - -AgentKit 现在支持两级环境变量配置: - -| 参数 | 级别 | 说明 | 使用场景 | -|------|------|------|----------| -| `--runtime_envs` / `-e` | **应用级** | 所有部署模式共享的环境变量 | API密钥、模型端点等跨环境配置 | -| `--workflow-runtime-envs` | **Workflow级** | 仅当前部署模式使用的环境变量 | 调试标志、特定环境配置等 | - -**使用示例**: - -```bash -# 应用级环境变量(local/hybrid/cloud 都会使用) -agentkit config \ - -e API_KEY=my-api-key \ - -e MODEL_ENDPOINT=https://api.example.com - -# Workflow 级环境变量(仅当前 launch_type 使用) -agentkit config \ - --workflow-runtime-envs DEBUG=true \ - --workflow-runtime-envs LOCAL_CACHE=/tmp/cache - -# 混合使用 -agentkit config \ - -e API_KEY=shared-key \ - --workflow-runtime-envs DEBUG=true -``` - -**配置合并规则**: -- 应用级环境变量会被所有 workflow 继承 -- Workflow 级环境变量只在当前模式下生效 -- 同名变量:Workflow 级会覆盖应用级 - -#### Cloud/Hybrid 模式参数 - -| 参数 | 说明 | 示例 | -|------|------|------| -| `--region` | 区域 | `cn-beijing` | -| `--tos_bucket` | TOS存储桶 | `agentkit` | -| `--image_tag` | 镜像标签 | `0.0.1` | -| `--ve_cr_instance_name` | 火山引擎 CR 实例名称 | `my-instance` | -| `--ve_cr_namespace_name` | 火山引擎 CR 命名空间 | `my-namespace` | -| `--ve_cr_repo_name` | 火山引擎 CR 仓库名称 | `my-repo` | - -### 控制参数 - -| 参数 | 说明 | -|------|------| -| `--config` / `-c` | 指定配置文件路径 | -| `--interactive` / `-i` | 强制交互式模式 | -| `--dry-run` | 预览模式(不保存) | -| `--show` / `-s` | 显示当前配置 | - -## 高级用法 - -### 1. 指定配置文件路径 - -```bash -agentkit config --config /path/to/custom/agentkit.yaml --entry_point agent.py -``` - -### 2. 环境变量最佳实践 - -```bash -# 应用级配置:API密钥等跨环境共享的配置 -agentkit config \ - -e VOLCENGINE_ACCESS_KEY=xxxxx \ - -e VOLCENGINE_SECRET_KEY=xxxxx \ - -e MODEL_ENDPOINT=https://api.example.com - -# 开发环境:添加调试配置 -agentkit config \ - --launch_type local \ - --workflow-runtime-envs DEBUG=true \ - --workflow-runtime-envs LOG_LEVEL=debug - -# 生产环境:使用生产级配置 -agentkit config \ - --launch_type cloud \ - --workflow-runtime-envs LOG_LEVEL=info \ - --workflow-runtime-envs ENABLE_MONITORING=true -``` - -**优势**:API密钥只需配置一次(应用级),不同环境的特定配置分别管理 - -### 3. 配合其他命令使用 - -```bash -# 配置后立即构建 -agentkit config --entry_point agent.py && agentkit build - -# 在脚本中使用 -#!/bin/bash -agentkit config \ - --agent_name myAgent \ - --entry_point agent.py \ - --launch_type local - -if [ $? -eq 0 ]; then - echo "配置成功" - agentkit launch -fi -``` - -## 配置验证 - -非交互式配置会自动进行验证: - -- ✅ **必填项检查**:确保必填字段不为空 -- ✅ **格式验证**:验证字段格式(如 entry_point 必须是 .py 文件) -- ✅ **选项约束**:确保选择值在允许范围内(如 launch_type) - -如果验证失败,会显示详细的错误信息并退出。 - -## 配置变更显示 - -非交互式配置会清晰显示配置变更: - -``` -通用配置 - 变更项: -┌───────────────────┬─────────────────┬─────────────────┐ -│ 配置项 │ 原值 │ 新值 │ -├───────────────────┼─────────────────┼─────────────────┤ -│ entry_point │ old_agent.py │ new_agent.py │ -│ image_tag │ 0.0.1 │ 0.0.2 │ -└───────────────────┴─────────────────┴─────────────────┘ - -✅ 配置更新完成! -配置文件: /path/to/agentkit.yaml -``` - -## 最佳实践 - -1. **首次配置使用交互式模式**:更友好的引导体验 - ```bash - agentkit config - ``` - -2. **日常修改使用非交互式模式**:快速高效 - ```bash - agentkit config --entry_point new_agent.py - ``` - -3. **CI/CD 环境使用非交互式模式**:完全自动化 - ```bash - agentkit config \ - --agent_name ${CI_PROJECT_NAME} \ - --entry_point agent.py \ - --image_tag ${CI_COMMIT_TAG} - ``` - -4. **修改前先预览**:避免错误 - ```bash - agentkit config --entry_point agent.py --dry-run - ``` - -5. **查看当前配置**:确认状态 - ```bash - agentkit config --show - ``` - -## 常见问题 - -### Q: 如何知道需要配置哪些参数? - -A: 使用 `agentkit config --help` 查看所有可用参数及其说明。 - -### Q: 环境变量会覆盖还是合并? - -A: 环境变量会**合并**到现有配置中。如果键名相同,新值会覆盖旧值。 - -### Q: 如何重置配置? - -A: 删除 `agentkit.yaml` 文件,然后重新运行 `agentkit config`。 - -### Q: 非交互式模式会验证配置吗? - -A: 是的,所有配置都会经过验证,包括必填项检查和格式验证。 - -## 示例脚本 - -### 批量配置多个环境 - -```bash -#!/bin/bash - -# 开发环境 -agentkit config \ - --config dev/agentkit.yaml \ - --agent_name myAgent-dev \ - --image_tag dev \ - --runtime_envs ENV=development - -# 测试环境 -agentkit config \ - --config test/agentkit.yaml \ - --agent_name myAgent-test \ - --image_tag test \ - --runtime_envs ENV=testing - -# 生产环境 -agentkit config \ - --config prod/agentkit.yaml \ - --agent_name myAgent-prod \ - --image_tag v1.0.0 \ - --runtime_envs ENV=production -``` - -### CI/CD 集成示例 - -```yaml -# .github/workflows/deploy.yml -- name: Configure AgentKit - run: | - agentkit config \ - --agent_name ${{ github.repository }} \ - --entry_point agent.py \ - --launch_type cloud \ - --image_tag ${{ github.sha }} \ - --runtime_envs DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - -- name: Build and Deploy - run: | - agentkit launch -``` - -## 总结 - -非交互式配置让 AgentKit 更适合: -- ✅ 自动化脚本 -- ✅ CI/CD 流水线 -- ✅ 快速配置修改 -- ✅ 批量配置管理 - -同时保持了交互式模式的友好体验,适合不同的使用场景。 diff --git a/docs/content/1.introduction/1.overview.md b/docs/content/1.introduction/1.overview.md deleted file mode 100644 index 00b66a8..0000000 --- a/docs/content/1.introduction/1.overview.md +++ /dev/null @@ -1,39 +0,0 @@ -# AgentKit - -## 什么是 AgentKit? - -AgentKit是火山引擎为AI Agent构建、部署、运行提供支持的开发工具平台,帮助开发者和企业降低 Agent 开发门槛,为Agent 提供模型之外的安全、内置工具、记忆、知识、监控、评测等基础设施,助力企业高效构建、部署、运维复杂智能的企业级Agent。平台也包含一个Python SDK和Starter Toolkit,来帮助开发者通过SDK/CLI来构建、部署、发布和管理Agent应用。 - -## AgentKit Platform - -AgentKit Platform 为 Agent 应用提供: - -- **Runtime 环境**:提供隔离的运行环境,支持容器化部署 -- **基础设施服务**: - - Memory(记忆管理) - - Knowledge(知识库) - - Identity(身份认证) - - Gateway(MCP 工具聚合与路由) - -通过 AgentKit Platform,开发者无需关心底层基础设施,可以专注于 Agent 业务逻辑的开发。 - -## AgentKit SDK - -AgentKit SDK 是一个Python开发工具包,内置了对AgentKit Platform的所有服务的客户端,开发者可以通过SDK来调用Platform的所有服务。 - -## AgentKit CLI - -AgentKit CLI 是一个命令行工具,用于简化 Agent 应用的全生命周期管理,包括初始化、配置、构建、部署和运维。 - -### 主要命令 - -| 命令 | 功能 | 说明 | -|------|------|------| -| `agentkit init` | 初始化项目 | 创建 Agent 应用模板,支持多种框架 | -| `agentkit config` | 配置项目 | 交互式配置部署和运行参数 | -| `agentkit build` | 构建镜像 | 构建符合标准的 Docker 镜像 | -| `agentkit deploy` | 部署应用 | 将镜像部署到 Platform Runtime | -| `agentkit launch` | 一键部署 | build + deploy 的组合命令 | -| `agentkit invoke` | 调用应用 | 向已部署的 Agent 发送请求 | -| `agentkit status` | 查看状态 | 查看 Runtime 运行状态 | -| `agentkit destroy` | 销毁资源 | 释放 Runtime 实例和相关资源 | diff --git a/docs/content/1.introduction/2.installation.md b/docs/content/1.introduction/2.installation.md deleted file mode 100644 index 7286d97..0000000 --- a/docs/content/1.introduction/2.installation.md +++ /dev/null @@ -1,58 +0,0 @@ -# 安装 AgentKit SDK - -## 系统要求 - -- Python 3.12+ -- pip 或其他包管理工具 - -## pip 安装 - -### 从内部源安装(由于官方源还在走上架流程,临时使用内部源) - -最新开发版本 -```bash -pip install --pre -U agentkit-sdk-python --index-url https://artifacts-cn-beijing.volces.com/repository/agentkit/simple/ --extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --trusted-host mirrors.tuna.tsinghua.edu.cn -``` -最新稳定版本 -```bash -pip install -U agentkit-sdk-python --index-url https://artifacts-cn-beijing.volces.com/repository/agentkit/simple/ --extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --trusted-host mirrors.tuna.tsinghua.edu.cn -``` - -> **说明**:内部源更新频率较高,可获取最新开发版本。 - -### 从官方源安装(由于安全问题暂时下架) - -```bash -pip install -U agentkit-sdk-python --index-url https://pypi.org/simple -``` - -> **说明**:由于安全问题,官方源暂时下架。 - -## 源码安装 - -适用于需要修改源码或参与开发的场景: -### 从内部Codebase仓库clone - -```bash -git clone git@code.byted.org:iaasng/agentkit-sdk-python.git -cd agentkit-sdk-python -pip install -e . -``` - -### 从官方GitHub仓库clone(官方Github仓库还在走申请流程,暂不开放) - -```bash -git clone git@github.com:volcengine/agentkit-sdk-python.git -cd agentkit-sdk-python -pip install -e . -``` - -## 验证安装 - -安装完成后,验证 CLI 工具是否可用: - -```bash -agentkit --version -``` - -如果成功显示版本号,说明安装完成。 diff --git a/docs/content/1.introduction/3.quickstart.md b/docs/content/1.introduction/3.quickstart.md deleted file mode 100644 index 0cb1a43..0000000 --- a/docs/content/1.introduction/3.quickstart.md +++ /dev/null @@ -1,501 +0,0 @@ -# 快速开始 - -使用AgentKit CLI 构建您的第一个智能体,并在云上部署运行。 - -## 前置准备 -首先请参考 [安装指南](/content/1.introduction/2.installation.md),完成SDK安装。 - -### 1. 火山引擎账号AK/SK(必选) - -登录[火山引擎官网](https://www.volcengine.com/),注册账号并开通 AgentKit 服务。 - -在「访问控制」页面获取 AK/SK - -设置环境变量: - -```bash -export VOLCENGINE_ACCESS_KEY= -export VOLCENGINE_SECRET_KEY= -``` - -### 2. 方舟模型 API Key(可选) -首先确保已经开通方舟模型服务,并获取了 API Key。如果您还没有开通方舟模型服务,请申请开通[火山方舟平台](https://console.volcengine.com/ark/region:ark+cn-beijing/overview)。 - -**获取推理接入点**: - -点击「在线推理」→ 用户可以从「预置推理接入点」选择已有模型接入点,也可以点击「自定义推理接入点」创建新的模型接入点: - -![推理接入点](../../public/images/select_or_create_model_endpoint.jpg) - -**获取API Key**: - -点击「API Key 管理」→ 用户可以从「API Key管理」列表选择已有 API Key,也可以点击「创建 API Key」创建新的 API Key: - -![API Key管理](../../public/images/model_apikey.jpg) - -记录好接入点ID 如`ep-20250520174054-xxxxx`(也可以是模型ID如 `deepseek-v3-1-terminus`)和 API Key,稍后配置Agent应用内部Runtime的环境变量 `MODEL_AGENT_NAME`和`MODEL_AGENT_API_KEY`时使用(如果不指定,AgentKit Platform 会自动为您获取一个凭证,VeADK会默认内置`doubao-seed-1-6`模型)。 - -## 开始使用 -### 步骤 1: 安装 AgentKit SDK -参考[安装 AgentKit SDK](./2.installation.md) - -### 步骤 2:创建项目 - -创建项目目录并初始化 Agent 应用: - -```bash -mkdir simple-agent && cd simple-agent -agentkit init -``` - -执行后会显示可用模板列表,选择模板 `1` (Basic Agent App): - -``` -(agentkit) test@localhost:~/workspace$ agentkit init - - ___ __ __ __ _ __ - / | ____ ____ ____ / /_/ //_/(_) /_ - / /| |/ __ `/ _ \/ __ \/ __/ ,< / / __/ - / ___ / /_/ / __/ / / / /_/ /| |/ / /_ -/_/ |_\__, /\___/_/ /_/\__/_/ |_/_/\__/ - /____/ - ✨ Build AI Agents with Ease ✨ - - Available Templates -┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ -┃ ID ┃ Name ┃ Type ┃ Language ┃ Description ┃ -┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ -│ 1 │ Basic Agent App │ Basic App │ Python │ 最简单的Agent应用,快速上手 │ -│ 2 │ Basic Stream Agent App │ Stream App │ Python │ 支持流式输出的Agent应用 │ -└────────┴───────────────────────────┴─────────────────┴─────────────────┴─────────────────────────────┘ - -Please select a template by entering the ID (1-2): -Template ID: 1 -Selected: Basic Agent App -Creating project: simple_agent -Using template: Basic Agent App - -✨ Project initialized successfully! -Template: Basic Agent App -Entry point: simple_agent.py -Language: Python 3.12 - -Created files: - ✓ simple_agent.py - ✓ requirements.txt - ✓ agentkit.yaml - ✓ .dockerignore - -Next steps: - 1. Review and modify the generated files - 2. Use agentkit config to configure your agent - 3. Use agentkit launch to build and deploy -``` - -会生成以下文件: -- `simple_agent.py` - Agent 应用入口文件 -- `requirements.txt` - Python 依赖 -- `agentkit.yaml` - 配置文件 - -### 步骤 3:配置项目(可选) - -使用交互式配置向导设置部署参数,配置文件会保存到 `agentkit.yaml` 中(也可以直接使用默认生成的配置文件): - -```bash -agentkit config -``` - -配置向导会引导您完成以下设置: - -**通用配置**(按 回车 使用默认值): -- **1.应用名称**:Agent 应用名称(模板1,默认值为 `simple_agent`,如接纳直接回车即可(下同)) -- **2.入口文件**:应用入口文件(模板1,默认值为 `simple_agent.py`) -- **3.应用描述**:应用描述信息(可选) -- **4.Python 版本**:默认 3.12 -- **5.依赖文件**:默认 `requirements.txt` -- **6.Agent应用内部Runtime常用环境变量**: - - `MODEL_AGENT_NAME`:方舟模型接入点 ID(可选) - - `MODEL_AGENT_API_KEY`:方舟模型 API Key(可选) -- **7.部署模式**:选择 `cloud`(云端构建和部署) - -**云端部署配置**: -- **1.服务区域**:默认 `cn-beijing` -- **2.镜像标签**:默认 `latest` -- **3.CR 镜像仓库**:CLI 会自动生成CR实例名称、CR命名空间和CR仓库名,用户也可手动指定(建议自动即可) - -``` -(agentkit) test@localhost:~/workspace$ agentkit config -╔══════════════════════════════════════ ⚙️ 基础配置 ══════════════════════════════════════╗ -║ ║ -║ ℹ️ 欢迎使用 AgentKit 配置向导 ║ -║ 本向导将帮助您完成Agent应用配置,请根据提示输入相关信息,或直接按Enter键使用默认值。 ║ -║ ║ -║ 您可以随时按 Ctrl+C 退出配置。 ║ -║ ║ -║ ║ -╚════════════════════════════════════════════════════════════════════════════════════════╝ - - -[1/8] 🤖 Agent application name(当前值:simple_agent): -✅ 已输入: simple_agent - - -[2/8] 📝 Agent application entry file (path allowed), e.g. simple_agent.py(当前值:simple_agent.py): -✅ 已输入: simple_agent.py - - -[3/8] 📄 Application description(当前值:AgentKit project simple_agent - Basic Agent App): -✅ 已输入: AgentKit project simple_agent - Basic Agent App - - -[4/8] ✏️ Agent application Language, defaults to Python -╭───────────────────────────╮ -│ 1. Python - Python (当前) │ -╰───────────────────────────╯ - -请选择 (输入编号或名称): - -✅ 使用当前默认值: Python - - -[5/8] 🐍 Agent application Language version [可选: 3.10, 3.11, 3.12, 3.13](当前值:3.12): -✅ 已输入: 3.12 - - -[6/8] 📦 Agent application Dependencies file(当前值:requirements.txt): -✅ 已输入: requirements.txt - - -[7/8] 🔐 Application-level runtime environment variables (shared across all deployment modes) -常用环境变量: - - MODEL_AGENT_API_KEY=your_api_key - - DEBUG=true - - LOG_LEVEL=info -输入格式: KEY=VALUE -命令: 'del KEY' 删除, 'list' 查看, 'clear' 清空所有, 空行结束 - - -[7/8] 🔐 变量: MODEL_AGENT_API_KEY=3848xxxx-xxx-xxxx-xxxx-xxxxxaeb5c -已添加: MODEL_AGENT_API_KEY=3848xxxx-xxx-xxxx-xxxx-xxxxxaeb5c - -[7/8] 🔐 变量: - -📋 共配置 1 个变量 - - -[8/8] 🚀 Deployment and runtime mode, defaults to local (local build and deploy), optional hybrid (local build, cloud deploy) -╭───────────────────────────────────────────────────────────────────────────────────╮ -│ 1. local - Local build and deploy │ -│ 2. hybrid - Local build, cloud deploy │ -│ 3. cloud - Cloud build and deploy base on Volcano Engine Agentkit Platform (当前) │ -╰───────────────────────────────────────────────────────────────────────────────────╯ - -请选择 (输入编号或名称): cloud - -✅ 已选择: cloud - - - -╭────────────────────────────────────────────────────────────────────────────────── ✅ 配置完成 ──────────────────────────────────────────────────────────────────────────────────╮ -│ │ -│ ╭────────────────────────────────┬──────────────────────────────────────────────────────╮ │ -│ │ 配置项 │ 值 │ │ -│ ├────────────────────────────────┼──────────────────────────────────────────────────────┤ │ -│ │ 应用名称 │ simple_agent │ │ -│ │ 入口文件 │ simple_agent.py │ │ -│ │ 应用描述 │ AgentKit project simple_agent - Basic Agent App │ │ -│ │ 语言 │ Python │ │ -│ │ 语言版本 │ 3.12 │ │ -│ │ 依赖文件 │ requirements.txt │ │ -│ │ Runtime Envs │ {'MODEL_AGENT_API_KEY': │ │ -│ │ │ '3848xxxx-xxx-xxxx-xxxx-xxxxxaeb5c'} │ │ -│ │ 部署模式 │ cloud │ │ -│ ╰────────────────────────────────┴──────────────────────────────────────────────────────╯ │ -│ │ -╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - -✅ 太棒了!通用配置已完成! - -ℹ️ 下面将开始针对您选择的部署模式进行配置。 - -╔══════════════════════════════════════════════ ⚙️ 云构建与部署配置 ═══════════════════════════════════════════════╗ -║ ║ -║ ℹ️ 欢迎使用 AgentKit 云构建与部署模式 配置向导 ║ -║ 本向导将帮助您完成云构建与部署模式下应用部署运行相关配置,请根据提示输入相关信息,或直接按Enter键使用默认值。 ║ -║ ║ -║ 您可以随时按 Ctrl+C 退出配置。 ║ -║ ║ -║ ║ -╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ - - -[1/4] 🌏 服务使用的区域 -╭───────────────────────────────────╮ -│ 1. cn-beijing - 华北2-北京 (当前) │ -╰───────────────────────────────────╯ - -请选择 (输入编号或名称): - -✅ 使用当前默认值: cn-beijing - - -[2/4] 📦 CR实例名称(当前值:agentkit-cli-{{account_id}}, 花括号内容为动态渲染的占位符,无需手动填写): -✅ 已输入: agentkit-cli-{{account_id}} - - -[3/4] 📁 CR命名空间(当前值:agentkit): -✅ 已输入: agentkit - - -[4/4] 📋 CR仓库名称,默认使用AgentKit项目名(当前值:simple_agent): myapp -✅ 已输入: myapp - - - -╭────────────────────────────────────────────────────────────────────────────────── ✅ 配置完成 ──────────────────────────────────────────────────────────────────────────────────╮ -│ │ -│ ╭────────────────────────────────┬──────────────────────────────────────────────────────╮ │ -│ │ 配置项 │ 值 │ │ -│ ├────────────────────────────────┼──────────────────────────────────────────────────────┤ │ -│ │ Region │ cn-beijing │ │ -│ │ Cr Instance Name │ agentkit-cli-{{account_id}} │ │ -│ │ Cr Namespace Name │ agentkit │ │ -│ │ Cr Repo Name │ myapp │ │ -│ ╰────────────────────────────────┴──────────────────────────────────────────────────────╯ │ -│ │ -╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - -✅ 太棒了!部署运行配置已完成! - -ℹ️ 可以使用agentkit launch命令一键启动应用了! - -✅ 配置完成! -``` - -配置完成后会生成 `agentkit.yaml` 配置文件: - -```yaml -common: - agent_name: simple_agent - entry_point: simple_agent.py - description: AgentKit project simple_agent - Basic Agent App - language: Python - language_version: '3.12' - agent_type: Basic App - dependencies_file: requirements.txt - runtime_envs: - MODEL_AGENT_API_KEY: 3848xxxx-xxxx-xxxx-xxxx-xxxxx3aeb5c - launch_type: cloud -launch_types: - cloud: - region: cn-beijing - tos_bucket: agentkit-cli-{{account_id}} - tos_prefix: agentkit-builds - tos_region: cn-beijing - tos_object_key: '' - tos_object_url: '' - image_tag: '{{timestamp}}' - cr_instance_name: agentkit-cli-{{account_id}} - cr_namespace_name: agentkit - cr_repo_name: myapp - cr_region: cn-beijing - cr_image_full_url: '' - build_timeout: 3600 - cp_workspace_name: agentkit-cli-workspace - cp_pipeline_name: Auto - cp_pipeline_id: '' - runtime_id: Auto - runtime_name: Auto - runtime_role_name: Auto - runtime_apikey: Auto - runtime_apikey_name: Auto - runtime_endpoint: '' - runtime_envs: {} - build_timestamp: '' - deploy_timestamp: '' -docker_build: {} -``` - -### 步骤 4:构建和部署 - -执行一键部署命令,将应用构建并部署到 AgentKit Platform: - -```bash -agentkit launch -``` - -该命令会自动完成以下步骤: -1. 渲染 Dockerfile -2. 创建项目压缩包并上传到 TOS -3. 准备 CR(容器镜像仓库)资源 -4. 创建 Pipeline 并执行构建 -5. 部署到 Runtime 环境 - -部署过程会显示: -```bash -(agentkit) test@localhost:~/workspace$ agentkit launch -Launching agent... -▶ 开始构建Agent镜像 -开始云构建流程... -1/6 渲染Dockerfile... -✓ Using existing Dockerfile -Current file is up-to-date -2/6 创建项目压缩包... -✅ 项目压缩包已创建: /tmp/tmp257pmig8/simple_agent_20251120_17xxxx_4cxxxxxx.tar.gz -3/6 上传到TOS... -检查TOS存储桶是否存在: agentkit-cli-21076xxxxx -✅ TOS存储桶存在: agentkit-cli-21076xxxxx -已上传到TOS: https://agentkit-cli-21076xxxxx.tos-cn-beijing.volces.com/agentkit-builds/simple_agent_20251120_17xxxx_4cxxxxxx.tar.gz, bucket: agentkit-cli-21076xxxxx -4/6 准备CR资源... -正在确保CR资源存在... -✅ CR实例已存在且运行中: agentkit-cli-21076xxxxx -✅ CR命名空间已存在: agentkit -✅ CR仓库已存在或创建成功: myapp -正在确保CR公网访问... -✅ CR资源准备完成 - 实例: agentkit-cli-21076xxxxx - 命名空间: agentkit - 仓库: myapp -5/6 准备Pipeline资源... -✅ 使用工作区: agentkit-cli-workspace -⚠️ 配置的Pipeline名称不存在,将创建新的Pipeline -创建新的Pipeline: simple_agent-ml7d1s5e -✅ 创建Pipeline成功: simple_agent-ml7d1s5e (ID: 06de7a5abxxxxxab1a8xxxxxa1788ff) -6/6 执行构建... -✅ Pipeline触发成功,运行ID: a147d38cxxxx0cba4xxxxa4cxxxx4a0 -等待构建完成... -✅ Pipeline运行完成! - 构建状态: Succeeded ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:59 -✅ 构建完成: agentkit-cli-21076xxxxx-cn-beijing.cr.volces.com/agentkit/myapp:2025112017xxxx -100% ▶ 构建完成 -▶ 开始部署Agent -✅ 生成角色名称: AgentKit-Runtime-Default-ServiceRole-n6dqrji -✅ 生成API密钥名称: API-KEY-m1azdr4m -正在创建Runtime: simple_agent-ml7d1s5e -✅ 创建Runtime成功: r-ye9j62wydcntl8dnhsoa, request_id: 20251120xxxxxxxxxxxxxxx5344 -等待Runtime状态为Ready... -💡 提示:Runtime初始化中,请耐心等待,不要中断进程 -✅ Runtime状态为Ready - Runtime状态: Releasing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:23 -Endpoint: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com -100% ▶ 部署完成 -✅ Successfully launched agent: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com -Built image: agentkit-cli-21076xxxxx-cn-beijing.cr.volces.com/agentkit/myapp:2025112017xxxx -Endpoint: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com -``` - -> **提示**:首次部署大约需要 2-3 分钟,请耐心等待。 - -## 使用 Agent - -### 调用 Agent - -使用 `invoke` 命令测试 Agent: - -```bash -agentkit invoke "推荐五个杭州必去景点和小吃?" -``` - -输出示例: -```bash -Invoking agent... -Using default headers: {'user_id': 'agentkit_user', 'session_id': 'agentkit_sample_session'} -✅ Invocation successful -📝 Response: -杭州作为“人间天堂”,既有山水之胜,又有文化之韵,还有地道的杭帮美食。以下是**5个必去景点**和**5种必尝小吃**推荐,涵盖自然、人文与风味,带你深度感受杭州魅力: - - -### **一、5个必去景点** -#### 1. **西湖(核心景区)** -**推荐理由**:杭州的灵魂所在,世界文化遗产,“三面云山一面城”的格局藏着无数诗意。 -- **必逛亮点**:乘船游湖看“三潭印月”(人民币1元纸币背景),漫步断桥残雪(冬雪时尤美)、苏堤春晓(春季桃花盛开),登雷峰塔俯瞰全景,傍晚在湖滨步行街赏音乐喷泉。 -- **Tips**:西湖免费开放,部分景点(如雷峰塔、三潭印月需乘船)收费,建议安排半天至一天,骑行环湖更惬意。 - -#### 2. **灵隐寺(飞来峰景区)** -**推荐理由**:中国佛教禅宗十大古刹之一,千年香火与石窟艺术的结合。 -- **必逛亮点**:寺内“云林禅寺”匾额为康熙御笔,大雄宝殿庄严恢弘;山门外的**飞来峰**有五代至宋代的摩崖石刻(布袋和尚、观音像等),石窟艺术价值极高。 -- **Tips**:需先买飞来峰门票(45元),再购灵隐寺香火券(30元),建议清晨前往,避开人流,感受古刹宁静。 - -#### 3. **西溪国家湿地公园** -**推荐理由**:城市中的天然氧吧,《非诚勿扰》取景地,“一曲溪流一曲烟”的江南湿地典范。 -- **必逛亮点**:乘摇橹船穿行芦苇荡,看“河渚街”的水乡市集,秋天赏柿子林,冬日观芦花飞雪。核心景区“烟水渔庄”“深潭口”生态极佳,适合慢游。 -- **Tips**:建议选“电瓶船+步行”组合游览,节省体力,门票80元(含电瓶船),四季皆宜。 - -#### 4. **宋城(含《宋城千古情》演出)** -**推荐理由**:沉浸式宋代文化主题公园,一秒穿越回“清明上河图”的繁华。 -- -**必逛亮点**:园区复原宋代市井街景,可体验古装换装、皮影戏、活字印刷;**《宋城千古情》**(300元起)是“一生必看的演出”,用灯光、舞美重现良渚文化、岳飞抗金、梁祝等杭州历史,震撼力极 -强。 -- **Tips**:演出分场次,建议提前订票,选下午或晚上场次,搭配夜游更有氛围。 - -#### 5. **千岛湖(淳安县)** -**推荐理由**:“天下第一秀水”,1078个岛屿星罗棋布,湖光山色堪比仙境。 -- **必逛亮点**:登**梅峰岛**俯瞰“千岛聚珠”全景,游**月光岛**(爱情主题岛屿),乘游船穿行于岛屿间,尝现捕的千岛湖鱼头(鲜美无比)。 -- **Tips**:距杭州市区约2小时车程,建议报一日游或自驾,选中心湖区(开发成熟,岛屿集中)。 - -### **二、5种必尝小吃/美食** -杭州小吃融合江南的细腻与本味,以“鲜、甜、嫩”为特色,以下5种不可错过: - -#### 1. **西湖醋鱼** -**特色**:杭帮菜“头牌”,选用西湖草鱼,鱼肉嫩白,糖醋汁酸甜平衡,带微蟹味(传统用草鱼,现多改良为鲈鱼更鲜嫩)。 -**推荐店铺**:楼外楼(西湖边老字号,贵但正宗)、知味观·味庄(性价比高,环境雅致)。 - -#### 2. **东坡肉** -**特色**:北宋苏东坡发明的“网红菜”,选用五花肉切方块,加黄酒慢炖,肉皮Q弹,肥肉入口即化,瘦肉香而不柴,配米饭绝了! -**推荐店铺**:外婆家(连锁,性价比之王,“外婆红烧肉”是改良版东坡肉)、知味观。 - -#### 3. **龙井虾仁** -**特色**:“茶与鲜”的完美融合,用明前龙井茶叶的清香,搭配鲜活河虾仁,虾仁洁白,茶叶翠绿,清淡鲜甜,不腻口。 -**推荐店铺**:楼外楼、杭州酒家(百年老店,杭帮菜经典)。 - -#### 4. **叫花鸡** -**特色**:传统古法菜,用荷叶包裹嫩鸡,外裹黄泥烤制,敲开泥壳后荷叶清香扑鼻,鸡肉嫩而多汁,带着草木香。 -**推荐店铺**:知味观(真空包装可带走)、河坊街“状元馆”(现做现卖,热乎吃更香)。 - -#### 5. **片儿川** -**特色**:杭州人最爱的“国民早餐面”,面汤用猪骨熬制,配料是“雪菜+笋片+瘦肉片”,雪菜鲜、笋片脆、肉片嫩,一碗下肚暖胃又满足。 -**推荐店铺**:奎元馆(百年面馆,“片儿川”鼻祖)、菊英面店(市井老店,本地人常去)。 - -### **小贴士** -- 景点可按“市区+周边”规划:西湖、灵隐寺、西溪湿地、宋城安排在市区2-3天,千岛湖单独1天。 -- 小吃可集中在**河坊街**(仿古商业街,聚集葱包桧、定胜糕等小吃)、**湖滨步行街**(老字号与新派餐厅都有)一站式打卡。 - -杭州的美,藏在山水、古刹、市井与烟火里,慢下来才能真正感受“江南忆,最忆是杭州”的韵味~ -``` - -### 查看状态 - -查看 Runtime 运行状态: - -```bash -agentkit status -``` - -输出示例: -```bash -✅ Runtime状态为Ready -{ - 'runtime_id': 'r-xxxxxxxxxxxxxxxxxx', - 'status': 'Ready', - 'endpoint': 'http://xxxxx.apigateway-cn-beijing.volceapi.com' -} -``` - -### 清理资源 - -销毁 Runtime 实例(谨慎操作): - -```bash -agentkit destroy -``` - -确认后会删除 Runtime 及相关资源。 - -## 下一步 - -恭喜!您已成功完成 Agent 应用的完整开发和部署流程。 - -接下来可以: -- 查看[SDK 文档](../2.agentkit-sdk/1.overview.md)了解更多功能 -- 探索其他应用模板(MCP、A2A 等) -- 集成 Memory、Knowledge 等 Platform 服务 diff --git a/docs/content/1.introduction/4.troubleshooting.md b/docs/content/1.introduction/4.troubleshooting.md deleted file mode 100644 index 5dda168..0000000 --- a/docs/content/1.introduction/4.troubleshooting.md +++ /dev/null @@ -1,153 +0,0 @@ -# 常见问题 - -本节列举了使用 AgentKit SDK 时的常见问题和解决方案。 - -## 安装问题 - -### 问题:pip 安装失败 - -**现象**:执行 `pip install` 时报错连接超时或包找不到。 - -**解决方案**: -1. 确认网络连接正常 -2. 使用内部源安装: - ```bash - pip install --pre -U agentkit-sdk-python --index-url https://artifacts-cn-beijing.volces.com/repository/agentkit/simple/ --extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --trusted-host mirrors.tuna.tsinghua.edu.cn - ``` -3. 检查 Python 版本是否为 3.12+ - -### 问题:CLI 命令不可用 - -**现象**:执行 `agentkit` 命令时提示 `command not found`。 - -**解决方案**: -1. 确认安装成功:`pip list | grep agentkit` -2. 检查 PATH 环境变量是否包含 pip 的 bin 目录 -3. 尝试重新安装:`pip install -U agentkit-sdk-python-inhouse-nightly` - -## 配置问题 - -### 问题:环境变量未生效 - -**现象**:提示无法连接到 AgentKit Platform 或认证失败。 - -**解决方案**: -1. 确认已设置必需的环境变量: - ```bash - echo $VOLCENGINE_ACCESS_KEY - echo $VOLCENGINE_SECRET_KEY - ``` -2. 确保没有多余的空格或引号 -3. 在当前 shell 会话中重新 export 环境变量 - -### 问题:配置文件格式错误 - -**现象**:执行 `agentkit launch` 时提示配置文件解析失败。 - -**解决方案**: -1. 检查 `agentkit.yaml` 格式是否正确(注意缩进) -2. 重新运行 `agentkit config` 生成配置 -3. 参考快速开始文档中的配置示例 - -## 部署问题 - -### 问题:CR 创建失败 - -**现象**: -``` -CreateRegistry: QuotaExceeded.Registry The quota of Registry is exceeded. -``` - -**解决方案**: -1. CR 实例数量超出配额限制 -2. 在 `agentkit config` 中配置为已有的 CR 实例名称 -3. 或联系管理员提高配额 - -### 问题:镜像构建失败 - -**现象**:Pipeline 构建失败,提示依赖安装错误。 - -**解决方案**: -1. 检查 `requirements.txt` 中的依赖是否正确 -2. 确认依赖版本是否兼容 Python 3.12 -3. 查看 Pipeline 日志获取详细错误信息 - -### 问题:Runtime 部署超时 - -**现象**:Runtime 长时间处于 `Releasing` 状态。 - -**解决方案**: -1. 首次部署通常需要 2-3 分钟,请耐心等待 -2. 使用 `agentkit status` 检查状态 -3. 如果超过 5 分钟仍未就绪,可能是资源不足,尝试 `agentkit destroy` 后重新部署 - -### 问题:Runtime 状态异常 - -**现象**:Runtime 状态为 `Failed` 或 `Error`。 - -**解决方案**: -1. 检查环境变量配置是否正确(特别是模型 API Key) -2. 查看 AgentKit Platform 控制台的日志 -3. 确认应用代码没有启动时错误 -4. 尝试使用 `agentkit destroy` 清理后重新部署 - -## 调用问题 - -### 问题:invoke 调用失败 - -**现象**:执行 `agentkit invoke` 时提示连接失败或超时。 - -**解决方案**: -1. 使用 `agentkit status` 确认 Runtime 状态为 `Ready` -2. 检查网络连接 -3. 确认 Endpoint 地址正确 -4. 检查防火墙或代理设置 - -### 问题:模型调用失败 - -**现象**:Agent 返回错误,提示模型访问失败。 - -**解决方案**: -1. 确认方舟模型 API Key 配置正确 -2. 检查接入点 ID 是否有效 -3. 确认模型配额是否用尽 -4. 登录方舟平台检查 API Key 权限 - -## 权限问题 - -### 问题:AK/SK 认证失败 - -**现象**:提示 `InvalidAccessKeyId` 或 `SignatureDoesNotMatch`。 - -**解决方案**: -1. 确认 AK/SK 正确且有效 -2. 检查是否有 AgentKit 服务的访问权限 -3. 确认 AK/SK 没有被禁用或过期 -4. 联系管理员分配相关权限 - -### 问题:资源访问被拒绝 - -**现象**:提示 `AccessDenied` 或权限不足。 - -**解决方案**: -1. 确认账号有相应资源的操作权限 -2. 检查 IAM 角色配置 -3. 联系管理员授予必要权限 - -## 获取帮助 - -如果以上方案无法解决您的问题,请: - -1. **查看日志**: - - 本地日志:检查命令行输出 - - Platform 日志:访问 AgentKit 控制台查看详细日志 - -2. **联系支持**: - - 提供详细的错误信息和日志 - - 说明复现步骤 - - 附上相关配置文件(注意脱敏) - -3. **查阅文档**: - - [SDK 文档](../3.agentkit-sdk/1.overview.md) - - [API 文档](链接待补充) - - 火山引擎官方文档 diff --git a/docs/content/2.agentkit-cli/1.overview.md b/docs/content/2.agentkit-cli/1.overview.md deleted file mode 100644 index b3d581e..0000000 --- a/docs/content/2.agentkit-cli/1.overview.md +++ /dev/null @@ -1,243 +0,0 @@ -# AgentKit CLI 概览 - -AgentKit CLI 是一个强大的命令行工具,让你能够快速开发和部署 AI Agent 应用。通过简单的命令,你可以完成从项目创建、本地调试到生产部署的完整流程。 - -## 核心功能 - -### 1. 项目初始化 - -一行命令创建 Agent 项目,内置 6 种开箱即用的模板: - -```bash -agentkit init -``` - -**可选模板**: -- **Basic App** - 最简单的Agent应用,快速上手 -- **Stream App** - 支持流式输出的Agent应用 - -### 2. 交互式配置 - -通过友好的交互式问答完成配置,无需手写配置文件: - -```bash -agentkit config -``` - -**配置项**: -- **基础信息** - Agent 名称、入口文件、描述 -- **Python 环境** - 版本选择和依赖管理 -- **部署方式** - 本地开发(local)、混合部署(hybrid)、云端部署(cloud) -- **环境变量** - API Key、模型配置等运行时参数 -- **高级选项** - 根据部署方式自动展示相关配置 - -### 3. 镜像构建 - -自动将你的 Agent 打包成 Docker 镜像: - -```bash -agentkit build -``` - -**构建方式**: -- **本地构建** - 在你的电脑上用 Docker 构建(适合开发调试) -- **云端构建** - 在火山引擎上自动构建(适合生产环境) - -### 4. 应用部署 - -将构建好的镜像部署到运行环境: - -```bash -agentkit deploy -``` - -**部署目标**: -- **本地容器** - 部署到你电脑的 Docker(方便快速测试) -- **云端平台** - 部署到火山引擎 AgentKit Runtime(生产级运行环境) - -### 5. 一键启动 - -构建 + 部署,一步到位: - -```bash -agentkit launch -``` - -相当于自动执行 `agentkit build` 和 `agentkit deploy`,适合快速迭代。 - -### 6. 应用调用 - -向已部署的 Agent 发送测试请求: - -```bash -# 直接发送消息 -agentkit invoke "今天天气如何?" - -# 自定义请求内容 -agentkit invoke --payload '{"prompt": "杭州天气?", "user_id": "test"}' -``` - -### 7. 状态查询 - -查看 Agent 是否在运行、运行地址等信息: - -```bash -agentkit status -``` - -### 8. 资源清理 - -停止并删除 Agent 实例,释放资源: - -```bash -agentkit destroy -``` - -## 三种部署模式 - -根据你的开发阶段和需求,选择合适的部署模式: - -### 🏠 Local 模式 - 本地开发 - -在你的电脑上构建和运行,适合快速开发调试。 - -**优势**: -- ⚡ 快速迭代,改完代码立即测试 -- 💻 完全离线工作,不依赖网络 -- 🎯 方便调试,直接查看日志 - -**流程**: -``` -Python 代码 → Docker 构建 → 本地容器运行 -``` - -### 🔀 Hybrid 模式 - 混合部署 - -本地构建,云端运行。既保留本地控制,又享受云端能力。 - -**优势**: -- 🔧 在本地控制构建过程 -- ☁️ 使用云端的高性能运行环境 -- 🔄 适合从本地迁移到云端的过渡阶段 - -**流程**: -``` -Python 代码 → 本地 Docker 构建 → 上传到镜像仓库 → 云端运行 -``` - -### ☁️ Cloud 模式 - 云端部署 - -完全托管的云端构建和运行,适合生产环境。 - -**优势**: -- 🚀 无需本地 Docker,任何电脑都能部署 -- 📊 内置可观测性,自动收集日志和指标 -- 👥 团队协作友好,统一的构建环境 -- 🔐 安全可靠,企业级运行时保障 - -**流程**: -``` -Python 代码 → 云端自动构建 → 镜像仓库 → 生产级运行时 -``` - -## 配置文件 - -所有配置保存在 `agentkit.yaml` 文件中,结构清晰易懂: - -```yaml -common: # 通用配置 - agent_name: my_agent # Agent 名称 - entry_point: my_agent.py # 入口文件 - python_version: '3.12' # Python 版本 - launch_type: cloud # 部署模式 - -launch_types: # 各模式的配置 - cloud: - region: cn-beijing # 区域 - image_tag: latest # 镜像标签 - runtime_envs: # 环境变量 - MODEL_AGENT_API_KEY: xxx -``` - -**配置方式**: -- 🎯 **推荐**:使用 `agentkit config` 交互式配置 -- ✍️ **高级**:直接编辑 `agentkit.yaml` 文件 - -## 快速开始 - -从零到部署,只需 5 步: - -```bash -# 步骤 1:创建项目 -agentkit init weather_agent --template simple_app -cd weather_agent - -# 步骤 2:配置应用(交互式填写配置) -agentkit config - -# 步骤 3:一键部署 -agentkit launch - -# 步骤 4:测试 Agent -agentkit invoke "杭州天气怎么样?" - -# 步骤 5:查看运行状态 -agentkit status - -# (可选)清理资源 -agentkit destroy -``` - -**预计耗时**:首次部署约 3-5 分钟 - -## 核心特性 - -### 🎨 简单易用 - -- **交互式向导**:一步步引导你完成配置,有清晰的提示和默认值 -- **彩色输出**:重要信息高亮显示,进度一目了然 -- **实时验证**:配置错误立即提示,避免后续失败 - -### 🔄 智能适配 - -根据你选择的部署模式,自动: -- 调整构建流程(本地/云端) -- 配置运行环境(Docker/云平台) -- 展示相关配置项 - -### 📝 配置管理 - -- **持久化存储**:配置保存在 `agentkit.yaml`,方便版本控制 -- **环境隔离**:支持多个配置文件(dev/test/prod) -- **手动编辑**:配置文件格式简单,支持直接修改 - -### 🛡️ 可靠稳定 - -- **参数校验**:提前检查配置项,减少失败率 -- **错误恢复**:构建失败自动清理,不留垃圾文件 -- **友好提示**:遇到问题会告诉你原因和解决方法 - -## 环境要求 - -### ✅ 基础环境(所有模式) -- Python 3.12 或更高版本 -- pip 包管理器 -- 已安装 AgentKit SDK - -### 🐳 本地开发(Local/Hybrid 模式) -- Docker Desktop 或 Docker Engine 20.10+ -- 确保 Docker 服务已启动 - -### ☁️ 云端部署(Cloud/Hybrid 模式) -- 火山引擎账号 -- 配置好 AK/SK 环境变量: - ```bash - export VOLC_ACCESSKEY="your_access_key" - export VOLC_SECRETKEY="your_secret_key" - ``` - -## 下一步 - -- 📖 [命令详解](./2.commands.md) - 了解每个命令的详细用法和参数 -- ⚙️ [配置文件说明](./3.configurations.md) - 深入理解配置项的含义 -- 🚀 [快速开始](../2.runtime/3.quickstart.md) - 跟随教程完成第一个 Agent diff --git a/docs/content/2.agentkit-cli/2.commands.md b/docs/content/2.agentkit-cli/2.commands.md deleted file mode 100644 index 1c46f7b..0000000 --- a/docs/content/2.agentkit-cli/2.commands.md +++ /dev/null @@ -1,1630 +0,0 @@ -# CLI 命令详解 - -AgentKit CLI 提供 8 个核心命令,覆盖 Agent 开发的完整生命周期。 - -## 命令总览 - -```bash -agentkit <命令> [参数] [选项] -``` - -### 命令清单 - -| 命令 | 用途 | 常用场景 | -|------|------|---------| -| `init` | 创建新项目 | 开始开发新 Agent | -| `config` | 配置应用 | 修改部署参数 | -| `build` | 构建镜像 | 打包 Agent 代码 | -| `deploy` | 部署应用 | 发布到运行环境 | -| `launch` | 构建+部署 | 快速上线 | -| `invoke` | 测试调用 | 验证 Agent 功能 | -| `status` | 查看状态 | 检查运行情况 | -| `destroy` | 清理资源 | 停止并删除实例 | - ---- - -## agentkit init - -创建一个新的 Agent 项目,自动生成代码模板和配置文件。**🆕 支持两种模式**: - -1. **模板模式**:从内置模板创建新项目 -2. **包装模式**:包装现有的 Agent 定义文件,快速部署 - -### 使用方法 - -```bash -# 模板模式:从模板创建新项目 -agentkit init [项目名称] [选项] - -# 包装模式:包装现有 Agent 文件 🆕 -agentkit init [项目名称] --from-agent [选项] -``` - -### 参数说明 - -**项目名称**(可选) -- 给你的 Agent 起个名字,例如 `weather_bot` -- 模板模式:如果不提供,默认使用 `simple_agent` -- 包装模式:如果不提供,自动从 Agent 文件名生成(格式:`agentkit-{文件名}`) -- 只能包含字母、数字、下划线(_)和中划线(-) -- 会作为生成的 Python 文件名 - -#### 模板模式选项 - -`--template, -t` 模板类型 -- 选择项目模板(2 种可选) -- 可选:`basic`, `basic_stream` -- 不指定则进入交互式选择界面 - -`--agent-name` Agent 名称 -- 设置 Agent 的名称 -- 默认:`Agent` -- 该名称会被用于模板渲染中 - -`--description` Agent 描述 -- 设置 Agent 的描述信息 -- 如果不提供,使用默认描述 -- 在 A2A (Agent-to-Agent) 场景中特别有用 - -`--system-prompt` 系统提示词 -- 设置 Agent 的系统提示词 -- 如果不提供,使用默认系统提示词 -- 用于定义 Agent 的行为和角色 - -`--model-name` 模型名称 -- 设置火山引擎 ARK 平台的模型名称 -- 默认:`doubao-seed-1-6-250615` -- 需要是火山引擎平台支持的模型名称 - -`--tools` 工具列表 -- 逗号分隔的工具名称列表 -- 例如:`web_search,run_code` -- 工具会被包含在模板代码中 - -#### 包装模式选项 🆕 - -`--from-agent, -f` Agent 文件路径(必需) -- 指定现有的 Python 文件路径,包含 veadk Agent 定义 -- 例如:`./my_agent.py` 或 `../agents/weather_agent.py` -- 文件必须包含 `Agent(...)` 定义 - -`--agent-var` Agent 变量名(可选) -- 指定 Agent 对象在文件中的变量名 -- 如果不提供,系统会自动检测(如 `agent`, `my_agent` 等) -- 当自动检测失败时需要手动指定 - -`--wrapper-type` 包装器类型(可选) -- 选择生成的包装器类型 -- 可选:`basic`(默认)、`stream`(流式输出) -- `basic`:标准请求/响应模式 -- `stream`:支持 SSE 流式输出 - -#### 通用选项 - -`--directory` 目标目录 -- 在哪个文件夹创建项目 -- 默认是当前目录 `.` -- 目录不存在会自动创建 - -### 模板选项 - -| 序号 | 模板名称 | 适用场景 | 包含内容 | -|------|---------|---------|---------| -| 1 | **basic** | 快速上手 | 最简单的 Agent 应用,快速上手 | -| 2 | **basic_stream** | 流式输出 | 支持流式输出的 Agent 应用 | - -### 会生成什么文件 - -#### 模板模式生成的文件 - -- **{项目名称}.py** - Agent 的主代码文件(使用 Jinja2 模板渲染,支持自定义参数) -- **requirements.txt** - Python 依赖包列表(基础依赖:`veadk-python` 和 `veadk-python[extensions]`,某些模板包含额外依赖) -- **agentkit.yaml** - 配置文件(默认 `cloud` 云端模式) -- **.dockerignore** - Docker 构建忽略文件 - -#### 包装模式生成的文件 🆕 - -- **{原Agent文件名}.py** - 你的原始 Agent 定义文件(复制到目标目录) -- **{项目名称}.py** - AgentKit 包装器文件(导入并包装你的 Agent,提供部署接口) -- **requirements.txt** - Python 依赖包列表(包含使用提示,basic 模式使用基础依赖,stream 模式额外包含 `google-adk`) -- **agentkit.yaml** - 配置文件(entry_point 指向包装器文件) -- **.dockerignore** - Docker 构建忽略文件 - -### 使用示例 - -#### 模板模式示例 - -```bash -# 示例 1:交互式创建(会让你选择模板) -agentkit init my_weather_agent - -# 示例 2:直接指定模板 -agentkit init my_weather_agent --template basic - -# 示例 3:在指定目录创建 -agentkit init my_agent --template basic_stream --directory ./my_agents - -# 示例 4:使用简写 -agentkit init weather -t basic - -# 示例 5:自定义 Agent 属性 -agentkit init my_agent \ - --template basic \ - --agent-name "天气助手" \ - --description "一个帮助用户查询天气的智能助手" \ - --system-prompt "你是一个专业的天气查询助手,请用友好的语气回答用户问题" \ - --model-name "doubao-pro-32k" - -# 示例 6:创建流式输出的 Agent -agentkit init stream_agent \ - --template basic_stream \ - --agent-name "流式对话助手" \ - --model-name "doubao-seed-1-6-250615" -``` - -#### 包装模式示例 🆕 - -```bash -# 示例 7:包装现有 Agent 文件(自动检测 Agent 变量) -agentkit init --from-agent ./my_agent.py - -# 示例 8:包装并指定项目名称 -agentkit init weather_bot --from-agent ./weather_agent.py - -# 示例 9:使用简写和指定 Agent 变量名 -agentkit init -f ./my_agent.py --agent-var my_custom_agent - -# 示例 10:生成流式输出包装器 -agentkit init chat_bot \ - --from-agent ./chat_agent.py \ - --wrapper-type stream - -# 示例 11:在指定目录包装 -agentkit init deployed_agent \ - --from-agent ../agents/production_agent.py \ - --agent-var prod_agent \ - --wrapper-type basic \ - --directory ./deployment - -# 示例 12:完整的包装命令 -agentkit init my_deployed_bot \ - -f ~/projects/agents/my_bot.py \ - --agent-var bot \ - --wrapper-type stream \ - --directory ./deploy -``` - -### 运行效果 - -#### 模板模式输出 - -当你运行模板模式命令后,会看到类似这样的输出: - -``` - ✨ Build AI Agents with Ease ✨ - -Available Templates -┌────┬──────────────────────────┬──────────┬──────────────────────────────────┐ -│ ID │ Name │ Type │ Description │ -├────┼──────────────────────────┼──────────┼──────────────────────────────────┤ -│ 1 │ Basic Agent App │ Basic App│ 最简单的Agent应用,快速上手 │ -│ 2 │ Basic Stream Agent App │ Stream App│ 支持流式输出的Agent应用 │ -└────┴──────────────────────────┴──────────┴──────────────────────────────────┘ - -Please select a template by entering the ID (1-2): -Template ID: 1 -Selected: Basic Agent App - -Creating project: my_weather_agent -Using template: Basic Agent App - -✨ Project initialized successfully! -Template: Basic Agent App -Entry point: my_weather_agent.py -Language: Python 3.12 - -Created files: - ✓ my_weather_agent.py - ✓ requirements.txt - ✓ agentkit.yaml - ✓ .dockerignore - -Next steps: - 1. Review and modify the generated files - 2. Use agentkit config to configure your agent - 3. Use agentkit launch to build and deploy -``` - -#### 包装模式输出 🆕 - -当你运行包装模式命令后,会看到类似这样的输出: - -``` - ✨ Build AI Agents with Ease ✨ - -🔄 Wrapping existing Agent file - -Project name: agentkit-my_agent -Agent file: ./my_agent.py -Wrapper type: basic - -✨ Project initialized successfully! -Template: Agent Wrapper (Basic) -Entry point: agentkit-my_agent.py -Language: Python 3.12 -Agent file: my_agent.py -Agent variable: agent - -Created files: - ✓ my_agent.py - ✓ agentkit-my_agent.py - ✓ requirements.txt - ✓ agentkit.yaml - ✓ .dockerignore - -Next steps: - 1. Review and modify the generated files - 2. Use agentkit config to configure your agent - 3. Use agentkit launch to build and deploy -``` - -### 包装模式详解 🆕 - -包装模式是一个强大的功能,让你能够快速将已有的 Agent 定义文件部署到 AgentKit 平台,无需重写代码。 - -#### 工作原理 - -1. **解析 Agent 文件**:自动分析你的 Python 文件,识别 Agent 对象定义 -2. **复制源文件**:将你的 Agent 文件复制到项目目录 -3. **生成包装器**:创建一个新的 Python 文件,导入并包装你的 Agent -4. **配置部署**:生成 `agentkit.yaml` 和其他必要的部署文件 - -#### 包装器的作用 - -生成的包装器文件负责: -- **导入你的 Agent**:从你的文件中导入 Agent 对象 -- **创建 Runner**:使用 veadk 的 Runner 包装 Agent -- **提供部署接口**:实现 AgentKit 要求的 `@app.entrypoint` 和 `@app.ping` 接口 -- **处理请求/响应**:自动处理 HTTP 请求格式转换 - -#### Agent 文件要求 - -你的 Agent 文件需要满足以下条件: - -**基本要求**: -```python -# 必须是 Python 文件 (.py) -# 必须包含 Agent 对象定义 - -from veadk import Agent - -# Agent 定义 - 变量名可以是 agent、my_agent 等 -agent = Agent( - model="doubao-seed-1-6-250615", - description="我的 Agent" -) -``` - -**支持的 Agent 变量名**: -- 系统会自动检测常见命名:`agent`, `main_agent`, `my_agent` 等 -- 也可以使用自定义命名,但需要用 `--agent-var` 参数指定 - -**不支持的情况**: -- ❌ 文件中没有 `Agent(...)` 定义 -- ❌ Agent 定义在函数内部(必须在模块级别) -- ❌ Agent 对象通过复杂的逻辑生成(需要直接赋值) - -#### 包装器类型对比 - -| 特性 | Basic 包装器 | Stream 包装器 | -|------|-------------|--------------| -| **响应方式** | 一次性返回完整结果 | 流式返回(SSE) | -| **适用场景** | 标准对话、短响应 | 长文本生成、实时输出 | -| **依赖包** | `veadk-python` | `veadk-python` + `google-adk` | -| **配置要求** | 无特殊要求 | Agent 需要支持流式输出 | -| **客户端体验** | 等待后一次性显示 | 逐字显示,更好的交互体验 | - -#### 使用场景 - -**适合使用包装模式的场景**: -- ✅ 已有 veadk Agent 代码,想快速部署 -- ✅ 在本地开发调试好的 Agent,准备上线 -- ✅ 多个项目共享同一个 Agent 定义 -- ✅ 想要保持 Agent 代码和部署代码分离 - -**适合使用模板模式的场景**: -- ✅ 从零开始创建新 Agent -- ✅ 学习 AgentKit 开发流程 -- ✅ 需要完整的示例代码作为起点 - -#### 包装后的项目结构 - -``` -my_project/ -├── my_agent.py # 你的原始 Agent 定义 -├── agentkit-my_agent.py # AgentKit 生成的包装器(入口文件) -├── requirements.txt # 依赖列表(含使用提示) -├── agentkit.yaml # 部署配置(entry_point 指向包装器) -└── .dockerignore # Docker 构建忽略规则 -``` - -**包装器文件示例** (basic 类型): -```python -# 导入你的 Agent -from my_agent import agent - -from veadk import Runner -from agentkit.apps import AgentkitSimpleApp - -app = AgentkitSimpleApp() -runner = Runner(agent=agent) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - return response - -@app.ping -def ping() -> str: - return "pong!" - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) -``` - -#### 常见问题 - -**Q: 找不到 Agent 定义怎么办?** - -A: 使用 `--agent-var` 参数明确指定 Agent 变量名: -```bash -agentkit init -f ./my_agent.py --agent-var my_custom_agent_name -``` - -**Q: 可以修改生成的包装器吗?** - -A: 可以!包装器是标准的 Python 代码,你可以根据需要自由修改。但要注意保持 `@app.entrypoint` 和 `@app.ping` 接口不变。 - -**Q: 原始 Agent 文件会被修改吗?** - -A: 不会!系统只会复制你的文件到目标目录,不会修改原文件。 - -**Q: 如何在包装器中添加额外的依赖?** - -A: 编辑生成的 `requirements.txt` 文件,添加你需要的依赖包。文件中已经包含了使用提示。 - ---- - -## agentkit config - -配置 Agent 应用的参数。支持三种模式:**交互式**(友好引导)、**非交互式**(快速更新)和**混合模式**(灵活组合)。 - -**🆕 全局配置支持**:新增全局配置功能(`~/.agentkit/config.yaml`),可跨项目共享配置。 - -### 使用方法 - -```bash -# 项目配置 -agentkit config [参数] [选项] - -# 全局配置 🆕 -agentkit config --global [选项] -``` - -### 三种配置模式 - -#### 🎯 交互式模式(默认,推荐首次配置) - -无参数运行,系统会一步步引导你填写各项参数: - -```bash -agentkit config -``` - -**交互流程示例**: -``` -[1/7] 🤖 Agent 名称: my_agent -[2/7] 📝 入口文件: my_agent.py -[3/7] 📄 应用描述: 我的天气查询 Agent -[4/7] 🐍 Python 版本: 3.12 -[5/7] 📦 依赖文件: requirements.txt -[6/7] 🚀 部署模式(选一个): - 1. local - 本地构建和运行 - 2. hybrid - 本地构建,云端运行 - 3. cloud - 云端构建和运行(推荐) -[7/7] 🔐 应用级环境变量(所有模式共享): - 变量: MODEL_API_KEY=xxxxx -``` - -#### ⚡ 非交互式模式(快速更新,适合脚本/CI/CD) - -通过命令行参数直接配置,无需手动输入: - -```bash -# 完整配置示例 -agentkit config \ - --agent_name myAgent \ - --entry_point agent.py \ - --launch_type cloud \ - --image_tag v1.0.0 \ - --runtime_envs API_KEY=xxxxx -``` - -```bash -# 增量更新(只修改部分配置) -agentkit config --entry_point new_agent.py -agentkit config --image_tag v1.0.1 -``` - -#### 🔀 混合模式 - -部分参数通过命令行指定,其他参数交互式输入: - -```bash -agentkit config --agent_name myAgent --interactive -``` - -### 主要参数 - -#### 通用配置参数 - -| 参数 | 说明 | 示例 | -|------|------|------| -| `--agent_name` | Agent应用名称 | `my_weather_bot` | -| `--entry_point` | 入口文件(必须 .py) | `agent.py` | -| `--description` | 应用描述 | `"天气查询助手"` | -| `--python_version` | Python版本 | `3.12` | -| `--dependencies_file` | 依赖文件 | `requirements.txt` | -| `--launch_type` | 部署模式 | `local`, `hybrid`, `cloud` | - -#### 环境变量配置(重要⭐) - -AgentKit 支持**两级环境变量**配置: - -| 参数 | 级别 | 说明 | 使用场景 | -|------|------|------|----------| -| `--runtime_envs` / `-e` | **应用级** | 所有部署模式共享 | API密钥、模型端点等跨环境配置 | -| `--workflow-runtime-envs` | **Workflow级** | 仅当前部署模式使用 | 调试标志、特定环境配置 | - -**使用示例**: -```bash -# 应用级(所有模式共享) -agentkit config \ - -e API_KEY=shared-key \ - -e MODEL_ENDPOINT=https://api.example.com - -# Workflow级(仅当前模式) -agentkit config \ - --workflow-runtime-envs DEBUG=true \ - --workflow-runtime-envs LOCAL_CACHE=/tmp - -# 混合使用 -agentkit config \ - -e API_KEY=shared \ - --workflow-runtime-envs DEBUG=true -``` - -**配置合并规则**: -- 应用级环境变量被所有 workflow 继承 -- Workflow 级环境变量只在当前模式下生效 -- 同名变量:Workflow 级覆盖应用级 - -#### Cloud/Hybrid 模式参数 - -| 参数 | 说明 | 示例 | -|------|------|------| -| `--region` | 火山引擎区域 | `cn-beijing` | -| `--tos_bucket` | TOS存储桶 | `agentkit-bucket` | -| `--image_tag` | 镜像标签 | `v1.0.0`, `latest` | -| `--cr_instance_name` | CR实例名称 | `my-cr-instance` | -| `--cr_namespace_name` | CR命名空间 | `agentkit` | -| `--cr_repo_name` | CR仓库名称 | `my-agent` | - -> 💡 **提示**:`--cr_*` 参数也支持旧的 `--ve_cr_*` 别名,保持向后兼容。 - -### 控制选项 - -| 选项 | 说明 | -|------|------| -| `--config`, `-c` | 指定配置文件路径(默认 `agentkit.yaml`) | -| `--interactive`, `-i` | 强制使用交互式模式 | -| `--dry-run` | 预览模式,显示变更但不保存 | -| `--show`, `-s` | 显示当前配置 | - -### 全局配置选项 🆕 - -AgentKit 支持全局配置文件(`~/.agentkit/config.yaml`),用于跨项目共享配置。 - -| 选项 | 说明 | -|------|------| -| `--global`, `-g` | 操作全局配置而非项目配置 | -| `--init` | 初始化全局配置文件(创建模板) | -| `--set` | 设置全局配置字段(格式:`key=value`) | - -**支持的全局配置字段**: - -| 字段 | 说明 | 示例 | -|------|------|------| -| `volcengine.access_key` | 火山引擎 Access Key | `AK***` | -| `volcengine.secret_key` | 火山引擎 Secret Key | `SK***` | -| `volcengine.region` | 默认区域 | `cn-beijing` | -| `cr.instance_name` | CR 实例名称 | `team-cr-instance` | -| `cr.namespace_name` | CR 命名空间 | `agentkit-team` | -| `tos.bucket` | TOS Bucket 名称 | `team-agentkit-builds` | -| `tos.prefix` | TOS 对象前缀 | `agentkit-builds` | -| `tos.region` | TOS 区域 | `cn-beijing` | - -**配置优先级**: -``` -环境变量 > 项目配置(agentkit.yaml) > 全局配置 > 默认值 -``` - -### 使用示例 - -#### 示例 1:首次配置(交互式) - -```bash -agentkit config -``` - -#### 示例 2:快速更新单个配置项 - -```bash -# 更新入口文件 -agentkit config --entry_point new_agent.py - -# 更新镜像标签 -agentkit config --image_tag v1.0.1 - -# 添加环境变量 -agentkit config -e NEW_KEY=new_value -``` - -#### 示例 3:完整的非交互式配置 - -```bash -agentkit config \ - --agent_name weather-bot \ - --entry_point agent.py \ - --description "天气查询助手" \ - --launch_type cloud \ - --image_tag v1.0.0 \ - --region cn-beijing \ - -e API_KEY=xxxxx \ - -e MODEL_ENDPOINT=https://api.example.com -``` - -#### 示例 4:配置预览 - -```bash -# 查看配置变更但不保存 -agentkit config --entry_point agent.py --image_tag v2.0 --dry-run -``` - -输出示例: -``` -通用配置 - 变更项: -┌───────────────┬──────────────┬──────────────┐ -│ 配置项 │ 原值 │ 新值 │ -├───────────────┼──────────────┼──────────────┤ -│ entry_point │ old_agent.py │ agent.py │ -│ image_tag │ v1.0 │ v2.0 │ -└───────────────┴──────────────┴──────────────┘ - -🔍 预览模式:未保存任何更改 -``` - -#### 示例 5:查看当前配置 - -```bash -agentkit config --show -``` - -#### 示例 6:全局配置管理 🆕 - -**初始化全局配置:** -```bash -# 创建全局配置模板 -agentkit config --global --init -``` - -输出: -``` -✅ 全局配置文件已创建: ~/.agentkit/config.yaml - -📝 配置模板已生成,包含以下配置项: - -🔐 Volcengine 凭证 - access_key: '' - secret_key: '' - region: cn-beijing - -📦 CR 配置 - instance_name: '' - namespace_name: '' - -🗂️ TOS 配置 - bucket: '' - prefix: agentkit-builds - region: cn-beijing -``` - -**查看全局配置:** -```bash -agentkit config --global --show -``` - -**设置全局配置:** -```bash -# 设置单个字段 -agentkit config --global --set cr.instance_name=team-cr-instance -agentkit config --global --set tos.bucket=team-bucket - -# 设置凭证 -agentkit config --global --set volcengine.access_key=AK*** -agentkit config --global --set volcengine.secret_key=SK*** -``` - -**团队协作场景:** -```bash -# 1. 团队管理员创建并分享全局配置 -agentkit config --global --init -vim ~/.agentkit/config.yaml # 填入团队共享的配置 - -# 2. 团队成员初始化项目时自动使用全局配置 -agentkit init my-agent -# agentkit.yaml 中相关字段自动留空,运行时使用全局配置 - -# 3. 特殊项目可以在 agentkit.yaml 中覆盖全局配置 -agentkit config --cr_instance_name special-cr # 覆盖全局配置 -``` - -#### 示例 7:CI/CD 集成 - -```bash -# 在CI/CD流水线中使用 -agentkit config \ - --agent_name ${CI_PROJECT_NAME} \ - --entry_point agent.py \ - --launch_type cloud \ - --image_tag ${CI_COMMIT_TAG} \ - -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - -agentkit launch -``` - -### 环境变量交互式输入 - -在交互式模式中,环境变量配置支持便捷命令: - -``` -🔐 应用级环境变量(输入 KEY=VALUE,空行结束) - - 可用命令: - - 输入 KEY=VALUE 添加变量 - - 输入 'list' 查看已有变量 - - 输入 'del KEY' 删除某个变量 - - 输入 'clear' 清空所有 - - 直接按回车结束输入 - -变量: MODEL_API_KEY=xxxxx -✅ 已添加: MODEL_API_KEY - -变量: list -当前变量: - MODEL_API_KEY=xxxxx - -变量: [回车结束] -📋 共配置 1 个变量 -``` - -### 配置验证 - -所有配置都会自动验证: - -- ✅ **必填项检查**:Agent名称、入口文件不能为空 -- ✅ **格式验证**:入口文件必须以 `.py` 结尾 -- ✅ **选项约束**:launch_type 必须是 `local`、`hybrid` 或 `cloud` -- ✅ **命名规范**:Agent名称只能包含字母、数字、下划线、中划线和点 - -验证失败会显示详细错误信息并退出。 - -### 最佳实践 - -1. **首次配置用交互式**:更友好的引导体验 - ```bash - agentkit config - ``` - -2. **日常修改用非交互式**:快速高效 - ```bash - agentkit config --entry_point new_agent.py - ``` - -3. **CI/CD用非交互式**:完全自动化 - ```bash - agentkit config --agent_name $PROJECT --image_tag $TAG - ``` - -4. **修改前先预览**:避免错误 - ```bash - agentkit config --entry_point agent.py --dry-run - ``` - -5. **环境变量分级管理**: - - 应用级:API密钥等跨环境共享 - - Workflow级:调试开关等特定环境配置 - -6. **团队协作使用全局配置** 🆕: - ```bash - # 团队管理员设置 - agentkit config --global --init - agentkit config --global --set cr.instance_name=team-cr - agentkit config --global --set tos.bucket=team-bucket - - # 团队成员直接使用 - agentkit init my-agent # 自动使用全局配置 - agentkit launch # 运行时自动使用全局配置 - ``` - -7. **配置优先级理解**: - - 项目配置可以覆盖全局配置 - - 环境变量优先级最高 - - 顺序:`环境变量 > 项目配置 > 全局配置 > 默认值` - ---- - -## agentkit build - -将你的 Agent 代码打包成 Docker 镜像,为部署做准备。 - -### 使用方法 - -```bash -agentkit build [选项] -``` - -### 参数说明 - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:`agentkit.yaml` - -`--platform` 构建平台 -- 指定目标平台架构 -- 默认:`auto`(自动识别) -- 一般不需要手动设置 - -`--regenerate-dockerfile` 强制重新生成 Dockerfile -- 强制重新生成 Dockerfile,即使已存在 -- 适用场景:配置更新后需要强制刷新 Dockerfile -- 默认:`False` - -### Docker 构建自定义配置 🔧 - -AgentKit 支持通过 `docker_build` 配置段自定义 Docker 镜像构建过程。在 `agentkit.yaml` 中添加以下配置: - -#### 配置参数 - -**`base_image`** - 自定义基础镜像 - -Python 项目(字符串格式): -```yaml -docker_build: - base_image: "python:3.12-slim" - # 或使用 Alpine 镜像 - base_image: "python:3.12-alpine" -``` - - -**`build_script`** - 自定义构建脚本 -- 路径相对于项目根目录 -- 用于安装系统依赖、编译扩展等 -- 脚本会在构建过程中自动执行 - -```yaml -docker_build: - build_script: "scripts/setup.sh" -``` - -#### 完整配置示例 - -**Python 项目示例**: -```yaml -agent_name: my-agent -entry_point: agent.py -language: Python -language_version: "3.12" -dependencies_file: requirements.txt -launch_type: local - -# Docker 构建自定义配置 -docker_build: - base_image: "python:3.12-alpine" - build_script: "scripts/setup.sh" -``` - -构建脚本示例 (`scripts/setup.sh`): -```bash -#!/bin/bash -# 安装系统依赖 -apt-get update && apt-get install -y gcc g++ libpq-dev -# 或 Alpine 系统使用:apk add --no-cache gcc musl-dev postgresql-dev - -echo "Custom build script completed" -``` - - - -#### 使用场景 - -| 场景 | 配置方式 | 示例 | -|------|---------|------| -| 使用轻量级镜像 | 指定 Alpine 基础镜像 | `base_image: "python:3.12-alpine"` | -| 安装系统依赖 | 编写构建脚本 | `build_script: "scripts/install_deps.sh"` | -| 编译 C 扩展 | 安装编译工具 | 在脚本中安装 gcc、g++ 等 | -| 配置证书 | 更新 CA 证书 | 在脚本中运行 `update-ca-certificates` | -| 多阶段构建 | 分别指定 builder 和 runtime | 仅 Golang 项目支持 | - -#### Dockerfile 自动管理 - -- Dockerfile 会根据配置**自动生成**,包含元数据头 -- 配置变化时自动更新(旧版本备份到 `.agentkit/dockerfile_backups/`) -- 删除元数据头后,AgentKit 不再自动管理该文件 -- 使用 `--regenerate-dockerfile` 强制重新生成 - -元数据头示例: -```dockerfile -# ============================================================================ -# AUTO-GENERATED by AgentKit v1.x.x -# ============================================================================ -# Source: agentkit.yaml -# Checksum: sha256:... -# Generated: 2025-01-17T10:30:00 -# -# This file is automatically generated and managed by AgentKit: -# - It will be auto-updated when agentkit.yaml config changes -# - To fully customize, remove this header comment -# ============================================================================ -``` - -### 构建过程 - -根据配置的 `launch_type` 自动选择构建方式: - -#### 🏠 Local 模式(本地构建) -在你的电脑上用 Docker 构建: -``` -🔨 开始构建本地镜像... -[1/3] 生成 Dockerfile... -[2/3] Docker 构建镜像... -[3/3] 验证镜像可用性... -✅ 构建成功: my-agent:latest -``` -预计耗时:1-3 分钟 - -#### ☁️ Cloud 模式(云端构建) -在火山引擎上自动构建: -``` -🔨 开始云端构建... -[1/6] 生成 Dockerfile... -[2/6] 打包项目代码... -[3/6] 上传到对象存储... -[4/6] 准备镜像仓库... -[5/6] 创建构建流水线... -[6/6] 执行构建任务... -✅ 构建成功: xxx.cr.volces.com/agentkit/my-agent:latest -``` -预计耗时:3-5 分钟 - -### 构建结果 - -- **镜像名称**:{agent_name}:{image_tag} -- **镜像信息**:自动保存到配置文件 -- **构建记录**:包含时间戳、镜像 ID 等 - -### 使用示例 - -```bash -# 示例 1:使用默认配置 -agentkit build - -# 示例 2:指定配置文件 -agentkit build --config-file ./prod.yaml - -# 示例 3:强制重新生成 Dockerfile -agentkit build --regenerate-dockerfile - -# 示例 4:配置更新后强制刷新 -agentkit build --config-file ./prod.yaml --regenerate-dockerfile -``` - -#### 自定义构建示例 - -**示例 5:使用 Alpine 基础镜像** - -1. 修改 `agentkit.yaml`: -```yaml -docker_build: - base_image: "python:3.12-alpine" - build_script: "scripts/alpine-setup.sh" -``` - -2. 创建 `scripts/alpine-setup.sh`: -```bash -#!/bin/sh -apk add --no-cache gcc musl-dev postgresql-dev -``` - -3. 构建: -```bash -agentkit build -``` - -**示例 6:安装系统依赖(C 扩展)** - -1. 修改 `agentkit.yaml`: -```yaml -docker_build: - build_script: "scripts/install-deps.sh" -``` - -2. 创建 `scripts/install-deps.sh`: -```bash -#!/bin/bash -apt-get update && apt-get install -y \ - gcc g++ \ - libpq-dev \ - libxml2-dev \ - libxslt1-dev -``` - -3. 构建: -```bash -agentkit build -``` - -**示例 7:Golang 多阶段构建** - -修改 `agentkit.yaml`: -```yaml -docker_build: - base_image: - builder: "golang:1.23-alpine" - runtime: "alpine:3.19" - build_script: "scripts/install-certs.sh" -``` - -构建: -```bash -agentkit build -``` - -### 注意事项 - -**Local 模式前提**: -- ✅ 确保 Docker 已安装并运行 -- ✅ Docker daemon 可正常访问 - -**Cloud 模式前提**: -- ✅ 设置 AK/SK 环境变量 -- ✅ 确保网络能访问火山引擎 - -**Docker 构建自定义**: -- ✅ 构建脚本的路径,请填写相对于项目根目录的相对路径 -- ✅ 脚本会自动获得执行权限 -- ✅ 构建脚本不存在会记录警告但不会中断构建 -- ✅ Dockerfile 自动生成,配置变化时自动更新 -- ✅ 旧版本 Dockerfile 会备份到 `.agentkit/dockerfile_backups/` -- ✅ 删除 Dockerfile 元数据头后不再自动管理 - -**提示**:构建信息会自动更新到配置文件,供 `deploy` 命令使用 - ---- - -## agentkit deploy - -将构建好的镜像启动运行,让 Agent 对外提供服务。 - -### 使用方法 - -```bash -agentkit deploy [选项] -``` - -### 参数说明 - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:`agentkit.yaml` - -### 部署过程 - -根据配置的 `launch_type` 自动选择部署目标: - -#### 🏠 Local 模式(本地部署) -在你的电脑上启动容器: -``` -🚀 开始部署到本地 Docker... -[1/3] 停止旧版本容器... -[2/3] 启动新容器... -[3/3] 验证容器状态... -✅ 部署成功!容器正在运行 -🌐 访问地址: http://localhost:8000 -``` -预计耗时:10-30 秒 - -#### ☁️ Cloud 模式(云端部署) -在火山引擎上创建 Runtime: -``` -🚀 开始部署到云端平台... -✅ 生成 Runtime 名称: my-agent-20250120-abc123 -✅ 创建 Runtime: r-xxxxxx -⏳ 等待 Runtime 就绪... -✅ Runtime 已就绪! -🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com -``` -预计耗时:1-2 分钟 - -### 使用示例 - -```bash -# 示例 1:部署到默认环境 -agentkit deploy - -# 示例 2:部署到生产环境 -agentkit deploy --config-file ./prod.yaml -``` - -### 部署完成后 - -**Local 模式**: -- ✅ 容器在本地运行 -- ✅ 可通过 `localhost:端口` 访问 -- ✅ 自动进行健康检查 - -**Cloud 模式**: -- ✅ Runtime 在云端运行 -- ✅ 获得一个公网可访问的 URL -- ✅ 自动验证 Runtime 状态 - ---- - -## agentkit launch - -构建 + 部署,一步完成!相当于自动执行 `build` 再执行 `deploy`。 - -### 使用方法 - -```bash -agentkit launch [选项] -``` - -### 参数说明 - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:`agentkit.yaml` - -### 执行流程 - -``` -🚀 开始启动 Agent... - -━━━ 第一步:构建镜像 ━━━ -🔨 读取配置: agentkit.yaml -🔨 开始构建... -✅ 构建完成 - -━━━ 第二步:部署应用 ━━━ -🚀 开始部署... -✅ 部署完成 - -✨ Agent 已成功启动! -``` - -### 使用示例 - -```bash -# 示例 1:一键启动 -agentkit launch - -# 示例 2:启动到生产环境 -agentkit launch --config-file ./prod.yaml -``` - -### 为什么用 launch - -- ⚡ **省时省力** - 一个命令代替两个 -- 🔒 **版本一致** - 确保构建和部署使用同一配置 -- 🚀 **快速迭代** - 改完代码立即测试 - ---- - -## agentkit invoke - -向已部署的 Agent 发送测试请求,验证功能是否正常。 - -### 使用方法 - -```bash -agentkit invoke [消息内容] [选项] -``` - -⚠️ **重要**:必须提供消息内容或 `--payload` 选项之一,**两者不能同时使用** - -### 参数说明 - -**消息内容** -- 直接在命令后面输入要发送的文字,不需要加任何选项标记 -- 会自动包装成 {"prompt": "你的消息"} -- 不能和 `--payload` 同时使用 -- 示例:`agentkit invoke "你好"` 或 `agentkit invoke "今天天气怎么样?"` - -**选项** - -`--payload, -p` 自定义请求数据 -- 用 JSON 格式指定完整的请求内容 -- 不能和消息内容同时使用 -- 示例:--payload '{"prompt": "你好", "context": "greeting"}' - -`--headers, -h` 自定义请求头 -- 用 JSON 格式指定 HTTP 请求头 -- 默认会自动添加 `user_id` 和 `session_id` -- 示例:--headers '{"user_id": "test123"}' - -`--apikey, -ak` API 密钥 -- 云端部署(Cloud 模式)时可能需要 -- 用于身份验证 -- 可选参数 - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:当前目录的 `agentkit.yaml` - -### 使用示例 - -#### 示例 1:直接发送消息(最简单) - -```bash -agentkit invoke "今天杭州天气如何?" -``` - -等同于发送以下 JSON: -```json -{ - "prompt": "今天杭州天气如何?" -} -``` - -#### 示例 2:自定义请求内容 - -```bash -agentkit invoke --payload '{"prompt": "杭州天气?", "user_location": "杭州"}' -``` - -#### 示例 3:带请求头 - -```bash -agentkit invoke \ - --payload '{"prompt": "杭州天气?"}' \ - --headers '{"user_id": "user123", "session_id": "sess456"}' -``` - -#### 示例 4:云端部署(带 API Key) - -```bash -agentkit invoke "你好" --apikey your_api_key_here -``` - -### 运行效果 - -``` -💬 正在调用 Agent... -✅ Runtime ID: r-xxxxxx -🌐 调用地址: http://xxx.apigateway-cn-beijing.volceapi.com -✅ 调用成功! - -📡 Agent 响应: -杭州今天天气晴,温度 22°C,适合出行。 -``` - -### 注意事项 - -- ⚠️ 消息内容和 `--payload` 只能选一个 -- ⚠️ 云端部署可能需要 API Key -- ⚠️ 调用前确保 Agent 已部署(用 `agentkit status` 检查) - ---- - -## agentkit status - -查看 Agent 的运行状态,包括是否在线、访问地址等信息。 - -### 使用方法 - -```bash -agentkit status [选项] -``` - -### 参数说明 - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:`agentkit.yaml` - -### 输出示例 - -#### 🏠 Local 模式 - -``` -✅ 容器名称: my-agent -✅ 运行状态: running -🌐 访问地址: http://localhost:8000 - -详细信息: -{ - "container_id": "abc123...", - "status": "running", - "ports": ["8000:8000"], - "created": "2025-01-20 10:00:00", - "health": "healthy" -} -``` - -#### ☁️ Cloud 模式 - -``` -✅ Runtime ID: r-xxxxxx -✅ 运行状态: Ready -🌐 访问地址: http://xxx.apigateway-cn-beijing.volceapi.com - -详细信息: -{ - "runtime_id": "r-xxxxxx", - "runtime_name": "my-agent-20250120-abc123", - "status": "Ready", - "endpoint": "http://xxx.apigateway-cn-beijing.volceapi.com", - "image": "xxx.cr.volces.com/agentkit/my-agent:latest", - "created_at": "2025-01-20 10:00:00" -} -``` - -### 状态说明 - -**Local 模式状态**: -- ✅ `running` - 正常运行中 -- ⏸️ `stopped` - 已停止 -- 🔄 `restarting` - 重启中 -- ❌ `error` - 出现错误 - -**Cloud 模式状态**: -- ✅ `Ready` - 就绪,可接收请求 -- 🔄 `Releasing` - 正在部署 -- ❌ `Error` - 运行错误 -- ❌ `Failed` - 部署失败 - -### 使用示例 - -```bash -# 示例 1:查看当前状态 -agentkit status - -# 示例 2:查看生产环境状态 -agentkit status --config-file ./prod.yaml -``` - ---- - -## agentkit destroy - -停止并删除 Agent 实例,释放资源。⚠️ 这是不可逆操作! - -### 使用方法 - -```bash -agentkit destroy [选项] -``` - -### 参数说明 - -`--force` 强制删除 -- 跳过确认提示,直接删除 -- 默认不开启(会要求确认) -- 谨慎使用! - -`--config-file` 配置文件路径 -- 指定配置文件位置 -- 默认:`agentkit.yaml` - -### 安全确认 - -默认会要求你确认操作: - -``` -🗑️ 准备销毁运行中的 Agent... -⚠️ 此操作不可恢复! -确定要继续吗?[y/N]: y -``` - -跳过确认(不推荐): -```bash -agentkit destroy --force -``` - -### 会删除什么 - -#### 🏠 Local 模式 -- ✅ 停止 Docker 容器 -- ✅ 删除容器实例 -- ⚠️ 镜像会保留(可手动删除) - -#### ☁️ Cloud 模式 -- ✅ 删除 Runtime 实例 -- ✅ 释放云端资源 -- ⚠️ 镜像会保留(可在 CR 中手动删除) - -### 运行效果 - -``` -🗑️ 开始销毁 Agent 资源... -✅ 停止 Runtime: r-xxxxxx -✅ 删除 Runtime 成功 -✅ 资源已清理完成 - -提示:配置文件和镜像已保留,可随时重新部署。 -``` - -### 使用示例 - -```bash -# 示例 1:安全删除(推荐) -agentkit destroy - -# 示例 2:强制删除 -agentkit destroy --force - -# 示例 3:删除指定环境 -agentkit destroy --config-file ./dev.yaml -``` - -### 重要提示 - -- ⚠️ **不可恢复**:删除后无法撤销,数据将永久丢失 -- ✅ **配置保留**:`agentkit.yaml` 文件不会被删除 -- ✅ **镜像保留**:Docker 镜像不会被删除,可重新部署 -- 💡 **重新部署**:随时可以用 `agentkit deploy` 重新部署 - ---- - -## 通用选项 - -所有命令都支持这些选项: - -### --help 查看帮助 - -查看任何命令的详细说明和参数: - -```bash -# 查看某个命令的帮助 -agentkit invoke --help -agentkit build --help - -# 查看所有命令列表 -agentkit --help -``` - -### --version 查看版本 - -显示 CLI 版本信息: - -```bash -agentkit --version -# 或 -agentkit -v -``` - ---- - -## 常用工作流 - -### 📝 完整开发流程(模板模式) - -从零开始到上线的完整步骤: - -```bash -# 1️⃣ 创建项目 -agentkit init weather_agent --template basic -cd weather_agent - -# 2️⃣ 配置应用 -agentkit config - -# 3️⃣ 一键部署 -agentkit launch - -# 4️⃣ 测试功能 -agentkit invoke "杭州天气怎么样?" - -# 5️⃣ 查看状态 -agentkit status -``` - -### 🔄 快速部署已有 Agent(包装模式)🆕 - -将现有的 Agent 快速部署上线: - -```bash -# 1️⃣ 包装现有 Agent 文件 -agentkit init --from-agent ~/my_projects/weather_agent.py - -# 2️⃣ 进入项目目录 -cd agentkit-weather_agent - -# 3️⃣ (可选)配置应用 -agentkit config - -# 4️⃣ 一键部署 -agentkit launch - -# 5️⃣ 测试功能 -agentkit invoke "今天天气如何?" - -# 6️⃣ 查看状态 -agentkit status -``` - -### 🔄 快速迭代流程 - -修改代码后的更新流程: - -```bash -# 方式 1:分步执行(推荐调试时使用) -agentkit build # 重新构建 -agentkit deploy # 重新部署 -agentkit invoke "测试" # 测试验证 - -# 方式 2:一键更新(推荐日常开发) -agentkit launch # 自动构建+部署 -agentkit invoke "测试" # 测试验证 -``` - -### 🌍 多环境管理 - -在开发、测试、生产环境间切换: - -```bash -# 开发环境 -agentkit launch --config-file agentkit.dev.yaml -agentkit invoke "测试" --config-file agentkit.dev.yaml - -# 生产环境 -agentkit launch --config-file agentkit.prod.yaml -agentkit invoke "测试" --config-file agentkit.prod.yaml -``` - ---- - -## 常见问题 - -遇到错误不要慌,这里有解决方案! - -### ❌ 配置文件找不到 - -``` -Error: Configuration file not found: agentkit.yaml -``` - -**原因**:当前目录没有配置文件 - -**解决**: -```bash -# 如果是新项目 -agentkit init my_agent - -# 如果已有项目 -agentkit config -``` - -### ❌ Docker 没有运行(Local 模式) - -``` -Error: Docker daemon not running -``` - -**原因**:Docker 服务未启动 - -**解决**: -- Windows/Mac:打开 Docker Desktop -- Linux:`sudo systemctl start docker` - -### ❌ 云端凭证未配置(Cloud 模式) - -``` -Error: VOLC_ACCESSKEY or VOLC_SECRETKEY not set -``` - -**原因**:没有设置火山引擎 AK/SK - -**解决**: -```bash -export VOLC_ACCESSKEY="你的AccessKey" -export VOLC_SECRETKEY="你的SecretKey" -``` - -### ❌ 构建失败 - -``` -❌ 构建失败: ... -``` - -**可能原因和解决方案**: -1. **依赖问题** - 检查 `requirements.txt` 是否正确 -2. **代码错误** - 检查 Python 代码是否有语法错误 -3. **网络问题** - 检查网络连接,重试构建 -4. **权限问题** - 确保有 Docker/云端的操作权限 - -### 💡 调试技巧 - -**1. 查看详细日志** -```bash -# 设置详细日志级别 -export LOG_LEVEL=DEBUG -agentkit build -``` - -**2. 验证配置文件** -```bash -# 检查配置是否正确 -cat agentkit.yaml -``` - -**3. 分步执行** -```bash -# 分开执行,更容易定位问题 -agentkit build # 先构建 -agentkit deploy # 再部署 -# 而不是直接用 launch -``` - -**4. 检查运行状态** -```bash -# 查看 Agent 是否正常运行 -agentkit status -``` - ---- - -## 下一步 - -- 📖 [配置文件说明](./3.configurations.md) - 深入了解每个配置项 -- 🚀 [快速开始](../1.introduction/3.quickstart.md) - 跟随教程实践 -- ❓ [问题排查](../1.introduction/4.troubleshooting.md) - 更多疑难问题解答 diff --git a/docs/content/2.agentkit-cli/3.configurations.md b/docs/content/2.agentkit-cli/3.configurations.md deleted file mode 100644 index 48d8251..0000000 --- a/docs/content/2.agentkit-cli/3.configurations.md +++ /dev/null @@ -1,637 +0,0 @@ -# 配置文件详解 - -`agentkit.yaml` 是配置 Agent 的核心文件,包含了所有运行参数。本文档帮你理解每个配置项的作用。 - -## 文件结构 - -配置文件由两部分组成: - -```yaml -common: - # 基础配置(所有模式通用) - agent_name: my_agent - entry_point: my_agent.py - launch_type: cloud - -launch_types: - local: - # Local 模式的专属配置 - hybrid: - # Hybrid 模式的专属配置 - cloud: - # Cloud 模式的专属配置 -``` - -**两个部分**: -- **common** - 通用配置,适用于所有部署模式 -- **launch_types** - 针对不同部署模式的特定配置 - ---- - -## common 配置 - -所有部署模式都需要的基础配置。 - -### 配置示例 - -```yaml -common: - agent_name: my_weather_agent # Agent 名称 - entry_point: my_weather_agent.py # 入口文件 - description: 天气查询 Agent # 描述(可选) - python_version: '3.12' # Python 版本 - dependencies_file: requirements.txt # 依赖文件 - launch_type: cloud # 部署模式 -``` - -### 配置项详解 - -#### agent_name(必填) - -**Agent 的名字** - -- 📝 **作用**:给你的 Agent 起个名字 -- ✅ **规则**:只能用字母、数字、`_`、`-` 和 `.` -- 🎯 **用途**: - - Docker 镜像的名字 - - 云端 Runtime 的名字前缀 - - 默认的镜像仓库名 - -**示例**: -```yaml -agent_name: weather_agent # 推荐:简单清晰 -agent_name: financial-analyzer-v2 # 可以:带版本号 -agent_name: customer_support_bot # 可以:描述性强 -``` - -#### entry_point(必填) - -**Agent 代码的入口文件** - -- 📝 **作用**:指定运行哪个 Python 文件 -- ✅ **规则**:必须是 `.py` 结尾 -- 🎯 **用途**:容器启动时运行这个文件 - -**示例**: -```yaml -entry_point: app.py # 常用 -entry_point: server.py # 常用 -entry_point: main.py # 常用 -``` - -#### description(可选) - -**Agent 的描述信息** - -- 📝 **作用**:简单描述 Agent 是做什么的 -- ✅ **规则**:任意文字 -- 🎯 **用途**:帮助团队成员理解用途 - -**示例**: -```yaml -description: "天气查询 Agent,支持全国主要城市" -description: "客服助手,处理常见问题" -``` - -#### python_version(可选) - -**Python 运行版本** - -- 📝 **作用**:指定 Python 版本 -- ✅ **默认**:`'3.12'` -- ⚠️ **注意**:目前只支持 3.12 - -**示例**: -```yaml -python_version: '3.12' # 当前唯一支持的版本 -``` - -#### dependencies_file(可选) - -**依赖包列表文件** - -- 📝 **作用**:指定依赖文件位置 -- ✅ **默认**:`requirements.txt` -- 🎯 **用途**:构建时安装这些依赖 - -**示例**: -```yaml -dependencies_file: requirements.txt # 默认 -dependencies_file: requirements/prod.txt # 自定义路径 -``` - -#### launch_type(必填) - -**部署和运行模式** - -- 📝 **作用**:选择在哪里构建和运行 -- ✅ **选项**:`local`、`hybrid`、`cloud` - -| 模式 | 适合场景 | 构建位置 | 运行位置 | -|------|---------|---------|---------| -| `local` | 本地开发调试 | 本地电脑 | 本地电脑 | -| `hybrid` | 过渡阶段 | 本地电脑 | 云端平台 | -| `cloud` | 生产环境 | 云端平台 | 云端平台 | - -**示例**: -```yaml -launch_type: local # 本地开发 -launch_type: cloud # 生产环境(推荐) -``` - ---- - -## Local 模式配置 - -在本地 Docker 上构建和运行,适合开发调试。 - -### 配置示例 - -```yaml -launch_types: - local: - image_tag: latest # 镜像标签 - invoke_port: 8000 # 应用端口 - container_name: my_agent # 容器名称 - runtime_envs: # 环境变量 - MODEL_AGENT_API_KEY: xxx - ports: # 端口映射 - - "8000:8000" - restart_policy: unless-stopped # 重启策略 - memory_limit: 1g # 内存限制 - cpu_limit: '1' # CPU 限制 -``` - -### 配置项详解 - -#### image_tag - -**镜像版本标签** - -- 默认:`latest` -- 作用:区分不同版本的镜像 -- 示例:`latest`、`v1.0`、`dev` - -#### invoke_port - -**Agent 监听的端口** - -- 默认:`8000` -- 作用:指定应用监听哪个端口 -- ❗ 必须与代码中的端口一致 - -#### container_name - -**Docker 容器名称** - -- 默认:使用 `agent_name` -- 作用:给容器起个名字 -- 可以留空,自动生成 - -#### runtime_envs - -**运行时环境变量** - -传递给容器的环境变量,如 API Key、配置参数等。 - -```yaml -runtime_envs: - MODEL_AGENT_API_KEY: your_api_key # 模型 API Key - DEBUG: 'true' # 开启调试 - LOG_LEVEL: info # 日志级别 -``` - -#### ports - -**端口映射** - -将容器内部端口映射到主机端口,格式:`主机端口:容器端口` - -```yaml -ports: - - "8080:8000" # 主机 8080 映射到容器 8000 - - "9090:9090" # 监控端口 -``` - -#### restart_policy - -**容器重启策略** - -- 默认:`unless-stopped` -- 选项: - - `no` - 不重启 - - `on-failure` - 失败时重启 - - `always` - 总是重启 - - `unless-stopped` - 除非手动停止,否则重启 - -#### memory_limit / cpu_limit - -**资源限制** - -限制容器使用的资源,防止占用过多。 - -```yaml -memory_limit: 2g # 限制 2GB 内存 -cpu_limit: '1' # 限制 1 个 CPU 核 -``` - -### 自动管理的字段 - -以下字段由 CLI 自动生成和管理,不需要手动配置: - -- `container_id` - 容器 ID -- `image_id` - 镜像 ID -- `build_timestamp` - 构建时间 -- `deploy_timestamp` - 部署时间 -- `full_image_name` - 完整镜像名 - ---- - -## Cloud 模式配置 - -在火山引擎上构建和运行,适合生产环境。 - -### 配置示例 - -```yaml -launch_types: - cloud: - region: cn-beijing # 区域 - image_tag: latest # 镜像标签 - ve_cr_instance_name: agentkit-center # CR 实例名 - ve_cr_namespace_name: agentkit # CR 命名空间 - ve_cr_repo_name: my_agent # CR 仓库名 - runtime_envs: # 环境变量 - MODEL_AGENT_API_KEY: xxx # 必填:模型 API Key - MODEL_AGENT_NAME: ep-xxx # 必填:模型接入点 - tos_bucket: agentkit-20250120-xxx # 对象存储桶(自动创建) -``` - -### 配置项详解 - -#### region - -**火山引擎区域** - -- 默认:`cn-beijing` -- 作用:选择服务运行的地理位置 -- 可选:`cn-beijing`、`cn-shanghai`、`cn-guangzhou` - -💡 **建议**:选择离用户最近的区域,降低延迟 - -#### image_tag - -**镜像版本标签** - -- 默认:`latest` -- 作用:区分不同版本 -- 示例:`latest`、`v1.0.0`、`prod-2025` - -#### ve_cr_instance_name - -**CR 镜像仓库实例名** - -- 默认:自动创建 -- 作用:Docker 镜像存储在哪个 CR 实例 - -**使用方式**: -```yaml -# 方式 1:使用已有实例 -ve_cr_instance_name: my-existing-cr - -# 方式 2:让 CLI 自动创建 -ve_cr_instance_name: Auto -``` - -#### ve_cr_namespace_name - -**CR 命名空间** - -- 默认:`agentkit` -- 作用:组织和管理镜像 -- 自动创建:不存在时自动创建 - -#### ve_cr_repo_name - -**CR 仓库名称** - -- 默认:使用 `agent_name` -- 作用:存储镜像的仓库 -- 自动创建:不存在时自动创建 - -#### runtime_envs - -**运行时环境变量** - -Agent 运行时需要的配置,最重要的是模型 API 凭证。 - -**必须配置**: -```yaml -runtime_envs: - MODEL_AGENT_API_KEY: xxx # 火山方舟 API Key - MODEL_AGENT_NAME: ep-xxx # 火山方舟接入点 ID -``` - -**可选配置**(增强功能): -```yaml -runtime_envs: - # 基础配置 - MODEL_AGENT_API_KEY: xxx - MODEL_AGENT_NAME: ep-xxx - - # 可观测性(日志、监控、链路追踪) - OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx - OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317 - OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: my_agent - - # 其他配置 - DEBUG: 'true' # 开启调试模式 - LOG_LEVEL: info # 设置日志级别 -``` - -#### tos_bucket - -**对象存储桶** - -- 默认:自动创建 -- 作用:存储代码压缩包(用于云端构建) -- 自动管理:CLI 会自动创建和管理 - -### 自动管理的字段 - -以下字段由 CLI 自动生成和管理,不需要手动配置: - -**存储相关** -- `tos_prefix` - 对象存储前缀 -- `tos_object_key` - 代码包的存储路径 -- `tos_object_url` - 代码包的访问地址 - -**构建相关** -- `cp_workspace_name` - 构建工作区名称 -- `cp_pipeline_name` - 构建流水线名称 -- `cp_pipeline_id` - 流水线 ID -- `build_timeout` - 构建超时时间(默认 3600 秒) - -**镜像相关** -- `ve_cr_region` - 镜像仓库区域 -- `ve_cr_image_full_url` - 完整的镜像 URL - -**运行时相关** -- `ve_runtime_id` - Runtime 实例 ID -- `ve_runtime_name` - Runtime 名称 -- `ve_runtime_endpoint` - 访问地址 -- `ve_runtime_apikey` - API 密钥 -- `build_timestamp` - 构建时间 -- `deploy_timestamp` - 部署时间 - ---- - -## Hybrid 模式配置 - -本地构建,云端运行。结合了 Local 和 Cloud 的配置项。 - -### 配置示例 - -```yaml -launch_types: - hybrid: - # Local 模式的配置(构建相关) - image_tag: latest # 镜像标签 - invoke_port: 8000 # 应用端口 - - # Cloud 模式的配置(部署相关) - region: cn-beijing # 云端区域 - ve_cr_instance_name: my-cr # CR 实例 - ve_cr_namespace_name: agentkit - ve_cr_repo_name: my_agent - runtime_envs: - MODEL_AGENT_API_KEY: xxx -``` - -### 配置说明 - -Hybrid 模式组合了两种模式的配置: - -**构建部分**(本地) -- `image_tag` - 镜像标签 -- `invoke_port` - 应用端口 - -**部署部分**(云端) -- `region` - 运行区域 -- `ve_cr_*` - 镜像仓库配置 -- `runtime_envs` - 环境变量 - -详细说明请参考上面的 Local 和 Cloud 模式配置。 - ---- - -## 最佳实践 - -### 🌍 多环境管理 - -为不同环境创建独立配置文件: - -```bash -agentkit.dev.yaml # 开发环境(local 模式) -agentkit.test.yaml # 测试环境(hybrid 模式) -agentkit.prod.yaml # 生产环境(cloud 模式) -``` - -**使用方式**: -```bash -# 开发 -agentkit launch --config-file agentkit.dev.yaml - -# 生产 -agentkit launch --config-file agentkit.prod.yaml -``` - -### 🔐 安全管理敏感信息 - -**❌ 错误做法**(硬编码): -```yaml -runtime_envs: - MODEL_AGENT_API_KEY: c05d49af-1234-5678-abcd-xxxx # 不要这样! -``` - -**✅ 正确做法**: - -**方案 1**:交互式配置 -```bash -agentkit config # 运行时输入敏感信息 -``` - -**方案 2**:使用 .gitignore -```bash -# .gitignore 文件 -agentkit.local.yaml # 本地配置不提交 -agentkit.prod.yaml # 生产配置不提交 -*.secret.yaml # 所有包含密钥的配置 -``` - -**方案 3**:创建配置模板 -```yaml -# agentkit.yaml.template (提交到 Git) -runtime_envs: - MODEL_AGENT_API_KEY: <请填写你的 API Key> - MODEL_AGENT_NAME: <请填写接入点 ID> -``` - -### 📝 添加配置注释 - -让团队成员更容易理解配置: - -```yaml -common: - agent_name: weather_agent - entry_point: app.py - launch_type: cloud # 生产环境使用云端部署 - -launch_types: - cloud: - region: cn-beijing # 北京区域,离用户最近 - runtime_envs: - # 火山方舟的模型访问凭证 - MODEL_AGENT_API_KEY: xxx - MODEL_AGENT_NAME: ep-xxx -``` - -### ✅ 定期验证配置 - -确保配置文件始终有效: - -```bash -# 方式 1:运行配置命令检查 -agentkit config - -# 方式 2:查看配置内容 -cat agentkit.yaml - -# 方式 3:尝试构建(不部署) -agentkit build -``` - ---- - -## 完整示例 - -### 📱 本地开发配置 - -适合快速开发和调试: - -```yaml -common: - agent_name: dev_weather_agent - entry_point: app.py - description: 开发环境的天气查询 Agent - python_version: '3.12' - launch_type: local - -launch_types: - local: - image_tag: dev - invoke_port: 8000 - runtime_envs: - MODEL_AGENT_API_KEY: xxx - DEBUG: 'true' # 开启调试 - LOG_LEVEL: debug # 详细日志 - ports: - - "8000:8000" - memory_limit: 512m # 开发环境资源限制小一些 - cpu_limit: '0.5' -``` - -### 🚀 生产环境配置 - -适合正式上线: - -```yaml -common: - agent_name: prod_weather_agent - entry_point: server.py - description: 生产环境的天气查询 Agent - python_version: '3.12' - launch_type: cloud - -launch_types: - cloud: - region: cn-beijing - image_tag: v1.0.0 # 使用具体版本号 - ve_cr_namespace_name: production - ve_cr_repo_name: weather_agent - runtime_envs: - # 基础配置 - MODEL_AGENT_API_KEY: xxx - MODEL_AGENT_NAME: ep-xxx - - # 可观测性(生产环境推荐开启) - OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx - OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317 - OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: prod_weather_agent - - # 日志配置 - LOG_LEVEL: info # 生产环境用 info 级别 -``` - ---- - -## 常见问题 - -### ❓ 配置文件找不到 - -``` -Error: Configuration file not found -``` - -**解决**: -```bash -agentkit init my_agent # 创建新项目 -# 或 -agentkit config # 创建配置 -``` - -### ❓ YAML 格式错误 - -``` -Error: Invalid YAML format -``` - -**检查清单**: -- ✅ 使用空格缩进(不要用 Tab) -- ✅ 检查冒号后面有空格 -- ✅ 字符串包含特殊字符要加引号 - -### ❓ 必填项缺失 - -``` -Error: agent_name is required -``` - -**解决**: -```bash -agentkit config # 重新配置,填写必填项 -``` - -### ❓ 环境变量不生效 - -**可能原因**: -1. 变量名拼写错误 -2. 配置没有保存 -3. 没有重新部署 - -**解决方法**: -```bash -# 1. 检查配置 -cat agentkit.yaml - -# 2. 重新部署 -agentkit deploy -``` - ---- - -## 下一步 - -- 📖 [CLI 概览](./1.overview.md) - 了解整体功能和特性 -- 🎮 [命令详解](./2.commands.md) - 学习每个命令的用法 -- 🚀 [快速开始](../1.introduction/3.quickstart.md) - 动手实践完整流程 diff --git a/docs/content/2.agentkit-cli/4.logging.md b/docs/content/2.agentkit-cli/4.logging.md deleted file mode 100644 index c848bf4..0000000 --- a/docs/content/2.agentkit-cli/4.logging.md +++ /dev/null @@ -1,481 +0,0 @@ -# 日志系统 - -AgentKit CLI 内置了灵活的日志系统,帮助你了解命令执行过程、调试问题和追踪运行状态。 - -## 默认行为 - -AgentKit 默认配置如下: - -- ✅ **控制台输出**:关闭(不显示日志) -- ✅ **文件日志**:关闭(不记录日志) -- 💡 **按需开启**:根据需要通过环境变量开启日志功能 - -```bash -# 默认情况下,命令运行时无任何日志输出 -agentkit status - -# 如需日志,请通过环境变量开启(见下文) -``` - -**日志示例**: - -``` -[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Loading configuration... -[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Using launch_type: cloud -[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Querying status with cloud strategy... -[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Status query completed: running -``` - ---- - -## 快速开始 - -### 开启文件日志 - -如果需要将日志保存到文件: - -```bash -# 开启文件日志(默认 INFO 级别) -export AGENTKIT_FILE_ENABLED=true - -# 运行命令 -agentkit deploy - -# 查看生成的日志文件 -cat .agentkit/logs/agentkit-$(date +%Y%m%d).log -``` - -### 开启控制台日志 - -如果你想在控制台实时查看日志: - -```bash -# 开启控制台日志 -export AGENTKIT_LOG_CONSOLE=true - -# 运行命令,现在可以在控制台看到日志了 -agentkit status -``` - -### 同时开启控制台和文件日志 - -```bash -# 同时开启控制台和文件日志 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true - -# 运行命令 -agentkit build -``` - -### 调试模式 - -遇到问题需要详细日志时: - -```bash -# 开启 DEBUG 级别日志(自动开启控制台和文件输出) -export AGENTKIT_LOG_LEVEL=DEBUG -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true - -# 运行命令,查看详细的调试信息 -agentkit build -``` - ---- - -## 环境变量配置 - -通过环境变量,你可以完全自定义日志行为。 - -### 基础配置 - -| 环境变量 | 说明 | 默认值 | 示例 | -|----------|------|--------|------| -| `AGENTKIT_LOG_CONSOLE` | 是否在控制台显示日志 | `false` | `true` / `false` | -| `AGENTKIT_FILE_ENABLED` | 是否保存日志到文件 | `false` | `true` / `false` | -| `AGENTKIT_LOG_LEVEL` | 日志级别(控制台和文件) | `INFO` | `DEBUG` / `INFO` / `WARNING` / `ERROR` | -| `AGENTKIT_LOG_FILE` | 日志文件路径(开启文件日志时生效) | `.agentkit/logs/agentkit-YYYYMMDD.log` | `/tmp/my-agent.log` | - -### 高级配置 - -分别控制控制台和文件的日志级别: - -| 环境变量 | 说明 | 默认值 | -|----------|------|--------| -| `AGENTKIT_CONSOLE_LOG_LEVEL` | 控制台日志级别 | `INFO` | -| `AGENTKIT_FILE_LOG_LEVEL` | 文件日志级别 | `INFO` | - -**使用示例**: - -```bash -# 控制台只看重要的错误,文件记录所有信息 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR -export AGENTKIT_FILE_LOG_LEVEL=DEBUG - -agentkit launch -``` - ---- - -## 日志级别说明 - -AgentKit 支持 5 种日志级别,级别越高,信息越少: - -| 级别 | 说明 | 适用场景 | -|------|------|----------| -| `DEBUG` | 详细的调试信息 | 问题排查、开发调试 | -| `INFO` | 常规操作信息(默认) | 了解命令执行过程 | -| `WARNING` | 警告信息 | 关注潜在问题 | -| `ERROR` | 错误信息 | 只看失败的操作 | -| `CRITICAL` | 严重错误 | 只看致命错误 | - ---- - -## 常用场景 - -### 场景 1:正常使用(默认配置) - -适合日常使用,无日志输出,保护信息安全。 - -```bash -# 无需任何配置,直接使用 -agentkit status -agentkit deploy -``` - -**效果**: -- ✅ 控制台:干净整洁,无日志输出 -- ✅ 文件:无日志文件生成,保护信息安全 - ---- - -### 场景 1.1:需要保存日志记录 - -开启文件日志,便于追溯操作历史: - -```bash -# 开启文件日志 -export AGENTKIT_FILE_ENABLED=true - -# 运行命令 -agentkit deploy -``` - -**效果**: -- ✅ 控制台:干净整洁 -- ✅ 日志:自动保存到 `.agentkit/logs/`,默认 INFO 级别 - ---- - -### 场景 2:调试问题 - -遇到错误或异常行为时,开启详细日志: - -```bash -# 开启控制台和文件的 DEBUG 日志 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_LOG_LEVEL=DEBUG - -# 运行命令 -agentkit build -``` - -**效果**: -- ✅ 控制台:显示详细的执行过程 -- ✅ 日志文件:保存完整 DEBUG 信息,便于事后分析 - ---- - -### 场景 3:CI/CD 环境 - -在持续集成环境中,需要在控制台看到日志,同时保存完整记录: - -```bash -# 在 CI 配置文件中设置 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_CONSOLE_LOG_LEVEL=INFO -export AGENTKIT_FILE_LOG_LEVEL=DEBUG -export AGENTKIT_LOG_FILE=/var/log/agentkit/build-${BUILD_ID}.log - -# 运行构建 -agentkit launch -``` - -**效果**: -- ✅ 控制台:显示关键信息,便于查看 CI 日志 -- ✅ 日志文件:保存详细信息,便于事后分析 - ---- - -### 场景 4:生产环境 - -生产环境只记录警告和错误到文件: - -```bash -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_FILE_LOG_LEVEL=WARNING -export AGENTKIT_LOG_FILE=/var/log/agentkit/production.log - -# 运行命令 -agentkit deploy -``` - -**效果**: -- ✅ 控制台:无输出,保持清爽 -- ✅ 日志文件:只记录警告和错误,聚焦问题 - ---- - -### 场景 5:完全静默 - -不需要任何日志时(默认行为): - -```bash -# 默认配置即为完全静默,无需设置环境变量 -agentkit status - -# 或者显式设置(确保之前的环境变量不影响) -unset AGENTKIT_LOG_CONSOLE -unset AGENTKIT_FILE_ENABLED -``` - -**效果**: -- ✅ 控制台:无日志输出 -- ✅ 文件:无日志文件生成 - ---- - -## 日志文件管理 - -### 日志文件位置 - -当开启文件日志后(`AGENTKIT_FILE_ENABLED=true`),日志保存在项目根目录的 `.agentkit/logs/` 文件夹中: - -``` -your-project/ -├── .agentkit/ -│ └── logs/ -│ ├── agentkit-20251120.log # 今天的日志 -│ ├── agentkit-20251119.log # 昨天的日志 -│ └── agentkit-20251118.log # 前天的日志 -├── agentkit.yaml -└── my_agent.py -``` - -### 自动清理旧日志 - -日志文件会随时间增多,建议定期清理: - -```bash -# 删除 7 天前的日志 -find .agentkit/logs -name "agentkit-*.log" -mtime +7 -delete - -# 或者手动删除 -rm .agentkit/logs/agentkit-20251101.log -``` - -### 自定义日志路径 - -```bash -# 保存到指定位置 -export AGENTKIT_LOG_FILE=/tmp/my-custom-agent.log - -# 或保存到用户目录 -export AGENTKIT_LOG_FILE=$HOME/.agentkit-logs/agent.log - -agentkit deploy -``` - ---- - -## 配置优先级 - -当多种配置方式同时存在时,优先级如下(从高到低): - -1. **专用环境变量** - `AGENTKIT_CONSOLE_LOG_LEVEL` -2. **通用环境变量** - `AGENTKIT_LOG_LEVEL` -3. **默认值** - `INFO` - -**示例**: - -```bash -# 设置通用级别为 INFO -export AGENTKIT_LOG_LEVEL=INFO - -# 设置控制台专用级别为 WARNING(优先级更高) -export AGENTKIT_CONSOLE_LOG_LEVEL=WARNING - -# 结果:控制台显示 WARNING,文件记录 INFO -agentkit status -``` - ---- - -## 故障排查 - -### 日志文件没有创建 - -**可能原因**: -- 文件日志被禁用了 -- 目录权限不足 - -**解决方法**: - -```bash -# 1. 检查是否禁用了文件日志 -echo $AGENTKIT_FILE_ENABLED # 应该是 true 或为空 - -# 2. 检查目录权限 -ls -la .agentkit/logs/ - -# 3. 手动创建目录 -mkdir -p .agentkit/logs - -# 4. 确保环境变量正确 -unset AGENTKIT_FILE_ENABLED # 重置为默认值 -``` - ---- - -### 控制台没有日志输出 - -**可能原因**: -- 控制台日志默认是关闭的 -- 日志级别设置过高 - -**解决方法**: - -```bash -# 1. 开启控制台日志 -export AGENTKIT_LOG_CONSOLE=true - -# 2. 设置合适的日志级别 -export AGENTKIT_CONSOLE_LOG_LEVEL=INFO - -# 3. 运行命令 -agentkit status -``` - ---- - -### 日志太多或太少 - -**调整日志级别**: - -```bash -# 日志太多 - 只看重要信息 -export AGENTKIT_LOG_LEVEL=WARNING - -# 日志太少 - 查看详细信息 -export AGENTKIT_LOG_LEVEL=DEBUG -``` - ---- - -## 最佳实践 - -### 开发环境推荐配置 - -在你的 `.bashrc` 或 `.zshrc` 中添加(可选): - -```bash -# AgentKit 开发环境配置(根据需要选择) -# 选项1:只开启控制台日志 -export AGENTKIT_LOG_CONSOLE=true - -# 选项2:同时开启控制台和文件日志 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_CONSOLE_LOG_LEVEL=INFO -export AGENTKIT_FILE_LOG_LEVEL=DEBUG -``` - -**推荐**: -- 默认不配置,保持干净 -- 需要调试时临时开启 -- 避免敏感信息意外记录 - ---- - -### 团队协作 - -在项目根目录创建 `.env.example` 文件: - -```bash -# AgentKit 日志配置示例 -# 根据需要复制到 .env 并修改 - -# === 开发环境建议配置 === -# 开启控制台日志(便于实时查看) -AGENTKIT_LOG_CONSOLE=true - -# 开启文件日志(便于问题追溯,可选) -# AGENTKIT_FILE_ENABLED=true - -# 设置日志级别 -AGENTKIT_LOG_LEVEL=INFO - -# 自定义日志路径(可选) -# AGENTKIT_LOG_FILE=./logs/my-agent.log -``` - -**提醒**: -- 团队成员根据需求自行调整 -- `.env` 文件应该在 `.gitignore` 中,避免提交个人配置 -- 默认不开启文件日志,保护信息安全 - ---- - -### 生产部署建议 - -```bash -# 生产环境配置 -export AGENTKIT_LOG_CONSOLE=false # 关闭控制台 -export AGENTKIT_FILE_ENABLED=true # 开启文件日志 -export AGENTKIT_FILE_LOG_LEVEL=WARNING # 只记录警告和错误 -export AGENTKIT_LOG_FILE=/var/log/agentkit/prod.log # 统一路径 -``` - -**优点**: -- 减少不必要的输出 -- 聚焦重要问题 -- 便于日志管理和监控 - ---- - -## 总结 - -AgentKit 的日志系统设计原则: - -- 🔒 **安全优先** - 默认不输出日志,避免信息泄露 -- 🎯 **按需启用** - 通过环境变量灵活开启 -- 🔧 **灵活配置** - 控制台和文件可独立控制 -- 📊 **分级控制** - 不同场景使用不同日志级别 -- 📁 **自动管理** - 开启后按日期分割,便于查找 - -**快速参考**: - -```bash -# 1. 开启文件日志 -export AGENTKIT_FILE_ENABLED=true - -# 2. 开启控制台调试 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_LOG_LEVEL=DEBUG - -# 3. 查看日志文件(需要先开启文件日志) -cat .agentkit/logs/agentkit-$(date +%Y%m%d).log - -# 4. 控制台和文件使用不同级别 -export AGENTKIT_LOG_CONSOLE=true -export AGENTKIT_FILE_ENABLED=true -export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR -export AGENTKIT_FILE_LOG_LEVEL=DEBUG -``` - -如有问题,请参考 [故障排查](#故障排查) 章节或联系技术支持。 diff --git a/docs/content/3.agentkit-sdk/1.overview.md b/docs/content/3.agentkit-sdk/1.overview.md deleted file mode 100644 index 265b50c..0000000 --- a/docs/content/3.agentkit-sdk/1.overview.md +++ /dev/null @@ -1,238 +0,0 @@ -# AgentKit SDK 概览 - -AgentKit SDK 是一个 Python 开发工具包,用于快速构建符合 AgentKit Platform 标准的 Agent 应用。SDK 提供了一套简洁的装饰器和客户端接口,帮助开发者专注于 Agent 业务逻辑的实现。 - -## 核心架构 - -AgentKit SDK 采用模块化设计,主要包含以下模块: - -### 1. Runtime 应用框架 - -提供多种应用模式,将用户代码封装为符合 Platform 标准的 HTTP 服务: - -#### AgentkitSimpleApp -最常用的应用框架,适用于标准的 Agent 应用。 - -**核心装饰器**: -- `@app.entrypoint` - 定义 Agent 的主入口函数 -- `@app.ping` - 定义健康检查函数 -- `@app.async_task` - 定义异步任务(规划中) - -**标准路由**: -- `/invoke` - Agent 调用端点 -- `/ping` - 健康检查 -- `/health`、`/readiness`、`/liveness` - Kubernetes 就绪探针 - -#### AgentkitMCPApp -基于 MCP (Model Context Protocol) 协议的应用框架,用于将工具封装为 MCP 服务。 - -**核心装饰器**: -- `@app.tool` - 将函数注册为 MCP 工具 -- `@app.agent_as_a_tool` - 将 Agent 封装为 MCP 工具 - -#### AgentkitA2aApp -基于 A2A (Agent-to-Agent) 协议的应用框架,用于构建可互相通信的 Agent。 - -**核心装饰器**: -- `@app.agent_executor` - 注册 Agent 执行器 -- `@app.task_store` - 注册任务存储(可选) - -### 2. Platform 服务客户端 - -提供便捷的客户端接口,用于访问 AgentKit Platform 的各项服务。 - -#### AgentkitMemory -记忆服务客户端,管理 Agent 的长期和短期记忆。 - -**主要功能**: -- `create_memory_collection()` - 创建记忆库 -- `list_memory_collections()` - 列举记忆库 -- `get_memory_collection()` - 获取记忆库详情 -- `update_memory_collection()` - 更新记忆库配置 -- `delete_memory_collection()` - 删除记忆库 -- `get_memory_connection_info()` - 获取连接信息 - -**设计理念**:控制面和数据面解耦 -- **控制面**(SDK 提供):管理记忆库的创建、配置和获取连接信息 -- **数据面**(ADK 实现):通过 MemoryBase 或 Mem0 协议进行实际的记忆读写 - -#### AgentkitKnowledge -知识库服务客户端,管理 Agent 的向量化知识库。 - -**主要功能**: -- `list_knowledge_bases()` - 列举知识库 -- `add_knowledge_base()` - 添加知识库 -- `get_knowledge_connection_info()` - 获取知识库连接信息 -- `delete_knowledge_base()` - 删除知识库 - -**使用场景**: -- RAG(检索增强生成)应用 -- 文档问答系统 -- 知识图谱集成 - -#### AgentkitMCP -MCP Gateway 客户端,用于管理和路由大量 MCP 工具。 - -**主要功能**: -- 注册和管理 MCP 服务 -- 工具聚合和智能路由 -- 降低工具集成复杂度 - -#### AgentkitRuntime -Runtime 管理客户端,用于管理 Agent 的运行时环境。 - -**主要功能**: -- 创建和管理 Runtime 实例 -- 查询 Runtime 状态 -- 配置环境变量和资源 - -### 3. 基础设施模块 - -#### BaseAgentkitClient -所有客户端的基类,提供统一的配置和 HTTP 请求能力。 - -**配置项**: -- API 端点配置 -- 认证凭证管理 -- 请求重试和超时 -- 日志和监控 - -#### Context 管理 -使用 `contextvars` 管理每个请求的上下文信息,包括: -- 用户身份 -- 会话 ID -- 请求元数据 -- 链路追踪信息 - -## 模块依赖关系 - -``` -AgentKit SDK -│ -├── Runtime Apps (应用框架层) -│ ├── AgentkitSimpleApp -│ ├── AgentkitMCPApp -│ ├── AgentkitA2aApp -│ └── AgentkitAgentServerApp -│ -├── Platform Clients (服务客户端层) -│ ├── AgentkitMemory -│ ├── AgentkitKnowledge -│ ├── AgentkitMCP -│ └── AgentkitRuntime -│ -└── Infrastructure (基础设施层) - ├── BaseAgentkitClient - ├── Context - └── Telemetry (可观测性) -``` - -## 主要特性 - -### 1. 装饰器驱动 -使用 Python 装饰器简化应用开发,开发者只需关注业务逻辑: - -```python -from agentkit.apps import AgentkitSimpleApp - -app = AgentkitSimpleApp() - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - # 业务逻辑 - return response -``` - -### 2. 框架无关 -SDK 不限制使用特定的 Agent 框架,支持: -- Volcengine ADK (veadk) -- Google ADK (gadk) -- LangChain -- 自定义框架 - -### 3. 自动化的可观测性 -内置 OpenTelemetry 支持,自动收集: -- 链路追踪(Tracing) -- 性能指标(Metrics) -- 日志(Logging) - -### 4. 生产就绪 -提供完整的生产环境支持: -- 健康检查端点 -- 优雅关闭 -- 错误处理 -- 请求重试 - -### 5. 类型安全 -完整的 Python 类型注解,提供: -- IDE 自动补全 -- 类型检查 -- 更好的代码可维护性 - -## 快速开始 - -### 安装 - -```bash -pip install agentkit-sdk-python -``` - -### 创建一个简单的 Agent - -```python -from agentkit.apps import AgentkitSimpleApp -from veadk import Agent, Runner -from veadk.tools.demo_tools import get_city_weather - -app = AgentkitSimpleApp() -agent = Agent(tools=[get_city_weather]) -runner = Runner(agent=agent) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - return response - -@app.ping -def ping() -> str: - return "pong!" - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) -``` - -### 使用 Platform 服务 - -```python -from agentkit.memory import AgentkitMemory -from agentkit.base_client import ApiConfig - -# 初始化客户端 -config = ApiConfig( - access_key="your_ak", - secret_key="your_sk" -) -memory_client = AgentkitMemory(config) - -# 创建记忆库 -response = memory_client.create_memory_collection( - name="my-memory", - short_term_configuration={...}, - long_term_configuration={...} -) -print(f"Memory ID: {response.id}") -``` - -## 下一步 - -- 查看[注解使用文档](./2.annotation.md)了解各种装饰器的详细用法 -- 参考 `samples/` 目录下的完整示例 -- 阅读 Platform 服务客户端的 API 文档 diff --git a/docs/content/3.agentkit-sdk/2.annotation.md b/docs/content/3.agentkit-sdk/2.annotation.md deleted file mode 100644 index e4e009a..0000000 --- a/docs/content/3.agentkit-sdk/2.annotation.md +++ /dev/null @@ -1,631 +0,0 @@ -# 注解使用指南 - -AgentKit SDK 提供了一套简洁的装饰器(注解),用于快速构建不同类型的 Agent 应用。本文档详细介绍各种注解的使用方法和最佳实践。 - -## Simple Agent 注解 - -`AgentkitSimpleApp` 是最常用的应用框架,提供标准的 HTTP 服务端点。 - -### @app.entrypoint - -定义 Agent 的主入口函数,处理来自 Platform 的调用请求。 - -#### 函数签名 - -```python -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - pass -``` - -#### 参数说明 - -- **payload** (dict): 请求体,包含用户输入和配置 - - `prompt` (str): 用户输入的提示词 - - 其他自定义字段 - -- **headers** (dict): 请求头,包含上下文信息 - - `user_id` (str): 用户 ID - - `session_id` (str): 会话 ID - - `request_id` (str): 请求追踪 ID - - 其他自定义头部 - -- **返回值** (str): Agent 的响应结果 - -#### 完整示例 - -```python -from agentkit.apps import AgentkitSimpleApp -from veadk import Agent, Runner -from veadk.tools.demo_tools import get_city_weather - -app = AgentkitSimpleApp() -agent = Agent(tools=[get_city_weather]) -runner = Runner(agent=agent) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - """Agent 主入口函数""" - # 1. 提取输入参数 - prompt = payload.get("prompt", "") - user_id = headers.get("user_id", "anonymous") - session_id = headers.get("session_id", "default") - - # 2. 调用 Agent 运行 - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - - # 3. 返回结果 - return response -``` - -#### 注意事项 - -1. **必须是异步函数**:使用 `async def` 定义 -2. **参数顺序固定**:第一个参数是 payload,第二个是 headers -3. **返回字符串**:返回值会被自动封装为 JSON 响应 -4. **错误处理**:建议在函数内部处理异常 - -#### 错误处理示例 - -```python -import logging - -logger = logging.getLogger(__name__) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - try: - prompt = payload["prompt"] - response = await runner.run(messages=prompt) - return response - except KeyError as e: - logger.error(f"Missing required field: {e}") - return f"Error: Missing required field {e}" - except Exception as e: - logger.error(f"Agent execution failed: {e}") - return f"Error: {str(e)}" -``` - -### @app.ping - -定义健康检查函数,用于 Platform 和 Kubernetes 的健康探测。 - -#### 函数签名 - -```python -@app.ping -def ping() -> str: - pass -``` - -#### 参数说明 - -- **无参数**:健康检查函数不接收任何参数 -- **返回值** (str): 健康状态信息,通常返回 "pong" 或 "ok" - -#### 基本示例 - -```python -@app.ping -def ping() -> str: - """健康检查""" - return "pong!" -``` - -#### 高级示例:包含依赖检查 - -```python -import redis -from sqlalchemy import create_engine - -# 初始化依赖 -redis_client = redis.Redis(host='localhost', port=6379) -db_engine = create_engine('postgresql://...') - -@app.ping -def ping() -> str: - """健康检查,包含依赖服务检测""" - try: - # 检查 Redis 连接 - redis_client.ping() - - # 检查数据库连接 - with db_engine.connect() as conn: - conn.execute("SELECT 1") - - return "ok - all services healthy" - except Exception as e: - logger.error(f"Health check failed: {e}") - return f"degraded - {str(e)}" -``` - -#### 注意事项 - -1. **无参数**:函数签名必须为 `def ping() -> str:` -2. **同步函数**:使用 `def` 而非 `async def` -3. **快速响应**:应在 1 秒内返回,避免超时 -4. **轻量级检查**:避免执行耗时操作 - -#### 可用端点 - -健康检查函数会自动注册到以下端点: -- `GET /ping` - 基础健康检查 -- `GET /health` - 健康状态 -- `GET /readiness` - Kubernetes 就绪探针 -- `GET /liveness` - Kubernetes 存活探针 - -### @app.async_task(规划中) - -用于定义异步任务,支持长时间运行的操作。 - -```python -@app.async_task -async def process_long_task(task_id: str, data: dict) -> dict: - """处理长时间运行的任务""" - # 长时间运行的逻辑 - result = await heavy_computation(data) - return result -``` - -> **注意**:此功能正在规划中,暂未实现。 - -## MCP Agent 注解 - -`AgentkitMCPApp` 用于构建 MCP (Model Context Protocol) 服务,将函数封装为标准的 MCP 工具。 - -### @app.tool - -将函数注册为 MCP 工具,供 LLM 调用。 - -#### 函数签名 - -```python -@app.tool -def tool_name(param1: str, param2: int) -> dict: - pass -``` - -#### 参数说明 - -- **函数参数**:工具的输入参数,必须有类型注解 -- **返回值**:工具的执行结果,建议返回 dict 类型 -- **文档字符串**:会作为工具描述,供 LLM 理解工具用途 - -#### 基本示例 - -```python -from agentkit.apps import AgentkitMCPApp - -mcp_app = AgentkitMCPApp() - -@mcp_app.tool -def get_city_weather(city: str) -> dict[str, str]: - """获取城市天气信息 - - Args: - city: 城市名称(必须为英文) - - Returns: - 包含天气状况和温度的字典 - """ - weather_data = { - "beijing": {"condition": "Sunny", "temperature": 25}, - "shanghai": {"condition": "Cloudy", "temperature": 22}, - } - - city = city.lower().strip() - if city in weather_data: - info = weather_data[city] - return {"result": f"{info['condition']}, {info['temperature']}°C"} - else: - return {"result": f"Weather information not found for {city}"} -``` - -#### 异步工具示例 - -```python -import aiohttp - -@mcp_app.tool -async def fetch_web_content(url: str) -> dict: - """获取网页内容 - - Args: - url: 网页 URL - - Returns: - 包含网页内容的字典 - """ - async with aiohttp.ClientSession() as session: - async with session.get(url) as response: - content = await response.text() - return { - "status": response.status, - "content": content[:1000] # 截取前 1000 字符 - } -``` - -#### 注意事项 - -1. **类型注解必需**:所有参数必须有类型注解,MCP 需要此信息生成工具模式 -2. **详细的文档字符串**:文档字符串会作为工具描述,帮助 LLM 理解工具用途 -3. **同步和异步均可**:支持 `def` 和 `async def` -4. **返回结构化数据**:建议返回 dict 类型,便于 LLM 解析 -5. **错误处理**:在函数内部处理异常,避免工具调用失败 - -#### 复杂参数示例 - -```python -from typing import List, Optional -from pydantic import BaseModel - -class SearchQuery(BaseModel): - keywords: List[str] - max_results: int = 10 - filters: Optional[dict] = None - -@mcp_app.tool -def search_documents(query: SearchQuery) -> dict: - """搜索文档 - - Args: - query: 搜索查询对象,包含关键词、结果数量和过滤条件 - - Returns: - 搜索结果列表 - """ - # 实现搜索逻辑 - results = perform_search( - keywords=query.keywords, - max_results=query.max_results, - filters=query.filters - ) - return {"results": results, "count": len(results)} -``` - -### @app.agent_as_a_tool - -将整个 Agent 封装为 MCP 工具,实现 Agent 的组合和协作。 - -#### 函数签名 - -```python -@app.agent_as_a_tool -async def agent_tool(prompt: str) -> str: - pass -``` - -#### 使用示例 - -```python -from veadk import Agent, Runner -from veadk.tools.demo_tools import get_city_weather - -# 创建一个专门的天气 Agent -weather_agent = Agent(tools=[get_city_weather]) -weather_runner = Runner(agent=weather_agent) - -mcp_app = AgentkitMCPApp() - -@mcp_app.agent_as_a_tool -async def weather_assistant(prompt: str) -> str: - """天气助手 Agent - - 专门处理天气相关查询的 Agent,可以查询全球城市的天气信息。 - - Args: - prompt: 用户的天气查询 - - Returns: - 天气查询结果 - """ - response = await weather_runner.run(messages=prompt) - return response -``` - -#### 多 Agent 协作示例 - -```python -# 创建多个专门的 Agent -weather_agent = Agent(tools=[get_city_weather]) -news_agent = Agent(tools=[get_latest_news]) -calendar_agent = Agent(tools=[check_schedule]) - -@mcp_app.agent_as_a_tool -async def weather_assistant(query: str) -> str: - """天气助手""" - return await Runner(agent=weather_agent).run(messages=query) - -@mcp_app.agent_as_a_tool -async def news_assistant(query: str) -> str: - """新闻助手""" - return await Runner(agent=news_agent).run(messages=query) - -@mcp_app.agent_as_a_tool -async def calendar_assistant(query: str) -> str: - """日程助手""" - return await Runner(agent=calendar_agent).run(messages=query) -``` - -#### 注意事项 - -1. **Agent 职责单一**:每个 Agent 应专注于特定领域 -2. **清晰的描述**:文档字符串要明确 Agent 的能力边界 -3. **异步执行**:通常是异步函数 -4. **合理的超时**:设置合理的执行超时时间 - -## A2A Agent 注解 - -`AgentkitA2aApp` 用于构建 A2A (Agent-to-Agent) 应用,支持 Agent 之间的通信和协作。 - -### @app.agent_executor - -注册 Agent 执行器,定义 Agent 的执行逻辑。 - -#### 函数签名 - -```python -@app.agent_executor(runner=runner, **kwargs) -class MyAgentExecutor(A2aAgentExecutor): - pass -``` - -#### 参数说明 - -- **runner**: Agent 的运行器实例 -- **kwargs**: 其他配置参数 - -#### 基本示例 - -```python -from agentkit.apps import AgentkitA2aApp -from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor -from veadk import Agent, Runner -from veadk.a2a.agent_card import get_agent_card -from veadk.tools.demo_tools import get_city_weather - -# 创建 A2A 应用 -a2a_app = AgentkitA2aApp() - -# 创建 Agent -agent = Agent(tools=[get_city_weather]) -runner = Runner(agent=agent) - -# 注册执行器 -@a2a_app.agent_executor(runner=runner) -class WeatherAgentExecutor(A2aAgentExecutor): - """天气查询 Agent 执行器""" - pass - -# 运行应用 -if __name__ == "__main__": - a2a_app.run( - agent_card=get_agent_card(agent=agent, url="http://127.0.0.1:8000"), - host="127.0.0.1", - port=8000, - ) -``` - -#### 自定义执行器示例 - -```python -from a2a.server.agent_execution import AgentExecutor -from a2a.server.agent_execution.context import RequestContext -from a2a.server.events.event_queue import EventQueue - -@a2a_app.agent_executor(runner=runner) -class CustomAgentExecutor(AgentExecutor): - """自定义 Agent 执行器""" - - async def execute( - self, - context: RequestContext, - event_queue: EventQueue - ) -> str: - """执行 Agent 逻辑 - - Args: - context: 请求上下文,包含输入消息和历史 - event_queue: 事件队列,用于发送中间结果 - - Returns: - Agent 的响应结果 - """ - # 从上下文提取输入 - user_message = context.current_input - - # 发送中间事件(可选) - await event_queue.put({ - "type": "thinking", - "content": "正在思考..." - }) - - # 执行 Agent - response = await self.runner.run(messages=user_message) - - return response -``` - -#### 注意事项 - -1. **继承 AgentExecutor**:必须继承自 `AgentExecutor` 或其子类 -2. **提供 runner**:必须通过参数传入 runner 实例 -3. **实现 execute 方法**:如需自定义逻辑,重写 `execute` 方法 -4. **使用 event_queue**:通过事件队列发送中间状态 - -### @app.task_store - -注册任务存储,用于持久化 A2A 任务状态。 - -#### 函数签名 - -```python -@app.task_store(**kwargs) -class MyTaskStore(TaskStore): - pass -``` - -#### 使用默认存储 - -```python -# 不指定 task_store,会使用内存存储(InMemoryTaskStore) -a2a_app = AgentkitA2aApp() - -@a2a_app.agent_executor(runner=runner) -class MyExecutor(A2aAgentExecutor): - pass -``` - -#### 自定义任务存储示例 - -```python -from a2a.server.tasks.task_store import TaskStore -from a2a.types import Task -import redis - -@a2a_app.task_store(redis_url="redis://localhost:6379") -class RedisTaskStore(TaskStore): - """基于 Redis 的任务存储""" - - def __init__(self, redis_url: str): - self.redis_client = redis.from_url(redis_url) - - async def save_task(self, task: Task) -> None: - """保存任务""" - task_data = task.model_dump_json() - self.redis_client.set(f"task:{task.id}", task_data) - - async def get_task(self, task_id: str) -> Task | None: - """获取任务""" - task_data = self.redis_client.get(f"task:{task_id}") - if task_data: - return Task.model_validate_json(task_data) - return None - - async def delete_task(self, task_id: str) -> None: - """删除任务""" - self.redis_client.delete(f"task:{task_id}") -``` - -#### 注意事项 - -1. **可选装饰器**:如不指定,使用内存存储 -2. **继承 TaskStore**:必须继承自 `TaskStore` -3. **实现必需方法**:实现 `save_task`、`get_task`、`delete_task` 等方法 -4. **持久化存储**:生产环境建议使用持久化存储(Redis、数据库等) - -## 最佳实践 - -### 1. 错误处理 - -所有装饰的函数都应该有良好的错误处理: - -```python -import logging - -logger = logging.getLogger(__name__) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - try: - # 业务逻辑 - result = await process(payload) - return result - except ValueError as e: - logger.warning(f"Invalid input: {e}") - return f"Invalid input: {str(e)}" - except Exception as e: - logger.error(f"Unexpected error: {e}", exc_info=True) - return "An error occurred. Please try again later." -``` - -### 2. 日志记录 - -添加适当的日志以便追踪问题: - -```python -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - request_id = headers.get("request_id", "unknown") - logger.info(f"[{request_id}] Processing request: {payload}") - - try: - response = await runner.run(messages=payload["prompt"]) - logger.info(f"[{request_id}] Request completed successfully") - return response - except Exception as e: - logger.error(f"[{request_id}] Request failed: {e}") - raise -``` - -### 3. 类型注解 - -使用完整的类型注解提高代码质量: - -```python -from typing import Dict, Any - -@app.entrypoint -async def run(payload: Dict[str, Any], headers: Dict[str, str]) -> str: - prompt: str = payload["prompt"] - user_id: str = headers.get("user_id", "anonymous") - # ... -``` - -### 4. 文档字符串 - -为所有函数添加详细的文档字符串: - -```python -@mcp_app.tool -def calculate_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> dict: - """计算两个地理坐标之间的距离 - - 使用 Haversine 公式计算地球表面两点间的大圆距离。 - - Args: - lat1: 起点纬度(度) - lon1: 起点经度(度) - lat2: 终点纬度(度) - lon2: 终点经度(度) - - Returns: - 包含距离信息的字典,距离单位为公里 - - Example: - >>> calculate_distance(39.9, 116.4, 31.2, 121.5) - {"distance_km": 1067.5} - """ - # 实现逻辑 -``` - -### 5. 性能优化 - -避免在装饰的函数中执行耗时初始化: - -```python -# ❌ 不好的做法 -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - agent = Agent(tools=[...]) # 每次请求都创建 - runner = Runner(agent=agent) - return await runner.run(messages=payload["prompt"]) - -# ✅ 好的做法 -agent = Agent(tools=[...]) # 只创建一次 -runner = Runner(agent=agent) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - return await runner.run(messages=payload["prompt"]) -``` - -## 下一步 - -- 查看 `samples/` 目录下的完整示例代码 -- 阅读 [SDK 概览](./1.overview.md) 了解整体架构 -- 部署应用到 AgentKit Platform diff --git a/docs/content/4.runtime/1.overview.md b/docs/content/4.runtime/1.overview.md deleted file mode 100644 index d082fe0..0000000 --- a/docs/content/4.runtime/1.overview.md +++ /dev/null @@ -1,26 +0,0 @@ -# AgentKit Runtime 概述 - -用户基于传统的IaaS架构部署、运行AI Agent时往往会遇到如下问题: - - IaaS运维工作量大:用户需自行搭建运行环境(计算资源、网络配置、依赖安装等),耗费大量人力用于配置、调试、维护、扩展以及问题排查和性能优化,效率较低。 - - 缺乏统一运行时平台:需要分别为Session或任务创建单独的运行环境,无法统一调度和管理Session。 - - 安全与隔离性差:不同用户或Agent之间的可能出现访问冲突,存在出现权限泄露或者越权访问的风险 - - 运维和监控的负担增加:没有内建的监控与日志管理,用户需要配置日志系统、指标收集和警报规则,难以针对Agent的特征实时监控Agent的运行状态,无法及时发现和解决问题 - -AgentKit runtime 是一个统一的Agent运行时,负责管理Agent的运行、会话和资源调度,为AI Agent提供安全隔离的托管式运行环境,支持便捷且规模化的部署。 - -## AgentKit Runtime核心能力 - -### 提供Serverless runtime 解决 AI Agent 部署、运维、成本难题: -- **Serverless运行时**:简化的环境管理和配置,无需关心底层基础设施,维护复杂的运行环境,实现弹性伸缩和运维成本优化 -- **统一运行时平台**:提供统一的运行时环境,可以在同一环境中运行多个Agent实例(Session),实现高效调度和实例管理,并提供统一的接入域名 -- **自动化生命周期管理与扩展**:根据需求从零自动扩展到大规模并发,用户无需再关注Agent的实际部署、扩缩容,运维便利 -- **按量付费,降低成本**:根据Agent流量自动创建销毁运行时资源,避免资源长期standby,节省云资源成本 -- **内建监控与日志管理**:提供实时监控和日志功能,用户可以轻松追踪Agent运行状态,及时发现并解决问题,减轻运维负担。 - -### 解决多用户的安全问题: -- 基于云厂商成熟的隔离技术保证安全隔离,不同的Agent runtime在隔离的受保护环境中运行,避免恶意Agent影响其他Agent安全 -- 与Identity & 网关鉴权协同,严格区分会话上下文与访问权限,降低数据泄露与串扰风险 - -### 框架、模型无关,提供便捷快速的构建部署方式: -- 深度融合veADK,同时支持主流基于python的Agent框架(其他非python框架本期先不支持),用户通过少量代码适配即可快速对接,且支持HTTP、MCP、A2A协议 -- 提供AgentKit SDK,支持configure和launch,支持一键协助客户从本地IDE部署至云上runtime diff --git a/docs/content/5.tools/1.sandbox_quickstart.md b/docs/content/5.tools/1.sandbox_quickstart.md deleted file mode 100644 index 0acbefc..0000000 --- a/docs/content/5.tools/1.sandbox_quickstart.md +++ /dev/null @@ -1,216 +0,0 @@ -# AgentKit Built-in Tools 快速开始指南 - -Built-in Tools是AgentKit内置的All-in-one的工具,提供了多种Agent在执行任务中需要的运行环境工具,支持快速集成与便捷调用。 - -## 核心能力 - - 提供code sandbox能力,让Agent安全地“运行代码” - - 提供browser sandbox能力:让Agent“像人一样操作网页” - - 提供terminal sandbox能力:让Agent“像人一样操作操作系统控制台(Terminal)” - - 提供文件系统能力:让Agent上传、下载文件 - -本文档将详细介绍如何在智能体代码中集成和使用 Built-in Tools,特别是代码执行沙箱功能。通过本指南,您将学会如何创建、配置和调用沙箱工具。 - -## 前置准备:创建沙箱工具 - -在开始编写代码之前,您需要先在火山引擎控制台创建一个沙箱工具实例: - -1. 访问 [Agentkit Built-in Tools 控制台](https://console.volcengine.com/agentkit-stg/region:agentkit-stg+cn-beijing/builtintools) -2. 创建新的沙箱工具实例 -3. 记录生成的 `TOOL_ID`,后续配置中会用到 - -## 智能体代码示例(使用VeADK框架) - -[VeADK](https://github.com/volcengine/veadk-python)是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。 -以下示例代码会展示如何使用VeADK框架来快速构建一个具备代码执行能力的智能体,通过集成Built-in Tools中的`run_code`工具,实现智能体在沙箱环境中安全地执行代码。 - -您无需从0-1构建veadk项目,推荐使用agentkit-cli,从Basic Agent App模版来创建项目(模板使用VeADK框架),在模版创建完成后,你需要做以下修改: -- 为智能体添加代码执行工具 `run_code` -- 配置环境变量 `AGENTKIT_TOOL_ID` 为您的沙箱工具实例 ID -最终,您的代码文件应该如下: - -### 完整代码 -将代码保存为`simple_agent_tool.py` - -```python -from veadk import Agent, Runner -import logging -from veadk.tools.builtin_tools.run_code import run_code -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) - -# 创建应用实例 -app = AgentkitSimpleApp() - -# 创建智能体,集成 run_code 工具 -agent: Agent = Agent( - tools=[run_code], # 添加代码执行工具 -) - -# 创建运行器 -runner = Runner(agent=agent) - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - """智能体入口函数,处理用户请求""" - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - - # 运行智能体,自动处理工具调用 - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - - logger.info(f"Run response: {response}") - return response - -@app.ping -def ping() -> str: - """健康检查接口""" - return "pong!" - -if __name__ == "__main__": - # 启动本地开发服务器 - app.run(host="0.0.0.0", port=8000) -``` - -### 代码说明 - -- **run_code 工具**:提供安全的代码执行环境,支持 Python、JavaScript 等多种编程语言 -- **session_id**:用于标识用户会话,同一 session_id 的请求将共享沙箱实例 -- **异步处理**:使用 `async/await` 语法支持高并发请求 -## 本地调试 -### 1. 官方源安装VeADK - -您可以直接使用 Python 包管理工具 pip 从 PyPI 平台 来安装 [veadk-python](https://volcengine.github.io/veadk-python/introduction/installation): - -```bash -# 正式环境源安装veADK -pip install veadk-python - -# 支持调用tools的veadk官方源版本尚未发布(预计1030发布),请先使用git源码方式安装。 -pip install veadk-python@git+https://github.com/volcengine/veadk-python.git -``` -> **说明**:支持调用built-in-tools的veadk-python版本为0.2.15及以上。 - -### 2. 配置环境变量 - -在启动智能体之前,需要配置以下环境变量: - -```bash -# 必需配置:沙箱工具 ID(从控制台获取) -export AGENTKIT_TOOL_ID=t-ye7fhfmghsc1kdxxxxxx - -# 必需配置:火山引擎访问凭证 -export VOLCENGINE_ACCESS_KEY=your_ak -export VOLCENGINE_SECRET_KEY=your_sk - -# 必需配置:模型相关配置 -export MODEL_AGENT_NAME=your_model_name -export MODEL_AGENT_API_KEY=your_model_api_key -``` - -**📝 注意事项:** - -- 请将 `your_ak`、`your_sk` 等占位符替换为您的实际配置值 -- `AGENTKIT_TOOL_ID` 从火山引擎控制台创建沙箱工具后获取 - -**🧪 测试环境配置(可选):** - -如果您的沙箱工具实例,是创建在测试环境账号下(如PPE),您需要在环境变量中显示指定 endpoint,否则默认连接正式环境,可能会导致调用失败。配置如下: - -```bash -export AGENTKIT_TOOL_HOST=agentkit-ppe.cn-beijing.volces-test.com -export AGENTKIT_TOOL_SERVICE_CODE=agentkit_ppe -``` -### 3. 本地启动智能体服务 - -配置完环境变量后,运行以下命令启动智能体: - -```bash -python simple_agent_tool.py -``` - -服务启动成功后,将监听 `http://0.0.0.0:8000`,您可以通过该地址调用智能体。 -### 4. 调用智能体 - -#### Session ID 机制说明 - -Built-in Tools 采用智能的会话管理机制: - -- **自动创建**:首次使用某个 `session_id` 调用时,系统会自动创建对应的沙箱会话实例 -- **会话复用**:相同 `session_id` 的多次请求将共享同一个沙箱实例,保持代码执行的上下文连续性 -- **生命周期**:每个会话实例默认有效期为 30 分钟,超时后自动销毁 -- **隔离性**:不同 `session_id` 的请求使用独立的沙箱环境,互不干扰 - -#### 调用示例 -使用以下 curl 命令测试智能体的代码执行能力: - -```bash -curl --location 'http://localhost:8000/invoke' \ - --header 'Content-Type: application/json' \ - --header 'user_id: veadk-test' \ - --header 'session_id: local_session' \ - --data '{"prompt": "给我在50和100之间一个随机的质数"}' -``` - -**参数说明:** - -- `user_id`:用户标识符 -- `session_id`:会话标识符,用于关联沙箱实例 -- `prompt`:用户的自然语言请求 - -#### 执行日志示例 - -调用成功后,控制台会输出详细的执行日志: -``` -2025-10-24 14:50:23 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app -2025-10-24 14:50:53 | DEBUG | runner.py:280 - Function call: id='call_1w6gamjirm56uvi8kl8dc0hr' args={'code': 'import random\nimport math\n\ndef is_prime(n):\n if n <= 1:\n return False\n if n == 2:\n return True\n if n % 2 == 0:\n return False\n for i in range(3, int(math.sqrt(n)) + 1, 2):\n if n % i == 0:\n return False\n return True\n\nprimes = [n for n in range(50, 101) if is_prime(n)]\nrandom_prime = random.choice(primes)\nprint(random_prime)', 'language': 'python3'} name='run_code' -2025-10-24 14:50:53 | DEBUG | run_code.py:41 - Running code in language: python3, session_id=local_session -2025-10-24 14:51:08 | DEBUG | run_code.py:68 - Invoke run code response: {'ResponseMetadata': {'RequestId': '', 'Action': 'InvokeTool', 'Version': '2025-10-30', 'Service': '', 'Region': ''}, 'Result': {'ToolId': 't-ye7i0e39c0c1kdxxxxxx', 'UserSessionId': 'local_session', 'SessionId': 's-ye7kmw6ps0c1kdxxxxxx', 'Endpoint': 'xxx', 'InternalEndpoint': '', 'Result': '{\n "success": true,\n "message": "Code executed successfully",\n "data": {\n "kernel_name": "python3",\n "session_id": "xxxx",\n "status": "ok",\n "execution_count": 1,\n "outputs": [\n {\n "output_type": "stream",\n "name": "stdout",\n "text": "83\\n",\n "data": null,\n "metadata": {},\n "execution_count": null,\n "ename": null,\n "evalue": null,\n "traceback": null\n }\n ],\n "code": "import random\\nimport math\\n\\ndef is_prime(n):\\n if n \\u003c= 1:\\n return False\\n if n == 2:\\n return True\\n if n % 2 == 0:\\n return False\\n for i in range(3, int(math.sqrt(n)) + 1, 2):\\n if n % i == 0:\\n return False\\n return True\\n\\nprimes = [n for n in range(50, 101) if is_prime(n)]\\nrandom_prime = random.choice(primes)\\nprint(random_prime)",\n "msg_id": "c4a5f58d-7c9b8b8a17118fe6d1c65aae_94_2"\n }\n}'}} -2025-10-24 14:51:24 | DEBUG | runner.py:288 - Event output: 在50和100之间随机生成的质数为:83。 - -(注:通过Python代码筛选50-100间的质数列表[53, 59, 61, 67, 71, 73, 79, 83, 89, 97],并随机选择得到结果。) -2025-10-24 14:51:24 | WARNING | runner.py:332 - No tracer is configured in the agent, no trace id provided. -INFO: 127.0.0.1:58727 - "POST /invoke HTTP/1.1" 200 OK -``` - -## 部署到生产环境 - -完成本地开发和测试后,您可以将智能体部署到 Agentkit 平台: - -1. **打包代码**:确保所有依赖都已正确配置在 `requirements.txt` 中 -2. **平台部署**:参考Runtime [快速开始](../1.introduction/3.quickstart.md) 部分部署tool,主要有以下几步: - - 在项目根目录运行 `agentkit init` 命令,初始化项目,会生成 `agentkit.yaml` 文件(如果前面已执行,跳过此步) - - 确保`agentkit.yaml`文件配置,应用入口设置为您刚才已经调通的应用代码`simple_agent_tool.py`,即: - ```yaml - entry_point: simple_agent_tool.py - ``` - - 确保所有依赖都已正确配置在 `requirements.txt` 中 - - 根据[快速开始]指南,通过`agentkit config`和`agentkit launch`命令,配置和部署应用。 -3. **调用应用**:部署完成后,您可以通过平台提供的 API 或 SDK 调用智能体。调用示例: - ```bash - agentkit invoke "给我在50和100之间一个随机的质数" - ``` - ---- - -## 常见问题 - -### Q: 如何查看沙箱支持的编程语言? -A: 当前支持 Python3、JavaScript 等主流语言,具体支持列表请参考工具文档。 - -### Q: Session 超时后的数据会保留吗? -A: 不会。Session 超时后,沙箱实例及其中的所有数据都会被清理,下次请求会创建新的实例。 - -### Q: 如何处理长时间运行的任务? -A: 建议将长时间任务拆分为多个步骤,或考虑使用异步任务队列方案。 - ---- diff --git a/docs/content/6.memory/1.memory_quickstart.md b/docs/content/6.memory/1.memory_quickstart.md deleted file mode 100644 index fd2e647..0000000 --- a/docs/content/6.memory/1.memory_quickstart.md +++ /dev/null @@ -1,166 +0,0 @@ -# AgentKit Memory 快速开始指南 - -AI Agent 运行过程中面临多轮任务日益复杂、上下文窗口不足的问题,需要有记忆能力来进行上下文保持与个性化定制。Agentkit Memory 提供统一的记忆库使用接口并与主流框架进行对接,为 Agent 运行记忆库支持提供跨会话、上下文感知和个性化交互,实现 Agent 的持续学习与演进。本章节将指导您安装依赖项并实现长期记忆功能。 - -# 使用示例 - -步骤如下 - -- 创建包含语义策略的记忆资源 -- 将事件(对话历史)写入记忆资源。 -- 从长期记忆中检索记忆记录 - -## 创建记忆库 - -通过火山引擎控制台,为智能体创建记忆库[Agentkit-Memory](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/memory) - -### 获取记忆资源的连接信息 - -在记忆详情-集成代码页面,获取连接信息。 - -- 对于 Mem0 类型的记忆资源,您可以看到类似如下的环境变量: - -``` -DATABASE_MEM0_BASE_URL="https://mem0-your-mem-url.mem0.volces.com:8000" -DATABASE_MEM0_API_KEY="xxxxxx-xxxxxxx" -``` - -- 对于 VikingDB 类型的记忆资源,您可以看到类似如下的环境变量: - -``` -DATABASE_VIKINGMEM_COLLECTION= #index -DATABASE_VIKINGMEM_MEMORY_TYPE=memory_summary_04uyfx # memory type, separate multiple by comma, e.g. event_v1,event_v2 -``` - -## 构建一个带长期记忆能力的智能体 - -[VeADK](https://github.com/volcengine/veadk-python)是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。 -以下示例展示了如何使用 VeADK 构建一个带长期记忆能力的智能体,记忆库后端采用 mem0。智能体可以根据用户输入的问题,使用长期记忆来存储用户偏好、会话摘要等个性化交互信息。 - -您无需从 0-1 构建 veadk 项目,我们推荐您使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改: - -- 为 Agent 添加`LongTermMemory` -- 配置上个章节获取的环境变量到`agentkit.yaml` -- 增加`mem0ai==0.1.118`到`requirements.txt` -- 在每一轮对话结束后显式调用`runner.save_session_to_long_term_memory`,将对话结果保存到长期记忆库 - -最终,您的代码文件应该如下: - -```python -''' -**simple agent demo app** - -Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur: -- MODEL_AGENT_NAME # model id in Volcano Engine Ark platform -- MODEL_AGENT_API_KEY # model api key in Volcano Engine Ark platform - -MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform. -''' -import logging -import os - -from veadk import Agent, Runner -from veadk.memory.long_term_memory import LongTermMemory - - -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) - -index = "simple_app" # required for viking backend, arbitrary for mem0 backend - -backend = "mem0" # one of "mem0", "viking_mem" -if backend == "viking_mem": - collection_name = os.getenv("DATABASE_VIKINGMEM_COLLECTION") - if not collection_name: - raise ValueError("DATABASE_VIKINGMEM_COLLECTION environment variable is not set") - index = collection_name - -app = AgentkitSimpleApp() -long_term_memory = LongTermMemory( - backend=backend, - index=index -) - -agent = Agent( - name="simple_app_agent", - instruction="You are a helpful assistant.", - long_term_memory=long_term_memory -) -runner = Runner(agent=agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id) - - logger.info(f"Run response: {response}") - - # save the teaching prompt and answer in long term memory - await runner.save_session_to_long_term_memory(session_id=session_id, user_id=user_id) - - return response - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) - -``` - -## 环境配置 - -请为您的 `agentkit.yaml` 文件添加如下配置 - -``` -# 当长期记忆后端为 mem0 时,添加如下配置 -launch_types: - cloud: - runtime_envs: - DATABASE_MEM0_BASE_URL: - DATABASE_MEM0_API_KEY: - -# 当长期记忆后端为 VikingDB 时,添加如下配置 -launch_types: - cloud: - runtime_envs: - DATABASE_VIKINGMEM_COLLECTION: - DATABASE_VIKINGMEM_MEMORY_TYPE: -``` - -## 启动服务 - -运行 `agentkit launch`。构建好 Runtime 链接信息将被自动保存在 `agentkit.yaml` 文件中。 - -## 如何发起调用 - -执行如下发起调用 - -``` -agentkit invoke "My secret is 0xabcd" -``` - -将自动使用 `user_id="agentkit_user"`, `session_id="agentkit_sample_session"`来发起调用。 - -## 校验记忆库是否生效 - -在首轮调用中,您保存了密码。我们需要更换`session_id`,来验证 Agent 是否能正确读取到记忆库中的信息。建议您等待约 1 分钟,待长期记忆抽取完成后,再发起调用。 - -``` -agentkit invoke \ - --payload '{"prompt": "What is my secret?"}' \ - --headers '{"user_id": "agentkit_user", "session_id": "s123"}' -``` - -您将看到 Agent 成功读取到记忆库中的信息,并告诉你密码是 `0xabcd`。 diff --git a/docs/content/7.knowledge/1.knowledge_quickstart.md b/docs/content/7.knowledge/1.knowledge_quickstart.md deleted file mode 100644 index eaaea9b..0000000 --- a/docs/content/7.knowledge/1.knowledge_quickstart.md +++ /dev/null @@ -1,175 +0,0 @@ -# AgentKit Knowledge 快速开始指南 - -Agentkit Knowledge 提供主流的知识库的一键配置导入能力,实现在 AgentKit 平台轻松关联知识库,并提供统一的知识库接口与框架对接,提升 Agent 使用不同知识库的便利性。 - -# 使用示例 - -步骤如下 - -- 创建知识库资源 -- 将模版文件添加到知识库 -- 从知识库中检索记忆记录 - -## 创建知识库 - -通过火山引擎控制台,为智能体创建知识库[VikingDB-Knowledge](https://console.volcengine.com/vikingdb/knowledge),并添加下面内容作为`qa.md`到知识库`customer_support`中。 - -```md -# 智能客服知识库 - -## 1. 公司简介 - -VE 科技是一家专注于智能客服与知识管理的高科技公司。我们的核心产品是 **智能客服系统**,通过自然语言处理与知识库检索,为企业客户提供高效、智能的自动化客服解决方案。 - -## 2. 产品功能说明 - -- **自动问答**:基于知识库,快速响应常见问题。 -- **多渠道接入**:支持网页、App、微信、飞书等渠道。 -- **智能推荐**:根据上下文推荐相关答案。 -- **数据分析**:提供用户问题统计与客服绩效报告。 -- **自助知识库管理**:支持非技术人员快速编辑知识内容。 - ---- - -## 3. 常见问题 (FAQ) - -### Q1: 智能客服系统支持哪些语言? - -A1: 目前支持 **中文** 和 **英文**,后续将逐步增加日语、韩语等多语言支持。 - -### Q2: 系统可以接入现有的 CRM 吗? - -A2: 可以。我们的系统支持通过 API 与主流 CRM 系统(如 Salesforce、Zoho、金蝶)进行无缝集成。 - -### Q3: 如果机器人无法回答用户问题,会怎么办? - -A3: 系统会自动将问题转接至人工客服,并在后台记录该问题,方便管理员补充到知识库。 - -### Q4: 知识库内容多久更新一次? - -## A4: 知识库支持 **实时更新**,管理员提交后即可立即生效。 - -## 4. 联系我们 - -- 官网:[https://www.example.com](https://www.example.com) -- 客服邮箱:support@ve -- 服务热线:400-123-4567 -``` - -## 导入知识库 - -通过火山引擎控制台,为智能体导入知识库[Agentkit-Knowledge](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/knowledge) - -### 获取记忆资源的连接信息 - -在记忆详情-集成代码页面,获取连接信息。 - -- 对于 VikingDB Knowledge 类型的记忆资源,您可以看到类似如下的环境变量: - -```bash -export DATABASE_VIKING_COLLECTION=customer_support -export DATABASE_VIKING_PROJECT=default -export DATABASE_VIKING_REGION=cn-beijing -``` - -## 构建一个带知识库能力的智能体 - -[VeADK](https://github.com/volcengine/veadk-python)是一个开源的智能体开发框架,提供了智能体的开发、运行、调试等功能,由火山引擎团队维护。 - -以下示例展示了如何使用 VeADK 构建一个带知识库能力的智能体,知识库后端采用 VikingDB Knowledge。智能体可以根据用户输入的问题,使用知识库来回答用户的问题。 - -您无需从 0-1 构建 veadk 项目,推荐使用 agentkit-cli,从 Basic Agent App 模版来创建项目(模板使用 VeADK 框架)。在模版创建完成后,你需要做以下修改: - -- 为 Agent 添加`Knowledgebase` -- 配置上个章节获取的环境变量到`agentkit.yaml` - -最终,您的代码文件应该如下: - -```python -''' -**simple agent demo app** - -Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur: -- MODEL_AGENT_NAME # model id in Volcano Engine Ark platform -- MODEL_AGENT_API_KEY # model api key in Volcano Engine Ark platform - -MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform. -''' -import logging -import os - -from veadk import Agent, Runner -from veadk.knowledgebase import KnowledgeBase - - -from agentkit.apps import AgentkitSimpleApp - -logger = logging.getLogger(__name__) - -collection_name = os.getenv("DATABASE_VIKING_COLLECTION") -if not collection_name: - raise ValueError("DATABASE_VIKING_COLLECTION environment variable is not set") - -model_name = "doubao-seed-1-6-250615" - -app = AgentkitSimpleApp() -knowledgebase = KnowledgeBase(backend="viking", index=collection_name) - - -agent = Agent( - instruction="Answer customer's questions according to your knowledgebase.", - model_name=model_name, - knowledgebase=knowledgebase -) -runner = Runner(agent=agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id) - - logger.info(f"Run response: {response}") - return response - - -@app.ping -def ping() -> str: - return "pong!" - - -if __name__ == "__main__": - app.run(host="0.0.0.0", port=8000) -``` - -## 环境配置 - -请为您的 `agentkit.yaml` 文件添加如下配置 - -``` -launch_types: - cloud: - runtime_envs: - DATABASE_VIKING_COLLECTION: - -``` - -## 启动服务 - -运行 `agentkit launch`。构建好 Runtime 链接信息将被自动保存在 `agentkit.yaml` 文件中。 - -## 如何发起调用 - -执行如下发起调用 - -``` -agentkit invoke "你们有什么产品?" -``` - -您将看到 Agent 成功读取到知识库中的信息,并将`qa.md`中的信息重新组织语言后回答您。 diff --git a/docs/content/8.mcp/1.overview.md b/docs/content/8.mcp/1.overview.md deleted file mode 100644 index f210f1f..0000000 --- a/docs/content/8.mcp/1.overview.md +++ /dev/null @@ -1,42 +0,0 @@ -# AgentKit MCP - -AgentKit MCP 提供统一的 MCP 网关与工具治理中枢。以共享实例、预制认证插件与自动搜索能力,降低接入门槛、减少 Token 成本、提升工具命中与可靠性,让团队可以专注在业务逻辑与体验打磨。 -核心定位:统一入口、轻障碍接入、可治理的工具体系。承载 MCP 访问与会话保持,结合 OAuth2 与 API-Key 的认证插件,以及跨工具的语义搜索能力,形成“易接入、可治理、低成本”的工程骨架。 - -## AgentKit MCP 功能点 - -AgentKit MCP 主要包括 MCP 服务和 MCP 工具集 - -### MCP 服务 - -支持将企业既有 Web/HTTP 服务与第三方接口需要快速进入 Agent。AgentKit 支持两条路径: - -1. 直接转发 MCP Server,面向已具备 MCP 的后端 -2. 将 HTTP 转换为 MCP,通过上传 Swagger 与规则校验自动生成工具与参数描述,使历史资产快速纳入 MCP 能力集。 - -适用场景 - -- 面向具体后端(MCP Server 或 HTTP) -- 提供访问域名与会话保持 -- 认证在服务级别预制(API-Key、OAuth) -- 适合工具规模可控与明确场景 - -### MCP 工具集 - -随着工具数量膨胀或客户端存在工具上限(如 Trae 最多 50 个),自动搜索将“工具全集”对 LLM 的暴露收敛为 search/use 两个封装工具,以向量检索选择高匹配度工具,降低上下文冗余与延迟,并提升调用准确率。 - -适用场景: - -- 组合多个 MCP 服务的工具集合 -- 以语义检索选择最优工具 -- 对 LLM 暴露为 search/use 两个工具 -- 适合工具数量大、客户端有工具上限的场景 - -### 认证与安全 - -AgentKit MCP 认证链路优先采用 OAuth2 客户端凭证 模式,适用于前端应用访问 Agent runtime、服务端任务访问 Agent runtime,以及 Agent 访问 MCP Server。同时提供 API-Key 作为低依赖的补充方案,并规划后续的轮转与托管。 - -认证模式的区分: - -- Inbound:Agent 与 MCP 入站认证(OAuth2、API-Key),细化到自然人授权码与客户端凭证。 -- Outbound:网关访问 MCP Server 的凭证透传或转换(API-Key、OAuth client)。 diff --git a/docs/content/8.mcp/2.mcp_quickstart.md b/docs/content/8.mcp/2.mcp_quickstart.md deleted file mode 100644 index c0bf9bf..0000000 --- a/docs/content/8.mcp/2.mcp_quickstart.md +++ /dev/null @@ -1,288 +0,0 @@ -# AgentKit MCP Quick Start - -## 环境要求 - -开始前你需要准备: - -1. 一个开通了 AgentKit 的火山账号的 AccessKey & SecretKey - - > Tips: 需要确保 AccessKey 有 AgentKitFullAccess 权限。 - -2. MCP 服务(可以部署在 VeFaas 或公网可访问的位置) - - - 现存支持 MCP 的服务后端 - - 现存的 HTTP 服务和服务的 Swagger 接口定义Json,具体可以参考[Swagger](https://swagger.io/) - -3. Python 3.12+ installed - -4. 方舟APIKEY - -## 第一步:配置本地环境 - -> 可以使用 `uv` 或者 `python3 -m venv` 进行虚拟环境管理,下文将以 `uv`做为示例 -> -> `uv` 安装参考:[uv install](https://docs.astral.sh/uv/getting-started/installation/) - -虚拟环境配置 - -```bash -mkdir agentkit-mcp-quickstart -cd agentkit-mcp-quickstart -uv venv --python 3.12.0 -source .venv/bin/active -``` - -安装依赖 - -> 可以通过 `--index` 指定源,加快安装速度 - -```bash -uv pip install veadk-python -uv pip install google- -pip install -U agentkit-sdk-python --index-url https://artifacts-cn-beijing.volces.com/repository/agentkit/simple/ --extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --trusted-host mirrors.tuna.tsinghua.edu.cn -``` - -## 第二步:创建 AgentKit MCP - -1. 登录火山引擎 [AgentKit 控制台](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/gateway/mcpservice)。 - -2. 为准备好的后端 [创建 MCP 服务](https://console.volcengine.com/agentkit/region:agentkit+cn-beijing/gateway/mcpservice/create)。 - -3. 获取到创建后的 MCP 服务 Endpoint 和 ApiKey。会看到以下类似的输出: -> `httpUrl`即为 MCP 服务的 Endpoint,`Authorization` 即为 ApiKey。 - -```json -{ - "mcpServers": { - "create-http-334df4": { - "httpUrl": "https://sd4fc6lpoh486npgcaav0.apigateway-cn-beijing.volceapi.com/mcp/create-http-334df4", - "headers": { - "Authorization": "Bearer P66l-rpaLbxxxxxxxxxxxxxxo2PQ" - } - } - } -} -``` - -## 第三步:设置环境环境变量,运行 Agent - -环境变量配置 - -```bash -export MCP_ENDPOINT={{第三步中获取的Endpoint}} -export MCP_AUTH_KEY={{第三步中获取的ApiKey}} -export API_KEY={{方舟的APIKEY}} -``` - -代码示例 -> 代码示例中,我们使用 VeADK 框架,创建了一个简单的智能体,用于调用 MCP 服务。 - -```python -import logging - -from veadk import Agent, Runner -from veadk.config import getenv -from agentkit.apps import AgentkitSimpleApp -from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams - -logger = logging.getLogger(__name__) - - -url = getenv("MCP_ENDPOINT") -mcp_auth_key = getenv("MCP_AUTH_KEY") -apikey = getenv("API_KEY") - -mcp_ecs_toolset = MCPToolset( - connection_params=StreamableHTTPConnectionParams( - url=url, - headers={"Authorization": f"Bearer {mcp_auth_key}"} - ), -) - -app = AgentkitSimpleApp() - -root_agent = Agent( - name="ecs_helper", - model_name="doubao-1-5-pro-256k-250115", - instruction=''' - Help user find ECS instances and their details. - ''', - description="ECS Helper Agent", - tools=[mcp_ecs_toolset] -) - -runner = Runner(agent=root_agent) - - -@app.entrypoint -async def run(payload: dict, headers: dict) -> str: - prompt = payload["prompt"] - user_id = headers["user_id"] - session_id = headers["session_id"] - - logger.info( - f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}" - ) - - # 运行智能体,自动处理工具调用 - response = await runner.run( - messages=prompt, - user_id=user_id, - session_id=session_id - ) - - logger.info(f"Run response: {response}") - return response - -@app.ping -def ping() -> str: - """健康检查接口""" - return "pong!" - -if __name__ == "__main__": - # 启动本地开发服务器 - app.run(host="0.0.0.0", port=8000) -``` - -执行请求 - -```curl -curl --location 'http://localhost:8000/invoke' \ - --header 'Content-Type: application/json' \ - --header 'user_id: veadk-test' \ - --header 'session_id: local_session' \ - --data '{"prompt": "分析下我的ecs实例"}' -``` - -运行结果 - -```text -2025-10-24 20:17:33 | INFO | ark_veauth.py:25 - Fetching ARK token... -2025-10-24 20:17:33 | INFO | agent.py:118 - Model extra config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}} -2025-10-24 20:17:33 | DEBUG | agent.py:127 - LiteLLM client created with config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}} -2025-10-24 20:17:33 | INFO | agent.py:153 - VeADK version: 0.2.13 -2025-10-24 20:17:33 | INFO | agent.py:155 - Agent `ecs_helper` init done. -2025-10-24 20:17:33 | DEBUG | agent.py:156 - Agent: {'name': 'ecs_helper', 'tools': [], 'model_name': 'doubao-1-5-pro-256k-250115', 'model_api_base': 'https://ark.cn-beijing.volces.com/api/v3/'} -2025-10-24 20:17:33 | WARNING | runner.py:198 - No short term memory or session service provided, use an in-memory one instead. -2025-10-24 20:17:33 | INFO | runner.py:217 - No long term memory provided. -INFO: Started server process [1330124] -INFO: Waiting for application startup. -INFO: Application startup complete. -INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) -2025-10-24 20:18:35 | INFO | runner.py:250 - Run config: speech_config=None response_modalities=None save_input_blobs_as_artifacts=False support_cfc=False streaming_mode= output_audio_transcription=AudioTranscriptionConfig() input_audio_transcription=AudioTranscriptionConfig() realtime_input_config=None enable_affective_dialog=None proactivity=None session_resumption=None context_window_compression=None save_live_audio=False max_llm_calls=100 -2025-10-24 20:18:35 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app -2025-10-24 20:18:38 | DEBUG | runner.py:280 - Function call: id='call_xbyfcvc86wc26mbxz39vst12' args={'region': 'cn-beijing', 'needNum': 10} name='describe_instances' -2025-10-24 20:19:14 | DEBUG | runner.py:288 - Event output: 以下是您的ECS实例详情: -1. **实例1**: - - **实例ID**:i-ye7irm2sqobw80cqxd40 - - **创建时间**:2025-10-23T21:36:31+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -2. **实例2**: - - **实例ID**:i-ye7ipm0dtsqc6imh310d - - **创建时间**:2025-10-23T21:05:44+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Debian 12 64 bit - - **镜像ID**:image-ydzwsvy72n46nmxzvafi - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -3. **实例3**: - - **实例ID**:i-ye7ilsbbpcbw80ca2ymj - - **创建时间**:2025-10-23T20:06:54+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -4. **实例4**: - - **实例ID**:i-ye7fg1hgqoxjd1utrfy3 - - **创建时间**:2025-10-22T14:57:49+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -5. **实例5**: - - **实例ID**:i-ye5ejwoow0cva4fqydfc - - **创建时间**:2025-09-24T14:25:37+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -6. **实例6**: - - **实例ID**:i-ye5ejub08wbw80bpd7hr - - **创建时间**:2025-09-24T14:24:35+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -7. **实例7**: - - **实例ID**:i-ye5e5jyq68bw80c889i5 - - **创建时间**:2025-09-24T10:44:54+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -8. **实例8**: - - **实例ID**:i-ye5c4jbx8gqc6ily6b30 - - **创建时间**:2025-09-23T16:02:05+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Windows Server 2022 Datacenter Edition 64 - bit Chinese - - **镜像ID**:image-ye5907jc6ikhx1exow93 - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -9. **实例9**: - - **实例ID**:i-ye5c4end34xjd1umbfns - - **创建时间**:2025-09-23T16:00:05+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Debian 12 64 bit - - **镜像ID**:image-ydzwsvfxhokhx11pdmlv - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a -10. **实例10**: - - **实例ID**:i-ye5blj0xdsxjd1tk1vfh - - **创建时间**:2025-09-23T11:09:46+08:00 - - **计费方式**:PostPaid(按量计费) - - **实例规格**:ecs.e-c1m2.xlarge - - **CPU**:4核(核心数2,每核心线程数2) - - **内存**:8192MB - - **操作系统**:Debian 12 64 bit - - **镜像ID**:image-ydzwsvfxhokhx11pdmlv - - **状态**:RUNNING(运行中) - - **所属可用区**:cn - beijing - a - -以上10个实例均为按量计费,规格为ecs.e-c1m2.xlarge ,且大部分使用Windows Server 2022 Datacenter Edition 64 - bit Chinese操作系统,少数使用Debian 12 64 bit操作系统,目前状态均为运行中,所属可用区为cn - beijing - a 。若您还需要进一步分析或有其他操作需求,可继续向我提问。 -``` diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index ebea160..0000000 --- a/docs/index.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: home - -hero: - name: AgentKit - text: Python SDK & CLI - tagline: 快速构建和部署 Agent 应用到火山引擎 AgentKit Platform - actions: - - theme: brand - text: 快速开始 - link: /content/1.introduction/3.quickstart.md - - theme: alt - text: 查看文档 - link: /content/1.introduction/1.overview - -features: - - icon: 🚀 - title: 快速初始化 - details: 使用 agentkit init 命令,一键生成项目模板,内置多种应用类型(Basic App、Stream App等) - - - icon: 🛠️ - title: 简洁的 SDK - details: 基于装饰器的优雅 API,使用 @app.entrypoint 定义入口函数,专注业务逻辑开发 - - - icon: ☁️ - title: 多种部署模式 - details: 支持 Local、Hybrid、Cloud 三种部署模式,灵活满足不同场景需求 - - - icon: 🔧 - title: 交互式配置 - details: 使用 agentkit config 命令,引导式配置部署参数、环境变量和镜像仓库 - - - icon: 📦 - title: 一键构建部署 - details: agentkit launch 命令组合 build 和 deploy,自动完成构建镜像和部署到 Runtime - - - icon: 🔌 - title: Platform 集成 - details: 无缝集成 Memory、Knowledge、MCP Gateway 等 Platform 服务,开箱即用 ---- diff --git a/docs/vite.config.js b/docs/vite.config.js deleted file mode 100644 index 6814542..0000000 --- a/docs/vite.config.js +++ /dev/null @@ -1,11 +0,0 @@ -export default { - server: { - // 允许访问的主机列表(添加需要允许的域名) - allowedHosts: [ - 'docs.agentkit.bytedance.net', // 解决当前报错的主机 - // 可选:添加其他需要允许的主机,如本地IP、自定义域名等 - // 'localhost', - // '192.168.1.100' - ] - } -} diff --git a/en/content/1.introduction/1.overview.html b/en/content/1.introduction/1.overview.html new file mode 100644 index 0000000..1929b33 --- /dev/null +++ b/en/content/1.introduction/1.overview.html @@ -0,0 +1,26 @@ + + + + + + AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit

Product Positioning

AgentKit is an enterprise-grade AI Agent development platform launched by Volcengine. It provides developers with a complete solution for building, deploying, and operating Agents. Through a standardized development toolchain and cloud-native infrastructure, the platform significantly lowers the barrier to developing and deploying complex intelligent agent applications.

Key Advantages

  • Declarative application definition: Define the core components and configuration of an agent application through a concise YAML file, enabling “define once, run anywhere”.
  • Modular and extensible: Includes rich built-in modules such as Tool, Memory, and Knowledge, and provides standardized interfaces to make customization and extension easy.
  • Cloud-native deployment: Seamlessly integrates with AgentKit Platform, supporting one-click deployment to the cloud, with elastic scaling, continuous integration, and high availability guarantees.
  • Multi-agent collaboration: Supports building complex systems where multiple Agents work together, enabling task decomposition, collaboration, and aggregation, and supports the A2A protocol Agent.
  • Full lifecycle management: Provides a complete agentkit CLI toolchain covering project initialization, local debugging, cloud deployment, and online operations.
  • Multi-language support: Supports Python and Golang development to meet different tech stack needs.
  • Rich project templates: Provides multiple prebuilt templates, including basic apps, streaming output, A2A protocol, etc., to kickstart development quickly.

Architecture Concept

AgentKit’s core design concept is to separate the definition and execution of an Agent App.

  • Application definition (Definition): Developers declaratively define application metadata, dependencies, runtime environment, and required platform services (such as knowledge base and memory modules) via the agentkit.yaml file.
  • Application execution (Execution): The agentkit CLI and AgentKit Platform parse the definition file and automatically complete a series of tedious tasks such as environment preparation, code packaging, image building, continuous integration, and cloud deployment.

This separation allows developers to focus on implementing business logic while AgentKit handles complex engineering problems, enabling agile development and fast production delivery.

Applicable Scenarios

  • Intelligent Q&A bots: Quickly build knowledge-base-integrated intelligent Q&A services.
  • Automated workflows: Create automation flows that can execute a series of tasks (such as sending emails, generating reports, calling APIs).
  • Complex data analysis: Build data analysis Agents that understand user intent, query databases, analyze data, and generate visual reports.
  • Multi-agent systems: Design and deploy systems where multiple Agents collaborate to complete complex tasks, such as a “researcher–analyst–reporter” pattern.

Get Started

  • Install AgentKit: Learn how to install AgentKit.
  • Quick Start: Use a simple example to quickly experience the full process from development to deployment.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/1.introduction/2.installation.html b/en/content/1.introduction/2.installation.html new file mode 100644 index 0000000..dffddb1 --- /dev/null +++ b/en/content/1.introduction/2.installation.html @@ -0,0 +1,73 @@ + + + + + + Install AgentKit | AgentKit + + + + + + + + + + + + + + + +
Skip to content

Install AgentKit

This guide will walk you through installing AgentKit and completing the basic configuration.

Environment Requirements

  • Python version: 3.10 or later
  • Operating system: Linux, macOS
  • Package manager: uv or pip recommended

We strongly recommend installing AgentKit in a Python virtual environment to avoid conflicts with system packages.

Installation Methods

Method 1: Install with pip

Stable Version

Recommended for production deployments:

bash
pip install agentkit-sdk-python

Development Version

Includes the latest features and fixes:

bash
pip install --pre agentkit-sdk-python

Install a Specific Version

Install a specific version:

bash
pip install agentkit-sdk-python==0.1.7

We recommend using uv to manage virtual environments and dependencies.

bash
# install uv
+curl -LsSf https://astral.sh/uv/install.sh | sh
+
+# Initialize uv environment
+uv init --no-workspace
+
+# Specify Python version for the environment
+uv venv --python 3.12
+
+# Install AgentKit using uv
+uv add agentkit-sdk-python
+
+# Install veadk (recommended for local debugging)
+uv add veadk-python
+
+# Activate the virtual environment
+source .venv/bin/activate

Method 3: Install from Source

For developers and customization scenarios:

Install from the official Github repository

bash
# clone repo
+git clone git@github.com:volcengine/agentkit-sdk-python.git
+
+cd agentkit-sdk-python
+
+# we use uv to build this project
+uv venv --python 3.12
+
+# only install necessary requirements
+uv sync
+
+# install agentkit-sdk-python with editable mode
+uv pip install -e .
+
+# Activate the virtual environment
+source .venv/bin/activate

If you prefer pip and venv, you can also run:

bash
# Create virtual environment
+python3 -m venv .venv
+
+# Activate virtual environment
+source .venv/bin/activate
+
+# Install AgentKit
+pip install agentkit-sdk-python

Verify Installation

After installation, run the following command to verify that the agentkit CLI is available:

bash
agentkit --version

If the version is printed successfully, AgentKit has been installed.

Authentication Configuration

Before using the agentkit CLI to interact with AgentKit Platform, you need to configure access credentials (AK/SK).

Use AgentKit’s global configuration feature to store your credentials securely:

bash
# Initialize global configuration
+agentkit config --global --init
+
+# Set your access credentials
+agentkit config --global --set volcengine.access_key="YOUR_ACCESS_KEY"
+agentkit config --global --set volcengine.secret_key="YOUR_SECRET_KEY"
+
+# Verify configuration
+agentkit config --global --show

This stores credentials securely in ~/.agentkit/config.yaml, avoiding exposure of sensitive information in shell history.

Environment variables (for development debugging)

For temporary development debugging, you can set environment variables:

bash
export VOLCENGINE_ACCESS_KEY="YOUR_ACCESS_KEY"
+export VOLCENGINE_SECRET_KEY="YOUR_SECRET_KEY"

⚠️ Note: For security reasons, it is not recommended to add export commands containing sensitive information to shell configuration files (such as ~/.bashrc or ~/.zshrc), because this may cause credential leakage.

Next Steps

You have now installed and configured AgentKit, and you can start building your first Agent.

  • Quick Start: Follow our quick start guide to experience the full workflow from development to deployment.
  • Troubleshooting: If you run into issues, see the troubleshooting guide.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/1.introduction/3.quickstart.html b/en/content/1.introduction/3.quickstart.html new file mode 100644 index 0000000..de7f944 --- /dev/null +++ b/en/content/1.introduction/3.quickstart.html @@ -0,0 +1,56 @@ + + + + + + Quick Start | AgentKit + + + + + + + + + + + + + + + + +
Skip to content

Quick Start

This guide will walk you through developing a simple Agent using the “Basic Agent App” template, and quickly experiencing the full AgentKit workflow from development and deployment to testing. AgentKit provides multiple templates, including basic apps, streaming output, and A2A protocol, and supports both Python and Golang development.

Preparation

1. Obtain Volcengine access keys (AK/SK)

First, you need a Volcengine account and to enable the AgentKit service. Please visit the Volcengine Console to complete registration and activation.

Then, create and obtain access keys (AK/SK) on the Access Control page.

After obtaining them, set them as environment variables:

bash
export VOLCENGINE_ACCESS_KEY=<your_access_key>
+export VOLCENGINE_SECRET_KEY=<your_secret_key>

2. Obtain a model inference API Key (Optional)

Your Agent usually needs to call a large language model (LLM) to provide core intelligence. AgentKit Platform supports multiple models from Volcengine Ark. Make sure you have enabled the Volcengine Ark service and obtained the model inference Endpoint and API Key.

  • Get the inference endpoint (Endpoint): On the Ark platform’s “Online Inference” page, you can select a preset inference endpoint or create a custom inference endpoint.

    Inference Endpoint

  • Get the API Key: On the “API Key Management” page, select or create a new API Key.

    API Key Management

Please record your Endpoint ID such as ep-20250520174054-xxxxx (it can also be a model ID such as deepseek-v3-1-terminus) and API Key. You will later configure them for the Agent via the environment variables MODEL_AGENT_NAME and MODEL_AGENT_API_KEY.

If you do not provide this information, AgentKit Platform will automatically inject a built-in doubao-seed-1-6 model for you during cloud deployment.

3. Local debugging credential configuration (Required for Local mode)

If you plan to run and debug the Agent locally (Local mode), because the local environment cannot automatically inject cloud credentials, you must configure the access credentials manually; otherwise, the Agent will not be able to call the LLM.

You can configure credentials in one of the following two ways:

Option 1: Configure Ark model credentials

Directly specify the model endpoint and API Key to use:

bash
# Set via --runtime_envs (-e) during config
+agentkit config -e MODEL_AGENT_NAME=<your_endpoint_id> -e MODEL_AGENT_API_KEY=<your_api_key>

Option 2: Configure Volcengine access keys

If you configure Volcengine AK/SK, veADK will try to automatically obtain your model access permissions:

bash
# Set via --runtime_envs (-e) during config
+agentkit config -e VOLCENGINE_ACCESS_KEY=<your_access_key> -e VOLCENGINE_SECRET_KEY=<your_secret_key>

Note:

  1. In Local mode, directly exporting environment variables in the host shell does not take effect inside the container. You must use agentkit config -e to write them into agentkit.yaml under runtime_envs.
  2. In Cloud mode, the Runtime automatically injects related credentials, and you usually do not need to manually configure the above environment variables.

Getting Started

Step 1: Install AgentKit

Before you begin, ensure you have followed the Install AgentKit guide to complete installation of the agentkit CLI and environment configuration.

Step 2: Initialize a project

Create a project directory and initialize your Agent app using agentkit init:

bash
mkdir simple-agent && cd simple-agent
+agentkit init

After running, a list of available templates will be shown. Select template 1 (Basic Agent App). You can also specify a template directly using the --template parameter:

bash
# Use basic template
+agentkit init --template basic
+
+# Use streaming output template
+agentkit init --template basic_stream
+
+# List all available templates
+agentkit init --list-templates

After the command runs, template code and config files will be generated in the current directory:

txt
.
+├── agentkit.yaml       # Core configuration file for the Agent.
+├── requirements.txt    # Python dependencies for the project.
+└── simple_agent.py     # Entry point for the Agent application.

Step 3: Configure and deploy

You can use agentkit launch to build and deploy the app to the cloud in one command. This command uses the configuration in agentkit.yaml.

If you need custom configuration (for example, specify deployment region, image repository, or provide model keys), you can edit agentkit.yaml manually, or run agentkit config to generate configuration through an interactive wizard.

bash
agentkit config

The configuration wizard will guide you to complete the following settings:

General settings (press Enter to use default values):

  • 1.App name: Agent app name (default is simple_agent, press Enter to accept)
  • 2.Entry file: App entry file (default is simple_agent.py)
  • 3.App description: App description (optional)
  • 4.Programming language: Python or Golang (default Python)
  • 5.Dependency file: default requirements.txt or go.mod
  • 6.Common internal Runtime environment variables for Agent apps:
    • MODEL_AGENT_NAME: Ark model endpoint ID (optional)
    • MODEL_AGENT_API_KEY: Ark model API Key (optional)
  • 7.Deployment mode: choose cloud (cloud build and deployment)

Cloud deployment settings:

  • 1.Service region: default cn-beijing
  • 2.Image tag: default , will be rendered as a timestamp in the format 20251218154940
  • 3.CR image repository: CLI will automatically generate the CR instance name, CR namespace, and CR repository name. Users can also specify manually (recommended to keep automatic).

After configuration is complete, run the launch command to deploy with one click:

bash
agentkit launch

This command automatically completes the following steps:

  1. Render Dockerfile
  2. Create a project archive and upload it to TOS
  3. Prepare CR (container image repository) resources
  4. Create and run a Pipeline build
  5. Deploy to the Runtime environment

After a successful deployment, you will see output like:

bash
 Runtime created successfully: r-ye9j62wydcn****nhsoa, request_id: 20251120***************5344
+Waiting for Runtime to be Ready...
+💡 Tip: Runtime is initializing, please be patient and do not interrupt the process
+ Runtime status is Ready
+  Runtime status: Releasing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:23
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com
+100% Deployment complete
+ Successfully launched agent: https://sd4fe31poh486npgcaqq0.apigateway-cn-beijing.volceapi.com
+Built image: agentkit-cli-21076x****-cn-beijing.cr.volces.com/agentkit/myapp:2025112017****
+Endpoint: https://sd4fe31poh486****.apigateway-cn-beijing.volceapi.com

Tip: The first deployment usually takes about 2–3 minutes. Please be patient.

Use the Agent

Invoke the Agent

Test the Agent with the invoke command:

bash
agentkit invoke "Hello"

If you see output similar to the following, congratulations—your first Agent is running successfully!

text
(agentkit) test@localhost:~/workspace/simple-agent$ agentkit invoke "Hello"
+Invoking agent...
+Using default headers: {'user_id': 'agentkit_user', 'session_id': 'agentkit_sample_session'}
+✅ Invocation successful
+📝 Response:
+Hello! I am an AI assistant developed by the **** team, specializing in data science (information gathering, data analysis, etc.), document writing (writing multi-chapter articles, in-depth research reports), and software development (creating websites/applications, solving coding problems, etc.).
+If you have any specific needs, I'd be happy to help!

Next Steps

Congratulations on completing development and deployment of your first Agent!

Next, you can:

  • Explore other app templates (MCP, A2A, etc.)
  • Integrate Platform services like Memory, Knowledge, and Tools to build more powerful Agents
  • Use commands like agentkit memory, agentkit knowledge, and agentkit tools to manage platform services

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/1.introduction/4.troubleshooting.html b/en/content/1.introduction/4.troubleshooting.html new file mode 100644 index 0000000..d6a3b65 --- /dev/null +++ b/en/content/1.introduction/4.troubleshooting.html @@ -0,0 +1,30 @@ + + + + + + Troubleshooting Guide | AgentKit + + + + + + + + + + + + + + + +
Skip to content

Troubleshooting Guide

This guide is intended to help you diagnose and resolve common issues you may encounter when using AgentKit. If you cannot find a solution here, feel free to contact us via GitHub Issues.

Installation Issues

1. agentkit command not found

  • Symptom: When running the agentkit command in the terminal, the system reports command not found.
  • Cause: This is usually because the executable path installed by pip has not been added to the system PATH environment variable.
  • Solution:
    • Confirm install location: Run pip show agentkit-sdk-python or uv pip show agentkit-sdk-python and find the install path indicated by the Location field.
    • Locate the executable: Under the install path’s bin directory (for example .../site-packages/bin), you should be able to find the agentkit executable.
    • Add to PATH: Add the absolute path of this bin directory to your ~/.bashrc, ~/.zshrc, or other shell configuration files.
      bash
      export PATH="/path/to/your/python/bin:$PATH"
    • Reload configuration: Run source ~/.bashrc or restart the terminal to apply the changes.

2. Dependency conflicts

  • Symptom: When installing agentkit-sdk-python, pip reports dependency version conflicts.
  • Cause: Your Python environment may already contain library versions that are incompatible with AgentKit.
  • Solution:
    • Use a virtual environment (recommended): We strongly recommend using uv or venv to create a clean virtual environment in your project to avoid conflicts with system-level Python packages.
      bash
      uv venv
      +source .venv/bin/activate
      +uv pip install agentkit-sdk-python
    • Clean and reinstall: If you must use the existing environment, uninstall and reinstall:
      bash
      pip uninstall agentkit-sdk-python
      +pip install agentkit-sdk-python

Configuration Issues

1. Environment variables not taking effect

  • Symptom: Prompts indicate it cannot connect to AgentKit Platform or authentication fails.
  • Cause: Required environment variables may not have been passed in, or incorrect environment variable names were used.
  • Solution:
    • Confirm required environment variables are set
    bash
    echo $VOLCENGINE_ACCESS_KEY
    +echo $VOLCENGINE_SECRET_KEY
    • Ensure there are no extra spaces or quotes
    • Re-export the environment variables in the current shell session

2. Configuration file format error

  • Symptom: When running agentkit launch, it reports configuration file parsing failure.
  • Cause: File format issues
  • Solution:
    • Check whether agentkit.yaml is formatted correctly (pay attention to indentation)
    • Re-run agentkit config to generate configuration

Deployment Issues

1. CR creation failed

  • Symptom:
CreateRegistry: QuotaExceeded.Registry The quota of Registry is exceeded.
  • Cause: Insufficient account quota
  • Solution:
    • Number of CR instances exceeds the quota limit
    • In agentkit config, configure it to use an existing CR instance name
    • Or contact the administrator to increase quota

2. Image build failed

  • Symptom: Pipeline build fails and reports dependency installation errors.
  • Cause: Dependency installation failure
  • Solution:
    • Check whether dependencies in requirements.txt are correct
    • Confirm dependency versions are compatible with Python 3.12
    • Check Pipeline logs for detailed error information (logs will be automatically downloaded to your local root directory; pay attention to prompts in the interactive UI and find a file named like pipeline_failed_****ff20ce223.log in the root directory)

3. Runtime deployment timeout

  • Symptom: Runtime stays in Releasing state for a long time.
  • Cause: The first deployment takes longer, or there may be insufficient resources.
  • Solution:
    • The first deployment usually takes 2–3 minutes; please be patient
    • Use agentkit status to check status
    • If it is still not ready after 5 minutes, resources may be insufficient; try agentkit destroy and then redeploy

4. Runtime status abnormal

  • Symptom: Runtime status is Failed or Error.
  • Cause: Internal Runtime exception
  • Solution:
    • Check whether environment variable configuration is correct (especially the model API Key)
    • Check logs in the AgentKit Platform console
    • Confirm the application code has no startup errors
    • Try cleaning up with agentkit destroy and redeploying

Invocation Issues

1. invoke failed

  • Symptom: When running agentkit invoke, it reports connection failure or timeout.
  • Cause: Network issues or incorrect Endpoint configuration
  • Solution:
    • Use agentkit status to confirm Runtime status is Ready
    • Check network connectivity
    • Confirm the Endpoint address is correct
    • Check firewall or proxy settings

2. Model invocation failed

  • Symptom: The Agent returns an error indicating model access failure.
  • Cause: Incorrect model API Key configuration or exhausted model quota
  • Solution:
    • Confirm the Ark model API Key configuration is correct
    • Check whether the endpoint ID is valid
    • Confirm whether model quota has been exhausted
    • Log in to the Ark platform to check API Key permissions

Permission Issues

1. AK/SK authentication failed

  • Symptom: Reports InvalidAccessKeyId or SignatureDoesNotMatch.
  • Cause: Incorrect AK/SK configuration or insufficient permissions
  • Solution:
    • Confirm AK/SK is correct and valid
    • Check whether you have access permissions for the AgentKit service
    • Confirm AK/SK has not been disabled or expired
    • Contact the administrator to assign the required permissions

2. Resource access denied

  • Symptom: Reports AccessDenied or insufficient permissions.
  • Cause: The account does not have enough permissions to perform the operation
  • Solution:
    • Confirm the account has the required permissions for the relevant resources
    • Check IAM role configuration
    • Contact the administrator to grant necessary permissions

Getting Help

If the above solutions cannot resolve your issue, please:

  1. Check logs:

    • Local logs: Check command line output
    • Platform logs: Visit the AgentKit console to view detailed logs
  2. Contact support:

    • Provide detailed error information and logs
    • Describe reproduction steps
    • Attach relevant configuration files (be sure to redact sensitive data)
    • Contact Volcengine technical support
  3. Read the docs:

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/2.agentkit-cli/1.overview.html b/en/content/2.agentkit-cli/1.overview.html new file mode 100644 index 0000000..544f126 --- /dev/null +++ b/en/content/2.agentkit-cli/1.overview.html @@ -0,0 +1,79 @@ + + + + + + AgentKit CLI Overview | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit CLI Overview

AgentKit CLI is a powerful command-line tool designed for developers to simplify and accelerate the full lifecycle of Agent application development, deployment, and management. Whether you’re rapidly prototyping locally or deploying at scale in production, the agentkit command delivers a consistent and efficient developer experience.

Key Advantages

  • Declarative configuration: Manage all configuration through a single agentkit.yaml file—clear, portable, and easy to version-control.
  • Multi-environment deployment: Seamlessly supports three modes—local development, hybrid deployment, and fully cloud deployment—to fit different scenarios.
  • One-command workflows: High-level commands like agentkit launch combine multiple steps (build, deploy, etc.) into one, dramatically improving efficiency.
  • Templated projects: Built-in application templates help you bootstrap quickly without starting from scratch.
  • Smart interactivity: Interactive wizards such as agentkit config guide you through setup and reduce the learning curve.

Main Commands

The agentkit CLI provides a set of intuitive commands to manage your Agent applications:

Core Commands

CommandDescription
agentkit initInitialize a new Agent project, with optional templates.
agentkit configConfigure agentkit.yaml via an interactive wizard.
agentkit buildBuild your Agent application into a Docker image.
agentkit deployDeploy a built image to the specified environment (local or cloud).
agentkit launchBuild and deploy in one command—the most commonly used command during development.
agentkit invokeInteract with a deployed Agent for quick testing.
agentkit statusView the Agent runtime status and endpoint.
agentkit destroyStop and destroy the Agent instance, releasing related resources.

Platform Service Commands

CommandDescription
agentkit memoryManage AgentKit Memory collections.
agentkit knowledgeManage AgentKit Knowledge bases.
agentkit toolsManage AgentKit Tools and Sessions.
agentkit runtimeManage AgentKit Runtime instances.

Want detailed usage for each command? See Command Reference.

Three Deployment Modes

One of the core features of AgentKit CLI is its flexible deployment model, designed to adapt to different stages from development to production.

1. Local Mode (local)

Build and deploy on your local machine—ideal for fast development and debugging.

  • Workflow: Source codeLocal Docker buildRun local container
  • Benefits: Fast iteration, supports offline work, easy to debug directly.

2. Cloud Mode (cloud)

Fully host build and deployment on the AgentKit Platform—a best practice for production.

  • Workflow: Source codeCloud auto buildCloud image registryProduction-grade Runtime
  • Benefits: No local Docker required, built-in observability, high environment consistency, secure and reliable.

3. Hybrid Mode (hybrid)

Build the image locally, then push it to the cloud AgentKit Platform for deployment. This combines local control with cloud capabilities.

  • Workflow: Source codeLocal Docker buildUpload to cloud image registryProduction-grade Runtime
  • Benefits: Balances local build flexibility with the stability of a cloud runtime—suitable for scenarios that require a custom build process.

Configuration File (agentkit.yaml)

agentkit.yaml is the core of an AgentKit project. It defines all application configuration in a declarative manner. We strongly recommend managing this file with the agentkit config command.

yaml
# General configuration
+common:
+  agent_name: my-agent
+  entry_point: app.py
+  language_version: '3.12'
+  launch_type: cloud # Define the default deployment mode
+
+# Mode-specific configuration
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: latest
+    runtime_envs:
+      MODEL_API_KEY: "your-api-key"

Want detailed explanations of all configuration options? See Configuration Reference.

Quick Start

In just a few minutes, you can deploy your first Agent.

bash
# 1. Initialize a project (choose the Basic App template)
+mkdir my-first-agent && cd my-first-agent
+agentkit init my-first-agent
+
+# Or specify a particular template
+agentkit init my-first-agent --template basic_stream  # Streaming output template
+agentkit init my-first-agent --template a2a           # A2A protocol template
+
+# 2. Configure the app (via the interactive wizard)
+agentkit config
+
+# 3. Deploy to the cloud in one command
+agentkit launch
+
+# 4. Test your Agent
+agentkit invoke "Hello!"
+
+# 5. Check runtime status
+agentkit status
+
+# 6. Clean up resources (optional)
+agentkit destroy

Explore More Features

bash
# List available templates
+agentkit init --list-templates
+
+# Manage platform services
+agentkit memory list      # List memory collections
+agentkit knowledge list   # List knowledge bases
+agentkit tools list       # List tools
+agentkit runtime list     # List runtime instances

Environment Requirements

✅ Basic Requirements (All Modes)

  • Python 3.10 or later
  • pip package manager
  • AgentKit SDK installed

🐍 Python Development Environment

  • Supports Python 3.10, 3.11, 3.12, 3.13
  • Recommended to manage dependencies with requirements.txt

🐹 Golang Development Environment

  • Supports Golang 1.24
  • Manage dependencies with go.mod
  • Suitable for high-performance scenarios

🐳 Local Development (Local/Hybrid Mode)

  • Docker Desktop or Docker Engine 20.10+
  • Ensure the Docker service is running

☁️ Cloud Deployment (Cloud/Hybrid Mode)

  • A Volcengine account
  • Configure access credentials (AK/SK). We recommend using the secure global configuration approach:
    bash
    # Initialize global configuration
    +agentkit config --global --init
    +
    +# Set access credentials
    +agentkit config --global --set volcengine.access_key="your_access_key"
    +agentkit config --global --set volcengine.secret_key="your_secret_key"
    +
    +# (Optional for Byteplus) Set BytePlus as the default cloud provider
    +agentkit config --global --set defaults.cloud_provider=byteplus
    +
    +# (Optional for Byteplus) Set Byteplus access credentials
    +agentkit config --global --set byteplus.access_key="your_byteplus_access_key"
    +agentkit config --global --set byteplus.secret_key="your_byteplus_secret_key"

Next Steps

  • 📖 Command Reference: Dive into parameters and usage for each CLI command.
  • ⚙️ Configuration Reference: Master all configuration options in agentkit.yaml.
  • 🚀 Quick Start: Follow an end-to-end tutorial to build a complete Agent application from scratch.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/2.agentkit-cli/2.commands.html b/en/content/2.agentkit-cli/2.commands.html new file mode 100644 index 0000000..33ff9ed --- /dev/null +++ b/en/content/2.agentkit-cli/2.commands.html @@ -0,0 +1,662 @@ + + + + + + CLI Command Reference | AgentKit + + + + + + + + + + + + + + + +
Skip to content

CLI Command Reference

AgentKit CLI is the core tool for interacting with the AgentKit Platform. It provides a complete set of commands designed to simplify and automate the full lifecycle of Agent development, deployment, and management. Whether you are initializing a new project, configuring cloud resources, or testing and iterating on your Agent, AgentKit CLI provides strong support.

This document introduces the purpose, parameters/options, and best practices for each command, helping you use AgentKit CLI efficiently to build excellent Agent applications.

Command Overview

AgentKit CLI follows the standard format: agentkit <command> [arguments] [options].

CommandDescriptionCore Use Cases
initInitialize a project: Create a brand-new Agent project or wrap existing code.Start new Agent development; quickly deploy existing code.
configConfigure an app: Manage project configuration interactively or non-interactively.Set deployment mode, environment variables, image tags, etc.
buildBuild an image: Package your Agent code into a portable Docker image.Prepare for deployment; CI/CD integration.
deployDeploy an app: Publish a built image to the target runtime environment.Go live or update an Agent service.
launchOne-command launch: Automatically completes both build and deploy.Fast iteration; simplified release workflow.
invokeTest invocation: Invoke an Agent locally or in the cloud for functional validation.Debug Agent logic; end-to-end validation.
statusView status: Get runtime status and endpoint information for a deployed Agent.Monitor service health; obtain access URL.
destroyClean up resources: Stop and delete deployed Agent instances and related resources.Take a service offline; release cloud resources.

agentkit init

agentkit init guides you through creating a new Agent project. It supports both “start from scratch” and “wrap existing code”, significantly improving bootstrap efficiency.

Modes

  1. Template Mode: Create a project from AgentKit built-in templates. Suitable for developers starting from scratch.
  2. Wrapper Mode: Quickly wrap an existing veadk Agent definition file into a deployable AgentKit project to reuse code.

Syntax

bash
# Template mode: create from a preset template
+agentkit init [project_name] [options]
+
+# Wrapper mode: wrap an existing Agent definition file
+agentkit init [project_name] --from-agent <path_to_agent_file> [options]

Core Parameter

  • project_name (optional):
    • Description: A unique name for your Agent project, such as smart-faq-agent.
    • Default: In template mode, simple_agent; in wrapper mode, auto-generated from the source filename (e.g. agentkit-my_agent).
    • Constraints: Can only contain letters, numbers, underscores (_), and hyphens (-).

Template Mode Options

OptionDescriptionExample
--template, -tSelect a project template such as basic, basic_stream, a2a.--template basic
--agent-nameSet the display name of the Agent.--agent-name "Intelligent Customer Support"
--descriptionDescribe what the Agent does (especially important in multi-agent collaboration).--description "Handle common user questions"
--system-promptDefine the Agent system prompt to shape its role and behavior.--system-prompt "You are a professional customer support agent..."
--model-nameSpecify the model name on Volcengine Ark.--model-name "doubao-pro-32k"
--toolsComma-separated list of tools such as web_search,run_code.--tools "web_search"

Wrapper Mode Options

OptionDescriptionExample
--from-agent, -f(Required) Path to an existing Python file that contains a veadk.Agent definition.--from-agent ./my_existing_agent.py
--agent-varIf auto-detection fails, manually specify the variable name of the Agent object in the file.--agent-var "custom_agent_instance"
--wrapper-typeWrapper type to generate: basic (standard) or stream (streaming).--wrapper-type stream

Common Options

OptionDescriptionDefault
--directoryTarget directory where the project will be created.Current directory (.)

Examples

Template Mode

bash
# Example 1: interactive creation; guides you to choose a template
+agentkit init my-first-agent
+
+# Example 2: create directly using the 'basic' template
+agentkit init weather-report-agent --template basic
+
+# Example 3: create in a specified directory
+agentkit init my_agent --template basic_stream --directory ./my_agents
+
+# Example 4: shorthand
+agentkit init weather -t basic
+
+# Example 5: customize Agent attributes
+agentkit init custom-agent \
+  --template basic \
+  --agent-name "Advanced Assistant" \
+  --description "An agent with web access and code execution" \
+  --tools "web_search,run_code"
+
+# Example 6: create a streaming output Agent
+agentkit init stream_agent \
+  --template basic_stream \
+  --agent-name "Streaming Chat Assistant" \
+  --model-name "doubao-seed-1-6-250615"

Wrapper Mode

bash
# Example 7: wrap an existing Agent file (auto-detect Agent variable)
+agentkit init --from-agent ./my_agent.py
+
+# Example 8: wrap and specify a project name
+agentkit init weather_bot --from-agent ./weather_agent.py
+
+# Example 9: shorthand and specify Agent variable name
+agentkit init -f ./my_agent.py --agent-var my_custom_agent
+
+# Example 10: generate a streaming wrapper
+agentkit init chat_bot \
+  --from-agent ./chat_agent.py \
+  --wrapper-type stream
+
+# Example 11: wrap into a specified directory
+agentkit init deployed_agent \
+  --from-agent ../agents/production_agent.py \
+  --agent-var prod_agent \
+  --wrapper-type basic \
+  --directory ./deployment
+
+# Example 12: a complete wrapper command
+agentkit init my_deployed_bot \
+  -f ~/projects/agents/my_bot.py \
+  --agent-var bot \
+  --wrapper-type stream \
+  --directory ./deploy

Best practices

  • Start from templates: For new AgentKit users, start with the basic template; it provides a simple project structure.
  • Leverage wrapper mode: When you already have mature veadk Agent logic, wrapper mode helps you avoid rewriting code and focus on fast deployment.
  • Use clear names: Give your project and Agent descriptive names to support long-term maintenance and teamwork.

Output

Template mode output

After running a template-mode command, you will see output similar to:

     ✨ Build AI Agents with Ease ✨
+
+Available Templates
+┌────┬──────────────────────────┬──────────┬──────────────────────────────────────────────┐
+│ ID │ Name                     │ Type     │ Description                                  │
+├────┼──────────────────────────┼──────────┼──────────────────────────────────────────────┤
+│ 1  │ Basic Agent App          │ Basic App│ Basic Agent app, great for getting started   │
+│ 2  │ Basic Stream Agent App   │ Stream App│ Agent app with streaming output             │
+│ 3  │ A2A Agent App            │ A2A App  │ Multi-agent app supporting the A2A protocol  │
+│ 4  │ Eino A2A Agent App       │ A2A App  │ A2A app based on the Eino framework (Golang) │
+└────┴──────────────────────────┴──────────┴──────────────────────────────────────────────┘
+
+Please select a template by entering the ID (1-2):
+Template ID: 1
+Selected: Basic Agent App
+
+Creating project: my_weather_agent
+Using template: Basic Agent App
+
+✨ Project initialized successfully!
+Template: Basic Agent App
+Entry point: my_weather_agent.py
+Language: Python 3.12
+
+Created files:
+  ✓ my_weather_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

Wrapper mode output 🆕

After running a wrapper-mode command, you will see output similar to:

     ✨ Build AI Agents with Ease ✨
+
+🔄 Wrapping existing Agent file
+
+Project name: agentkit-my_agent
+Agent file: ./my_agent.py
+Wrapper type: basic
+
+✨ Project initialized successfully!
+Template: Agent Wrapper (Basic)
+Entry point: agentkit-my_agent.py
+Language: Python 3.12
+Agent file: my_agent.py
+Agent variable: agent
+
+Created files:
+  ✓ my_agent.py
+  ✓ agentkit-my_agent.py
+  ✓ requirements.txt
+  ✓ agentkit.yaml
+  ✓ .dockerignore
+
+Next steps:
+  1. Review and modify the generated files
+  2. Use agentkit config to configure your agent
+  3. Use agentkit launch to build and deploy

Wrapper mode deep dive 🆕

Wrapper mode is a powerful feature that lets you quickly deploy an existing Agent definition file to the AgentKit platform without rewriting code.

How it works

  1. Parse the Agent file: Automatically analyzes your Python file and identifies the Agent object definition.
  2. Copy the source file: Copies your Agent file into the project directory.
  3. Generate a wrapper: Creates a new Python file that imports and wraps your Agent.
  4. Configure deployment: Generates agentkit.yaml and other required deployment files.

What the wrapper does

The generated wrapper file is responsible for:

  • Importing your Agent: Imports the Agent object from your file.
  • Creating a Runner: Wraps the Agent using the veadk Runner.
  • Providing deployment interfaces: Implements the @app.entrypoint and @app.ping interfaces required by AgentKit.
  • Handling request/response: Automatically converts HTTP request formats.

Requirements for the Agent file

Your Agent file must meet the following requirements:

Basic requirements:

python
# Must be a Python file (.py)
+# Must contain an Agent object definition
+
+from veadk import Agent
+
+# Agent definition - variable name can be agent, my_agent, etc.
+agent = Agent(
+    model="doubao-seed-1-6-250615",
+    description="My Agent"
+)

Supported Agent variable names:

  • The system auto-detects common names such as: agent, main_agent, my_agent, etc.
  • You can also use a custom name, but you must specify it via --agent-var.

Unsupported cases:

  • ❌ No Agent(...) definition in the file.
  • ❌ Agent definition is inside a function (must be at module level).
  • ❌ Agent object is created via complex logic (must be a direct assignment).

Wrapper type comparison

FeatureBasic wrapperStream wrapper
Response modeReturn the full result onceStreaming return (SSE)
Typical scenariosStandard chat; short responsesLong-form generation; real-time output
Dependenciesveadk-pythonveadk-python + google-adk
Config requirementsNoneAgent must support streaming output
Client UXWait and then show onceToken-by-token display; better interactivity

When to use which

Good scenarios for wrapper mode:

  • ✅ You already have veadk Agent code and want to deploy quickly.
  • ✅ Your Agent is developed and debugged locally and is ready to go live.
  • ✅ Multiple projects share the same Agent definition.
  • ✅ You want to keep Agent code and deployment code separated.

Good scenarios for template mode:

  • ✅ Create a new Agent from scratch.
  • ✅ Learn the AgentKit development workflow.
  • ✅ Need complete example code as a starting point.

Project structure after wrapping

my_project/
+├── my_agent.py              # your original Agent definition
+├── agentkit-my_agent.py     # wrapper generated by AgentKit (entry point)
+├── requirements.txt         # dependencies list (with usage notes)
+├── agentkit.yaml            # deployment config (entry_point points to wrapper)
+└── .dockerignore            # Docker build ignore rules

Wrapper file example (basic type):

python
# Import your Agent
+from my_agent import agent
+
+from veadk import Runner
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id,
+    )
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

FAQ

Q: What if the Agent definition cannot be found?

A: Use --agent-var to explicitly specify the Agent variable name:

bash
agentkit init -f ./my_agent.py --agent-var my_custom_agent_name

Q: Can I modify the generated wrapper?

A: Yes. The wrapper is standard Python code and can be modified as needed. Just make sure @app.entrypoint and @app.ping remain unchanged.

Q: Will the original Agent file be modified?

A: No. The system only copies your file into the target directory; it does not modify the original file.

Q: How do I add extra dependencies in the wrapper project?

A: Edit the generated requirements.txt file and add the dependency packages you need. The file already contains usage notes.


agentkit config

Configure parameters for an Agent application. Three modes are supported: interactive (guided), non-interactive (fast updates), and hybrid (flexible combination).

🆕 Global configuration support: A global configuration file (~/.agentkit/config.yaml) is available to share configuration across projects.

Usage

bash
# Project configuration
+agentkit config [arguments] [options]
+
+# Project level: set the cloud provider (volcengine/byteplus)
+agentkit config --cloud_provider byteplus
+
+# Global configuration 🆕
+agentkit config --global [options]

Three configuration modes

Run with no parameters; the wizard guides you step-by-step:

bash
agentkit config

Interactive flow example:

[1/7] 🤖 Agent name: my_agent
+[2/7] 📝 Entry point: my_agent.py  
+[3/7] 📄 App description: My weather query agent
+[4/7] 🐍 Python version: 3.12
+[5/7] 📦 Dependencies file: requirements.txt
+[6/7] 🚀 Deployment mode (choose one):
+  1. local - build and run locally
+  2. hybrid - build locally, run in the cloud
+  3. cloud - build and run in the cloud (recommended)
+[7/7] 🔐 App-level environment variables (shared by all modes):
+  Variable: MODEL_API_KEY=xxxxx

⚡ Non-interactive mode (fast updates; suitable for scripts/CI/CD)

Configure directly via command-line parameters without manual input:

bash
# Full configuration example
+agentkit config \
+    --agent_name myAgent \
+    --entry_point agent.py \
+    --launch_type cloud \
+    --cloud_provider byteplus \
+    --image_tag v1.0.0 \
+    --runtime_envs API_KEY=xxxxx
bash
# Incremental updates (only modify part of the configuration)
+agentkit config --entry_point new_agent.py
+agentkit config --image_tag v1.0.1

🔀 Hybrid mode

Specify some parameters via the command line and input the rest interactively:

bash
agentkit config --agent_name myAgent --interactive

Main parameters

General configuration parameters

ParameterDescriptionExample
--agent_nameAgent application namemy_weather_bot
--entry_pointEntry file (must end with .py)agent.py
--descriptionApp description"Weather assistant"
--language_versionLanguage version3.12
--dependencies_fileDependencies filerequirements.txt
--launch_typeDeployment modelocal, hybrid, cloud
--cloud_provider / --cloud-providerCloud providervolcengine, byteplus

Environment variable configuration (important ⭐)

AgentKit supports two-level environment variable configuration:

ParameterLevelDescriptionUse cases
--runtime_envs / -eApp levelShared across all deployment modesAPI keys, model endpoints, cross-environment configuration
--workflow-runtime-envsWorkflow levelOnly applies to the current deployment modeDebug flags, mode-specific configuration

Examples:

bash
# App level (shared across all modes)
+agentkit config \
+    -e API_KEY=shared-key \
+    -e MODEL_ENDPOINT=https://api.example.com
+
+# Workflow level (current mode only)
+agentkit config \
+    --workflow-runtime-envs DEBUG=true \
+    --workflow-runtime-envs LOCAL_CACHE=/tmp
+
+# Mixed usage
+agentkit config \
+    -e API_KEY=shared \
+    --workflow-runtime-envs DEBUG=true

Merge rules:

  • App-level environment variables are inherited by all workflows.
  • Workflow-level environment variables only take effect in the current mode.
  • Variables with the same name: workflow-level overrides app-level.

Cloud/Hybrid mode parameters

ParameterDescriptionExample
--regionVolcengine regioncn-beijing
--tos_bucketTOS bucketagentkit-bucket
--image_tagImage tagv1.0.0, latest
--cr_instance_nameCR instance namemy-cr-instance
--cr_namespace_nameCR namespaceagentkit
--cr_repo_nameCR repository namemy-agent

💡 Tip: the --cr_* parameters also support legacy aliases --ve_cr_* for backward compatibility.

Runtime resource bindings (Cloud/Hybrid)

You can use agentkit config to bind (or unbind) runtime resources. When agentkit launch/deploy creates/updates a runtime, the bindings are passed through to the Runtime API.

Supported binding fields:

  • memory_id: bind a Memory
  • knowledge_id: bind a Knowledge
  • tool_id: bind a Tool
  • mcp_toolset_id: bind an MCP Toolset

Command-line examples:

bash
# Bind resources
+agentkit config \
+  --memory_id mem-xxx \
+  --knowledge_id kb-xxx \
+  --tool_id tool-xxx \
+  --mcp_toolset_id mcp-ts-xxx
+
+# Unbind (set to empty string)
+agentkit config --memory_id ""

YAML persisted location (agentkit.yaml):

yaml
launch_types:
+  cloud:  # or hybrid
+    runtime_bindings:
+      memory_id: mem-xxx
+      knowledge_id: kb-xxx
+      tool_id: tool-xxx
+      mcp_toolset_id: mcp-ts-xxx

💡 Unbind semantics:

  • Omit a key in config: do not change that binding
  • Set to "" or null: clear/unbind (a clear operation will be sent when updating the Runtime)

Runtime network configuration (Cloud/Hybrid)

You can use agentkit config to set runtime networking (VPC/private network, public network, or dual-stack). This configuration takes effect only when creating a runtime for the first time (CreateRuntime).

⚠️ Limitation: If a runtime already exists, agentkit launch/deploy will call UpdateRuntime. UpdateRuntime does not support modifying network_configuration, so this setting will not affect existing runtimes. If you need to change the network, destroy and recreate the runtime.

Command-line example (private network):

bash
agentkit config \
+  --runtime-network-mode private \
+  --runtime-vpc-id vpc-xxxxxxxx \
+  --runtime-subnet-id subnet-aaaaaaaa \
+  --runtime-enable-shared-internet-access

YAML format (agentkit.yaml):

yaml
launch_types:
+  cloud:  # or hybrid
+    runtime_network:
+      mode: private            # public | private | both
+      vpc_id: vpc-xxxxxxxx     # required for private/both
+      enable_shared_internet_access: true  # only effective for private/both
+      subnet_ids:
+        - subnet-aaaaaaaa

mode values:

  • public: public access only
  • private: private access only (requires vpc_id)
  • both: enable both public and private access (requires vpc_id)

enable_shared_internet_access:

  • Only takes effect when mode is private or both. When enabled, the runtime uses the platform-provided shared public egress to access the public internet.
  • If mode=public and this flag is enabled, AgentKit will error to prevent a misleading “configured but not effective” setup.

Control options

OptionDescription
--config, -cSpecify the configuration file path (default: agentkit.yaml)
--interactive, -iForce interactive mode
--dry-runPreview changes without saving
--show, -sShow current configuration

Global configuration options 🆕

AgentKit supports a global configuration file (~/.agentkit/config.yaml) for sharing configuration across projects.

OptionDescription
--global, -gOperate on the global config instead of the project config
--initInitialize the global config file (create a template)
--setSet a global config field (format: key=value)

Supported global config fields:

FieldDescriptionExample
volcengine.access_keyVolcengine Access KeyAK***
volcengine.secret_keyVolcengine Secret KeySK***
volcengine.regionDefault regioncn-beijing
cr.instance_nameCR instance nameteam-cr-instance
cr.namespace_nameCR namespaceagentkit-team
tos.bucketTOS bucket nameteam-agentkit-builds
tos.prefixTOS object prefixagentkit-builds
tos.regionTOS regioncn-beijing

Configuration precedence:

Environment variables > Project config (agentkit.yaml) > Global config > Defaults

Examples

Example 1: first-time configuration (interactive)

bash
agentkit config

Example 2: quickly update a single field

bash
# Update entry point
+agentkit config --entry_point new_agent.py
+
+# Update image tag
+agentkit config --image_tag v1.0.1
+
+# Add an environment variable
+agentkit config -e NEW_KEY=new_value

Example 3: complete non-interactive configuration

bash
agentkit config \
+    --agent_name weather-bot \
+    --entry_point agent.py \
+    --description "Weather assistant" \
+    --launch_type cloud \
+    --image_tag v1.0.0 \
+    --region cn-beijing \
+    -e API_KEY=xxxxx \
+    -e MODEL_ENDPOINT=https://api.example.com

Example 4: configuration preview (dry run)

bash
# Show changes but do not save
+agentkit config --entry_point agent.py --image_tag v2.0 --dry-run

Example output:

General config - changes:
+┌──────────────┬──────────────┬──────────────┐
+│ Config item   │ Old value     │ New value     │
+├──────────────┼──────────────┼──────────────┤
+│ entry_point   │ old_agent.py  │ agent.py      │
+│ image_tag     │ v1.0          │ v2.0          │
+└──────────────┴──────────────┴──────────────┘
+
+🔍 Dry-run: no changes were saved

Example 5: show current configuration

bash
agentkit config --show

Example 6: global configuration management 🆕

Initialize global configuration:

bash
# Create a global config template
+agentkit config --global --init

Output:

✅ Global configuration file created: ~/.agentkit/config.yaml
+
+📝 A template has been generated containing the following fields:
+
+🔐 Volcengine credentials
+  access_key: ''
+  secret_key: ''
+  region: cn-beijing
+
+📦 CR configuration
+  instance_name: ''
+  namespace_name: ''
+
+🗂️  TOS configuration
+  bucket: ''
+  prefix: agentkit-builds
+  region: cn-beijing

Show global configuration:

bash
agentkit config --global --show

Set global configuration:

bash
# Set a single field
+agentkit config --global --set cr.instance_name=team-cr-instance
+agentkit config --global --set tos.bucket=team-bucket
+
+# Set credentials
+agentkit config --global --set volcengine.access_key=AK***
+agentkit config --global --set volcengine.secret_key=SK***

Team collaboration scenario:

bash
# 1. Team admin creates and shares global configuration
+agentkit config --global --init
+vim ~/.agentkit/config.yaml  # fill in team-shared configuration
+
+# 2. Team members automatically use global config when initializing projects
+agentkit init my-agent
+# related fields in agentkit.yaml are left empty; global config is used at runtime
+
+# 3. Special projects can override global configuration in agentkit.yaml
+agentkit config --cr_instance_name special-cr  # override global config

Example 7: CI/CD integration

bash
# Use in CI/CD pipelines
+agentkit config \
+    --agent_name ${CI_PROJECT_NAME} \
+    --entry_point agent.py \
+    --launch_type cloud \
+    --image_tag ${CI_COMMIT_TAG} \
+    -e DEPLOY_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+
+agentkit launch

Interactive input for environment variables

In interactive mode, environment variable configuration supports convenience commands:

🔐 App-level environment variables (enter KEY=VALUE; empty line to finish)
+  
+  Available commands:
+  - Enter KEY=VALUE to add a variable
+  - Enter 'list' to show existing variables
+  - Enter 'del KEY' to delete a variable
+  - Enter 'clear' to clear all
+  - Press Enter on an empty line to finish
+
+Variable: MODEL_API_KEY=xxxxx
+✅ Added: MODEL_API_KEY
+
+Variable: list
+Current variables:
+  MODEL_API_KEY=xxxxx
+
+Variable: [press Enter to finish]
+📋 Configured 1 shared variable

Configuration validation

All configuration is validated automatically:

  • Required fields: Agent name and entry point cannot be empty
  • Format validation: entry point must end with .py
  • Option constraints: launch_type must be local, hybrid, or cloud
  • Naming rules: Agent name can only contain letters, numbers, underscore, hyphen, and dot

Validation failures show detailed errors and exit.

Best practices

  1. Use interactive mode for first-time setup for a guided experience

    bash
    agentkit config
  2. Use non-interactive mode for daily updates for speed and efficiency

    bash
    agentkit config --entry_point new_agent.py
  3. Use non-interactive mode in CI/CD for full automation

    bash
    agentkit config --agent_name $PROJECT --image_tag $TAG
  4. Preview before applying to avoid mistakes

    bash
    agentkit config --entry_point agent.py --dry-run
  5. Manage environment variables by level:

    • App level: shared across environments (API keys, etc.)
    • Workflow level: mode-specific (debug flags, etc.)
  6. Use global config for team collaboration 🆕:

    bash
    # Team admin
    +agentkit config --global --init
    +agentkit config --global --set cr.instance_name=team-cr
    +agentkit config --global --set tos.bucket=team-bucket
    +
    +# Team members
    +agentkit init my-agent  # automatically uses global config
    +agentkit launch         # automatically uses global config at runtime
  7. Understand configuration precedence:

    • Project config can override global config
    • Environment variables have the highest priority
    • Order: Environment variables > Project config > Global config > Defaults

agentkit build

Package your Agent code into a Docker image in preparation for deployment.

Usage

bash
agentkit build [options]

Parameter description

--config-file configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

--platform build platform

  • Specify the target platform/architecture
  • Default: auto (auto-detect)
  • Usually not needed

--regenerate-dockerfile force regenerate Dockerfile

  • Force regenerate Dockerfile even if it already exists
  • Use case: when configuration has changed and you need to refresh the Dockerfile
  • Default: False

Docker build customization 🛠

AgentKit supports customizing Docker image builds via the docker_build section. Add the following to agentkit.yaml.

Configuration fields

base_image - custom base image

Python projects (string form):

yaml
docker_build:
+  base_image: "python:3.12-slim"
+  # Or use an Alpine image
+  base_image: "python:3.12-alpine"

build_script - custom build script

  • Path is relative to the project root
  • Used for installing system dependencies, compiling extensions, etc.
  • The script runs automatically during the build
yaml
docker_build:
+  build_script: "scripts/setup.sh"

Complete example

Python project example:

yaml
agent_name: my-agent
+entry_point: agent.py
+language: Python
+language_version: "3.12"
+dependencies_file: requirements.txt
+launch_type: local
+
+# Docker build customization
+docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/setup.sh"

Build script example (scripts/setup.sh):

bash
#!/bin/bash
+# Install system dependencies
+apt-get update && apt-get install -y gcc g++ libpq-dev
+# Or on Alpine: apk add --no-cache gcc musl-dev postgresql-dev
+
+echo "Custom build script completed"

Use cases

ScenarioConfigurationExample
Use a lightweight imageSpecify an Alpine base imagebase_image: "python:3.12-alpine"
Install system dependenciesWrite a build scriptbuild_script: "scripts/install_deps.sh"
Compile C extensionsInstall a build toolchainInstall gcc, g++, etc. in the script
Configure certificatesUpdate CA certificatesRun update-ca-certificates in the script
Multi-stage buildsSpecify builder and runtime separatelyGolang projects only

Dockerfile auto-management

  • Dockerfile is auto-generated based on configuration and includes a metadata header
  • Automatically updated when configuration changes (old versions are backed up to .agentkit/dockerfile_backups/)
  • If you remove the metadata header, AgentKit will no longer manage the file automatically
  • Use --regenerate-dockerfile to force regeneration

Example metadata header:

dockerfile
# ============================================================================
+# AUTO-GENERATED by AgentKit v1.x.x
+# ============================================================================
+# Source: agentkit.yaml
+# Checksum: sha256:...
+# Generated: 2025-01-17T10:30:00
+# 
+# This file is automatically generated and managed by AgentKit:
+#   - It will be auto-updated when agentkit.yaml config changes
+#   - To fully customize, remove this header comment
+# ============================================================================

Build process

The build strategy is chosen automatically based on launch_type:

🏠 Local mode (build locally)

Build with Docker on your machine:

🔨 Starting local image build...
+[1/3] Generating Dockerfile...
+[2/3] Building Docker image...
+[3/3] Verifying image availability...
+✅ Build succeeded: my-agent:latest

Estimated time: 1–3 minutes.

☁️ Cloud mode (build in the cloud)

Build automatically on Volcengine:

🔨 Starting cloud build...
+[1/6] Generating Dockerfile...
+[2/6] Packaging project code...
+[3/6] Uploading to object storage...
+[4/6] Preparing image registry...
+[5/6] Creating build pipeline...
+[6/6] Executing build task...
+✅ Build succeeded: xxx.cr.volces.com/agentkit/my-agent:latest

Estimated time: 3–5 minutes.

Build result

  • Image name: {agent_name}:{image_tag}
  • Image information: automatically saved into the configuration file
  • Build record: includes timestamp, image ID, etc.

Examples

bash
# Example 1: build with default configuration
+agentkit build
+
+# Example 2: specify config file
+agentkit build --config-file ./prod.yaml
+
+# Example 3: force regenerate Dockerfile
+agentkit build --regenerate-dockerfile
+
+# Example 4: force refresh after config changes
+agentkit build --config-file ./prod.yaml --regenerate-dockerfile

Custom build examples

Example 5: use an Alpine base image

  1. Modify agentkit.yaml:
yaml
docker_build:
+  base_image: "python:3.12-alpine"
+  build_script: "scripts/alpine-setup.sh"
  1. Create scripts/alpine-setup.sh:
bash
#!/bin/sh
+apk add --no-cache gcc musl-dev postgresql-dev
  1. Build:
bash
agentkit build

Example 6: install system dependencies (C extensions)

  1. Modify agentkit.yaml:
yaml
docker_build:
+  build_script: "scripts/install-deps.sh"
  1. Create scripts/install-deps.sh:
bash
#!/bin/bash
+apt-get update && apt-get install -y \
+    gcc g++ \
+    libpq-dev \
+    libxml2-dev \
+    libxslt1-dev
  1. Build:
bash
agentkit build

Example 7: Golang multi-stage build

Modify agentkit.yaml:

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:3.19"
+  build_script: "scripts/install-certs.sh"

Build:

bash
agentkit build

Notes

Local mode prerequisites:

  • ✅ Ensure Docker is installed and running
  • ✅ Docker daemon is accessible

Cloud mode prerequisites:

  • ✅ Set AK/SK credentials
  • ✅ Ensure network access to Volcengine

Docker build customization:

  • ✅ Build script path should be relative to the project root
  • ✅ Scripts automatically gain execute permissions
  • ✅ Missing build scripts produce warnings but do not stop the build
  • ✅ Dockerfile is auto-generated and updated when configuration changes
  • ✅ Older Dockerfiles are backed up to .agentkit/dockerfile_backups/
  • ✅ Removing the metadata header disables automatic management

Tip: build metadata will be written back to the config file for use by the deploy command.


agentkit deploy

Deploy the built image and start the Agent to serve requests.

Usage

bash
agentkit deploy [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Deployment Process

Automatically selects the deployment target based on the configured launch_type:

🏠 Local Mode (Local Deployment)

Starts the container on your local machine:

🚀 Starting deployment to local Docker...
+[1/3] Stopping old container version...
+[2/3] Starting new container...
+[3/3] Verifying container status...
+✅ Deployment successful! Container is running
+🌐 Access URL: http://localhost:8000

Estimated time: 10-30 seconds

☁️ Cloud Mode (Cloud Deployment)

Creates a Runtime on Volcengine:

🚀 Starting deployment to cloud platform...
+✅ Generated Runtime name: my-agent-20250120-abc123
+✅ Created Runtime: r-xxxxxx
+⏳ Waiting for Runtime to be ready...
+✅ Runtime is ready!
+🌐 Access URL: http://xxx.apigateway-cn-beijing.volceapi.com

Estimated time: 1-2 minutes

Usage Examples

bash
# Example 1: Deploy to default environment
+agentkit deploy
+
+# Example 2: Deploy to production environment
+agentkit deploy --config-file ./prod.yaml

After Deployment

Local Mode:

  • ✅ Container running locally
  • ✅ Accessible via localhost:port
  • ✅ Automatic health checks

Cloud Mode:

  • ✅ Runtime running in the cloud
  • ✅ Get a publicly accessible URL
  • ✅ Automatic Runtime status verification

agentkit launch

Build + Deploy in one step! Equivalent to automatically running build then deploy.

Usage

bash
agentkit launch [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Execution Flow

🚀 Starting Agent launch...
+
+━━━ Step 1: Build Image ━━━
+🔨 Reading config: agentkit.yaml
+🔨 Starting build...
+✅ Build completed
+
+━━━ Step 2: Deploy Application ━━━
+🚀 Starting deployment...
+✅ Deployment completed
+
+✨ Agent launched successfully!

Usage Examples

bash
# Example 1: One-click launch
+agentkit launch
+
+# Example 2: Launch to production environment
+agentkit launch --config-file ./prod.yaml

Why Use launch

  • Time-saving - One command instead of two
  • 🔒 Version consistency - Ensures build and deploy use the same configuration
  • 🚀 Fast iteration - Test immediately after code changes

agentkit invoke

Send a test request to a deployed Agent to verify functionality.

Usage

bash
agentkit invoke [message content] [options]

⚠️ Important: You must provide either message content or the --payload option, but not both

Parameter Description

Message Content

  • Enter the text you want to send directly after the command, without any option flags
  • Will be automatically wrapped as {"prompt": "your message"}
  • Cannot be used with --payload
  • Example: agentkit invoke "hello" or agentkit invoke "how's the weather today?"

Options

--payload, -p Custom request data

  • Specify complete request content in JSON format
  • Cannot be used with message content
  • Example: --payload '{"prompt": "hello", "context": "greeting"}'

--headers, -h Custom request headers

  • Specify HTTP headers in JSON format
  • Automatically adds user_id and session_id by default
  • Example: --headers '{"user_id": "test123"}'

--raw Output raw response (for debugging)

  • For streaming calls: prints SSE event JSON from server line by line to verify event format
  • For non-streaming calls: outputs compact raw JSON (no pretty indent)
  • Example: agentkit invoke "hello" --raw

--show-reasoning Output reasoning content (for LangChain debugging)

  • When streaming events contain additional_kwargs.reasoning_content, incrementally prints this field
  • Displayed separately from final answer (Reasoning first, then Answer)
  • Example: agentkit invoke "1+1=?" --show-reasoning

--apikey, -ak API Key

  • May be required for cloud deployment (Cloud mode)
  • Used for authentication
  • Optional parameter

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml in current directory

Usage Examples

Example 1: Send message directly (simplest)

bash
agentkit invoke "How's the weather in Hangzhou today?"

Equivalent to sending the following JSON:

json
{
+  "prompt": "How's the weather in Hangzhou today?"
+}

Example 2: Custom request content

bash
agentkit invoke --payload '{"prompt": "Hangzhou weather?", "user_location": "Hangzhou"}'

Example 3: With headers

bash
agentkit invoke \
+  --payload '{"prompt": "Hangzhou weather?"}' \
+  --headers '{"user_id": "user123", "session_id": "sess456"}'

Example 4: Cloud deployment (with API Key)

bash
agentkit invoke "hello" --apikey your_api_key_here

Execution Output

💬 Calling Agent...
+✅ Runtime ID: r-xxxxxx
+🌐 Calling address: http://xxx.apigateway-cn-beijing.volceapi.com
+✅ Call successful!
+
+📡 Agent response:
+Hangzhou is sunny today, 22°C, great for going out.

Notes

  • ⚠️ Message content and --payload are mutually exclusive
  • ⚠️ Cloud deployment may require API Key
  • ⚠️ Ensure Agent is deployed before calling (check with agentkit status)

agentkit status

View the Agent's running status, including whether it's online, access URL, and other information.

Usage

bash
agentkit status [options]

Parameter Description

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Output Example

🏠 Local Mode

✅ Container name: my-agent
+✅ Running status: running
+🌐 Access URL: http://localhost:8000
+
+Details:
+{
+    "container_id": "abc123...",
+    "status": "running",
+    "ports": ["8000:8000"],
+    "created": "2025-01-20 10:00:00",
+    "health": "healthy"
+}

☁️ Cloud Mode

✅ Runtime ID: r-xxxxxx
+✅ Running status: Ready
+🌐 Access URL: http://xxx.apigateway-cn-beijing.volceapi.com
+
+Details:
+{
+    "runtime_id": "r-xxxxxx",
+    "runtime_name": "my-agent-20250120-abc123",
+    "status": "Ready",
+    "endpoint": "http://xxx.apigateway-cn-beijing.volceapi.com",
+    "image": "xxx.cr.volces.com/agentkit/my-agent:latest",
+    "created_at": "2025-01-20 10:00:00"
+}

Status Description

Local Mode Status:

  • running - Running normally
  • ⏸️ stopped - Stopped
  • 🔄 restarting - Restarting
  • error - Error occurred

Cloud Mode Status:

  • Ready - Ready to receive requests
  • 🔄 Releasing - Deploying
  • Error - Runtime error
  • Failed - Deployment failed

Usage Examples

bash
# Example 1: View current status
+agentkit status
+
+# Example 2: View production environment status
+agentkit status --config-file ./prod.yaml

agentkit destroy

Stop and delete the Agent instance, releasing resources. ⚠️ This operation is irreversible!

Usage

bash
agentkit destroy [options]

Parameter Description

--force Force delete

  • Skip confirmation prompt and delete directly
  • Default is off (will ask for confirmation)
  • Use with caution!

--config-file Configuration file path

  • Specify the config file location
  • Default: agentkit.yaml

Safety Confirmation

By default, you will be asked to confirm the operation:

🗑️ Preparing to destroy running Agent...
+⚠️ This operation cannot be undone!
+Are you sure you want to continue? [y/N]: y

Skip confirmation (not recommended):

bash
agentkit destroy --force

What Will Be Deleted

🏠 Local Mode

  • ✅ Stop Docker container
  • ✅ Delete container instance
  • ⚠️ Image will be retained (can be manually deleted)

☁️ Cloud Mode

  • ✅ Delete Runtime instance
  • ✅ Release cloud resources
  • ⚠️ Image will be retained (can be manually deleted in CR)

Execution Output

🗑️ Starting to destroy Agent resources...
+✅ Stopped Runtime: r-xxxxxx
+✅ Runtime deleted successfully
+✅ Resources cleaned up
+
+Tip: Configuration file and images are retained, can redeploy anytime.

Usage Examples

bash
# Example 1: Safe deletion (recommended)
+agentkit destroy
+
+# Example 2: Force deletion
+agentkit destroy --force
+
+# Example 3: Delete specified environment
+agentkit destroy --config-file ./dev.yaml

Important Notes

  • ⚠️ Irreversible: Cannot be undone after deletion, data will be permanently lost
  • Config retained: agentkit.yaml file will not be deleted
  • Image retained: Docker images will not be deleted, can redeploy
  • 💡 Redeploy: Can redeploy anytime with agentkit deploy

Common Options

All commands support these options:

--help View Help

View detailed descriptions and parameters for any command:

bash
# View help for a specific command
+agentkit invoke --help
+agentkit build --help
+
+# View list of all commands
+agentkit --help

--version View Version

Display CLI version information:

bash
agentkit --version
+# or
+agentkit -v

Platform Service Commands

AgentKit CLI provides rich platform service management commands for managing Memory, Knowledge, Tools, and Runtime resources.

agentkit memory

Manage AgentKit Memory collections, supporting create, view, update, and delete operations.

bash
# Create memory collection (default provider-type: MEM0)
+agentkit memory create --name my-memory --description "My memory collection"
+
+# Add external memory collection
+agentkit memory add --provider-collection-id <id> --provider-type VIKINGDB_MEMORY --name my-external-memory
+
+# List all memory collections (supports pagination and filtering)
+agentkit memory list
+agentkit memory list --name-contains "my" --limit 10
+
+# View memory collection details
+agentkit memory show -m <id>
+
+# Update memory collection
+agentkit memory update -m <id> --description "Updated description"
+
+# Delete memory collection
+agentkit memory delete -m <id>
+
+# Get connection information
+agentkit memory conn -m <id>
+
+# View supported Provider types
+agentkit memory provider-types

agentkit knowledge

Manage AgentKit Knowledge bases, supporting CRUD operations.

bash
# Add knowledge base (connect external knowledge base)
+agentkit knowledge add --name my-kb --provider-knowledge-id <id> --provider-type VIKINGDB_KNOWLEDGE
+
+# List all knowledge bases (supports pagination and filtering)
+agentkit knowledge list
+agentkit knowledge list --status Ready
+
+# View knowledge base details
+agentkit knowledge show -k <id>
+
+# Update knowledge base
+agentkit knowledge update -k <id> --description "Updated description"
+
+# Delete knowledge base
+agentkit knowledge delete -k <id>
+
+# Get connection information
+agentkit knowledge conn -k <id>
+
+# View supported Provider types
+agentkit knowledge provider-types

agentkit tools

Manage AgentKit Tools and Sessions, including tool lifecycle management and session operations.

bash
# Tool management
+# Create tool (needs to specify tool-type)
+agentkit tools create --name my-tool --tool-type <type> --description "My tool"
+# List tools (supports pagination and filtering)
+agentkit tools list
+# View tool details
+agentkit tools show -t <id>
+# Update tool
+agentkit tools update -t <id> --description "New description"
+# Delete tool
+agentkit tools delete -t <id>
+
+# Session management
+# Create session
+agentkit tools session create -t <id> --name my-session --ttl 30 --ttl-unit minute
+# List sessions
+agentkit tools session list -t <id>
+# View session details
+agentkit tools session show -t <id> -s <session_id>
+# Get session logs
+agentkit tools session logs -t <id> -s <session_id>
+# Set session TTL
+agentkit tools session set-ttl -t <id> -s <session_id> --ttl 60 --ttl-unit minute
+# Delete session
+agentkit tools session delete -t <id> -s <session_id>

agentkit runtime

Manage AgentKit Runtime instances, supporting runtime create, update, delete, and version management.

bash
# Create runtime (needs to specify artifact info)
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --description "My runtime"
+
+# Create runtime and associate resources
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --memory-id mem-xxx \
+  --knowledge-id kb-xxx \
+  --tool-id tool-xxx \
+  --mcp-toolset-id mcp-ts-xxx
+
+# Create runtime with private network access (VPC)
+agentkit runtime create \
+  --name my-runtime \
+  --role-name <role> \
+  --artifact-type DockerImage \
+  --artifact-url <url> \
+  --vpc-id vpc-xxxxxxxx \
+  --subnet-ids subnet-aaaaaaaa \
+  --enable-private-network \
+  --enable-public-network false
+
+# List all runtimes (supports pagination and filtering)
+agentkit runtime list
+
+# View runtime details
+agentkit runtime get -r <id>
+
+# Update runtime
+agentkit runtime update -r <id> --description "New description"
+
+> 💡 Tip: `agentkit runtime update` currently only supports updating artifact/description/env/tags and resource binding fields (`memory-id/knowledge-id/tool-id/mcp-toolset-id`), network configuration cannot be modified.
+
+# Delete runtime
+agentkit runtime delete -r <id>
+
+# Release new version
+agentkit runtime release -r <id> --version-number <version>
+
+# View specific version details
+agentkit runtime version -r <id> --version-number <version>
+
+# List all versions
+agentkit runtime versions -r <id>

Common Workflows

📝 Complete Development Workflow (Template Mode)

Complete steps from zero to production:

bash
# 1️⃣ Create project
+agentkit init weather_agent --template basic
+cd weather_agent
+
+# 2️⃣ Configure app
+agentkit config
+
+# 3️⃣ One-click deploy
+agentkit launch
+
+# 4️⃣ Test functionality
+agentkit invoke "How's the weather in Hangzhou?"
+
+# 5️⃣ Check status
+agentkit status

🔄 Quick Deploy Existing Agent (Wrapper Mode) 🆕

Quickly deploy an existing Agent:

bash
# 1️⃣ Wrap existing Agent file
+agentkit init --from-agent ~/my_projects/weather_agent.py
+
+# 2️⃣ Enter project directory
+cd agentkit-weather_agent
+
+# 3️⃣ (Optional) Configure app
+agentkit config
+
+# 4️⃣ One-click deploy
+agentkit launch
+
+# 5️⃣ Test functionality
+agentkit invoke "How's the weather today?"
+
+# 6️⃣ Check status
+agentkit status

🔄 Quick Iteration Workflow

Update workflow after code changes:

bash
# Method 1: Step-by-step (recommended for debugging)
+agentkit build        # Rebuild
+agentkit deploy       # Redeploy
+agentkit invoke "test"  # Test validation
+
+# Method 2: One-click update (recommended for daily development)
+agentkit launch       # Auto build+deploy
+agentkit invoke "test"  # Test validation

🌍 Multi-Environment Management

Switch between dev, test, and production environments:

bash
# Development environment
+agentkit launch --config-file agentkit.dev.yaml
+agentkit invoke "test" --config-file agentkit.dev.yaml
+
+# Production environment
+agentkit launch --config-file agentkit.prod.yaml
+agentkit invoke "test" --config-file agentkit.prod.yaml

FAQ

Don't panic when you encounter errors, here are solutions!

❌ Configuration file not found

Error: Configuration file not found: agentkit.yaml

Cause: No configuration file in current directory

Solution:

bash
# If new project
+agentkit init my_agent
+
+# If existing project
+agentkit config

❌ Docker not running (Local Mode)

Error: Docker daemon not running

Cause: Docker service not started

Solution:

  • Windows/Mac: Open Docker Desktop
  • Linux: sudo systemctl start docker

❌ Cloud credentials not configured (Cloud Mode)

Error: VOLC_ACCESSKEY or VOLC_SECRETKEY not set

Cause: Volcengine AK/SK not set

Solution:

bash
# Recommended: Use secure global config
+agentkit config --global --init
+agentkit config --global --set volcengine.access_key="your AccessKey"
+agentkit config --global --set volcengine.secret_key="your SecretKey"
+
+# Or: Temporary environment variables (for dev/debugging)
+export VOLC_ACCESSKEY="your AccessKey"
+export VOLC_SECRETKEY="your SecretKey"

❌ Build failed

❌ Build failed: ...

Possible causes and solutions:

  1. Dependency issues - Check if requirements.txt is correct
  2. Code errors - Check if Python code has syntax errors
  3. Network issues - Check network connection, retry build
  4. Permission issues - Ensure you have Docker/cloud operation permissions

💡 Debugging Tips

1. View detailed logs

bash
# Set verbose log level
+export LOG_LEVEL=DEBUG
+agentkit build

2. Verify configuration file

bash
# Check if configuration is correct
+cat agentkit.yaml

3. Execute step by step

bash
# Execute separately, easier to locate issues
+agentkit build    # Build first
+agentkit deploy   # Then deploy
+# Instead of using launch directly

4. Check running status

bash
# Check if Agent is running normally
+agentkit status

Next Steps

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/2.agentkit-cli/3.configurations.html b/en/content/2.agentkit-cli/3.configurations.html new file mode 100644 index 0000000..f58f946 --- /dev/null +++ b/en/content/2.agentkit-cli/3.configurations.html @@ -0,0 +1,372 @@ + + + + + + Configuration File Reference | AgentKit + + + + + + + + + + + + + + + +
Skip to content

Configuration File Reference

agentkit.yaml is the core configuration file for your Agent. It contains all runtime parameters. This document explains what each configuration field does.

Configuration system overview

AgentKit uses a two-level configuration architecture:

Config fileLocationPurpose
Project config./agentkit.yamlProject-level config. Each Agent project is independent.
Global config~/.agentkit/config.yamlUser-level config shared across projects (for example, Volcengine credentials).

Precedence:

Environment variables > Project config > Global config > Defaults

File structure

The project config file has three sections:

yaml
common:
+  # Base config (shared by all launch types)
+  agent_name: my_agent
+  entry_point: my_agent.py
+  language: Python
+  launch_type: cloud
+  runtime_envs: {}           # App-level environment variables
+
+launch_types:
+  local:
+    # Local-only settings
+  hybrid:
+    # Hybrid-only settings
+  cloud:
+    # Cloud-only settings
+
+docker_build:
+  # Docker build config (optional)
+  base_image: python:3.12-slim
+  build_script: scripts/setup.sh

The three sections:

  • common - shared configuration for all deployment modes
  • launch_types - mode-specific configuration for different deployment modes
  • docker_build - optional Docker build customization

common

Base configuration required by all deployment modes.

Example

yaml
common:
+  agent_name: my_weather_agent        # Agent name (required)
+  entry_point: my_weather_agent.py    # Entry file (required)
+  description: Weather query agent    # Description (optional)
+  language: Python                    # Programming language
+  language_version: '3.12'            # Language version
+  dependencies_file: requirements.txt  # Dependency file
+  launch_type: cloud                  # Launch type
+  runtime_envs:                       # App-level env vars (shared by all launch types)
+    LOG_LEVEL: info

Fields

agent_name (required)

The Agent name

  • 📝 What it does: gives your Agent a name
  • Rules: only letters, numbers, _, and -
  • 🎯 Used for:
    • Docker image name
    • prefix for the cloud Runtime name
    • default image repository name

Examples:

yaml
agent_name: weather_agent           # Recommended: simple and clear
+agent_name: financial-analyzer-v2   # OK: includes a version
+agent_name: customer_support_bot    # OK: descriptive

entry_point (required)

The entry file for your Agent code

  • 📝 What it does: specifies which file to run
  • Rules: must end with .py, .go, or .sh
  • 🎯 Used for: the container runs this file on startup

Examples:

yaml
# Python project
+entry_point: app.py
+entry_point: server.py
+
+# Go project
+entry_point: main.go
+entry_point: cmd/server/main.go
+
+# Custom startup script
+entry_point: start.sh

description (optional)

A description of the Agent

  • 📝 What it does: briefly explains what the Agent does
  • Rules: any text
  • 🎯 Used for: helping teammates understand the purpose

Examples:

yaml
description: "Weather query agent for major cities nationwide"
+description: "Customer support assistant for common questions"

language (optional)

Programming language

  • 📝 What it does: declares the language used by the project
  • Options: Python, Golang
  • Default: Python
  • 🎯 Used for: choosing the Dockerfile template and build workflow

Examples:

yaml
language: Python    # Python project
+language: Golang    # Go project

language_version (optional)

Language runtime version

  • 📝 What it does: specifies the language version
  • Python supported: 3.10, 3.11, 3.12, 3.13
  • Golang supported: 1.24
  • Default: Python 3.12, Golang 1.24

Examples:

yaml
# Python project
+language: Python
+language_version: '3.12'
+
+# Go project
+language: Golang
+language_version: '1.24'

⚠️ Note: python_version is deprecated. Use language_version instead.

dependencies_file (optional)

Dependency list file

  • 📝 What it does: sets the path to your dependency file
  • Default: requirements.txt for Python projects; go.mod for Go projects
  • 🎯 Used for: installing dependencies during build

Examples:

yaml
# Python project
+dependencies_file: requirements.txt
+dependencies_file: requirements/prod.txt
+
+# Go project
+dependencies_file: go.mod

launch_type (required)

Deployment and runtime mode

  • 📝 What it does: selects where to build and run
  • Options: local, hybrid, cloud
ModeBest forBuild locationRun location
locallocal development & debuggingyour machineyour machine
hybridtransition phaseyour machinecloud platform
cloudproductioncloud platformcloud platform

Examples:

yaml
launch_type: local   # local development
+launch_type: hybrid  # build locally + deploy to cloud
+launch_type: cloud   # production (recommended)

cloud_provider (optional)

Cloud provider (platform service provider)

  • 📝 What it does: choose whether platform services use Volcano Engine (China) or BytePlus (Overseas)
  • Options: volcengine, byteplus
  • Default: volcengine
  • 🎯 Used for:
    • affects default region, endpoint, and credential namespace
    • affects the default base image used for auto-generated Dockerfiles (when docker_build.base_image is not explicitly set)

Precedence (highest to lowest):

Environment variables > Project config (agentkit.yaml) > Global config (~/.agentkit/config.yaml) > Defaults

How to configure:

yaml
# 1) Project config (recommended: put it in agentkit.yaml)
+common:
+  cloud_provider: byteplus
bash
# 1.1) Project config (write to agentkit.yaml via non-interactive command)
+agentkit config --cloud_provider byteplus
yaml
# 2) Global config (applies across projects)
+defaults:
+  cloud_provider: byteplus
bash
# 3) Environment variables (temporary override)
+export CLOUD_PROVIDER=byteplus

runtime_envs (optional)

App-level environment variables

  • 📝 What it does: defines environment variables shared by all deployment modes
  • 🎯 Used for: common configuration such as log level
  • ⚠️ Precedence: policy-level runtime_envs override variables with the same name defined at the app level

Example:

yaml
common:
+  runtime_envs:
+    LOG_LEVEL: info
+    APP_ENV: production

Local launch type

Build and run on local Docker. Best for development and debugging.

Example

yaml
launch_types:
+  local:
+    image_tag: latest                  # Image tag
+    invoke_port: 8000                  # App port
+    container_name: my_agent           # Container name (optional)
+    runtime_envs:                      # Policy-level env vars
+      MODEL_AGENT_API_KEY: xxx
+    ports:                             # Port mappings
+      - "8000:8000"
+    restart_policy: unless-stopped     # Restart policy
+    memory_limit: 1g                   # Memory limit
+    cpu_limit: '1'                     # CPU limit

Fields

image_tag

Image version tag

  • Default: latest
  • Purpose: distinguishes different image versions
  • Examples: latest, v1.0, dev

invoke_port

The port your Agent listens on

  • Default: 8000
  • Purpose: sets which port the app listens on
  • ❗ Must match the port used in your code

container_name

Docker container name

  • Default: uses agent_name
  • Purpose: assigns a name to the container
  • Can be omitted; a name will be generated automatically

runtime_envs

Policy-level runtime environment variables

Environment variables passed into the container, such as API keys and configuration parameters. They are merged with common.runtime_envs; variables with the same name override the app-level ones.

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: your_api_key  # Model API key
+  DEBUG: 'true'                      # Enable debugging
+  LOG_LEVEL: debug                   # Override LOG_LEVEL from common

ports

Port mappings

Maps container ports to host ports using host_port:container_port.

yaml
ports:
+  - "8080:8000"  # Host 8080 maps to container 8000
+  - "9090:9090"  # Monitoring port

volumes

Volume mounts

Mounts host directories into the container using host_path:container_path.

yaml
volumes:
+  - "./data:/app/data"      # Data directory
+  - "./logs:/app/logs"      # Log directory

restart_policy

Container restart policy

  • Default: unless-stopped
  • Options:
    • no - do not restart
    • on-failure - restart on failures
    • always - always restart
    • unless-stopped - restart unless manually stopped

memory_limit / cpu_limit

Resource limits

Limits the resources a container can use, preventing it from consuming too much.

yaml
memory_limit: 2g    # Limit to 2GB memory
+cpu_limit: '1'      # Limit to 1 CPU core

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

FieldDescription
container_idContainer ID after deployment
image_idImage ID after build
build_timestampBuild time
deploy_timestampDeployment time
full_image_nameFull image name (e.g. my-agent:latest)

Cloud launch type

Build and run on Volcengine. Best for production.

Example

yaml
launch_types:
+  cloud:
+    region: cn-beijing                       # Region
+    image_tag: "{{timestamp}}"               # Image tag (template variables supported)
+
+    # TOS (object storage) settings
+    tos_bucket: Auto                         # Auto-create bucket
+
+    # Container Registry settings
+    cr_instance_name: Auto                   # CR instance name (Auto = auto-create)
+    cr_namespace_name: agentkit              # CR namespace
+    cr_repo_name: ""                         # CR repo name (empty = use agent_name)
+
+    # Runtime settings
+    runtime_name: Auto                       # Runtime name
+    runtime_role_name: Auto                  # IAM role name
+    runtime_apikey_name: Auto                # API key secret name
+
+    # Environment variables
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # Model API key
+      MODEL_AGENT_NAME: ep-xxx               # Model endpoint

Template variables

Cloud mode supports template variables, rendered automatically during build/deploy:

VariableDescriptionExample value
Current timestamp (YYYYMMDDHHmmss)20251128153042
Volcengine account ID2100123456

Examples:

yaml
image_tag: "{{timestamp}}"                               # Unique tag for each build
+cr_instance_name: "agentkit-platform-{{account_id}}"     # Account-isolated CR instance
+tos_bucket: "agentkit-platform-{{account_id}}"           # Account-isolated bucket

The Auto keyword

When a value is Auto, the CLI will automatically create or manage the corresponding resource:

FieldAuto behavior
tos_bucketAuto-create bucket agentkit-platform-
cr_instance_nameAuto-create CR instance agentkit-platform-
runtime_nameAuto-create Runtime
runtime_role_nameAuto-create IAM role
runtime_apikey_nameAuto-create API key secret

Fields

region

Volcengine region

  • Default: cn-beijing
  • Purpose: selects the geographic location where the service runs
  • Options: cn-beijing (currently only Beijing is supported)

💡 Tip: choose the region closest to your users to reduce latency.

image_tag

Image version tag

  • Default: (generates a unique tag each build)
  • Purpose: distinguishes different versions
  • Examples: , latest, v1.0.0
yaml
# Option 1: use a timestamp (recommended; ensures uniqueness)
+image_tag: "{{timestamp}}"
+
+# Option 2: fixed version
+image_tag: v1.0.0
+
+# Option 3: use latest (not recommended for production)
+image_tag: latest

tos_bucket

Object storage bucket

  • Default: Auto (auto-create)
  • Purpose: stores the source code archive (for cloud builds)
  • Security note: tos_bucket must belong to your current account. If you set another person's bucket name (e.g. a public read-write bucket), the CLI will block uploads and ask you to change it.
yaml
# Auto-create (recommended)
+tos_bucket: Auto
+
+# Use an existing bucket
+tos_bucket: my-existing-bucket

cr_instance_name

Container Registry instance name

  • Default: Auto (auto-create)
  • Purpose: selects which CR instance stores your Docker images
yaml
# Auto-create
+cr_instance_name: Auto
+
+# Use an existing instance
+cr_instance_name: my-existing-cr

cr_namespace_name

CR namespace

  • Default: agentkit
  • Purpose: organizes and manages images
  • Auto-create: created automatically if missing

cr_repo_name

CR repository name

  • Default: empty (uses agent_name)
  • Purpose: the repository that stores the image
  • Auto-create: created automatically if missing

runtime_name / runtime_role_name / runtime_apikey_name

Runtime-related settings

  • Default: Auto (auto-create)
  • Purpose: manages the cloud runtime instance and its authentication
yaml
runtime_name: Auto           # Runtime name
+runtime_role_name: Auto      # IAM role
+runtime_apikey_name: Auto    # API key secret name

runtime_envs

Policy-level runtime environment variables

Configuration required by the Agent at runtime. The most important values are model API credentials. They are merged with common.runtime_envs.

Required:

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: xxx  # Volcano Ark API key
+  MODEL_AGENT_NAME: ep-xxx  # Volcano Ark endpoint ID

Optional (enhanced capabilities):

yaml
runtime_envs:
+  # Base settings
+  MODEL_AGENT_API_KEY: xxx
+  MODEL_AGENT_NAME: ep-xxx
+
+  # Observability (logs, metrics, tracing)
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+  OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: my_agent
+
+  # Other settings
+  DEBUG: 'true'     # Enable debug mode
+  LOG_LEVEL: info   # Set log level

build_timeout

Build timeout

  • Default: 3600 (seconds)
  • Purpose: maximum wait time for a cloud build

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

TOS storage-related

FieldDescription
tos_prefixObject storage prefix (default agentkit-builds)
tos_regionTOS region
tos_object_keyStorage path for the code package
tos_object_urlURL for the code package

Code Pipeline build-related

FieldDescription
cp_workspace_nameBuild workspace name
cp_pipeline_nameBuild pipeline name
cp_pipeline_idPipeline ID

Image-related

FieldDescription
cr_regionImage registry region
cr_image_full_urlFull image URL

Runtime-related

FieldDescription
runtime_idRuntime instance ID
runtime_endpointApplication access URL
runtime_apikeyRuntime API key
build_timestampBuild time
deploy_timestampDeployment time

Hybrid launch type

Build locally and run in the cloud. This is useful during development and debugging: you can build images quickly on your machine and then run them on the cloud.

Example

yaml
launch_types:
+  hybrid:
+    region: cn-beijing                       # Cloud region
+    image_tag: "{{timestamp}}"               # Image tag (template variables supported)
+
+    # Container Registry settings
+    cr_instance_name: Auto                   # CR instance name
+    cr_namespace_name: agentkit              # CR namespace
+    cr_repo_name: ""                         # CR repo name
+
+    # Runtime settings
+    runtime_name: Auto                       # Runtime name
+    runtime_role_name: Auto                  # IAM role name
+    runtime_apikey_name: Auto                # API key secret name
+
+    # Environment variables
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx               # Model API key
+      MODEL_AGENT_NAME: ep-xxx               # Model endpoint

Differences from Cloud mode

ItemHybridCloud
Build locationLocal DockerCloud Code Pipeline
TOS settingsNot requiredRequired (stores the code package)
Build speedFast (local)Slower (upload + cloud build)
Best forDevelopment & debuggingProduction

Fields

Hybrid mode is largely the same as Cloud mode, but does not require TOS-related settings (because local builds do not upload a source archive).

region

Volcengine region

  • Default: cn-beijing
  • Purpose: selects the geographic location where the cloud service runs

image_tag

Image version tag

  • Default:
  • Purpose: distinguishes different image versions
  • Template variables supported

cr_instance_name / cr_namespace_name / cr_repo_name

Container Registry settings

Same as Cloud mode. Used to store the locally built image.

yaml
cr_instance_name: Auto          # Auto-create CR instance
+cr_namespace_name: agentkit     # Namespace
+cr_repo_name: ""                # Repo name (empty = use agent_name)

runtime_name / runtime_role_name / runtime_apikey_name

Runtime settings

Same as Cloud mode. Used to manage the cloud runtime instance.

runtime_envs

Policy-level runtime environment variables

Same as Cloud mode. Environment variables passed to the cloud runtime.

Auto-managed fields

The following fields are generated and managed by the CLI; you do not need to set them manually:

FieldDescription
image_idImage ID built locally
build_timestampBuild time
full_image_nameFull image name
cr_image_full_urlFull image URL in CR
runtime_idRuntime instance ID
runtime_endpointApplication access URL
runtime_apikeyRuntime API key

docker_build

Customize the Docker build process. Supports custom base images, build scripts, and more.

Example

yaml
docker_build:
+  # Python project - string form
+  base_image: "python:3.12-slim"
+
+  # Custom build script
+  build_script: "scripts/setup.sh"
+
+  # Force regenerate Dockerfile
+  regenerate_dockerfile: false
+
+  # Target platform (cross-platform builds)
+  platform: "linux/amd64"

Multi-stage build for Go projects:

yaml
docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"    # Builder stage image
+    runtime: "alpine:latest"         # Runtime stage image
+  build_script: "scripts/install_certs.sh"

Fields

base_image

Custom base image

  • Default: chosen automatically based on language
  • Python default: uses AgentKit prebuilt base images and switches automatically according to common.cloud_provider
    • volcengine: agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python<version>-bookworm-slim-latest
    • byteplus: agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python<version>-bookworm-slim-latest
  • Golang default: agentkit-cn-beijing.cr.volces.com/base/compile_basego:1.24 (build) + agentkit-cn-beijing.cr.volces.com/base/runtime_basego:latest (runtime)
yaml
# Python project - string
+base_image: "python:3.12-alpine"
+
+# Go project - mapping (multi-stage build)
+base_image:
+  builder: "golang:1.24-alpine"
+  runtime: "alpine:latest"

build_script

Custom build script

  • Default: none
  • Purpose: runs a custom script during Docker build
  • Path: relative to the project root

Typical use cases:

  • install system dependencies
  • compile C extensions
  • download additional resources
yaml
build_script: "scripts/setup.sh"
+build_script: "docker/install_deps.sh"

regenerate_dockerfile

Force regenerate Dockerfile

  • Default: false
  • Purpose: regenerate even if a Dockerfile already exists
  • CLI flag: --regenerate-dockerfile

platform

Target CPU architecture

  • Default: current system architecture
  • Purpose: cross-platform builds
  • CLI flag: --platform
yaml
platform: "linux/amd64"    # x86_64
+platform: "linux/arm64"    # ARM (e.g. Apple Silicon)

Global configuration

Global configuration is stored in ~/.agentkit/config.yaml and shared across projects.

Location

~/.agentkit/config.yaml

Example

yaml
# Volcengine credentials
+volcengine:
+  access_key: "AKLTxxxxxxxx"
+  secret_key: "xxxxxxxx"
+  region: "cn-beijing"
+
+# Default Container Registry settings
+cr:
+  instance_name: "my-team-cr-instance"
+  namespace_name: "my-team"
+
+# Default TOS settings
+tos:
+  bucket: "my-team-bucket"
+  prefix: "agentkit-builds"
+  region: "cn-beijing"

Precedence

When a project config value is empty or set to Auto, AgentKit will automatically fall back to global config:

1. Explicit values in project config (highest)
+2. Global config (~/.agentkit/config.yaml)
+3. Defaults (lowest)

Typical use cases

Shared team configuration

Teammates can share the same CR instance and TOS bucket:

yaml
# ~/.agentkit/config.yaml
+cr:
+  instance_name: "team-shared-cr"
+  namespace_name: "team-agents"
+
+tos:
+  bucket: "team-shared-bucket"

Then in the project config, set the fields to Auto to reuse the team settings:

yaml
# agentkit.yaml
+launch_types:
+  cloud:
+    cr_instance_name: Auto    # Uses team-shared-cr from global config
+    tos_bucket: Auto          # Uses team-shared-bucket from global config

Best practices

🌍 Multi-environment management

Create separate config files for different environments:

bash
agentkit.dev.yaml   # Development (local)
+agentkit.test.yaml  # Testing (hybrid)
+agentkit.prod.yaml  # Production (cloud)

Usage:

bash
# Development
+agentkit launch --config-file agentkit.dev.yaml
+
+# Production
+agentkit launch --config-file agentkit.prod.yaml

🔐 Secure handling of secrets

❌ Bad practice (hard-coding):

yaml
runtime_envs:
+  MODEL_AGENT_API_KEY: c05d49af-1234-5678-abcd-xxxx  # Don't do this!

✅ Recommended approaches:

Option 1: interactive configuration

bash
agentkit config  # Enter sensitive values interactively

Option 2: use .gitignore

bash
# .gitignore
+agentkit.local.yaml    # Don't commit local config
+agentkit.prod.yaml     # Don't commit prod config
+*.secret.yaml          # Any config file containing secrets

Option 3: create a config template

yaml
# agentkit.yaml.template (commit to Git)
+runtime_envs:
+  MODEL_AGENT_API_KEY: <fill in your API key>
+  MODEL_AGENT_NAME: <fill in the endpoint ID>

📝 Add helpful comments

Make config easier for teammates to understand:

yaml
common:
+  agent_name: weather_agent
+  entry_point: app.py
+  launch_type: cloud  # Use cloud deployment for production
+
+launch_types:
+  cloud:
+    region: cn-beijing  # Beijing region, closest to users
+    runtime_envs:
+      # Volcano Ark model access credentials
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx

✅ Validate configuration regularly

Keep your config valid:

bash
# Option 1: run the config command to validate
+agentkit config
+
+# Option 2: inspect the config file
+cat agentkit.yaml
+
+# Option 3: try building (without deploying)
+agentkit build

Full examples

📱 Local development config (Python)

Good for rapid iteration and debugging:

yaml
common:
+  agent_name: dev_weather_agent
+  entry_point: app.py
+  description: Weather query agent for development
+  language: Python
+  language_version: '3.12'
+  launch_type: local
+  runtime_envs:
+    APP_ENV: development
+
+launch_types:
+  local:
+    image_tag: dev
+    invoke_port: 8000
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+      DEBUG: 'true'         # Enable debugging
+      LOG_LEVEL: debug      # Verbose logs
+    ports:
+      - "8000:8000"
+    memory_limit: 512m      # Lower limits for dev
+    cpu_limit: '0.5'

Golang project config

An example configuration for a Go Agent:

yaml
common:
+  agent_name: go_agent
+  entry_point: main.go
+  description: Golang agent
+  language: Golang
+  language_version: '1.24'
+  dependencies_file: go.mod
+  launch_type: hybrid
+
+launch_types:
+  hybrid:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"
+    cr_instance_name: Auto
+    cr_namespace_name: agentkit
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx
+
+docker_build:
+  base_image:
+    builder: "golang:1.24-alpine"
+    runtime: "alpine:latest"

Production config

Suitable for going live:

yaml
common:
+  agent_name: prod_weather_agent
+  entry_point: server.py
+  description: Weather query agent for production
+  language: Python
+  language_version: '3.12'
+  launch_type: cloud
+  runtime_envs:
+    APP_ENV: production
+    LOG_LEVEL: info
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    image_tag: "{{timestamp}}"    # Use a timestamp to ensure uniqueness
+
+    # CR settings
+    cr_instance_name: Auto
+    cr_namespace_name: production
+    cr_repo_name: weather_agent
+
+    # TOS settings
+    tos_bucket: Auto
+
+    # Runtime settings
+    runtime_name: Auto
+    runtime_role_name: Auto
+    runtime_apikey_name: Auto
+
+    runtime_envs:
+      # Base settings
+      MODEL_AGENT_API_KEY: xxx
+      MODEL_AGENT_NAME: ep-xxx
+
+      # Observability (recommended in production)
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_API_KEY: xxx
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_ENDPOINT: http://apmplus-cn-beijing.volces.com:4317
+      OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME: prod_weather_agent
+
+docker_build:
+  base_image: "python:3.12-slim"

🎯 Minimal configuration examples

Local mode (minimal):

yaml
common:
+  agent_name: simple-agent
+  entry_point: agent.py
+  launch_type: local

Cloud mode (minimal):

yaml
common:
+  agent_name: cloud-agent
+  entry_point: main.py
+  launch_type: cloud
+
+launch_types:
+  cloud:
+    region: cn-beijing
+    runtime_envs:
+      MODEL_AGENT_API_KEY: xxx

FAQ

❓ Configuration file not found

Error: Configuration file not found

Fix:

bash
agentkit init my_agent  # Create a new project
+# or
+agentkit config         # Create config

❓ Invalid YAML format

Error: Invalid YAML format

Checklist:

  • ✅ Use spaces for indentation (do not use tabs)
  • ✅ Ensure there is a space after :
  • ✅ Quote strings containing special characters
  • ✅ Quote template variables: ""

❓ Missing required fields

Error: agent_name is required

Fix:

bash
agentkit config  # Reconfigure and fill required fields

❓ Template variables failed to render

Error: Config field 'cr_instance_name' template variables were not fully rendered

Possible causes:

  1. Volcengine credentials are not configured
  2. Insufficient AK/SK permissions

Fix:

bash
# Check environment variables
+echo $VOLC_ACCESSKEY
+echo $VOLC_SECRETKEY
+
+# Or check global config
+cat ~/.agentkit/config.yaml

❓ Environment variables not taking effect

Possible causes:

  1. Variable name typo
  2. Config was not saved
  3. Not redeployed
  4. Confusing common.runtime_envs with policy-level runtime_envs

Fix:

bash
# 1) Check config
+cat agentkit.yaml
+
+# 2) Confirm env var placement
+# common.runtime_envs - shared by all modes
+# launch_types.<mode>.runtime_envs - specific to the chosen mode
+
+# 3) Redeploy
+agentkit deploy

❓ Legacy field names are incompatible

If your config uses legacy field names (for example ve_cr_instance_name or python_version), update them to the new names:

Legacy fieldNew field
python_versionlanguage_version
ve_cr_instance_namecr_instance_name
ve_cr_namespace_namecr_namespace_name
ve_cr_repo_namecr_repo_name
ve_runtime_idruntime_id
ve_runtime_nameruntime_name
ve_runtime_endpointruntime_endpoint

💡 Tip: the CLI still supports legacy field names (via aliases), but migration is recommended.


Configuration field quick reference

common fields

FieldRequiredDefaultDescription
agent_name-Agent name
entry_point-Entry file
descriptionemptyDescription
languagePythonProgramming language
language_version3.12/1.24Language version
dependencies_fileauto-detectedDependency file
launch_typelocalLaunch type
runtime_envs{}App-level environment variables

Cloud/Hybrid fields

FieldDefaultDescription
regioncn-beijingVolcengine region
image_tagImage tag
cr_instance_nameAutoCR instance name
cr_namespace_nameagentkitCR namespace
cr_repo_nameempty (uses agent_name)CR repository name
runtime_nameAutoRuntime name
runtime_envs{}Policy-level environment variables

docker_build fields

FieldDefaultDescription
base_imageauto-selectedBase image
build_scriptnoneBuild script
regenerate_dockerfilefalseForce regenerate
platformcurrent archTarget platform

Next steps

  • 📖 CLI Overview - learn the main capabilities and concepts
  • 🎮 Commands - learn how each command works
  • 🚀 Quick Start - follow an end-to-end walkthrough

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/2.agentkit-cli/4.logging.html b/en/content/2.agentkit-cli/4.logging.html new file mode 100644 index 0000000..205dc23 --- /dev/null +++ b/en/content/2.agentkit-cli/4.logging.html @@ -0,0 +1,175 @@ + + + + + + Logging System | AgentKit + + + + + + + + + + + + + + + +
Skip to content

Logging System

AgentKit CLI comes with a flexible built-in logging system to help you understand command execution, debug issues, and track runtime status.

Default Behavior

AgentKit defaults to the following:

  • Console output: Disabled (no logs displayed)
  • File logging: Disabled (no logs recorded)
  • 💡 Enable on demand: Turn logging on via environment variables as needed
bash
# By default, commands run with no log output
+agentkit status
+
+# If you need logs, enable them via environment variables (see below)

Log example:

[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Loading configuration...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Using launch_type: cloud
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Querying status with cloud strategy...
+[2025-11-20 14:56:09] [INFO] [agentkit.toolkit.executors] Status query completed: running

Quick Start

Enable File Logging

If you want to save logs to a file:

bash
# Enable file logging (default INFO level)
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit deploy
+
+# View the generated log file
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log

Enable Console Logging

If you want to view logs in real time in the console:

bash
# Enable console logging
+export AGENTKIT_LOG_CONSOLE=true
+
+# Run a command; now you can see logs in the console
+agentkit status

Enable Both Console and File Logging

bash
# Enable both console and file logging
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit build

Debug Mode

When you need detailed logs to investigate an issue:

bash
# Enable DEBUG-level logging (enable console and file output)
+export AGENTKIT_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command to view detailed debug information
+agentkit build

Environment Variable Configuration

With environment variables, you can fully customize logging behavior.

Basic Configuration

Environment VariableDescriptionDefaultExample
AGENTKIT_LOG_CONSOLEWhether to display logs in the consolefalsetrue / false
AGENTKIT_FILE_ENABLEDWhether to save logs to a filefalsetrue / false
AGENTKIT_LOG_LEVELLog level (console and file)INFODEBUG / INFO / WARNING / ERROR
AGENTKIT_LOG_FILELog file path (takes effect when file logging is enabled).agentkit/logs/agentkit-YYYYMMDD.log/tmp/my-agent.log

Advanced Configuration

Control log levels for console and file separately:

Environment VariableDescriptionDefault
AGENTKIT_CONSOLE_LOG_LEVELConsole log levelINFO
AGENTKIT_FILE_LOG_LEVELFile log levelINFO

Example:

bash
# Show only important errors in the console, but record everything to a file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+
+agentkit launch

Log Levels

AgentKit supports 5 log levels. The higher the level, the fewer messages you see:

LevelDescriptionTypical Use Cases
DEBUGDetailed debugging informationTroubleshooting, development/debugging
INFOGeneral operational information (default)Understanding command execution flow
WARNINGWarning messagesTracking potential issues
ERRORError messagesFocusing on failed operations
CRITICALCritical errorsSeeing only fatal failures

Common Scenarios

Scenario 1: Normal Use (Default Configuration)

Suitable for day-to-day use: no log output to protect sensitive information.

bash
# No configuration needed; just use it
+agentkit status
+agentkit deploy

Effect:

  • ✅ Console: clean and tidy, no log output
  • ✅ Files: no log files generated, protecting sensitive information

Scenario 1.1: Need to Save Log Records

Enable file logging to help trace operational history:

bash
# Enable file logging
+export AGENTKIT_FILE_ENABLED=true
+
+# Run a command
+agentkit deploy

Effect:

  • ✅ Console: clean and tidy
  • ✅ Logs: automatically saved to .agentkit/logs/ at INFO level by default

Scenario 2: Debugging Issues

When encountering errors or abnormal behavior, enable detailed logs:

bash
# Enable DEBUG logs for both console and file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# Run a command
+agentkit build

Effect:

  • ✅ Console: shows detailed execution steps
  • ✅ Log file: records full DEBUG details for post-incident analysis

Scenario 3: CI/CD Environment

In CI, you typically want logs in the console and also keep a full record:

bash
# Set in your CI configuration file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG
+export AGENTKIT_LOG_FILE=/var/log/agentkit/build-${BUILD_ID}.log
+
+# Run the build
+agentkit launch

Effect:

  • ✅ Console: shows key information for CI log review
  • ✅ Log file: keeps detailed information for later analysis

Scenario 4: Production Environment

In production, record only warnings and errors to a file:

bash
export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_FILE_LOG_LEVEL=WARNING
+export AGENTKIT_LOG_FILE=/var/log/agentkit/production.log
+
+# Run a command
+agentkit deploy

Effect:

  • ✅ Console: no output, stays clean
  • ✅ Log file: records only warnings and errors, focusing on issues

Scenario 5: Fully Silent

When you don’t need any logs (default behavior):

bash
# Default configuration is fully silent; no environment variables needed
+agentkit status
+
+# Or set explicitly (to ensure previous env vars do not affect)
+unset AGENTKIT_LOG_CONSOLE
+unset AGENTKIT_FILE_ENABLED

Effect:

  • ✅ Console: no log output
  • ✅ Files: no log files generated

Log File Management

Log File Location

When file logging is enabled (AGENTKIT_FILE_ENABLED=true), logs are stored under .agentkit/logs/ in the project root:

your-project/
+├── .agentkit/
+│   └── logs/
+│       ├── agentkit-20251120.log  # Today's logs
+│       ├── agentkit-20251119.log  # Yesterday's logs
+│       └── agentkit-20251118.log  # The day before yesterday's logs
+├── agentkit.yaml
+└── my_agent.py

Automatic Cleanup of Old Logs

Log files accumulate over time; it’s recommended to clean them up periodically:

bash
# Delete logs older than 7 days
+find .agentkit/logs -name "agentkit-*.log" -mtime +7 -delete
+
+# Or delete manually
+rm .agentkit/logs/agentkit-20251101.log

Custom Log Path

bash
# Save to a specific location
+export AGENTKIT_LOG_FILE=/tmp/my-custom-agent.log
+
+# Or save to a user directory
+export AGENTKIT_LOG_FILE=$HOME/.agentkit-logs/agent.log
+
+agentkit deploy

Configuration Precedence

When multiple configuration methods are present, the precedence is (high to low):

  1. Dedicated environment variables - AGENTKIT_CONSOLE_LOG_LEVEL
  2. General environment variables - AGENTKIT_LOG_LEVEL
  3. Default value - INFO

Example:

bash
# Set the general level to INFO
+export AGENTKIT_LOG_LEVEL=INFO
+
+# Set a dedicated console level to WARNING (higher priority)
+export AGENTKIT_CONSOLE_LOG_LEVEL=WARNING
+
+# Result: console shows WARNING, file records INFO
+agentkit status

Troubleshooting

No Log File Created

Possible causes:

  • File logging is disabled
  • Insufficient directory permissions

How to fix:

bash
# 1. Check whether file logging is disabled
+echo $AGENTKIT_FILE_ENABLED  # should be true or empty
+
+# 2. Check directory permissions
+ls -la .agentkit/logs/
+
+# 3. Create the directory manually
+mkdir -p .agentkit/logs
+
+# 4. Ensure environment variables are correct
+unset AGENTKIT_FILE_ENABLED  # reset to default

No Console Log Output

Possible causes:

  • Console logging is disabled by default
  • Log level is set too high

How to fix:

bash
# 1. Enable console logging
+export AGENTKIT_LOG_CONSOLE=true
+
+# 2. Set an appropriate log level
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+
+# 3. Run a command
+agentkit status

Too Many or Too Few Logs

Adjust the log level:

bash
# Too many logs - show only important information
+export AGENTKIT_LOG_LEVEL=WARNING
+
+# Too few logs - view detailed information
+export AGENTKIT_LOG_LEVEL=DEBUG

Best Practices

Optionally add to your .bashrc or .zshrc:

bash
# AgentKit development environment configuration (choose as needed)
+# Option 1: Enable console logs only
+export AGENTKIT_LOG_CONSOLE=true
+
+# Option 2: Enable both console and file logs
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=INFO
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

Recommendations:

  • Keep it unconfigured by default to stay clean
  • Enable temporarily when debugging
  • Avoid accidentally recording sensitive information

Team Collaboration

Create a .env.example file in the project root:

bash
# AgentKit logging configuration example
+# Copy to .env and modify as needed
+
+# === Recommended dev configuration ===
+# Enable console logs (for real-time viewing)
+AGENTKIT_LOG_CONSOLE=true
+
+# Enable file logging (optional; useful for tracing issues)
+# AGENTKIT_FILE_ENABLED=true
+
+# Set log level
+AGENTKIT_LOG_LEVEL=INFO
+
+# Custom log path (optional)
+# AGENTKIT_LOG_FILE=./logs/my-agent.log

Reminder:

  • Team members should adjust based on their needs
  • .env should be in .gitignore to avoid committing personal configuration
  • Keep file logging disabled by default to protect sensitive information

Production Deployment Recommendations

bash
# Production configuration
+export AGENTKIT_LOG_CONSOLE=false          # Disable console
+export AGENTKIT_FILE_ENABLED=true          # Enable file logging
+export AGENTKIT_FILE_LOG_LEVEL=WARNING     # Record warnings and errors only
+export AGENTKIT_LOG_FILE=/var/log/agentkit/prod.log  # Unified path

Benefits:

  • Reduces unnecessary output
  • Focuses on important issues
  • Easier log management and monitoring

Summary

AgentKit logging system design principles:

  • 🔒 Security first - no logs by default to avoid information leaks
  • 🎯 Enable on demand - turn on via environment variables when needed
  • 🔧 Flexible configuration - control console and file independently
  • 📊 Level-based control - use different log levels for different scenarios
  • 📁 Automatic management - split by date for easier lookup once enabled

Quick reference:

bash
# 1. Enable file logging
+export AGENTKIT_FILE_ENABLED=true
+
+# 2. Enable console debugging
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_LOG_LEVEL=DEBUG
+
+# 3. View log file (file logging must be enabled first)
+cat .agentkit/logs/agentkit-$(date +%Y%m%d).log
+
+# 4. Use different levels for console and file
+export AGENTKIT_LOG_CONSOLE=true
+export AGENTKIT_FILE_ENABLED=true
+export AGENTKIT_CONSOLE_LOG_LEVEL=ERROR
+export AGENTKIT_FILE_LOG_LEVEL=DEBUG

If you run into issues, refer to the Troubleshooting section or contact technical support.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/3.agentkit-sdk/1.overview.html b/en/content/3.agentkit-sdk/1.overview.html new file mode 100644 index 0000000..a165f61 --- /dev/null +++ b/en/content/3.agentkit-sdk/1.overview.html @@ -0,0 +1,92 @@ + + + + + + AgentKit SDK Overview | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit SDK Overview

AgentKit SDK is a Python development toolkit for rapidly building Agent applications that comply with AgentKit Platform standards. The SDK provides a concise set of decorators and client interfaces, allowing developers to focus on implementing Agent business logic.

Core Architecture

AgentKit SDK adopts a modular design, consisting of the following primary modules:

1. Runtime Application Framework

Provides multiple application patterns, encapsulating user code into HTTP services that comply with Platform standards:

AgentkitSimpleApp

The most commonly used application framework, suitable for standard Agent applications.

Core Decorators:

  • @app.entrypoint - Defines the main entry function for the Agent
  • @app.ping - Defines the health check function
  • @app.async_task - Defines asynchronous tasks (planned)

Standard Routes:

  • /invoke - Agent invocation endpoint
  • /ping - Health check
  • /health, /readiness, /liveness - Kubernetes readiness probes

AgentkitMCPApp

An application framework based on the MCP (Model Context Protocol) protocol, used to encapsulate tools as MCP services.

Core Decorators:

  • @app.tool - Registers a function as an MCP tool
  • @app.agent_as_a_tool - Encapsulates an Agent as an MCP tool

AgentkitA2aApp

An application framework based on the A2A (Agent-to-Agent) protocol, used to build Agents that can communicate with each other.

Core Decorators:

  • @app.agent_executor - Registers an Agent executor
  • @app.task_store - Registers task storage (optional)

2. Platform Service Clients

Provides convenient client interfaces for accessing various services of the AgentKit Platform.

AgentkitMemory

Memory service client for managing long-term and short-term memory of Agents.

Main Functions:

  • create_memory_collection() - Creates a memory collection
  • list_memory_collections() - Lists memory collections
  • get_memory_collection() - Gets memory collection details
  • update_memory_collection() - Updates memory collection configuration
  • delete_memory_collection() - Deletes a memory collection
  • get_memory_connection_info() - Gets connection information

Design Philosophy: Decoupling of control plane and data plane

  • Control Plane (provided by SDK): Manages creation, configuration, and retrieval of connection information for memory collections
  • Data Plane (implemented by ADK): Performs actual memory read/write operations through MemoryBase or Mem0 protocols

AgentkitKnowledge

Knowledge base service client for managing vectorized knowledge bases of Agents.

Main Functions:

  • list_knowledge_bases() - Lists knowledge bases
  • add_knowledge_base() - Adds a knowledge base
  • get_knowledge_connection_info() - Gets knowledge base connection information
  • delete_knowledge_base() - Deletes a knowledge base

Use Cases:

  • RAG (Retrieval-Augmented Generation) applications
  • Document Q&A systems
  • Knowledge graph integration

AgentkitMCP

MCP Gateway client for managing and routing a large number of MCP tools.

Main Functions:

  • Registers and manages MCP services
  • Tool aggregation and intelligent routing
  • Reduces tool integration complexity

AgentkitRuntime

Runtime management client for managing Agent runtime environments.

Main Functions:

  • Creates and manages Runtime instances
  • Queries Runtime status
  • Configures environment variables and resources

3. Infrastructure Modules

BaseAgentkitClient

Base class for all clients, providing unified configuration and HTTP request capabilities.

Configuration Items:

  • API endpoint configuration
  • Authentication credential management
  • Request retry and timeout
  • Logging and monitoring

Context Management

Uses contextvars to manage context information for each request, including:

  • User identity
  • Session ID
  • Request metadata
  • Tracing information

Module Dependencies

AgentKit SDK
+
+├── Runtime Apps (Application Framework Layer)
+│   ├── AgentkitSimpleApp
+│   ├── AgentkitMCPApp
+│   ├── AgentkitA2aApp
+│   └── AgentkitAgentServerApp
+
+├── Platform Clients (Service Client Layer)
+│   ├── AgentkitMemory
+│   ├── AgentkitKnowledge
+│   ├── AgentkitMCP
+│   └── AgentkitRuntime
+
+└── Infrastructure (Infrastructure Layer)
+    ├── BaseAgentkitClient
+    ├── Context
+    └── Telemetry (Observability)

Key Features

1. Decorator-Driven

Uses Python decorators to simplify application development; developers only need to focus on business logic:

python
from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    # Business logic
+    return response

2. Framework-Agnostic

The SDK does not restrict the use of specific Agent frameworks; it supports:

  • Volcengine ADK (veadk)
  • Google ADK (gadk)
  • LangChain
  • Custom frameworks

3. Automated Observability

Built-in OpenTelemetry support, automatically collects:

  • Traces
  • Metrics
  • Logging

4. Production-Ready

Provides complete production environment support:

  • Health check endpoints
  • Graceful shutdown
  • Error handling
  • Request retry

5. Type Safety

Full Python type annotations provide:

  • IDE autocomplete
  • Type checking
  • Better code maintainability

Quick Start

Installation

bash
pip install agentkit-sdk-python

Create a Simple Agent

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Use Platform Services

python
from agentkit.sdk.memory import AgentkitMemory
+from agentkit.base_client import ApiConfig
+
+# Initialize client
+config = ApiConfig(
+    access_key="your_ak",
+    secret_key="your_sk"
+)
+memory_client = AgentkitMemory(config)
+
+# Create memory collection
+response = memory_client.create_memory_collection(
+    name="my-memory",
+    short_term_configuration={...},
+    long_term_configuration={...}
+)
+print(f"Memory ID: {response.id}")

Next Steps

  • Check the Annotation Usage Guide for detailed usage of various decorators
  • Refer to complete examples in the samples/ directory
  • Read the API documentation for Platform service clients

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/3.agentkit-sdk/2.annotation.html b/en/content/3.agentkit-sdk/2.annotation.html new file mode 100644 index 0000000..15783cf --- /dev/null +++ b/en/content/3.agentkit-sdk/2.annotation.html @@ -0,0 +1,365 @@ + + + + + + Annotation Usage Guide | AgentKit + + + + + + + + + + + + + + + +
Skip to content

Annotation Usage Guide

AgentKit SDK provides a concise set of decorators (annotations) for rapidly building different types of Agent applications. This document details the usage and best practices for various annotations.

Simple Agent Annotations

AgentkitSimpleApp is the most commonly used application framework, providing standard HTTP service endpoints.

@app.entrypoint

Defines the main entry function for the Agent, handling invocation requests from the Platform.

Function Signature

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    pass

Parameter Description

  • payload (dict): Request body, containing user input and configuration

    • prompt (str): User input prompt
    • Other custom fields
  • headers (dict): Request headers, containing context information

    • user_id (str): User ID
    • session_id (str): Session ID
    • request_id (str): Request trace ID
    • Other custom headers
  • Return Value (str): Agent's response result

Complete Example

python
from agentkit.apps import AgentkitSimpleApp
+from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+app = AgentkitSimpleApp()
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    """Agent main entry function"""
+    # 1. Extract input parameters
+    prompt = payload.get("prompt", "")
+    user_id = headers.get("user_id", "anonymous")
+    session_id = headers.get("session_id", "default")
+
+    # 2. Invoke Agent execution
+    response = await runner.run(
+        messages=prompt,
+        user_id=user_id,
+        session_id=session_id
+    )
+
+    # 3. Return result
+    return response

Notes

  1. Must be async function: Use async def to define
  2. Fixed parameter order: First parameter is payload, second is headers
  3. Return string: Return value is automatically encapsulated as JSON response
  4. Error handling: Recommended to handle exceptions within the function

Error Handling Example

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        prompt = payload["prompt"]
+        response = await runner.run(messages=prompt)
+        return response
+    except KeyError as e:
+        logger.error(f"Missing required field: {e}")
+        return f"Error: Missing required field {e}"
+    except Exception as e:
+        logger.error(f"Agent execution failed: {e}")
+        return f"Error: {str(e)}"

@app.ping

Defines the health check function, used for Platform and Kubernetes health probes.

Function Signature

python
@app.ping
+def ping() -> str:
+    pass

Parameter Description

  • No parameters: Health check function does not accept any parameters
  • Return Value (str): Health status information, usually returns "pong" or "ok"

Basic Example

python
@app.ping
+def ping() -> str:
+    """Health check"""
+    return "pong!"

Advanced Example: Including Dependency Checks

python
import redis
+from sqlalchemy import create_engine
+
+# Initialize dependencies
+redis_client = redis.Redis(host='localhost', port=6379)
+db_engine = create_engine('postgresql://...')
+
+@app.ping
+def ping() -> str:
+    """Health check, including dependency service detection"""
+    try:
+        # Check Redis connection
+        redis_client.ping()
+
+        # Check database connection
+        with db_engine.connect() as conn:
+            conn.execute("SELECT 1")
+
+        return "ok - all services healthy"
+    except Exception as e:
+        logger.error(f"Health check failed: {e}")
+        return f"degraded - {str(e)}"

Notes

  1. No parameters: Function signature must be def ping() -> str:
  2. Synchronous function: Use def rather than async def
  3. Quick response: Should return within 1 second to avoid timeout
  4. Lightweight check: Avoid performing time-consuming operations

Available Endpoints

Health check functions are automatically registered to the following endpoints:

  • GET /ping - Basic health check
  • GET /health - Health status
  • GET /readiness - Kubernetes readiness probe
  • GET /liveness - Kubernetes liveness probe

@app.async_task (Planned)

Used to define asynchronous tasks, supporting long-running operations.

python
@app.async_task
+async def process_long_task(task_id: str, data: dict) -> dict:
+    """Process long-running tasks"""
+    # Long-running logic
+    result = await heavy_computation(data)
+    return result

Note: This feature is planned and not yet implemented.

MCP Agent Annotations

AgentkitMCPApp is used to build MCP (Model Context Protocol) services, encapsulating functions as standard MCP tools.

@app.tool

Registers a function as an MCP tool for LLM invocation.

Function Signature

python
@app.tool
+def tool_name(param1: str, param2: int) -> dict:
+    pass

Parameter Description

  • Function parameters: Tool input parameters, must have type annotations
  • Return Value: Tool execution result, recommended to return dict type
  • Docstring: Used as tool description for LLM to understand tool purpose

Basic Example

python
from agentkit.apps import AgentkitMCPApp
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.tool
+def get_city_weather(city: str) -> dict[str, str]:
+    """Get city weather information
+
+    Args:
+        city: City name (must be in English)
+
+    Returns:
+        Dictionary containing weather conditions and temperature
+    """
+    weather_data = {
+        "beijing": {"condition": "Sunny", "temperature": 25},
+        "shanghai": {"condition": "Cloudy", "temperature": 22},
+    }
+
+    city = city.lower().strip()
+    if city in weather_data:
+        info = weather_data[city]
+        return {"result": f"{info['condition']}, {info['temperature']}°C"}
+    else:
+        return {"result": f"Weather information not found for {city}"}

Async Tool Example

python
import aiohttp
+
+@mcp_app.tool
+async def fetch_web_content(url: str) -> dict:
+    """Fetch web page content
+
+    Args:
+        url: Web page URL
+
+    Returns:
+        Dictionary containing web page content
+    """
+    async with aiohttp.ClientSession() as session:
+        async with session.get(url) as response:
+            content = await response.text()
+            return {
+                "status": response.status,
+                "content": content[:1000]  # Extract first 1000 characters
+            }

Notes

  1. Type annotations required: All parameters must have type annotations; MCP needs this information to generate tool schema
  2. Detailed docstrings: Docstrings serve as tool descriptions to help LLM understand tool purpose
  3. Sync and async both supported: Supports def and async def
  4. Return structured data: Recommended to return dict type for easy LLM parsing
  5. Error handling: Handle exceptions within the function to avoid tool call failures

Complex Parameter Example

python
from typing import List, Optional
+from pydantic import BaseModel
+
+class SearchQuery(BaseModel):
+    keywords: List[str]
+    max_results: int = 10
+    filters: Optional[dict] = None
+
+@mcp_app.tool
+def search_documents(query: SearchQuery) -> dict:
+    """Search documents
+
+    Args:
+        query: Search query object, containing keywords, result count, and filter conditions
+
+    Returns:
+        Search results list
+    """
+    # Implement search logic
+    results = perform_search(
+        keywords=query.keywords,
+        max_results=query.max_results,
+        filters=query.filters
+    )
+    return {"results": results, "count": len(results)}

@app.agent_as_a_tool

Encapsulates the entire Agent as an MCP tool, enabling Agent composition and collaboration.

Function Signature

python
@app.agent_as_a_tool
+async def agent_tool(prompt: str) -> str:
+    pass

Usage Example

python
from veadk import Agent, Runner
+from veadk.tools.demo_tools import get_city_weather
+
+# Create a dedicated weather Agent
+weather_agent = Agent(tools=[get_city_weather])
+weather_runner = Runner(agent=weather_agent)
+
+mcp_app = AgentkitMCPApp()
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(prompt: str) -> str:
+    """Weather assistant Agent
+
+    An Agent specifically designed to handle weather-related queries, capable of querying weather information for cities worldwide.
+
+    Args:
+        prompt: User's weather query
+
+    Returns:
+        Weather query result
+    """
+    response = await weather_runner.run(messages=prompt)
+    return response

Multi-Agent Collaboration Example

python
# Create multiple dedicated Agents
+weather_agent = Agent(tools=[get_city_weather])
+news_agent = Agent(tools=[get_latest_news])
+calendar_agent = Agent(tools=[check_schedule])
+
+@mcp_app.agent_as_a_tool
+async def weather_assistant(query: str) -> str:
+    """Weather assistant"""
+    return await Runner(agent=weather_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def news_assistant(query: str) -> str:
+    """News assistant"""
+    return await Runner(agent=news_agent).run(messages=query)
+
+@mcp_app.agent_as_a_tool
+async def calendar_assistant(query: str) -> str:
+    """Calendar assistant"""
+    return await Runner(agent=calendar_agent).run(messages=query)

Notes

  1. Single Agent responsibility: Each Agent should focus on a specific domain
  2. Clear descriptions: Docstrings should clearly define the Agent's capability boundaries
  3. Async execution: Usually an async function
  4. Reasonable timeout: Set a reasonable execution timeout

A2A Agent Annotations

AgentkitA2aApp is used to build A2A (Agent-to-Agent) applications, supporting communication and collaboration between Agents.

@app.agent_executor

Registers an Agent executor, defining the Agent's execution logic.

Function Signature

python
@app.agent_executor(runner=runner, **kwargs)
+class MyAgentExecutor(A2aAgentExecutor):
+    pass

Parameter Description

  • runner: Agent runner instance
  • kwargs: Other configuration parameters

Basic Example

python
from agentkit.apps import AgentkitA2aApp
+from google.adk.a2a.executor.a2a_agent_executor import A2aAgentExecutor
+from veadk import Agent, Runner
+from veadk.a2a.agent_card import get_agent_card
+from veadk.tools.demo_tools import get_city_weather
+
+# Create A2A application
+a2a_app = AgentkitA2aApp()
+
+# Create Agent
+agent = Agent(tools=[get_city_weather])
+runner = Runner(agent=agent)
+
+# Register executor
+@a2a_app.agent_executor(runner=runner)
+class WeatherAgentExecutor(A2aAgentExecutor):
+    """Weather query Agent executor"""
+    pass
+
+# Run application
+if __name__ == "__main__":
+    a2a_app.run(
+        agent_card=get_agent_card(agent=agent, url="http://127.0.0.1:8000"),
+        host="127.0.0.1",
+        port=8000,
+    )

Custom Executor Example

python
from a2a.server.agent_execution import AgentExecutor
+from a2a.server.agent_execution.context import RequestContext
+from a2a.server.events.event_queue import EventQueue
+
+@a2a_app.agent_executor(runner=runner)
+class CustomAgentExecutor(AgentExecutor):
+    """Custom Agent executor"""
+
+    async def execute(
+        self,
+        context: RequestContext,
+        event_queue: EventQueue
+    ) -> str:
+        """Execute Agent logic
+
+        Args:
+            context: Request context, containing input messages and history
+            event_queue: Event queue, used for sending intermediate results
+
+        Returns:
+            Agent's response result
+        """
+        # Extract input from context
+        user_message = context.current_input
+
+        # Send intermediate events (optional)
+        await event_queue.put({
+            "type": "thinking",
+            "content": "Thinking..."
+        })
+
+        # Execute Agent
+        response = await self.runner.run(messages=user_message)
+
+        return response

Notes

  1. Inherit AgentExecutor: Must inherit from AgentExecutor or its subclasses
  2. Provide runner: Must pass runner instance through parameters
  3. Implement execute method: To customize logic, override the execute method
  4. Use event_queue: Send intermediate states through the event queue

@app.task_store

Registers task storage for persisting A2A task states.

Function Signature

python
@app.task_store(**kwargs)
+class MyTaskStore(TaskStore):
+    pass

Using Default Storage

python
# Without specifying task_store, in-memory storage (InMemoryTaskStore) will be used
+a2a_app = AgentkitA2aApp()
+
+@a2a_app.agent_executor(runner=runner)
+class MyExecutor(A2aAgentExecutor):
+    pass

Custom Task Storage Example

python
from a2a.server.tasks.task_store import TaskStore
+from a2a.types import Task
+import redis
+
+@a2a_app.task_store(redis_url="redis://localhost:6379")
+class RedisTaskStore(TaskStore):
+    """Redis-based task storage"""
+
+    def __init__(self, redis_url: str):
+        self.redis_client = redis.from_url(redis_url)
+
+    async def save_task(self, task: Task) -> None:
+        """Save task"""
+        task_data = task.model_dump_json()
+        self.redis_client.set(f"task:{task.id}", task_data)
+
+    async def get_task(self, task_id: str) -> Task | None:
+        """Get task"""
+        task_data = self.redis_client.get(f"task:{task_id}")
+        if task_data:
+            return Task.model_validate_json(task_data)
+        return None
+
+    async def delete_task(self, task_id: str) -> None:
+        """Delete task"""
+        self.redis_client.delete(f"task:{task_id}")

Notes

  1. Optional decorator: If not specified, in-memory storage is used
  2. Inherit TaskStore: Must inherit from TaskStore
  3. Implement required methods: Implement save_task, get_task, delete_task, and other methods
  4. Persistent storage: For production environments, persistent storage (Redis, database, etc.) is recommended

Best Practices

1. Error Handling

All decorated functions should have good error handling:

python
import logging
+
+logger = logging.getLogger(__name__)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    try:
+        # Business logic
+        result = await process(payload)
+        return result
+    except ValueError as e:
+        logger.warning(f"Invalid input: {e}")
+        return f"Invalid input: {str(e)}"
+    except Exception as e:
+        logger.error(f"Unexpected error: {e}", exc_info=True)
+        return "An error occurred. Please try again later."

2. Logging

Add appropriate logs for problem tracking:

python
@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    request_id = headers.get("request_id", "unknown")
+    logger.info(f"[{request_id}] Processing request: {payload}")
+
+    try:
+        response = await runner.run(messages=payload["prompt"])
+        logger.info(f"[{request_id}] Request completed successfully")
+        return response
+    except Exception as e:
+        logger.error(f"[{request_id}] Request failed: {e}")
+        raise

3. Type Annotations

Use complete type annotations to improve code quality:

python
from typing import Dict, Any
+
+@app.entrypoint
+async def run(payload: Dict[str, Any], headers: Dict[str, str]) -> str:
+    prompt: str = payload["prompt"]
+    user_id: str = headers.get("user_id", "anonymous")
+    # ...

4. Docstrings

Add detailed docstrings for all functions:

python
@mcp_app.tool
+def calculate_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> dict:
+    """Calculate the distance between two geographic coordinates
+
+    Uses the Haversine formula to calculate the great-circle distance between two points on the Earth's surface.
+
+    Args:
+        lat1: Starting latitude (degrees)
+        lon1: Starting longitude (degrees)
+        lat2: Ending latitude (degrees)
+        lon2: Ending longitude (degrees)
+
+    Returns:
+        Dictionary containing distance information, distance unit is kilometers
+
+    Example:
+        >>> calculate_distance(39.9, 116.4, 31.2, 121.5)
+        {"distance_km": 1067.5}
+    """
+    # Implementation logic

5. Performance Optimization

Avoid performing time-consuming initialization in decorated functions:

python
# ❌ Bad practice
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    agent = Agent(tools=[...])  # Created on every request
+    runner = Runner(agent=agent)
+    return await runner.run(messages=payload["prompt"])
+
+# ✅ Good practice
+agent = Agent(tools=[...])  # Created only once
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    return await runner.run(messages=payload["prompt"])

Next Steps

  • Check the complete example code in the samples/ directory
  • Read the SDK Overview to understand the overall architecture
  • Deploy the application to AgentKit Platform

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/4.runtime/1.runtime_quickstart.html b/en/content/4.runtime/1.runtime_quickstart.html new file mode 100644 index 0000000..39b4ffc --- /dev/null +++ b/en/content/4.runtime/1.runtime_quickstart.html @@ -0,0 +1,171 @@ + + + + + + AgentKit Runtime: From Local Development to Cloud Deployment | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Runtime: From Local Development to Cloud Deployment

AgentKit Runtime is a unified, managed Agent execution environment designed to provide you with a secure, efficient, and scalable serverless platform, allowing you to focus on Agent business logic rather than tedious infrastructure operations.

What Does AgentKit Runtime Solve for You?

  • Heavy Operational Burden: Have you ever spent significant time on environment setup, network configuration, dependency installation, manual scaling, and troubleshooting?
  • Lack of Unified Management Platform: Does creating and managing separate environments for different Agents or sessions make scheduling chaotic and maintenance difficult?
  • Security and Isolation Challenges: Are you concerned about permission conflicts, data leakage, or malicious access risks in multi-user or multi-Agent scenarios?
  • Missing Monitoring and Logs: Do you need to spend extra resources configuring logging systems, metrics collection, and alerting rules to monitor Agent health in real-time?

AgentKit Runtime systematically addresses all these problems by providing a serverless managed environment.

Core Advantages

1. Serverless Architecture: Simplified Operations, Optimized Costs

  • Zero Infrastructure Management: No need to worry about underlying servers and complex environment configurations, achieving true "code as a service."
  • Unified Runtime Platform: Efficiently run and schedule multiple Agent instances (Sessions) in the same environment, with unified access points.
  • Automated Lifecycle Management: Automatically scale from zero to large-scale concurrency based on real-time traffic, enabling unattended elastic scaling.
  • Pay-as-You-Go: Only incur costs when Agents are running; resources automatically scale to zero when there's no traffic, maximizing cloud cost savings.
  • Built-in Monitoring and Logs: Out-of-the-box real-time monitoring and logging systems make it easy to track Agent status and quickly locate issues.

2. Enterprise-Grade Security Isolation

  • Multiple Isolation Safeguards: Based on mature cloud vendor virtualization and container technologies, ensuring each Agent Runtime runs in an independent, protected environment.
  • Fine-Grained Access Control: Deep integration with Identity and gateway authentication, strictly isolating session context and access permissions, effectively preventing data cross-contamination and unauthorized access risks.

3. Framework-Agnostic Quick Integration

  • Broad Framework Support: Deeply integrated with veADK while compatible with mainstream Python Agent frameworks, requiring minimal adaptation for quick onboarding.
  • Multi-Protocol Support: Native support for HTTP, MCP, A2A, and other communication protocols to meet diverse application scenario needs.
  • One-Click Deployment: Through AgentKit SDK, you can easily achieve one-click deployment from your local IDE to the cloud Runtime.

Three-Step Guide: From Local Development to Cloud Deployment

This guide will walk you through the complete process from environment configuration and local development debugging to ultimately deploying your Agent to a production environment.

Prerequisites

Before starting, please ensure you have:

  1. A Volcengine account with AgentKit service activated, and obtain your AccessKey & SecretKey.

    Note: Please ensure your AccessKey has AgentKitFullAccess permissions.

  2. Python 3.10+ installed locally.

Step 1: Environment Configuration

We recommend using uv or python3 -m venv to manage your Python virtual environment. The following examples will use uv.

For uv installation instructions, please refer to: uv installation

1. Create and Activate Virtual Environment

bash
mkdir agentkit-runtime-quickstart
+cd agentkit-runtime-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

2. Install Core Dependencies

You can specify a mirror source via the --index parameter to speed up installation.

bash
uv add veadk-python
+uv add agentkit-sdk-python

Step 2: Create and Debug Agent Locally

1. Initialize Agent Project

We strongly recommend using agentkit-cli to quickly bootstrap your project. The init command creates a well-structured Agent project with streaming support from a template.

bash
# Use agentkit-cli to create project from template
+agentkit init

This automatically generates a project structure containing simple_agent.py and requirements.txt, allowing you to start development immediately.

2. Agent Code Overview

The core code of simple_agent.py generated using the basic_stream template is shown below. It demonstrates how to wrap a veADK Agent with AgentkitSimpleApp, execute it through Runner, and return results as SSE (Server-Sent Events) streams.

python
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+import logging
+
+from google.adk.agents import RunConfig
+from google.adk.agents.run_config import StreamingMode
+from google.genai.types import Content, Part
+from veadk import Agent, Runner
+
+from agentkit.apps import AgentkitSimpleApp
+from veadk.prompts.agent_default_prompt import DEFAULT_DESCRIPTION, DEFAULT_INSTRUCTION
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+
+app = AgentkitSimpleApp()
+
+app_name = "simple_streamable_app"
+
+agent_name = "Agent"
+description = DEFAULT_DESCRIPTION
+system_prompt = DEFAULT_INSTRUCTION
+
+
+tools = []
+
+# from veadk.tools.builtin_tools.web_search import web_search
+# tools.append(web_search)
+
+
+agent = Agent(
+    name=agent_name,
+    description=description,
+    instruction=system_prompt,
+    tools=tools,
+)
+agent.model._additional_args["stream_options"] = {"include_usage": True}
+runner = Runner(agent=agent, app_name=app_name)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict):
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+
+    session_service = runner.short_term_memory.session_service  # type: ignore
+
+    # prevent session recreation
+    session = await session_service.get_session(
+        app_name=app_name, user_id=user_id, session_id=session_id
+    )
+    if not session:
+        await session_service.create_session(
+            app_name=app_name, user_id=user_id, session_id=session_id
+        )
+
+    new_message = Content(role="user", parts=[Part(text=prompt)])
+    try:
+        async for event in runner.run_async(
+            user_id=user_id,
+            session_id=session_id,
+            new_message=new_message,
+            run_config=RunConfig(streaming_mode=StreamingMode.SSE),
+        ):
+            # Format as SSE data
+            sse_event = event.model_dump_json(exclude_none=True, by_alias=True)
+            logger.debug("Generated event in agent run streaming: %s", sse_event)
+            yield sse_event
+    except Exception as e:
+        logger.exception("Error in event_generator: %s", e)
+        # You might want to yield an error event here
+        error_data = json.dumps({"error": str(e)})
+        yield error_data
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Code Highlights:

  • Uses Volcengine Ark Doubao model by default and automatically handles model API Key retrieval.
  • Built-in session management logic ensures multi-turn conversation continuity.
  • Achieves seamless integration with AgentKit Runtime through AgentkitSimpleApp.

3. Configure Environment Variables

Before starting the Agent service, you need to configure Volcengine access credentials:

bash
# Required: Configure your Volcengine access credentials
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

Important: Please replace your_ak and your_sk with your actual credentials.

4. Start and Invoke Service Locally

Once everything is ready, run the following command to start the Agent service:

bash
python simple_agent.py

The service will listen on http://0.0.0.0:8000. Now, open another terminal and test your Agent using curl:

bash
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "Tell me a joke!"}'

Parameter Reference:

  • user_id: User identifier
  • session_id: Session identifier
  • prompt: User's natural language request

Sample Execution Log:

After successful invocation, the console will output detailed execution logs:

INFO:     Started server process [38120]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+INFO:     127.0.0.1:60807 - "POST /invoke HTTP/1.1" 200 OK
+INFO:__main__:Running agent with prompt: Tell me a joke!, user_id: test, session_id: local_session
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output: Why
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  did
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  AI
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  apply
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  for
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  a
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  job
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  at
+2025-12-01 20:12:50 | DEBUG | runner.py:151 - Event output:  the
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  bakery
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ?
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Because
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  it
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  wanted
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  to
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  work
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  on
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  its
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: d
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: ough
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: **
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  processing
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  skills
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: !
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output:  😄
+2025-12-01 20:12:51 | DEBUG | runner.py:151 - Event output: Why did the AI apply for a job at the bakery?
+
+Because it wanted to work on its **dough** processing skills! 😄

Step 3: Deploy to Production Environment

After completing local development and testing, you can deploy your agent to the AgentKit platform:

  1. Package Code: Ensure all dependencies are correctly configured in requirements.txt. The code generated using the template already includes all necessary dependencies.
  2. Platform Deployment: Following the Quick Start guide, use the agentkit config and agentkit launch commands to configure and deploy your application.
  3. Invoke Application: After deployment, you can invoke your agent through the platform's API or SDK. Example invocation:
    bash
    agentkit invoke "Tell me a joke!"

You have now successfully completed the entire process from local development to cloud deployment!

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/5.tools/1.sandbox_quickstart.html b/en/content/5.tools/1.sandbox_quickstart.html new file mode 100644 index 0000000..3548a6a --- /dev/null +++ b/en/content/5.tools/1.sandbox_quickstart.html @@ -0,0 +1,88 @@ + + + + + + AgentKit Built-in Tools Quick Start Guide | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Built-in Tools Quick Start Guide

Built-in Tools provide Agents with standardized sandbox runtime environments and tool interfaces. The all-in-one sandbox image integrates core capabilities including code execution, browser automation, and terminal operations, supporting standardized integration and API calls.

Core Capabilities

  • Code Sandbox: Enables Agents to safely "run code"
  • Browser Sandbox: Enables Agents to "interact with web pages like humans"
  • Terminal Sandbox: Enables Agents to "operate the operating system console (Terminal) like humans"
  • File System: Enables Agents to upload and download files

This document provides detailed instructions on how to integrate and use Built-in Tools in your Agent code, with a focus on the code execution sandbox functionality. By following this guide, you will learn how to create, configure, and invoke sandbox tools.

Prerequisites: Creating a Sandbox Tool

Before writing code, you need to create a sandbox tool instance in the Volcengine console:

  1. Visit the AgentKit Built-in Tools Console
  2. Create a new sandbox tool instance
  3. Record the generated TOOL_ID for use in subsequent configuration

Agent Code Example

The following code demonstrates how to use VeADK to build an Agent with code execution capabilities. By integrating the Built-in Tools run_code tool, your Agent will be able to execute code safely within a sandbox environment.

We recommend using agentkit-cli to create a project from the Basic Agent template. After the template is created, you need to make the following modifications:

  • Add the code execution tool run_code to your Agent
  • Configure the environment variable AGENTKIT_TOOL_ID with your sandbox tool instance ID

Your final code file should look like this:

Complete Code

Save the code as simple_agent_tool.py:

python
from veadk import Agent, Runner
+from veadk.tools.builtin_tools.run_code import run_code
+from agentkit.apps import AgentkitSimpleApp
+
+app = AgentkitSimpleApp()
+agent: Agent = Agent(
+    tools=[run_code],
+)
+runner = Runner(agent=agent)
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+    
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+    return response
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Code Explanation

  • run_code Tool: Provides a secure code execution environment supporting multiple programming languages including Python and JavaScript
  • session_id: Used to identify user sessions; requests with the same session_id will share the same sandbox instance
  • Asynchronous Processing: Uses async/await syntax to support high-concurrency requests

Local Debugging

1. Install VeADK from Official Source

You can install veadk-python directly using the Python package manager pip from the PyPI platform:

bash
pip install veadk-python

Note: The veadk-python version that supports calling built-in tools is 0.2.15 and above.

2. Configure Environment Variables

Before starting the Agent, you need to configure the following environment variables:

bash
# Required: Sandbox tool ID (obtained from the console)
+export AGENTKIT_TOOL_ID=t-ye7fhfmghsc1kdxxxxxx
+
+# Required: Volcengine access credentials
+export VOLCENGINE_ACCESS_KEY=your_ak
+export VOLCENGINE_SECRET_KEY=your_sk

📝 Important Notes:

  • Replace placeholders like your_ak, your_sk with your actual configuration values
  • AGENTKIT_TOOL_ID is obtained after creating the sandbox tool in the Volcengine console

3. Start the Agent Service Locally

After configuring the environment variables, run the following command to start the Agent:

bash
python simple_agent_tool.py

Once the service starts successfully, it will listen on http://0.0.0.0:8000, and you can invoke the Agent through this address.

4. Invoke the Agent

Tool Instance Invocation Mechanism

Tool instances support intelligent session-based scheduling management:

  • Automatic Creation: When you first use a specific session_id to invoke, the system will automatically create the corresponding sandbox session instance
  • Session Reuse: Multiple requests with the same session_id will share the same sandbox instance, maintaining continuity of code execution context
  • Lifecycle: Each session instance has a default validity period of 30 minutes, after which it will be automatically destroyed
  • Isolation: Requests with different session_id values use independent sandbox environments with no interference between them

Invocation Example

Use the following curl command to test the Agent's code execution capability:

bash
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: veadk-test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "Give me a random prime number between 50 and 100"}'

Parameter Description:

  • user_id: User identifier
  • session_id: Session identifier, used to associate with the sandbox instance
  • prompt: User's natural language request

Execution Log Example

After a successful invocation, the console will output detailed execution logs:

2025-11-23 21:10:24 | DEBUG | runner.py:578 - Function call: id='call_jwrcwdayjj8xnlgalyzzcoqq' args={'code': 'import random\n\ndef is_prime(n):\n    if n <= 1:\n        return False\n    if n == 2:\n        return True\n    if n % 2 == 0:\n        return False\n    for i in range(3, int(n**0.5) + 1, 2):\n        if n % i == 0:\n            return False\n    return True\n\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\nrandom_prime = random.choice(primes_between)\nprint(random_prime)', 'language': 'python3'} name='run_code'
+2025-11-23 21:10:24 | DEBUG | run_code.py:48 - tools endpoint: agentkit.cn-beijing.volces.com
+2025-11-23 21:10:24 | DEBUG | run_code.py:54 - tool_user_session_id: veAgent_veadk-test_local_session
+2025-11-23 21:10:24 | DEBUG | run_code.py:56 - Running code in language: python3, session_id=local_session, code=import random
+
+def is_prime(n):
+    if n <= 1:
+        return False
+    if n == 2:
+        return True
+    if n % 2 == 0:
+        return False
+    for i in range(3, int(n**0.5) + 1, 2):
+        if n % i == 0:
+            return False
+    return True
+
+primes_between = [p for p in range(50, 101) if is_prime(p)]
+random_prime = random.choice(primes_between)
+print(random_prime), tool_id=t-ye7yhff668o2eybtfvr0, host=agentkit.cn-beijing.volces.com, service=agentkit, region=cn-beijing
+2025-11-23 21:10:24 | DEBUG | run_code.py:65 - Get AK/SK from tool context failed.
+2025-11-23 21:10:24 | DEBUG | run_code.py:77 - Successfully get AK/SK from environment variables.
+2025-11-23 21:10:25 | DEBUG | run_code.py:103 - Invoke run code response: {'ResponseMetadata': {'RequestId': '****', 'Action': 'InvokeTool', 'Version': '2025-10-30', 'Service': 'agentkit', 'Region': 'cn-beijing'}, 'Result': {'ToolId': 't-****', 'UserSessionId': '****', 'SessionId': 's-****', 'Endpoint': '', 'InternalEndpoint': '', 'Result': '{\n  "success": true,\n  "message": "Code executed successfully",\n  "data": {\n    "kernel_name": "python3",\n    "session_id": "****",\n    "status": "ok",\n    "execution_count": 1,\n    "outputs": [\n      {\n        "output_type": "stream",\n        "name": "stdout",\n        "text": "67\\n",\n        "data": null,\n        "metadata": {},\n        "execution_count": null,\n        "ename": null,\n        "evalue": null,\n        "traceback": null\n      }\n    ],\n    "code": "import random\\n\\ndef is_prime(n):\\n    if n \\u003c= 1:\\n        return False\\n    if n == 2:\\n        return True\\n    if n % 2 == 0:\\n        return False\\n    for i in range(3, int(n**0.5) + 1, 2):\\n        if n % i == 0:\\n            return False\\n    return True\\n\\nprimes_between = [p for p in range(50, 101) if is_prime(p)]\\nrandom_prime = random.choice(primes_between)\\nprint(random_prime)",\n    "msg_id": "****"\n  }\n}'}}
+2025-11-23 21:10:38 | DEBUG | runner.py:586 - Event output: The random prime number between 50 and 100 is: 67
+2025-11-23 21:10:38 | WARNING | runner.py:652 - No tracer is configured in the agent, no trace id provided.
+INFO:     127.0.0.1:52785 - "POST /invoke HTTP/1.1" 200 OK

Deploying to Production

After completing local development and testing, you can deploy your Agent to the AgentKit platform:

  1. Package Code: Ensure all dependencies are properly configured in requirements.txt
  2. Platform Deployment: Refer to the Quick Start section in Runtime to deploy the tool. The main steps are:
    • Run the agentkit init command in the project root directory to initialize the project, which will generate the agentkit.yaml file (skip this step if already executed)
    • Ensure the agentkit.yaml file is configured with the application entry point set to your working application code simple_agent_tool.py:
      yaml
      entry_point: simple_agent_tool.py
    • Ensure all dependencies are properly configured in requirements.txt
    • Follow the Quick Start guide and use the agentkit config and agentkit launch commands to configure and deploy the application
  3. Invoke Application: After deployment, you can invoke the Agent through the API or SDK provided by the platform. Example invocation:
    bash
    agentkit invoke "Give me a random prime number between 50 and 100"

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/6.memory/1.memory_quickstart.html b/en/content/6.memory/1.memory_quickstart.html new file mode 100644 index 0000000..1b8639f --- /dev/null +++ b/en/content/6.memory/1.memory_quickstart.html @@ -0,0 +1,110 @@ + + + + + + AgentKit Memory Quick Start Guide | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Memory Quick Start Guide

AI Agents face increasingly complex multi-turn tasks and context window limitations during operation. They require memory capabilities for context retention and personalization. AgentKit Memory provides a unified memory store interface and integrates with mainstream frameworks, offering cross-session, context-aware, and personalized interactions for Agents, enabling continuous learning and evolution. This chapter guides you through installing dependencies and implementing long-term memory functionality.

Usage Examples

The following example demonstrates how to use AgentKit Memory to implement long-term memory functionality.

Steps:

  • Create a memory resource with semantic policies
  • Write events (conversation history) to the memory resource
  • Retrieve memory records from long-term memory

Creating a Memory Store

Create a memory store for your agent through the Volcano Engine Console: Agentkit-Memory

Obtaining Memory Resource Connection Information

On the Memory Details - Integration Code page, obtain the connection information.

  • For Mem0-type memory resources, you will see environment variables similar to:
DATABASE_MEM0_BASE_URL="https://mem0-your-mem-url.mem0.volces.com:8000"
+DATABASE_MEM0_API_KEY="xxxxxx-xxxxxxx"
  • For VikingDB-type memory resources, you will see environment variables similar to:
DATABASE_VIKINGMEM_COLLECTION=<collection_name of your vikingdb memory> #index
+DATABASE_VIKINGMEM_MEMORY_TYPE=memory_summary_04uyfx # memory type, separate multiple by comma, e.g. event_v1,event_v2

Building an Agent with Long-Term Memory

VeADK is an open-source agent development framework that provides development, execution, and debugging capabilities for agents, maintained by the Volcano Engine team. The following example demonstrates how to use VeADK to build an agent with long-term memory capabilities, using mem0 as the memory store backend. The agent can store user preferences, conversation summaries, and other personalized interaction information using long-term memory based on user input.

You don't need to build a VeADK project from scratch. We recommend using agentkit-cli to create a project from the Basic Agent App template (the template uses the VeADK framework). After the template is created, you need to make the following modifications:

  • Add LongTermMemory to the Agent
  • Configure the environment variables obtained in the previous section to agentkit.yaml
  • Add mem0ai==0.1.118 to requirements.txt
  • Explicitly call runner.save_session_to_long_term_memory after each round of conversation to save the dialogue results to long-term memory

Finally, your code file should look like this:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.memory.long_term_memory import LongTermMemory
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+index = "simple_app" # required for viking backend, arbitrary for mem0 backend
+
+backend = "mem0" # one of "mem0", "viking_mem"
+if backend == "viking_mem":
+    collection_name = os.getenv("DATABASE_VIKINGMEM_COLLECTION")
+    if not collection_name:
+        raise ValueError("DATABASE_VIKINGMEM_COLLECTION environment variable is not set")
+    index = collection_name
+
+app = AgentkitSimpleApp()
+long_term_memory = LongTermMemory(
+  backend=backend,
+  index=index
+)
+
+agent = Agent(
+  name="simple_app_agent",
+  instruction="You are a helpful assistant.",
+  long_term_memory=long_term_memory
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+
+    # save the teaching prompt and answer in long term memory
+    await runner.save_session_to_long_term_memory(session_id=session_id, user_id=user_id)
+
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Environment Configuration

Please add the following configuration to your agentkit.yaml file:

# When the long-term memory backend is mem0, add the following configuration
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_MEM0_BASE_URL: <your mem0 url>
+      DATABASE_MEM0_API_KEY: <your mem0 api key>
+
+# When the long-term memory backend is VikingDB, add the following configuration
+launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKINGMEM_COLLECTION: <your vikingdb collection name>
+      DATABASE_VIKINGMEM_MEMORY_TYPE: <your vikingdb memory type, defaults to "event_v1", separate multiple by comma, e.g. event_v1,event_v2>

Starting the Service

Run agentkit launch. The Runtime connection information will be automatically saved to the agentkit.yaml file.

How to Invoke

Execute the following command to invoke:

agentkit invoke "My secret is 0xabcd"

This will automatically use user_id="agentkit_user", session_id="agentkit_sample_session" to invoke the agent.

Verifying Memory Store Functionality

In the first invocation, you saved the password. We need to change the session_id to verify whether the Agent can correctly read information from the memory store. We recommend waiting approximately 1 minute for the long-term memory extraction to complete before invoking again.

agentkit invoke \
+  --payload '{"prompt": "What is my secret?"}' \
+  --headers '{"user_id": "agentkit_user", "session_id": "s123"}'

You will see that the Agent successfully reads information from the memory store and tells you the password is 0xabcd.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/7.knowledge/1.knowledge_quickstart.html b/en/content/7.knowledge/1.knowledge_quickstart.html new file mode 100644 index 0000000..1c45dd9 --- /dev/null +++ b/en/content/7.knowledge/1.knowledge_quickstart.html @@ -0,0 +1,128 @@ + + + + + + AgentKit Knowledge Quickstart Guide | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit Knowledge Quickstart Guide

AgentKit Knowledge provides one-click configuration and import capabilities for mainstream knowledge bases, enabling easy association with knowledge bases on the AgentKit platform. It offers unified knowledge base interfaces and framework integration, enhancing the convenience of using different knowledge bases for Agents.

Usage Example

The steps are as follows:

  • Create a knowledge base resource
  • Add template files to the knowledge base
  • Retrieve records from the knowledge base

Creating a Knowledge Base

Through the Volcano Engine Console, create a knowledge base for your agent using VikingDB-Knowledge, and add the following content as qa.md to the customer_support knowledge base.

md
# Intelligent Customer Service Knowledge Base
+
+## 1. Company Introduction
+
+VE Technology is a high-tech company specializing in intelligent customer service and knowledge management. Our core product is the **Intelligent Customer Service System**, which provides efficient and intelligent automated customer service solutions for enterprise clients through natural language processing and knowledge base retrieval.
+
+## 2. Product Features
+
+- **Automatic Q&A**: Quickly respond to common questions based on the knowledge base.
+- **Multi-channel Access**: Support for web, App, WeChat, Feishu, and other channels.
+- **Intelligent Recommendations**: Recommend relevant answers based on context.
+- **Data Analytics**: Provide user question statistics and customer service performance reports.
+- **Self-service Knowledge Base Management**: Support for non-technical personnel to quickly edit knowledge content.
+
+---
+
+## 3. Frequently Asked Questions (FAQ)
+
+### Q1: What languages does the Intelligent Customer Service System support?
+
+A1: Currently supports **Chinese** and **English**, with Japanese, Korean, and other multi-language support to be added gradually.
+
+### Q2: Can the system integrate with existing CRMs?
+
+A2: Yes. Our system supports seamless integration with mainstream CRM systems (such as Salesforce, Zoho, Kingdee) through APIs.
+
+### Q3: What happens if the bot cannot answer a user's question?
+
+A3: The system will automatically transfer the question to a human customer service agent and record the question in the backend for administrators to add to the knowledge base.
+
+### Q4: How often is the knowledge base content updated?
+
+A4: The knowledge base supports **real-time updates**, taking effect immediately after administrators submit changes.
+
+## 4. Contact Us
+
+- Website: [https://www.example.com](https://www.example.com)
+- Support Email: support@volcengine.com
+- Service Hotline: 400-123-4567

Importing the Knowledge Base

Through the Volcano Engine Console, import the knowledge base for your agent using Agentkit-Knowledge

Obtaining Connection Information for Memory Resources

On the memory details - integration code page, obtain the connection information.

  • For VikingDB Knowledge type memory resources, you will see environment variables similar to the following:
bash
export DATABASE_VIKING_COLLECTION=customer_support
+export DATABASE_VIKING_PROJECT=default
+export DATABASE_VIKING_REGION=cn-beijing

Building an Agent with Knowledge Base Capabilities

VeADK is an open-source agent development framework that provides development, runtime, and debugging capabilities for agents, maintained by the Volcano Engine team.

The following example demonstrates how to use VeADK to build an agent with knowledge base capabilities, using VikingDB Knowledge as the knowledge base backend. The agent can answer user questions based on the knowledge base according to user input.

You don't need to build a veadk project from scratch. It is recommended to use agentkit-cli to create a project from the Basic Agent App template (the template uses the VeADK framework). After the template is created, you need to make the following modifications:

  • Add Knowledgebase to the Agent
  • Configure the environment variables obtained in the previous section to agentkit.yaml

Finally, your code file should look like this:

python
'''
+**simple agent demo app**
+
+Before running, the user must set the following environment variables; otherwise, runtime exceptions will inevitably occur:
+- MODEL_AGENT_NAME  # model id in Volcano Engine Ark platform
+- MODEL_AGENT_API_KEY  # model api key in Volcano Engine Ark platform
+
+MODEL_AGENT_NAME and MODEL_AGENT_API_KEY are used to access the model service of the Volcano Engine Ark platform.
+'''
+import logging
+import os
+
+from veadk import Agent, Runner
+from veadk.knowledgebase import KnowledgeBase
+
+
+from agentkit.apps import AgentkitSimpleApp
+
+logger = logging.getLogger(__name__)
+
+collection_name = os.getenv("DATABASE_VIKING_COLLECTION")
+if not collection_name:
+    raise ValueError("DATABASE_VIKING_COLLECTION environment variable is not set")
+
+model_name = "doubao-seed-1-6-250615"
+
+app = AgentkitSimpleApp()
+knowledgebase = KnowledgeBase(backend="viking", index=collection_name)
+
+
+agent = Agent(
+    instruction="Answer customer's questions according to your knowledgebase.",
+    model_name=model_name,
+    knowledgebase=knowledgebase
+)
+runner = Runner(agent=agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    response = await runner.run(messages=prompt, user_id=user_id, session_id=session_id)
+
+    logger.info(f"Run response: {response}")
+    return response
+
+
+@app.ping
+def ping() -> str:
+    return "pong!"
+
+
+if __name__ == "__main__":
+    app.run(host="0.0.0.0", port=8000)

Environment Configuration

Please add the following configuration to your agentkit.yaml file:

launch_types:
+  cloud:
+    runtime_envs:
+      DATABASE_VIKING_COLLECTION: <your viking collection name>

Starting the Service

Run agentkit launch. The built Runtime connection information will be automatically saved in the agentkit.yaml file.

How to Initiate a Call

Execute the following to initiate a call:

agentkit invoke "What products do you have?"

You will see the Agent successfully retrieve information from the knowledge base and reorganize the language from qa.md to answer you.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/8.mcp/1.overview.html b/en/content/8.mcp/1.overview.html new file mode 100644 index 0000000..23790b9 --- /dev/null +++ b/en/content/8.mcp/1.overview.html @@ -0,0 +1,26 @@ + + + + + + AgentKit MCP | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit MCP

AgentKit MCP provides a unified MCP gateway and tool governance hub. Through shared instances, pre-built authentication plugins, and automatic search capabilities, it lowers the barrier to entry, reduces token costs, improves tool hit rates and reliability—allowing teams to focus on business logic and user experience refinement.

Core Positioning: Unified entry point, low-barrier access, and a governable tool ecosystem. It handles MCP access and session persistence, combined with OAuth2 and API-Key authentication plugins, as well as cross-tool semantic search capabilities, forming an engineering backbone that is "easy to integrate, governable, and low-cost."

AgentKit MCP Features

AgentKit MCP mainly includes MCP Services and MCP Toolsets.

MCP Services

Supports quickly bringing enterprise existing Web/HTTP services and third-party interfaces into Agents. AgentKit supports two paths:

  1. Direct MCP Server forwarding – For backends that already have MCP capabilities
  2. HTTP-to-MCP conversion – Upload Swagger definitions and rule validations to automatically generate tools and parameter descriptions, allowing historical assets to quickly enter the MCP capability set

Applicable Scenarios:

  • Targeting specific backends (MCP Server or HTTP)
  • Providing access domains and session persistence
  • Authentication pre-configured at the service level (API-Key, OAuth)
  • Suitable for scenarios with controllable and well-defined tool scale

MCP Toolsets

As the number of tools grows or when clients have tool limits (e.g., Trae supports up to 50 tools), automatic search condenses the exposure of the "full tool set" to the LLM into two encapsulated tools: search and use. Vector retrieval selects high-match tools, reducing context redundancy and latency while improving call accuracy.

Applicable Scenarios:

  • Combining tool collections from multiple MCP services
  • Selecting optimal tools through semantic retrieval
  • Exposing only two tools, search and use, to the LLM
  • Suitable for scenarios with large tool quantities or client tool limits

Authentication & Security

AgentKit MCP authentication primarily adopts the OAuth2 Client Credentials pattern, suitable for frontend applications accessing Agent runtime, server-side tasks accessing Agent runtime, and Agents accessing MCP Servers. It also provides API-Key as a low-dependency alternative, with rotation and hosting planned for future releases.

Authentication Mode Distinctions:

  • Inbound: Agent and MCP inbound authentication (OAuth2, API-Key), refined to individual authorization codes and client credentials
  • Outbound: Gateway credential pass-through or transformation when accessing MCP Servers (API-Key, OAuth client)

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/content/8.mcp/2.mcp_quickstart.html b/en/content/8.mcp/2.mcp_quickstart.html new file mode 100644 index 0000000..dde2ccb --- /dev/null +++ b/en/content/8.mcp/2.mcp_quickstart.html @@ -0,0 +1,236 @@ + + + + + + AgentKit MCP Quick Start | AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKit MCP Quick Start

Prerequisites

Before you begin, you need to prepare:

  1. AccessKey & SecretKey from a Volcengine account with AgentKit enabled

    Tip: Make sure the AccessKey has AgentKitFullAccess permission.

  2. MCP Service (can be deployed on VeFaaS or publicly accessible locations)

    • Existing backend services that support MCP
    • Existing HTTP services with Swagger API definition JSON. See Swagger for details.
  3. Python 3.10+ installed

  4. Ark API Key

Step 1: Configure Local Environment

You can use uv or python3 -m venv for virtual environment management. Below we'll use uv as an example.

uv installation reference: uv install

Virtual Environment Setup

bash
mkdir agentkit-mcp-quickstart
+cd agentkit-mcp-quickstart
+uv venv --python 3.12.0
+source .venv/bin/activate

Install Dependencies

You can specify a mirror source with --index to speed up installation.

bash
uv pip install veadk-python
+uv pip install google-adk
+pip install agentkit-sdk-python

Step 2: Create AgentKit MCP

  1. Log in to the AgentKit Console on Volcengine.

  2. Create an MCP Service for your prepared backend.

  3. Obtain the MCP Service Endpoint and ApiKey after creation. You will see output similar to:

    httpUrl is the MCP Service Endpoint, Authorization is the ApiKey.

json
{
+  "mcpServers": {
+    "create-http-334df4": {
+      "httpUrl": "https://sd4fc6lpoh486npgcaav0.apigateway-cn-beijing.volceapi.com/mcp/create-http-334df4",
+      "headers": {
+        "Authorization": "Bearer P66l-rpaLbxxxxxxxxxxxxxxo2PQ"
+      }
+    }
+  }
+}

Step 3: Set Environment Variables and Run Agent

Environment Variable Configuration

bash
export MCP_ENDPOINT={{Endpoint obtained in Step 2}}
+export MCP_AUTH_KEY={{ApiKey obtained in Step 2}}
+export API_KEY={{Ark API Key}}

Code Example

In the code example below, we use the VeADK framework to create a simple agent for calling MCP services.

python
import logging
+
+from veadk import Agent, Runner
+from veadk.config import getenv
+from agentkit.apps import AgentkitSimpleApp
+from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StreamableHTTPConnectionParams
+
+logger = logging.getLogger(__name__)
+
+
+url = getenv("MCP_ENDPOINT")
+mcp_auth_key = getenv("MCP_AUTH_KEY")
+apikey = getenv("API_KEY")
+
+mcp_ecs_toolset = MCPToolset(
+        connection_params=StreamableHTTPConnectionParams(
+        url=url,
+        headers={"Authorization": f"Bearer {mcp_auth_key}"}
+    ),
+)
+
+app = AgentkitSimpleApp()
+
+root_agent = Agent(
+    name="ecs_helper",
+    model_name="doubao-1-5-pro-256k-250115",
+    instruction='''
+        Help user find ECS instances and their details.
+    ''',
+    description="ECS Helper Agent",
+    tools=[mcp_ecs_toolset]
+)
+
+runner = Runner(agent=root_agent)
+
+
+@app.entrypoint
+async def run(payload: dict, headers: dict) -> str:
+    prompt = payload["prompt"]
+    user_id = headers["user_id"]
+    session_id = headers["session_id"]
+
+    logger.info(
+        f"Running agent with prompt: {prompt}, user_id: {user_id}, session_id: {session_id}"
+    )
+    
+    # Run agent, automatically handling tool calls
+    response = await runner.run(
+        messages=prompt, 
+        user_id=user_id, 
+        session_id=session_id
+    )
+
+    logger.info(f"Run response: {response}")
+    return response
+
+@app.ping
+def ping() -> str:
+    """Health check endpoint"""
+    return "pong!"
+
+if __name__ == "__main__":
+    # Start local development server
+    app.run(host="0.0.0.0", port=8000)

Execute Request

bash
curl --location 'http://localhost:8000/invoke' \
+  --header 'Content-Type: application/json' \
+  --header 'user_id: veadk-test' \
+  --header 'session_id: local_session' \
+  --data '{"prompt": "Analyze my ECS instances"}'

Execution Result

text
2025-10-24 20:17:33 | INFO | ark_veauth.py:25 - Fetching ARK token...
+2025-10-24 20:17:33 | INFO | agent.py:118 - Model extra config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | DEBUG | agent.py:127 - LiteLLM client created with config: {'extra_headers': {'x-is-encrypted': 'true', 'veadk-source': 'veadk', 'veadk-version': '0.2.13', 'User-Agent': 'VeADK/0.2.13', 'X-Client-Request-Id': 'veadk/0.2.13'}, 'extra_body': {'caching': {'type': 'enabled'}, 'expire_at': 1761311852}}
+2025-10-24 20:17:33 | INFO | agent.py:153 - VeADK version: 0.2.13
+2025-10-24 20:17:33 | INFO | agent.py:155 - Agent `ecs_helper` init done.
+2025-10-24 20:17:33 | DEBUG | agent.py:156 - Agent: {'name': 'ecs_helper', 'tools': [<google.adk.tools.mcp_tool.mcp_toolset.MCPToolset object at 0x7f8b4f24b9b0>], 'model_name': 'doubao-1-5-pro-256k-250115', 'model_api_base': 'https://ark.cn-beijing.volces.com/api/v3/'}
+2025-10-24 20:17:33 | WARNING | runner.py:198 - No short term memory or session service provided, use an in-memory one instead.
+2025-10-24 20:17:33 | INFO | runner.py:217 - No long term memory provided.
+INFO:     Started server process [1330124]
+INFO:     Waiting for application startup.
+INFO:     Application startup complete.
+INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
+2025-10-24 20:18:35 | INFO | runner.py:250 - Run config: speech_config=None response_modalities=None save_input_blobs_as_artifacts=False support_cfc=False streaming_mode=<StreamingMode.NONE: None> output_audio_transcription=AudioTranscriptionConfig() input_audio_transcription=AudioTranscriptionConfig() realtime_input_config=None enable_affective_dialog=None proactivity=None session_resumption=None context_window_compression=None save_live_audio=False max_llm_calls=100
+2025-10-24 20:18:35 | DEBUG | runner.py:265 - Auto create session: local_session, user_id: veadk-test, app_name: veadk_default_app
+2025-10-24 20:18:38 | DEBUG | runner.py:280 - Function call: id='call_xbyfcvc86wc26mbxz39vst12' args={'region': 'cn-beijing', 'needNum': 10} name='describe_instances'
+2025-10-24 20:19:14 | DEBUG | runner.py:288 - Event output: Here are your ECS instance details:
+1. **Instance 1**:
+    - **Instance ID**: i-ye7irm2sqobw80cqxd40
+    - **Creation Time**: 2025-10-23T21:36:31+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+2. **Instance 2**:
+    - **Instance ID**: i-ye7ipm0dtsqc6imh310d
+    - **Creation Time**: 2025-10-23T21:05:44+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvy72n46nmxzvafi
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+3. **Instance 3**:
+    - **Instance ID**: i-ye7ilsbbpcbw80ca2ymj
+    - **Creation Time**: 2025-10-23T20:06:54+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+4. **Instance 4**:
+    - **Instance ID**: i-ye7fg1hgqoxjd1utrfy3
+    - **Creation Time**: 2025-10-22T14:57:49+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+5. **Instance 5**:
+    - **Instance ID**: i-ye5ejwoow0cva4fqydfc
+    - **Creation Time**: 2025-09-24T14:25:37+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+6. **Instance 6**:
+    - **Instance ID**: i-ye5ejub08wbw80bpd7hr
+    - **Creation Time**: 2025-09-24T14:24:35+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+7. **Instance 7**:
+    - **Instance ID**: i-ye5e5jyq68bw80c889i5
+    - **Creation Time**: 2025-09-24T10:44:54+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+8. **Instance 8**:
+    - **Instance ID**: i-ye5c4jbx8gqc6ily6b30
+    - **Creation Time**: 2025-09-23T16:02:05+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Windows Server 2022 Datacenter Edition 64-bit Chinese
+    - **Image ID**: image-ye5907jc6ikhx1exow93
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+9. **Instance 9**:
+    - **Instance ID**: i-ye5c4end34xjd1umbfns
+    - **Creation Time**: 2025-09-23T16:00:05+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvfxhokhx11pdmlv
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+10. **Instance 10**:
+    - **Instance ID**: i-ye5blj0xdsxjd1tk1vfh
+    - **Creation Time**: 2025-09-23T11:09:46+08:00
+    - **Billing Method**: PostPaid (Pay-as-you-go)
+    - **Instance Type**: ecs.e-c1m2.xlarge
+    - **CPU**: 4 cores (2 cores, 2 threads per core)
+    - **Memory**: 8192MB
+    - **OS**: Debian 12 64 bit
+    - **Image ID**: image-ydzwsvfxhokhx11pdmlv
+    - **Status**: RUNNING
+    - **Availability Zone**: cn-beijing-a
+
+All 10 instances are pay-as-you-go with type ecs.e-c1m2.xlarge. Most use Windows Server 2022 Datacenter Edition 64-bit Chinese, with a few using Debian 12 64-bit. All are currently running in availability zone cn-beijing-a. If you need further analysis or have other operation requirements, feel free to ask.

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/en/index.html b/en/index.html new file mode 100644 index 0000000..341094c --- /dev/null +++ b/en/index.html @@ -0,0 +1,26 @@ + + + + + + AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKitPython SDK & CLI

Quickly build and deploy Agent applications to the Volcengine AgentKit Platform

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/examples/complete_workflow_example.py b/examples/complete_workflow_example.py deleted file mode 100644 index 263b175..0000000 --- a/examples/complete_workflow_example.py +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env python3 -""" -AgentKit SDK 完整工作流示例 -============================ - -这个示例展示了使用新的配置管理 API 的完整工作流: -1. 初始化项目 -2. 使用 AgentConfig 修改配置 -3. 构建和部署 Agent -4. 调用 Agent -5. 清理资源 - -特性: -- ✅ 使用 InitResult.load_config() 加载配置 -- ✅ 使用 AgentConfig 优雅地修改配置 -- ✅ 使用 AgentKitClient 管理完整生命周期 -- ✅ 完整的错误处理 -""" - -import sys -from agentkit.toolkit.sdk import AgentKitClient - -def main(): - print("=" * 70) - print("AgentKit SDK 完整工作流示例") - print("=" * 70) - print() - - # ========== Step 1: 初始化项目 ========== - print("📦 Step 1: 初始化项目...") - print("-" * 70) - - init_result = AgentKitClient.init_project( - project_name="demo_planning_agent", - template="basic_stream", - description="一个制定计划和方案的智能 Agent", - system_prompt="你是一个指定计划和方案的 Agent,你要做的事情就是帮助用户将问题拆分,给出整体的任务分解和步骤规划。", - model_name="deepseek-v3-1-250821", - tools="web_search,code_runner" - ) - - if not init_result.success: - print(f"❌ 项目初始化失败: {init_result.error}") - sys.exit(1) - - print("✅ 项目创建成功!") - print(f" 项目名称: {init_result.project_name}") - print(f" 项目路径: {init_result.project_path}") - print(f" 配置文件: {init_result.config_file}") - print(f" 创建文件: {len(init_result.created_files)} 个") - print() - - # ========== Step 2: 使用 AgentConfig 修改配置 ========== - print("🔧 Step 2: 配置 Agent (使用 AgentConfig API)...") - print("-" * 70) - - # ✅ 新方式:使用 InitResult.load_config() - config = init_result.load_config() - - print("📖 当前配置:") - print(f" Agent 名称: {config.agent_name}") - print(f" 启动模式: {config.launch_type}") - print(f" 编程语言: {config.language} {config.language_version}") - print(f" 入口文件: {config.entry_point}") - print() - - # 修改配置为 local 模式(方便本地测试) - print("🔧 修改启动模式为 local...") - config.launch_type = "local" - - # 添加环境变量 - config.add_runtime_env("LOG_LEVEL", "DEBUG") - config.add_runtime_env("ENVIRONMENT", "development") - - # 保存配置 - config.save() - print("✅ 配置已更新并保存") - print(f" 启动模式: {config.launch_type}") - print(f" 环境变量: {len(config.runtime_envs)} 个") - print() - - # ========== Step 3: 创建 Client ========== - print("🤖 Step 3: 创建 AgentKitClient...") - print("-" * 70) - - # ✅ 方式 1: 使用 AgentConfig 对象(推荐) - client = AgentKitClient(config) - print("✅ Client 已创建(使用 AgentConfig 对象)") - print() - - # 或者使用 InitResult.create_client() 一步到位 - # client = init_result.create_client(launch_type="local") - - # ========== Step 4: 构建 Agent ========== - print("🔨 Step 4: 构建 Agent 镜像...") - print("-" * 70) - - build_result = client.build() - - if not build_result.success: - print(f"❌ 构建失败: {build_result.error}") - print(f" 错误类型: {build_result.error_type}") - sys.exit(1) - - print("✅ 构建成功!") - print(f" 镜像名称: {build_result.image_name}") - print(f" 镜像 ID: {build_result.image_id}") - print(f" 镜像标签: {build_result.image_tag}") - print() - - # ========== Step 5: 部署 Agent ========== - print("🚀 Step 5: 部署 Agent...") - print("-" * 70) - - deploy_result = client.deploy() - - if not deploy_result.success: - print(f"❌ 部署失败: {deploy_result.error}") - sys.exit(1) - - print("✅ 部署成功!") - print(f" 服务端点: {deploy_result.endpoint_url}") - print(f" 容器 ID: {deploy_result.container_id}") - print(f" 服务 ID: {deploy_result.service_id}") - print() - - # ========== Step 6: 查询状态 ========== - print("📊 Step 6: 查询 Agent 状态...") - print("-" * 70) - - status_result = client.status() - - if status_result.success: - print("✅ 状态查询成功!") - print(f" 运行状态: {status_result.status.value}") - print(f" 是否运行: {'是' if status_result.is_running() else '否'}") - print(f" 服务端点: {status_result.endpoint_url}") - if status_result.uptime: - print(f" 运行时长: {status_result.uptime}") - else: - print(f"⚠️ 状态查询失败: {status_result.error}") - print() - - # ========== Step 7: 调用 Agent ========== - print("💬 Step 7: 调用 Agent...") - print("-" * 70) - - # 准备调用参数 - payload = { - "prompt": "请帮我制定一个学习 Python 的计划,我是初学者,每天可以投入 2 小时学习。" - } - - headers = { - "user_id": "demo_user_001", - "session_id": "demo_session_001" - } - - print("📤 发送请求:") - print(f" 提示词: {payload['prompt'][:50]}...") - print(f" 用户 ID: {headers['user_id']}") - print() - - invoke_result = client.invoke( - payload=payload, - headers=headers - ) - - if not invoke_result.success: - print(f"❌ 调用失败: {invoke_result.error}") - print(f" 错误类型: {invoke_result.error_type}") - else: - print("✅ 调用成功!") - - # 处理响应 - if invoke_result.is_streaming: - print("📡 流式响应:") - print("-" * 70) - try: - for event in invoke_result.stream(): - # 打印每个事件 - if isinstance(event, dict): - if 'content' in event: - print(event['content'], end='', flush=True) - elif 'data' in event: - print(event['data'], end='', flush=True) - else: - print(event, end='', flush=True) - print() # 换行 - except Exception as e: - print(f"\n⚠️ 流式响应处理出错: {e}") - else: - print("📥 响应:") - print("-" * 70) - print(invoke_result.response) - - print() - print("-" * 70) - print() - - # ========== Step 8: 清理资源 ========== - print("🧹 Step 8: 清理资源...") - print("-" * 70) - - cleanup = input("是否清理资源(停止并删除容器)? (y/N): ").strip().lower() - - if cleanup == 'y': - destroy_result = client.destroy(force=True) - - if destroy_result.success: - print(f"✅ {destroy_result.message}") - else: - print(f"❌ 清理失败: {destroy_result.error}") - else: - print("⏭️ 跳过清理,Agent 继续运行") - print(" 可以使用以下命令手动清理:") - print(f" cd {init_result.project_path}") - print(" agentkit destroy") - - print() - print("=" * 70) - print("✅ 工作流完成!") - print("=" * 70) - print() - - # ========== 总结 ========== - print("📝 工作流总结:") - print(f" • 项目路径: {init_result.project_path}") - print(f" • 配置文件: {init_result.config_file}") - print(f" • 启动模式: {config.launch_type}") - print(f" • 镜像名称: {build_result.image_name if build_result.success else 'N/A'}") - print(f" • 服务端点: {deploy_result.endpoint_url if deploy_result.success else 'N/A'}") - print() - - print("🎯 下一步操作:") - print(f" 1. 查看项目文件: cd {init_result.project_path}") - print(f" 2. 修改代码: vim {init_result.project_path}/{config.entry_point}") - print(f" 3. 重新构建: cd {init_result.project_path} && agentkit build") - print(" 4. 查看状态: agentkit status") - print() - - -if __name__ == "__main__": - try: - main() - except KeyboardInterrupt: - print("\n\n⚠️ 用户中断") - sys.exit(0) - except Exception as e: - print(f"\n\n❌ 发生错误: {e}") - import traceback - traceback.print_exc() - sys.exit(1) diff --git a/hashmap.json b/hashmap.json new file mode 100644 index 0000000..18f1ae6 --- /dev/null +++ b/hashmap.json @@ -0,0 +1 @@ +{"content_1.introduction_1.overview.md":"CxYdc5QO","content_1.introduction_2.installation.md":"B_uDtPtx","content_1.introduction_3.quickstart.md":"D8kgkZZU","content_1.introduction_4.troubleshooting.md":"UOTF9dWY","content_2.agentkit-cli_1.overview.md":"BpjmCrAz","content_2.agentkit-cli_2.commands.md":"Dg4HXmoC","content_2.agentkit-cli_3.configurations.md":"B5LW8eA4","content_2.agentkit-cli_4.logging.md":"BmTvgFmd","content_3.agentkit-sdk_1.overview.md":"D47HXcGC","content_3.agentkit-sdk_2.annotation.md":"36mHSS0p","content_4.runtime_1.runtime_quickstart.md":"BmdJbidS","content_5.tools_1.sandbox_quickstart.md":"C65A9nS4","content_6.memory_1.memory_quickstart.md":"_3gVMsCE","content_7.knowledge_1.knowledge_quickstart.md":"BmMqyhTj","content_8.mcp_1.overview.md":"Ds1BUHd2","content_8.mcp_2.mcp_quickstart.md":"Dl6u5Kgz","en_content_1.introduction_1.overview.md":"P6NUNREt","en_content_1.introduction_2.installation.md":"CEZ13i5J","en_content_1.introduction_3.quickstart.md":"Ci6oPPk0","en_content_1.introduction_4.troubleshooting.md":"Rozs1iDL","en_content_2.agentkit-cli_1.overview.md":"CkNAYw2y","en_content_2.agentkit-cli_2.commands.md":"CWvyKhK4","en_content_2.agentkit-cli_3.configurations.md":"B_ONoSNn","en_content_2.agentkit-cli_4.logging.md":"CKu1hSf7","en_content_3.agentkit-sdk_1.overview.md":"BdtJKqB6","en_content_3.agentkit-sdk_2.annotation.md":"W70VjxIS","en_content_4.runtime_1.runtime_quickstart.md":"CFRmDDBm","en_content_5.tools_1.sandbox_quickstart.md":"CMivIjEK","en_content_6.memory_1.memory_quickstart.md":"BRTeGBGS","en_content_7.knowledge_1.knowledge_quickstart.md":"8Q5YYw7O","en_content_8.mcp_1.overview.md":"4fEofmMb","en_content_8.mcp_2.mcp_quickstart.md":"-pvhzRBs","en_index.md":"CcuX5I5M","index.md":"BmbdQK4h","readme.md":"CsTNQcgo"} diff --git a/docs/public/image/create_long_term_memory.jpg b/image/create_long_term_memory.jpg similarity index 100% rename from docs/public/image/create_long_term_memory.jpg rename to image/create_long_term_memory.jpg diff --git a/docs/public/images/agentkit_config_demoshow_basic.png b/images/agentkit_config_demoshow_basic.png similarity index 100% rename from docs/public/images/agentkit_config_demoshow_basic.png rename to images/agentkit_config_demoshow_basic.png diff --git a/docs/public/images/agentkit_config_demoshow_cloud.png b/images/agentkit_config_demoshow_cloud.png similarity index 100% rename from docs/public/images/agentkit_config_demoshow_cloud.png rename to images/agentkit_config_demoshow_cloud.png diff --git a/docs/public/images/ak_sk_show.png b/images/ak_sk_show.png similarity index 100% rename from docs/public/images/ak_sk_show.png rename to images/ak_sk_show.png diff --git a/docs/public/images/create_model_apikey.png b/images/create_model_apikey.png similarity index 100% rename from docs/public/images/create_model_apikey.png rename to images/create_model_apikey.png diff --git a/docs/public/images/init_demo.png b/images/init_demo.png similarity index 100% rename from docs/public/images/init_demo.png rename to images/init_demo.png diff --git a/images/model_apikey.jpg b/images/model_apikey.jpg new file mode 100644 index 0000000..8d1e508 Binary files /dev/null and b/images/model_apikey.jpg differ diff --git a/images/select_or_create_model_endpoint.jpg b/images/select_or_create_model_endpoint.jpg new file mode 100644 index 0000000..3e97220 Binary files /dev/null and b/images/select_or_create_model_endpoint.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..8a0883a --- /dev/null +++ b/index.html @@ -0,0 +1,26 @@ + + + + + + AgentKit + + + + + + + + + + + + + + + +
Skip to content

AgentKitPython SDK & CLI

快速构建和部署 Agent 应用到火山引擎 AgentKit Platform

Released under the Apache-2.0 License.

+ + + + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index a78561d..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,59 +0,0 @@ -[project] -name = "agentkit-sdk-python" -version = "0.1.7" -description = "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." -readme = "README.md" -requires-python = ">=3.10" -license = { file = "LICENSE" } -authors = [ - {name = "Yaozheng Fang", email = "fangyozheng@gmail.com"}, - {name = "Guodong Li", email = "cu.eric.lee@gmail.com"}, - {name = "Xiangrui Cheng", email = "innsdcc@gmail.com"}, - {name = "Yumeng Bao", email = "baoyumeng.123@gmail.com"}, -] -dependencies = [ - "a2a-sdk>=0.3.7", - "fastapi>=0.117.1", - "fastmcp>=2.12.3", - "opentelemetry-api>=1.32.1", - "opentelemetry-exporter-otlp-proto-common>=1.32.1", - "opentelemetry-exporter-otlp-proto-grpc>=1.32.1", - "opentelemetry-sdk>=1.32.1", - "pydantic>=2.11.9", - "requests>=2.32.5", - "uvicorn>=0.37.0", - "pyyaml", - "prompt_toolkit", - "typer", - "rich", - "docker", - "jinja2", - "tos>=2.8.7", - "volcengine", - "pyfiglet>=1.0.2", -] - -[project.scripts] -agentkit = "agentkit.toolkit.cli.cli:app" - -[tool.setuptools.packages.find] -where = ["."] -include = ["agentkit*"] - -[tool.setuptools] -include-package-data = true - -[dependency-groups] -dev = [ - "pre-commit>=4.3.0", -] -toolkit = [ - "pyyaml>=6.0.2", - "typer>=0.19.2", - "inquirerpy>=0.3.4", -] - -[project.optional-dependencies] -extensions = [] -toolkit = [] -dev = [] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a1a5a1a..0000000 --- a/requirements.txt +++ /dev/null @@ -1,25 +0,0 @@ -# Core dependencies -a2a-sdk>=0.3.7 -fastapi>=0.117.1 -fastmcp>=2.12.3 -opentelemetry-api>=1.32.1 -opentelemetry-exporter-otlp-proto-common>=1.32.1 -opentelemetry-exporter-otlp-proto-grpc>=1.32.1 -opentelemetry-sdk>=1.32.1 -pydantic>=2.11.9 -requests>=2.32.5 -uvicorn>=0.37.0 -pyyaml>=6.0.2 -prompt_toolkit -typer>=0.19.2 -rich -docker -jinja2 -tos>=2.8.7 -volcengine -volcengine-python-sdk -pyfiglet>=1.0.2 -inquirerpy>=0.3.4 - -# Development dependencies -pre-commit>=4.3.0 diff --git a/tools/generate_types_from_api_json.py b/tools/generate_types_from_api_json.py deleted file mode 100644 index 475b041..0000000 --- a/tools/generate_types_from_api_json.py +++ /dev/null @@ -1,831 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -""" -从API JSON定义自动生成Pydantic结构体的工具 - -使用方法: - python generate_types_from_api_json.py [--output ] - -示例: - python generate_types_from_api_json.py ../agentkit/runtime/runtime_api.json --output generated_types.py \ - --base-class-name AgentKitBaseModel -""" - -import json -import argparse -import re -from typing import Dict, List, Set, Tuple -from collections import defaultdict - - -def sanitize_docstring(text: str) -> str: - """清理docstring内容,避免三引号导致语法错误""" - if not text: - return "" - sanitized = text.replace('"""', '\\"\\"\\"') - sanitized = sanitized.replace('\r', ' ').replace('\n', ' ') - sanitized = ' '.join(sanitized.split()) - return sanitized - - -class TypeMapper: - """类型映射器:将JSON中的Type字段映射为Python类型""" - - TYPE_MAPPING = { - 1: "str", # String - 2: "int", # Integer - 3: "float", # Float/Double - 4: "int", # Long - 5: "float", # Double - 6: "bool", # Boolean - 7: "dict", # Object/Map - 8: "list", # Array (general) - } - - @staticmethod - def get_python_type(type_id: int) -> str: - """获取Python类型字符串""" - return TypeMapper.TYPE_MAPPING.get(type_id, "str") - - -class FieldInfo: - """字段信息""" - def __init__(self, name: str, python_name: str, type_str: str, - is_required: bool, is_array: bool, description: str = ""): - self.name = name # 原始名称(用作alias) - self.python_name = python_name # Python字段名(小写+下划线) - self.type_str = type_str # Python类型字符串 - self.is_required = is_required - self.is_array = is_array - self.description = description - - def to_field_definition(self) -> str: - """生成字段定义代码""" - # 确定类型 - if self.is_array: - final_type = f"list[{self.type_str}]" - else: - final_type = self.type_str - - # 处理可选字段 - if not self.is_required: - final_type = f"Optional[{final_type}]" - default_value = "default=None" - else: - default_value = "..." - - # 生成Field定义 - field_def = f'Field({default_value}, alias="{self.name}")' - - return f' {self.python_name}: {final_type} = {field_def}' - - -class NestedModel: - """嵌套模型""" - def __init__(self, name: str): - self.name = name - self.fields: List[FieldInfo] = [] - self.children: Dict[str, 'NestedModel'] = {} - - def add_field(self, field: FieldInfo): - """添加字段""" - self.fields.append(field) - - def add_child(self, name: str) -> 'NestedModel': - """添加子模型""" - if name not in self.children: - self.children[name] = NestedModel(name) - return self.children[name] - - def to_class_definition(self, indent: int = 0, base_class_name: str = "BaseModel") -> str: - """生成类定义""" - indent_str = " " * indent - lines = [] - - # 类定义 - lines.append(f"{indent_str}class {self.name}({base_class_name}):") - - # 字段定义 - if self.fields: - for field in self.fields: - lines.append(f"{indent_str}{field.to_field_definition()}") - else: - lines.append(f"{indent_str} pass") - - return "\n".join(lines) - - -class APIStructGenerator: - """API结构生成器""" - - def __init__(self, base_model_name: str = "AgentKitBaseModel", base_model_doc: str | None = None): - self.nested_models: Dict[str, NestedModel] = {} - self.used_types: Set[str] = {"BaseModel", "Field", "Optional"} - self.generated_class_names: Set[str] = set() - self.base_model_name = base_model_name - self.base_model_doc = base_model_doc or "AgentKit auto-generated base model" - # 确保基础类名不会与生成的结构体冲突 - self.generated_class_names.add(self.base_model_name) - self.file_header_cache: List[str] | None = None - - def generate_client_module( - self, - data: dict, - *, - client_class_name: str, - client_description: str, - service_name: str, - types_module: str, - base_class_import: str, - base_class_name: str, - ) -> str: - """根据API定义生成客户端代码""" - api_list = data.get("ApiList", []) - if not api_list: - return "" - lines = self._generate_file_header() - lines.append("from typing import Dict") - lines.append(f"from {base_class_import} import {base_class_name}") - lines.append(f"from {types_module} import (") - type_names = [] - for api in api_list: - action = api.get("Action") - if not action: - continue - type_names.extend([f"{action}Request", f"{action}Response"]) - for name in sorted(set(type_names)): - lines.append(f" {name},") - lines.append(")") - lines.append("") - lines.append("") - doc = sanitize_docstring(client_description or f"AgentKit client for {service_name}") - lines.append(f"class {client_class_name}({base_class_name}):") - lines.append(f" \"\"\"{doc}\"\"\"") - lines.append(" API_ACTIONS: Dict[str, str] = {") - for api in api_list: - action = api.get("Action") - if not action: - continue - lines.append(f" \"{action}\": \"{action}\",") - lines.append(" }") - lines.append("") - lines.append(" def __init__(") - lines.append(" self,") - lines.append(" access_key: str = \"\",") - lines.append(" secret_key: str = \"\",") - lines.append(" region: str = \"\",") - lines.append(" session_token: str = \"\",") - lines.append(" ) -> None:") - lines.append(" super().__init__(") - lines.append(" access_key=access_key,") - lines.append(" secret_key=secret_key,") - lines.append(" region=region,") - lines.append(" session_token=session_token,") - lines.append(f" service_name=\"{service_name}\",") - lines.append(" )") - lines.append("") - for api in api_list: - action = api.get("Action") - if not action: - continue - method_name = self.to_snake_case(action) - req_type = f"{action}Request" - resp_type = f"{action}Response" - lines.append("") - lines.append(f" def {method_name}(self, request: {req_type}) -> {resp_type}:") - lines.append(" return self._invoke_api(") - lines.append(f" api_action=\"{action}\",") - lines.append(" request=request,") - lines.append(f" response_type={resp_type},") - lines.append(" )") - lines.append("") - return "\n".join(lines) - - def register_class_name(self, name: str): - """记录已经生成的类名,避免重复""" - self.generated_class_names.add(name) - - def qualify_model_name(self, base_name: str, action: str) -> str: - """为嵌套模型生成带Action后缀的唯一类名""" - candidate = f"{base_name}For{action}" - index = 2 - while candidate in self.generated_class_names: - candidate = f"{base_name}For{action}{index}" - index += 1 - self.generated_class_names.add(candidate) - return candidate - - def _strip_generic_suffix(self, name: str) -> str: - """去掉一些通用后缀,使生成的类名更有语义,同时减少 *2 这类命名""" - for suffix in ("Configuration", "Config", "Info", "List", "Item", "Items"): - if name.endswith(suffix) and len(name) > len(suffix): - return name[: -len(suffix)] - return name - - def _build_nested_base_name(self, path: str, is_array_object: bool) -> str: - """根据字段路径构造嵌套模型的基础类名,尽量避免使用 *2 这种后缀""" - parts = [self._strip_generic_suffix(p) for p in path.split(".") if p] - if not parts: - core = "NestedModel" - elif len(parts) == 1: - core = parts[0] - else: - # 多级嵌套时,将各层名称拼接起来以区分不同路径 - core = "".join(parts) - if is_array_object: - core = f"{core}Item" - return core - - def parse_field_path(self, field_name: str) -> Tuple[List[str], str, bool, bool]: - """ - 解析字段路径 - - 返回: (path_parts, field_name, is_array_item, is_simple_array) - 例如: - "Name" -> ([], "Name", False, False) - "AuthorizerConfiguration.KeyAuth.ApiKey" -> (["AuthorizerConfiguration", "KeyAuth"], "ApiKey", False, False) - "Envs.N.Key" -> (["Envs"], "Key", True, False) - 对象数组的字段 - "AllowedClients.N" -> (["AuthorizerConfiguration", "CustomJwtAuthorizer"], "AllowedClients", False, True) - 简单数组字段 - """ - parts = field_name.split(".") - - # 检查是否以.N结尾(简单数组) - is_simple_array = len(parts) >= 2 and parts[-1] == "N" - - # 检查是否包含.N.(对象数组) - is_array_item = "N" in parts[:-1] if len(parts) > 1 else False - - # 清理N标记 - clean_parts = [] - for part in parts: - if part != "N": - clean_parts.append(part) - - if len(clean_parts) == 1: - return [], clean_parts[0], False, False - else: - return clean_parts[:-1], clean_parts[-1], is_array_item, is_simple_array - - def to_snake_case(self, name: str) -> str: - """将驼峰命名转换为蛇形命名""" - if not name: - return name - # 先在连续大写 + 小写的边界处插入下划线,例如 "MCPService" -> "MCP_Service" - step_one = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", name) - # 再在小写/数字后接大写的地方插入下划线,例如 "ServiceID" -> "Service_ID" - step_two = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", step_one) - # 统一转小写并去掉可能的重复下划线 - return re.sub(r"__+", "_", step_two).lower() - - def create_nested_structure(self, parameters: List[dict], action: str) -> NestedModel: - """创建嵌套结构""" - root = NestedModel("Root") - path_models: Dict[str, NestedModel] = {} - class_models: Dict[str, NestedModel] = {} - path_class_names: Dict[str, str] = {} - - # 第一遍:收集所有嵌套路径和数组字段 - array_fields = defaultdict(set) # 记录哪些路径有数组字段(.N.) - normal_fields = defaultdict(set) # 记录哪些路径有普通字段 - nested_object_paths = set() # 记录所有嵌套对象路径 - - for param in parameters: - field_name = param["Name"] - path_parts, final_name, is_array_item, is_simple_array = self.parse_field_path(field_name) - - if len(path_parts) > 0: - path_str = ".".join(path_parts) - - if is_array_item: - # 记录这是一个对象数组的字段 - array_fields[path_str].add(final_name) - else: - # 记录这是一个普通字段 - normal_fields[path_str].add(final_name) - - # 记录所有嵌套路径 - for i in range(1, len(path_parts) + 1): - nested_path = ".".join(path_parts[:i]) - nested_object_paths.add(nested_path) - - # 判断哪些路径是真正的数组对象(只有数组字段,没有普通字段) - array_objects = {} - for path in array_fields: - if path not in normal_fields: - # 这个路径只有数组字段,是真正的数组对象 - array_objects[path] = array_fields[path] - - # 创建嵌套模型实例(先创建普通嵌套对象) - for path in sorted(nested_object_paths): - if path not in array_objects: # 如果不是数组对象路径 - base_name = self._build_nested_base_name(path, is_array_object=False) - model_name = self.qualify_model_name(base_name, action) - model = NestedModel(model_name) - path_models[path] = model - path_class_names[path] = model_name - class_models[model_name] = model - - # 为数组对象创建Item模型(只有在根级别或明确的数组对象才加Item后缀) - for array_path in array_objects: - parts = array_path.split(".") - if len(parts) == 1 or array_path in nested_object_paths: - base_name = self._build_nested_base_name(array_path, is_array_object=True) - else: - # 忽略那些仅作为中间路径、但本身不是嵌套对象的数组路径 - continue - model_name = self.qualify_model_name(base_name, action) - model = NestedModel(model_name) - path_models[array_path] = model - path_class_names[array_path] = model_name - class_models[model_name] = model - - # 调试:打印 CreateMCPToolset 的嵌套路径信息 - if action == "CreateMCPToolset": - print("[DEBUG] action=CreateMCPToolset nested_object_paths=", sorted(nested_object_paths)) - print("[DEBUG] action=CreateMCPToolset array_objects=", sorted(array_objects.keys())) - - # 建立父子关系字段(包含对象和对象数组) - for full_path in sorted(nested_object_paths): - parts = full_path.split(".") - if len(parts) < 2: - # 顶层对象由 root_refs 负责挂到根上 - continue - parent_path = ".".join(parts[:-1]) - child_name = parts[-1] - if parent_path not in path_models: - continue - parent_model = path_models[parent_path] - child_python_name = self.to_snake_case(child_name) - existing = [f for f in parent_model.fields if f.python_name == child_python_name] - if existing: - continue - child_type = path_class_names.get(full_path, child_name) - is_array_object = full_path in array_objects - field = FieldInfo( - name=child_name, - python_name=child_python_name, - type_str=child_type, - is_required=False, - is_array=is_array_object, - description="", - ) - parent_model.add_field(field) - - # 调试:打印 CreateMCPToolset 的父子关系字段 - if action == "CreateMCPToolset": - for p, m in path_models.items(): - print( - "[DEBUG] path_model", - p, - "-> class", - m.name, - "fields=", - [f.python_name for f in m.fields], - ) - - # 第二遍:填充字段 - root_refs = {} # 用于跟踪根级别的对象引用 - - for param in parameters: - field_name = param["Name"] - path_parts, final_name, is_array_item, is_simple_array = self.parse_field_path(field_name) - - # 获取类型 - type_id = param.get("Type", 1) - python_type = TypeMapper.get_python_type(type_id) - - # 是否必填 - is_required = param.get("IsRequired", 0) == 1 - - # 描述 - description = param.get("Description", "") - - python_name = self.to_snake_case(final_name) - - # 处理不同情况 - if len(path_parts) == 0: - # 根级别的简单字段(不是嵌套对象的入口) - field = FieldInfo( - name=final_name, - python_name=python_name, - type_str=python_type, - is_required=is_required, - is_array=False, - description=description - ) - root.add_field(field) - - elif is_simple_array: - # 这是一个简单数组字段(如AuthorizerConfiguration.CustomJwtAuthorizer.AllowedClients.N) - parent_path = ".".join(path_parts) - if parent_path in path_models: - parent_model = path_models[parent_path] - existing = [f for f in parent_model.fields if f.python_name == python_name] - if not existing: - field = FieldInfo( - name=final_name, - python_name=python_name, - type_str=python_type, - is_required=is_required, - is_array=True, - description=description - ) - parent_model.add_field(field) - elif len(path_parts) == 0: - # 根级别的简单数组 - field = FieldInfo( - name=final_name, - python_name=python_name, - type_str=python_type, - is_required=is_required, - is_array=True, - description=description - ) - root.add_field(field) - - elif is_array_item: - # 这是对象数组的字段(如Envs.N.Key) - array_path = ".".join(path_parts) - - if array_path in path_models: - field = FieldInfo( - name=final_name, - python_name=python_name, - type_str=python_type, - is_required=is_required, - is_array=False, - description=description - ) - path_models[array_path].add_field(field) - - # 确保根级别有对这个数组的引用 - if len(path_parts) == 1: - array_name = path_parts[0] - if array_name not in root_refs: - ref_type = path_class_names.get(array_path, f"{array_name}Item") - root_refs[array_name] = { - 'type': ref_type, - 'is_array': True, - 'is_required': False - } - else: - # 嵌套对象字段本身携带的简单属性(非子对象引用) - full_path = ".".join(path_parts) - - if full_path in path_models: - field = FieldInfo( - name=final_name, - python_name=python_name, - type_str=python_type, - is_required=is_required, - is_array=False, - description=description, - ) - path_models[full_path].add_field(field) - - # 确保根级别的第一层对象被引用 - root_level_name = path_parts[0] - if root_level_name not in root_refs: - ref_type = path_class_names.get(root_level_name, root_level_name) - root_refs[root_level_name] = { - 'type': ref_type, - 'is_array': False, - 'is_required': False, - } - - # 添加根级别的对象引用 - for ref_name, ref_info in root_refs.items(): - python_name = self.to_snake_case(ref_name) - # 检查是否已存在 - existing = [f for f in root.fields if f.python_name == python_name] - if not existing: - ref_type = ref_info['type'] - field = FieldInfo( - name=ref_name, - python_name=python_name, - type_str=ref_type, - is_required=ref_info['is_required'], - is_array=ref_info['is_array'], - description="" - ) - root.add_field(field) - - self.nested_models = class_models - return root - - def generate_request_model(self, action: str, parameters: List[dict]) -> str: - """生成请求模型""" - class_name = f"{action}Request" - self.register_class_name(class_name) - root = self.create_nested_structure(parameters, action) - root.name = class_name - - sections = [] - for model in self.nested_models.values(): - sections.append(model.to_class_definition(base_class_name=self.base_model_name)) - sections.append(root.to_class_definition(base_class_name=self.base_model_name)) - - return "\n\n".join(sections) - - def generate_response_model(self, action: str, parameters: List[dict]) -> str: - """生成响应模型""" - class_name = f"{action}Response" - if class_name in self.generated_class_names: - # 如果已经存在同名响应,跳过生成以避免重复 - return "" - self.register_class_name(class_name) - - lines = [] - lines.append(f"class {class_name}({self.base_model_name}):") - - # 处理响应字段 - has_fields = False - for param in parameters: - name = param.get("Name", "") - type_id = param.get("Type", 1) - is_array = param.get("IsArray", 0) == 1 - description = param.get("Description", "") - param_type_ref = param.get("ParameterType", {}).get("$ref", "") - - python_name = self.to_snake_case(name) - - # 确定类型 - if param_type_ref: - # 引用DataType中定义的类型 - python_type = param_type_ref - else: - python_type = TypeMapper.get_python_type(type_id) - - # 处理数组 - if is_array: - python_type = f"list[{python_type}]" - - # 响应字段通常都是可选的 - python_type = f"Optional[{python_type}]" - - # 生成字段定义 - field_def = f'Field(default=None, alias="{name}")' - - lines.append(f' {python_name}: {python_type} = {field_def}') - has_fields = True - - if not has_fields: - lines.append(" pass") - - return "\n".join(lines) - - def generate_datatype_models(self, data_types: List[dict]) -> List[str]: - """从DataType节生成模型定义""" - lines = [] - - for i, dtype in enumerate(data_types): - struct_name = dtype.get("StructName", "") - elements = dtype.get("Element", []) - - if not struct_name or not elements: - continue - if struct_name in self.generated_class_names: - continue - self.register_class_name(struct_name) - - # 添加空行分隔不同的类(除了第一个) - if i > 0: - lines.append("") - lines.append("") - - # 生成类定义 - lines.append(f"class {struct_name}({self.base_model_name}):") - - # 生成字段 - for element in elements: - elem_name = element.get("ElementName", "") - elem_type = element.get("ElementType", 1) - is_required = element.get("IsRequired", 0) == 1 - is_array = element.get("IsArray", 0) == 1 - param_type_ref = element.get("ParameterType", {}).get("$ref", "") - - python_name = self.to_snake_case(elem_name) - - # 确定类型 - if param_type_ref: - # 引用其他类型 - python_type = param_type_ref - else: - python_type = TypeMapper.get_python_type(elem_type) - - # 处理数组 - if is_array: - python_type = f"list[{python_type}]" - - # 处理可选 - if not is_required: - python_type = f"Optional[{python_type}]" - default_value = "default=None" - else: - default_value = "..." - - lines.append(f' {python_name}: {python_type} = Field({default_value}, alias="{elem_name}")') - - - return lines - - def _generate_file_header(self) -> List[str]: - """生成通用文件头""" - if self.file_header_cache is not None: - return list(self.file_header_cache) - lines = [] - lines.append("# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.") - lines.append("#") - lines.append("# Licensed under the Apache License, Version 2.0 (the \"License\");") - lines.append("# you may not use this file except in compliance with the License.") - lines.append("# You may obtain a copy of the License at") - lines.append("#") - lines.append("# http://www.apache.org/licenses/LICENSE-2.0") - lines.append("#") - lines.append("# Unless required by applicable law or agreed to in writing, software") - lines.append("# distributed under the License is distributed on an \"AS IS\" BASIS,") - lines.append("# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.") - lines.append("# See the License for the specific language governing permissions and") - lines.append("# limitations under the License.") - lines.append("") - lines.append("# Auto-generated from API JSON definition") - lines.append("# Do not edit manually") - lines.append("") - lines.append("from __future__ import annotations") - lines.append("") - self.file_header_cache = lines - return list(lines) - - def generate_from_api_json(self, data: dict) -> str: - """从API JSON数据生成所有模型""" - lines = self._generate_file_header() - lines.append("from typing import Optional") - lines.append("from pydantic import BaseModel, Field") - lines.append("") - lines.append("\n".join([ - f"class {self.base_model_name}(BaseModel):", - f" \"\"\"{self.base_model_doc}\"\"\"", - " model_config = {", - ' "populate_by_name": True,', - ' "arbitrary_types_allowed": True', - " }", - ])) - lines.append("") - lines.append("") - # 首先生成DataType中定义的结构体 - data_types = data.get("DataType") - if data_types: - lines.append("# Data Types") - datatype_lines = self.generate_datatype_models(data_types) - lines.extend(datatype_lines) - lines.append("") - lines.append("") - - # 处理每个API - api_list = data.get("ApiList", []) - for api in api_list: - action = api.get("Action", "") - request_params = api.get("RequestParameters", []) - response_params = api.get("ResponseParameters", []) - - # 生成请求模型 - if request_params: - lines.append(f"# {action} - Request") - lines.append(self.generate_request_model(action, request_params)) - lines.append("") - lines.append("") - - # 生成响应模型 - if response_params: - lines.append(f"# {action} - Response") - lines.append(self.generate_response_model(action, response_params)) - lines.append("") - lines.append("") - - return "\n".join(lines) - - -def main(): - parser = argparse.ArgumentParser( - description="从API JSON定义生成Pydantic结构体" - ) - parser.add_argument( - "json_file", - help="API JSON定义文件路径" - ) - parser.add_argument( - "--output", "-o", - default="generated_types.py", - help="类型定义输出文件 (默认: generated_types.py)" - ) - parser.add_argument( - "--client-output", - help="可选:客户端代码输出文件路径" - ) - parser.add_argument( - "--client-class-name", - help="可选:客户端类名,例如 AgentkitMCP" - ) - parser.add_argument( - "--client-description", - help="可选:客户端类的docstring描述" - ) - parser.add_argument( - "--service-name", - help="可选:服务名称,用于BaseAgentkitClient(service_name=...)" - ) - parser.add_argument( - "--types-module", - help="可选:客户端引用的类型模块(例如 agentkit.mcp.mcp_all_types)" - ) - parser.add_argument( - "--base-class-import", - default="agentkit.client", - help="基础客户端类的导入路径 (默认: agentkit.client)" - ) - parser.add_argument( - "--base-client-class", - default="BaseAgentkitClient", - help="客户端基类名称 (默认: BaseAgentkitClient)" - ) - parser.add_argument( - "--base-class-name", - default="AgentKitBaseModel", - help="生成模型继承的基础类名称 (默认: AgentKitBaseModel)" - ) - parser.add_argument( - "--base-class-doc", - default="AgentKit auto-generated base model", - help="基础类的文档字符串 (默认: AgentKit auto-generated base model)" - ) - - args = parser.parse_args() - - # 生成代码 - with open(args.json_file, 'r', encoding='utf-8') as f: - api_data = json.load(f) - - generator = APIStructGenerator( - base_model_name=args.base_class_name, - base_model_doc=args.base_class_doc, - ) - generated_code = generator.generate_from_api_json(api_data) - - # 写入文件 - with open(args.output, 'w', encoding='utf-8') as f: - f.write(generated_code) - - print(f"✓ 成功生成结构体定义: {args.output}") - print(f" - 从: {args.json_file}") - print(f" - 共生成 {len(generated_code.splitlines())} 行代码") - - if args.client_output: - required_client_args = [ - args.client_class_name, - args.service_name, - args.types_module, - ] - if not all(required_client_args): - missing = [ - name for name, value in [ - ("--client-class-name", args.client_class_name), - ("--service-name", args.service_name), - ("--types-module", args.types_module), - ] if not value - ] - missing_str = ", ".join(missing) - raise ValueError(f"缺少生成客户端所需参数: {missing_str}") - client_code = generator.generate_client_module( - api_data, - client_class_name=args.client_class_name, - client_description=args.client_description or "", - service_name=args.service_name, - types_module=args.types_module, - base_class_import=args.base_class_import, - base_class_name=args.base_client_class, - ) - with open(args.client_output, 'w', encoding='utf-8') as f: - f.write(client_code) - print(f"✓ 成功生成客户端: {args.client_output}") - print(f" - From: {args.json_file}") - print(f" - Lines: {len(client_code.splitlines())}") - - -if __name__ == "__main__": - main() diff --git a/vp-icons.css b/vp-icons.css new file mode 100644 index 0000000..ddc5bd8 --- /dev/null +++ b/vp-icons.css @@ -0,0 +1 @@ +.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")} \ No newline at end of file