Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/google/adk/cli/cli_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
Agent created in {agent_folder}:
- .env
- .gitignore
- __init__.py
- root_agent.yaml

⚠️ WARNING: Secrets (like GOOGLE_API_KEY) are stored in .env.
Expand Down Expand Up @@ -139,8 +138,9 @@ def _generate_files(
if type == "config":
with open(agent_config_file_path, "w", encoding="utf-8") as f:
f.write(_AGENT_CONFIG_TEMPLATE.format(model_name=model))
with open(init_file_path, "w", encoding="utf-8") as f:
f.write("")
# Config agents are loaded from root_agent.yaml; they are not Python
# packages. Matching existing config samples, do not emit an empty
# __init__.py.
click.secho(
_SUCCESS_MSG_CONFIG.format(agent_folder=agent_folder),
fg="green",
Expand Down
6 changes: 2 additions & 4 deletions tests/unittests/cli/utils/test_cli_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,8 @@ def test_run_cmd_with_type_config(
assert "model: gemini-2.5-flash" in yaml_content
assert "description: A helpful assistant for user questions." in yaml_content

# Should create empty __init__.py
init_file = agent_dir / "__init__.py"
assert init_file.exists()
assert init_file.read_text().strip() == ""
# Config agents are YAML-loaded; do not emit a package marker.
assert not (agent_dir / "__init__.py").exists()

# Should still create .env file
env_file = agent_dir / ".env"
Expand Down