Skip to content

feat(cli): comprehensive alignment of server and run commands#5440

Open
EaCognitive wants to merge 2 commits intogoogle:mainfrom
EaCognitive:feat-cli-mega-update
Open

feat(cli): comprehensive alignment of server and run commands#5440
EaCognitive wants to merge 2 commits intogoogle:mainfrom
EaCognitive:feat-cli-mega-update

Conversation

@EaCognitive
Copy link
Copy Markdown

Fixes #5434
Fixes #5435

Problem

Several critical parameters in the ADK SDK's RunConfig (specifically max_llm_calls and avatar_config) are currently not exposed via the CLI in the adk run, adk web, or adk api_server commands. This creates an inconsistency between the SDK's capabilities and the CLI's interface, limiting developers' ability to control costs and customize agent appearance.

Solution

This PR provides a comprehensive alignment of the ADK CLI with the underlying SDK:

  1. Safety & Cost Control: Adds the --max_llm_calls flag to limit the total number of LLM calls per run.
  2. Visual Customization: Adds the --avatar_config flag (supporting JSON strings or file paths) to configure AI avatars.
  3. CLI Consistency: Ensures both flags are available across all interaction modes: adk run, adk web, and adk api_server.

Changes

  • src/google/adk/cli/cli_tools_click.py: Added new flags to the common options decorator and updated all relevant command arguments.
  • src/google/adk/cli/cli.py: Updated the CLI runner to parse and pass these parameters to the agent.
  • src/google/adk/cli/fast_api.py: Updated the FastAPI application factory to support the new configurations.
  • src/google/adk/cli/adk_web_server.py: Integrated the parameters into the web server logic and all RunConfig instantiations.

Verification

  • Verified flags appear in help text for all three commands.
  • Verified avatar_config correctly handles both inline JSON and file paths.
  • Verified max_llm_calls is correctly enforced in the Runner.

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] Add --avatar_config flag to server commands [CLI] Add --max_llm_calls flag to web and api_server

2 participants