Description
Non-interactive agentcore add agent --type byo rejects the invocation with --framework is required (and then --model-provider is required), but the BYO path never consumes the framework value: it is not written to agentcore.json, not used for packaging, and has no effect on the deployed runtime. Any value satisfies the check, so users are forced to pick a framework that is meaningless for bring-your-own code. The BYO example in docs/commands.md — which omits --framework, reasonably — fails as written because of this.
Steps to Reproduce
- Create a project:
agentcore create --name ByoRepro --no-agent
cd ByoRepro
- Run the BYO example from docs/commands.md:
agentcore add agent --name MyAgent --type byo --code-location ./my-agent --entrypoint main.py --language Python
- Observe
--framework is required. Add any --framework value and observe the registered agent is identical regardless of which framework was given.
Expected Behavior
The BYO path accepts the invocation without --framework, as shown in the docs example. A flag that is required should influence the result; one that cannot is not asked for.
Actual Behavior
Validation fails with --framework is required (and --model-provider is required once a framework is supplied). Supplying e.g. --framework Strands vs --framework LangChain_LangGraph produces byte-identical agentcore.json entries.
CLI Version
0.27.1
Operating System
Linux
Additional Context
Cause: the non-interactive validation in src/cli/commands/add/validate.ts applies its "Non-MCP protocols: validate framework" block to the BYO path as well, while handleByoPath in src/cli/primitives/AgentPrimitive.tsx never reads options.framework. --model-provider has a marginal BYO use (non-Bedrock values set up an API-key credential), so it may deserve a default rather than removal — maintainer's call.
Related: #2075 (BYO ignores --language TypeScript) — independent defect, same code path.
Description
Non-interactive
agentcore add agent --type byorejects the invocation with--framework is required(and then--model-provider is required), but the BYO path never consumes the framework value: it is not written to agentcore.json, not used for packaging, and has no effect on the deployed runtime. Any value satisfies the check, so users are forced to pick a framework that is meaningless for bring-your-own code. The BYO example in docs/commands.md — which omits--framework, reasonably — fails as written because of this.Steps to Reproduce
agentcore create --name ByoRepro --no-agent cd ByoRepro--framework is required. Add any--frameworkvalue and observe the registered agent is identical regardless of which framework was given.Expected Behavior
The BYO path accepts the invocation without
--framework, as shown in the docs example. A flag that is required should influence the result; one that cannot is not asked for.Actual Behavior
Validation fails with
--framework is required(and--model-provider is requiredonce a framework is supplied). Supplying e.g.--framework Strandsvs--framework LangChain_LangGraphproduces byte-identical agentcore.json entries.CLI Version
0.27.1
Operating System
Linux
Additional Context
Cause: the non-interactive validation in
src/cli/commands/add/validate.tsapplies its "Non-MCP protocols: validate framework" block to the BYO path as well, whilehandleByoPathinsrc/cli/primitives/AgentPrimitive.tsxnever readsoptions.framework.--model-providerhas a marginal BYO use (non-Bedrock values set up an API-key credential), so it may deserve a default rather than removal — maintainer's call.Related: #2075 (BYO ignores
--language TypeScript) — independent defect, same code path.