diff --git a/docs/commands.md b/docs/commands.md index 23ed07b91..49ba6fc0c 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -30,8 +30,11 @@ Create a new AgentCore project. # Interactive wizard agentcore create -# Fully non-interactive with defaults -agentcore create --name MyProject --defaults +# Non-interactive harness project (this is the default) +agentcore create --name MyProject + +# Non-interactive agent project +agentcore create --name MyProject --framework Strands --model-provider Bedrock # Custom configuration agentcore create \ @@ -44,7 +47,8 @@ agentcore create \ # With networking agentcore create \ --name MyProject \ - --defaults \ + --framework Strands \ + --model-provider Bedrock \ --network-mode VPC \ --subnets subnet-abc,subnet-def \ --security-groups sg-123 @@ -60,7 +64,7 @@ agentcore create \ --model-provider Bedrock # Preview without creating -agentcore create --name MyProject --defaults --dry-run +agentcore create --name MyProject --framework Strands --model-provider Bedrock --dry-run # Import from Bedrock Agents agentcore create \ @@ -77,7 +81,7 @@ agentcore create \ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `--name ` | Agent (resource) name; also used as project directory name when `--project-name` is omitted | | `--project-name ` | Project directory name (alphanumeric, starts with letter, max 23 chars) | -| `--defaults` | Use defaults (Python, Strands, Bedrock, no memory) | +| `--defaults` | Create a harness project with default settings (this is the default) | | `--no-agent` | Skip agent creation | | `--type ` | `create` (default) or `import` | | `--language ` | `Python` (default) or `TypeScript` (Strands-only; see [Frameworks](frameworks.md#supported-languages)) | @@ -1492,7 +1496,7 @@ agentcore deploy -y --json # Deploy with auto-confirm ### Scripted Project Setup ```bash -agentcore create --name MyProject --defaults +agentcore create --name MyProject --framework Strands --model-provider Bedrock cd MyProject agentcore add memory --name SharedMemory --strategies SEMANTIC agentcore deploy -y diff --git a/docs/config-bundles.md b/docs/config-bundles.md index f8505294d..3a9ff01e7 100644 --- a/docs/config-bundles.md +++ b/docs/config-bundles.md @@ -20,7 +20,7 @@ invocation time from whichever bundle version is active. Create an agent with a pre-wired config bundle that injects system prompt and tool descriptions at runtime: ```bash -agentcore create --name MyProject --defaults --with-config-bundle +agentcore create --name MyProject --framework Strands --model-provider Bedrock --with-config-bundle ``` This creates a `{AgentName}Config` bundle with smart defaults and generates a template that uses diff --git a/docs/gateway.md b/docs/gateway.md index 09400ad20..9d0132b97 100644 --- a/docs/gateway.md +++ b/docs/gateway.md @@ -10,7 +10,7 @@ the gateway client code. ```bash # 1. Create a project -agentcore create --name MyProject --defaults +agentcore create --name MyProject --framework Strands --model-provider Bedrock cd MyProject # 2. Add a gateway diff --git a/docs/knowledge-bases.md b/docs/knowledge-bases.md index 6a5284990..540f17fc0 100644 --- a/docs/knowledge-bases.md +++ b/docs/knowledge-bases.md @@ -11,7 +11,7 @@ code is wired to call `retrieve` against the KB through the gateway. ```bash # 1. Create a project -agentcore create --name MyProject --defaults +agentcore create --name MyProject --framework Strands --model-provider Bedrock cd MyProject # 2. Add a gateway diff --git a/docs/payments.md b/docs/payments.md index 3f7e844c1..ed49950b1 100644 --- a/docs/payments.md +++ b/docs/payments.md @@ -12,7 +12,7 @@ guide. ```bash # 1. Create a project with payments capability -agentcore create --name MyProject --defaults +agentcore create --name MyProject --framework Strands --model-provider Bedrock cd MyProject # 2. Add a payment manager @@ -367,7 +367,7 @@ The complete path from a fresh project to a settled on-chain payment. Steps 1– ```bash # 1. Create a project and add the payment manager + connector -agentcore create --name MyProject --defaults && cd MyProject +agentcore create --name MyProject --framework Strands --model-provider Bedrock && cd MyProject agentcore add payment-manager --name MyManager agentcore add payment-connector --manager MyManager --name MyCDPConnector --provider CoinbaseCDP \ --api-key-id "$CDP_API_KEY_ID" --api-key-secret "$CDP_API_KEY_SECRET" --wallet-secret "$CDP_WALLET_SECRET" diff --git a/docs/recommendations.md b/docs/recommendations.md index b6d25f9c7..2e23ec041 100644 --- a/docs/recommendations.md +++ b/docs/recommendations.md @@ -129,7 +129,7 @@ When using `--bundle-name`, the completed result also includes `configurationBun 1. Create agent with config bundle: ```bash - agentcore create --name MyAgent --defaults --with-config-bundle + agentcore create --name MyAgent --framework Strands --model-provider Bedrock --with-config-bundle agentcore deploy ``` diff --git a/src/cli/commands/create/__tests__/create.test.ts b/src/cli/commands/create/__tests__/create.test.ts index 5264371d8..964178541 100644 --- a/src/cli/commands/create/__tests__/create.test.ts +++ b/src/cli/commands/create/__tests__/create.test.ts @@ -241,14 +241,17 @@ describe('create command', () => { }); describe('--defaults', () => { - it('creates project with defaults', async () => { - const name = `Defaults${Date.now()}`; + // --defaults creates a harness project (the default), identical to passing no routing flags. + // The harness path returns `harnessName` and writes app//harness.json. + it('creates a harness project', async () => { + const name = `Def${Date.now().toString().slice(-6)}`; const result = await runCLI(['create', '--name', name, '--defaults', '--json'], testDir); expect(result.exitCode, `stderr: ${result.stderr}`).toBe(0); const json = JSON.parse(result.stdout); expect(json.success).toBe(true); - expect(await exists(join(testDir, name))).toBeTruthy(); + expect(json.harnessName).toBe(name); + expect(await exists(join(json.projectPath, 'app', name, 'harness.json'))).toBeTruthy(); }); }); diff --git a/src/cli/commands/create/command.tsx b/src/cli/commands/create/command.tsx index 88e37b117..998405da3 100644 --- a/src/cli/commands/create/command.tsx +++ b/src/cli/commands/create/command.tsx @@ -447,7 +447,7 @@ export const registerCreate = (program: Command) => { 'Project name (start with letter, alphanumeric only, max 23 chars) [non-interactive]' ) .option('--no-agent', 'Skip agent creation [non-interactive]') - .option('--defaults', 'Use defaults (Python, Strands, Bedrock, no memory) [non-interactive]') + .option('--defaults', 'Create a harness project with default settings (this is the default) [non-interactive]') .option('--build ', 'Build type: CodeZip or Container (default: CodeZip) [non-interactive]') .option('--language ', 'Target language: Python or TypeScript (default: Python) [non-interactive]') .option( @@ -633,13 +633,6 @@ export const registerCreate = (program: Command) => { // Agent path: any agent-specific flag triggers it if (isAgentPath(opts)) { - if (opts.defaults) { - opts.language = opts.language ?? 'Python'; - opts.build = opts.build ?? 'CodeZip'; - opts.framework = opts.framework ?? 'Strands'; - opts.modelProvider = opts.modelProvider ?? 'Bedrock'; - opts.memory = opts.memory ?? 'none'; - } opts.language = opts.language ?? 'Python'; await handleCreateCLI(opts); return;