Skip to content

feat(cli): skip __init__.py for config-based adk create - #6754

Closed
a2105z wants to merge 1 commit into
google:mainfrom
a2105z:feat/config-create-no-init
Closed

a2105z wants to merge 1 commit into
google:mainfrom
a2105z:feat/config-create-no-init

Conversation

@a2105z

@a2105z a2105z commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

adk create --type=config no longer writes an empty __init__.py.

Config agents are loaded from root_agent.yaml (after the Python module/package probes miss root_agent). Existing config samples and the YAML agent-loader fixtures already omit __init__.py, so generated projects now match that layout.

Also updates the config success message and CLI unit expectations.

On the package-resolution note in #6753: an empty __init__.py did not expose root_agent either, so the loader still fell through to YAML. With agents_dir prepended on sys.path, the local agent directory remains the first candidate; this change aligns scaffolding with samples rather than relying on an empty package marker.

Fixes #6753

Test plan

  • Repro before: adk create --type=config emitted .env, .gitignore, __init__.py, root_agent.yaml
  • After: emits .env, .gitignore, root_agent.yaml only
  • uv run pytest tests/unittests/cli/utils/test_cli_create.py -q → 36 passed
  • Code-type create still generates __init__.py + agent.py

Config agents load from root_agent.yaml, matching existing samples that
omit an empty package marker from generated scaffolding.
@a2105z

a2105z commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ftnext — follow-up on #6753.

adk create --type=config now matches the existing config samples: .env, .gitignore, and root_agent.yaml only (no empty __init__.py). Ready for review whenever maintainers have a chance.

copybara-service Bot pushed a commit that referenced this pull request Oct 1, 2026
Merge #6754

Fixes #6753

PiperOrigin-RevId: 991448740
@adk-bot

adk-bot commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Thank you @a2105z for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit d594b69.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Oct 1, 2026
@adk-bot adk-bot closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Do not generate __init__.py for config-based agents

3 participants