-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
Python project templates vended by agentcore create include unnecessary dependencies in their pyproject.toml files:
-
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
- Run
agentcore createand select any Python framework (e.g., Strands) with the Bedrock model provider - Inspect the generated
pyproject.tomlin the agent directory - Observe that
python-dotenvis listed as a dependency - (Strands only) Observe that
anthropic,google-genai, andopenaiare all listed regardless of provider choice - Search the generated
.pyfiles for anyimport dotenvorfrom dotenv— none found
Expected Behavior
python-dotenvshould 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-dotenvis 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.