diff --git a/libs/cli/langgraph_cli/__init__.py b/libs/cli/langgraph_cli/__init__.py index e2b01a98c..905119c35 100644 --- a/libs/cli/langgraph_cli/__init__.py +++ b/libs/cli/langgraph_cli/__init__.py @@ -1 +1 @@ -__version__ = "0.4.31" +__version__ = "0.4.32" diff --git a/libs/cli/langgraph_cli/deploy.py b/libs/cli/langgraph_cli/deploy.py index d2967c472..a2ed5c74d 100644 --- a/libs/cli/langgraph_cli/deploy.py +++ b/libs/cli/langgraph_cli/deploy.py @@ -1690,11 +1690,17 @@ OPT_HOST_URL = click.option( ) OPT_AGENT_ID = click.option( - "--agent-id", help="Logical agent ID (requires agent mode enabled for the tenant)." + "--agent-id", + envvar="LANGSMITH_AGENT_ID", + show_envvar=True, + help="Logical agent ID (requires agent mode enabled for the tenant).", ) OPT_AGENT_ENVIRONMENT = click.option( - "--environment", + "--agent-environment", + "environment", + envvar="LANGSMITH_AGENT_ENVIRONMENT", + show_envvar=True, type=click.Choice(["development", "staging", "production"]), help="Agent environment (requires agent mode enabled for the tenant).", ) @@ -1982,13 +1988,14 @@ def _deploy_cmd( validate_deploy_commands(install_command, build_command) agent = None if agent_id is not None or environment is not None: + em.note("Note: --agent-id and --agent-environment flags are in private beta") if not agent_id or not agent_id.strip() or not environment: raise click.UsageError( - "--agent-id and --environment are required together." + "--agent-id and --agent-environment are required together." ) if name is not None or deployment_id is not None: raise click.UsageError( - "--agent-id and --environment cannot be combined with --name or --deployment-id." + "--agent-id and --agent-environment cannot be combined with --name or --deployment-id." ) agent = {"agent_id": agent_id, "environment": environment} if not config.exists(): @@ -2138,6 +2145,11 @@ def deploy_list( agent_id: str | None, environment: str | None, ) -> None: + if agent_id is not None or environment is not None: + click.secho( + "Note: --agent-id and --agent-environment flags are in private beta", + fg="yellow", + ) if agent_id is not None and not agent_id.strip(): raise click.UsageError("--agent-id must not be empty.") filters = {} diff --git a/libs/cli/tests/unit_tests/test_deploy_agents.py b/libs/cli/tests/unit_tests/test_deploy_agents.py index 14de9f099..2f37627cc 100644 --- a/libs/cli/tests/unit_tests/test_deploy_agents.py +++ b/libs/cli/tests/unit_tests/test_deploy_agents.py @@ -58,7 +58,7 @@ AGENT_ARGS = [ "deploy", "--agent-id", "customer-support", - "--environment", + "--agent-environment", "staging", "--remote", "--no-wait",