8000 feat: Add support for display_name and description when deploying to … · devevignesh/adk-python@aaf1f9b · GitHub
[go: up one dir, main page]

Skip to content

Commit aaf1f9b

Browse files
yeesiancopybara-github
authored andcommitted
feat: Add support for display_name and description when deploying to agent engine
PiperOrigin-RevId: 769674731
1 parent 8e438f2 commit aaf1f9b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/google/adk/cli/cli_deploy.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def to_agent_engine(
218218
region: str,
219219
staging_bucket: str,
220220
trace_to_cloud: bool,
221+
display_name: Optional[str] = None,
222+
description: Optional[str] = None,
221223
requirements_file: Optional[str] = None,
222224
env_file: Optional[str] = None,
223225
):
@@ -342,6 +344,8 @@ def to_agent_engine(
342344
agent_engines.create(
343345
agent_engine=agent_engine,
344346
requirements=requirements_file,
347+
display_name=display_name,
348+
description=description,
345349
env_vars=env_vars,
346350
extra_packages=[temp_folder],
347351
)

src/google/adk/cli/cli_tools_click.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,20 @@ def cli_deploy_cloud_run(
793793
default=False,
794794
help="Optional. Whether to enable Cloud Trace for Agent Engine.",
795795
)
796+
@click.option(
797+
"--display_name",
798+
type=str,
799+
show_default=True,
800+
default="",
801+
help="Optional. Display name of the agent in Agent Engine.",
802+
)
803+
@click.option(
804+
"--description",
805+
type=str,
806+
show_default=True,
807+
default="",
808+
help="Optional. Description of the agent in Agent Engine.",
809+
)
796810
@click.option(
797811
"--adk_app",
798812
type=str,
@@ -847,6 +861,8 @@ def cli_deploy_agent_engine(
847861
region: str,
848862
staging_bucket: str,
849863
trace_to_cloud: bool,
864+
display_name: str,
865+
description: str,
850866
adk_app: str,
851867
temp_folder: str,
852868
env_file: str,
@@ -859,7 +875,7 @@ def cli_deploy_agent_engine(
859875
Example:
860876
861877
adk deploy agent_engine --project=[project] --region=[region]
862-
--staging_bucket=[staging_bucket] path/to/my_agent
878+
--staging_bucket=[staging_bucket] --display_name=[app_name] path/to/my_agent
863879
"""
864880
try:
865881
cli_deploy.to_agent_engine(
@@ -868,6 +884,8 @@ def cli_deploy_agent_engine(
868884
region=region,
869885
staging_bucket=staging_bucket,
870886
trace_to_cloud=trace_to_cloud,
887+
display_name=display_name,
888+
description=description,
871889
adk_app=adk_app,
872890
temp_folder=temp_folder,
873891
env_file=env_file,

0 commit comments

Comments
 (0)
0