Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -77,7 +81,7 @@ agentcore create \
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `--name <name>` | Agent (resource) name; also used as project directory name when `--project-name` is omitted |
| `--project-name <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 <type>` | `create` (default) or `import` |
| `--language <lang>` | `Python` (default) or `TypeScript` (Strands-only; see [Frameworks](frameworks.md#supported-languages)) |
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/config-bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/knowledge-bases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
9 changes: 6 additions & 3 deletions src/cli/commands/create/__tests__/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

const json = JSON.parse(result.stdout);
expect(json.success).toBe(true);
expect(json.projectPath).toMatch(new RegExp(`/${projectName}$`));

Check warning on line 50 in src/cli/commands/create/__tests__/create.test.ts

View workflow job for this annotation

GitHub Actions / lint

Found non-literal argument to RegExp Constructor
expect(await exists(join(json.projectPath, 'agentcore'))).toBeTruthy();
});
});
Expand Down Expand Up @@ -192,7 +192,7 @@

const json = JSON.parse(result.stdout);
expect(json.success).toBe(true);
expect(json.projectPath).toMatch(new RegExp(`/${projectName}$`));

Check warning on line 195 in src/cli/commands/create/__tests__/create.test.ts

View workflow job for this annotation

GitHub Actions / lint

Found non-literal argument to RegExp Constructor
expect(json.agentName).toBe(agentName);
expect(await exists(join(json.projectPath, 'app', agentName))).toBeTruthy();

Expand Down Expand Up @@ -230,7 +230,7 @@

const json = JSON.parse(result.stdout);
expect(json.success).toBe(true);
expect(json.projectPath).toMatch(new RegExp(`/${projectName}$`));

Check warning on line 233 in src/cli/commands/create/__tests__/create.test.ts

View workflow job for this annotation

GitHub Actions / lint

Found non-literal argument to RegExp Constructor
expect(json.agentName).toBe(agentName);
expect(await exists(join(json.projectPath, 'app', agentName))).toBeTruthy();

Expand All @@ -241,14 +241,17 @@
});

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/<name>/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();
});
});

Expand All @@ -272,7 +275,7 @@

expect(result.exitCode).toBe(0);
const json = JSON.parse(result.stdout);
expect(json.projectPath).toMatch(new RegExp(`/${projectName}$`));

Check warning on line 278 in src/cli/commands/create/__tests__/create.test.ts

View workflow job for this annotation

GitHub Actions / lint

Found non-literal argument to RegExp Constructor
expect(json.wouldCreate).toContain(`${json.projectPath}/app/${agentName}/`);
expect(await exists(join(testDir, projectName)), 'Should not create directory').toBe(false);
});
Expand Down
9 changes: 1 addition & 8 deletions src/cli/commands/create/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <type>', 'Build type: CodeZip or Container (default: CodeZip) [non-interactive]')
.option('--language <language>', 'Target language: Python or TypeScript (default: Python) [non-interactive]')
.option(
Expand Down Expand Up @@ -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;
Expand Down
Loading