Skip to content

feat: Add .yml file extension support for --reload_agents file watcher #3834

@yamadashy

Description

@yamadashy

Is your feature request related to a problem? Please describe.

When using --reload_agents flag with adk web, only .py and .yaml files are watched for changes. Files with .yml extension are silently ignored, which causes confusion during development because changes to .yml config files don't trigger a reload.

Describe the solution you'd like

Add .yml to the watched file extensions in AgentChangeEventHandler.on_modified():

# Current (src/google/adk/cli/utils/agent_change_handler.py:41)
if not (event.src_path.endswith(".py") or event.src_path.endswith(".yaml")):

# Proposed
if not (event.src_path.endswith(".py") or event.src_path.endswith(".yaml") or event.src_path.endswith(".yml")):

Describe alternatives you've considered

  1. Renaming all .yml files to .yaml - Works, but adds friction
  2. Documenting that only .yaml is supported - Reduces confusion but still inconvenient

Additional context

While yaml.org recommends .yaml, both extensions are widely used in practice (GitHub Actions, Docker Compose, Ansible, Ruby on Rails, etc.). Supporting both would improve developer experience without any downside.

If this approach is acceptable, I'd be happy to submit a PR.

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions