Description
Python project templates vended by agentcore create include unnecessary dependencies in their pyproject.toml files:
python-dotenv is listed as a dependency in all 6 framework templates (Strands, LangChain/LangGraph, CrewAI, Google ADK, OpenAI Agents, AutoGen), but it is never imported in any template Python code. Environment variable loading from .env files is handled by the agentcore dev CLI command, not by the agent code itself.
Strands template unconditionally installs anthropic, google-genai, and openai SDK packages regardless of which modelProvider the user selected. For example, a user who selects Bedrock as their provider still gets anthropic, google-genai, and openai installed.
This bloats the user's virtual environment with packages they don't need, increasing install time and dependency surface area.
Steps to Reproduce
- Run
agentcore create and select any Python framework (e.g., Strands) with the Bedrock model provider - Inspect the generated
pyproject.toml in the agent directory - Observe that
python-dotenv is listed as a dependency - (Strands only) Observe that
anthropic, google-genai, and openai are all listed regardless of provider choice - Search the generated
.py files for any import dotenv or from dotenv — none found
Expected Behavior
python-dotenv should not be included since no template code imports it- Provider-specific SDK packages (
anthropic, google-genai, openai) should only be included when the corresponding model provider is selected
Actual Behavior
python-dotenv is included in all 6 framework templates- Strands template installs all three provider SDKs unconditionally
CLI Version
0.3.0-preview.1.0
Operating System
macOS
Additional Context
The other frameworks (LangChain, CrewAI, Google ADK, OpenAI Agents, AutoGen) already use Handlebars conditionals for their provider-specific dependencies — only Strands was missing this pattern.
Description
Python project templates vended by
agentcore createinclude unnecessary dependencies in theirpyproject.tomlfiles:python-dotenvis listed as a dependency in all 6 framework templates (Strands, LangChain/LangGraph, CrewAI, Google ADK, OpenAI Agents, AutoGen), but it is never imported in any template Python code. Environment variable loading from.envfiles is handled by theagentcore devCLI command, not by the agent code itself.Strands template unconditionally installs
anthropic,google-genai, andopenaiSDK packages regardless of whichmodelProviderthe user selected. For example, a user who selects Bedrock as their provider still getsanthropic,google-genai, andopenaiinstalled.This bloats the user's virtual environment with packages they don't need, increasing install time and dependency surface area.
Steps to Reproduce
agentcore createand select any Python framework (e.g., Strands) with the Bedrock model providerpyproject.tomlin the agent directorypython-dotenvis listed as a dependencyanthropic,google-genai, andopenaiare all listed regardless of provider choice.pyfiles for anyimport dotenvorfrom dotenv— none foundExpected Behavior
python-dotenvshould not be included since no template code imports itanthropic,google-genai,openai) should only be included when the corresponding model provider is selectedActual Behavior
python-dotenvis included in all 6 framework templatesCLI Version
0.3.0-preview.1.0
Operating System
macOS
Additional Context
The other frameworks (LangChain, CrewAI, Google ADK, OpenAI Agents, AutoGen) already use Handlebars conditionals for their provider-specific dependencies — only Strands was missing this pattern.