Skip to content

Commit 10013c4

Browse files
feat(cli): support agentkit commands via sub-command (#362)
* feat(cli): support agentkit commands via sub-command * add file header
1 parent 42b8158 commit 10013c4

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
"aiomysql>=0.3.2", # For async MySQL database (short term memory)
4141
"opensearch-py==2.8.0",
4242
"filetype>=1.2.0",
43+
"agentkit-sdk-python"
4344
]
4445

4546
[project.scripts]

veadk/cli/cli.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@
1515

1616
import click
1717

18+
from veadk.cli.cli_agentkit import agentkit
19+
from veadk.cli.cli_clean import clean
20+
from veadk.cli.cli_create import create
1821
from veadk.cli.cli_deploy import deploy
1922
from veadk.cli.cli_eval import eval
2023
from veadk.cli.cli_init import init
21-
from veadk.cli.cli_create import create
2224
from veadk.cli.cli_kb import kb
2325
from veadk.cli.cli_pipeline import pipeline
2426
from veadk.cli.cli_prompt import prompt
25-
from veadk.cli.cli_web import web
26-
from veadk.cli.cli_uploadevalset import uploadevalset
27-
from veadk.cli.cli_update import update
28-
from veadk.cli.cli_clean import clean
2927
from veadk.cli.cli_rl import rl_group
28+
from veadk.cli.cli_update import update
29+
from veadk.cli.cli_uploadevalset import uploadevalset
30+
from veadk.cli.cli_web import web
3031
from veadk.version import VERSION
3132

3233

@@ -55,6 +56,7 @@ def veadk():
5556
veadk.add_command(update)
5657
veadk.add_command(clean)
5758
veadk.add_command(rl_group)
59+
veadk.add_command(agentkit)
5860

5961
if __name__ == "__main__":
6062
veadk()

veadk/cli/cli_agentkit.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import click
16+
from agentkit.toolkit.cli.cli import app as agentkit_typer_app
17+
from typer.main import get_command
18+
19+
20+
@click.group()
21+
def agentkit():
22+
"""AgentKit-compatible commands"""
23+
pass
24+
25+
26+
agentkit_commands = get_command(agentkit_typer_app)
27+
28+
if isinstance(agentkit_commands, click.Group):
29+
for cmd_name, cmd in agentkit_commands.commands.items():
30+
agentkit.add_command(cmd, name=cmd_name)

0 commit comments

Comments
 (0)