fix(create): make --defaults create a harness project#1644
Merged
Conversation
Harness is now the default for `agentcore create`, so `--defaults` no longer creates a Python/Strands/Bedrock agent. Drop the agent-default backfill that ran when `--defaults` was combined with an agent-path flag, so the flag is purely "create with default (harness) settings" and behaves identically to passing no routing flags at all. Update the `--defaults` help text and every doc usage to match: standalone quick-starts drop the flag (harness is implicit) and agent-oriented flows (gateway, knowledge bases, payments, config bundles, recommendations) use the explicit `--framework Strands --model-provider Bedrock` agent path. Strengthen the `--defaults` unit test to assert the harness contract (`harnessName` + `app/<name>/harness.json`) so the routing can't silently regress.
Contributor
Package TarballHow to installgh release download pr-1644-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.21.0.tgz |
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
agentcore-cli-automation
approved these changes
Jun 25, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Looks good to merge.
This is a focused, well-scoped change:
- Removing the agent-default backfill correctly reflects the new harness-default semantics for
agentcore create.--defaultsis now purely "create with default (harness) settings," matching the no-flags path. - All doc updates are correct: agent-oriented flows (gateway, KB, payments, config bundles, recommendations) now use the explicit
--framework Strands --model-provider Bedrockagent path, which also fixes the previously-broken--defaults --with-config-bundleexamples (harness path silently ignored--with-config-bundle). - The strengthened unit test asserts the harness contract (
harnessName+app/<name>/harness.json) so the routing can't silently regress. - Telemetry is unaffected — both the harness path (
withCommandRunTelemetry) and agent path (runCliCommand) instrument as before.
One minor behavioral note (not blocking): mixing --defaults with a single agent-path flag like --framework Strands now triggers the standard "provide all: --framework, --model-provider, --memory" validation error instead of being backfilled. This is the intended behavior per the PR description, and the resulting error is clear enough to guide users.
Contributor
Coverage Report
|
nborges-aws
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Harness is now the default for
agentcore create, so--defaultsno longer creates a Python/Strands/Bedrock agent — it produces a harness project, identical to passing no routing flags.This PR makes the code and docs reflect that:
command.tsx— drop the agent-default backfill block that ran when--defaultswas combined with an agent-path flag (e.g.--defaults --framework Strands). The flag is now purely "create with default (harness) settings." Update the help text from "Use defaults (Python, Strands, Bedrock, no memory)" to "Create a harness project with default settings (this is the default)."--defaultsusage is corrected:docs/commands.md).gateway.md,knowledge-bases.md,payments.md,config-bundles.md,recommendations.md) now use the explicit--framework Strands --model-provider Bedrockagent path. This also fixes the two--defaults --with-config-bundleexamples, which were silently broken — the harness path ignores--with-config-bundle, so they previously produced a harness with no bundle.--defaultsunit test to assert the harness contract (harnessName+app/<name>/harness.json) so the routing can't silently regress.Related Issue
Closes #
Documentation PR
N/A — docs in this repo are updated in-line.
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integ(ran the affectedcreateunit +create-edge-casesinteg suites — all pass)npm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshots (no asset changes)Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.