Skip to content
Closed
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ npm i -g "./$TARBALL"
- **The CLI looks frozen in a PowerShell window**: legacy conhost pauses all
output while text is selected (the title bar shows `Select`). Press `Esc`.
Windows Terminal does not do this.
- **`project create` refuses a long path**: Windows caps paths at 260 characters
- **`agentcore create` refuses a long path**: Windows caps paths at 260 characters
unless `LongPathsEnabled` is set, and the CDK app's `node_modules` puts its
deepest file 155 characters below the project root (aws-cdk-lib's own shipped
fixtures), so the project root must be at most 104 characters. Create the
Expand Down
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,51 +29,51 @@ those details so you can create, deploy, and invoke agents from your terminal.
Create a managed Harness project, deploy it, and send a prompt:

```bash
agentcore project create --name MyAssistant
agentcore create --name MyAssistant
cd MyAssistant
agentcore project deploy
agentcore project invoke harness --prompt "Hey, what can you do for me?"
agentcore deploy
agentcore invoke harness --prompt "Hey, what can you do for me?"
```

To start with code you own instead, create a Runtime project from a template.
Run this alternative from outside an existing project:

```bash
agentcore project create --name MyAgent --template agent-python-strands
agentcore create --name MyAgent --template agent-python-strands
```

## Command Surface

`project` commands manage local project specifications and their deployments.
Resource commands operate on deployed resources without requiring a local project.

| Command | Purpose |
| ---------- | ----------------------------------------------------------------------------- |
| `project` | Create, develop, build, deploy, invoke, and inspect a project |
| `harness` | Manage Harnesses, versions, and endpoints; invoke and inspect them |
| `identity` | Manage credential providers |
| `runtime` | Inspect, invoke, and open a shell in deployed Runtimes |
| `memory` | Inspect Memories, actors, sessions, events, and records |
| `gateway` | Inspect and invoke Gateways, inspect targets and rules, and generate policies |
| `payment` | Inspect payment managers, connectors, sessions, instruments, and balances |
| `eval` | Evaluate agents, manage datasets and configurations, and run experiments |
| `feedback` | Submit feedback |
| `config` | Read and write global CLI settings |
| `update` | Check for and install CLI updates |
Project commands manage local project specifications and their deployments. Resource commands
operate on deployed resources without requiring a local project.

| Command | Purpose |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `create`, `add`, `export`, `remove`, `dev`, `deploy`, `invoke`, `log`, `traces`, `status`, `build` | Create, develop, build, deploy, invoke, and inspect a project |
| `harness` | Manage Harnesses, versions, and endpoints; invoke and inspect them |
| `identity` | Manage credential providers |
| `runtime` | Inspect, invoke, and open a shell in deployed Runtimes |
| `memory` | Inspect Memories, actors, sessions, events, and records |
| `gateway` | Inspect and invoke Gateways, inspect targets and rules, and generate policies |
| `payment` | Inspect payment managers, connectors, sessions, instruments, and balances |
| `eval` | Evaluate agents, manage datasets and configurations, and run experiments |
| `feedback` | Submit feedback |
| `config` | Read and write global CLI settings |
| `update` | Check for and install CLI updates |

Use `--help` for subcommands and flags, or browse the [command reference](command.md):

```bash
agentcore --help
agentcore project --help
agentcore add --help
agentcore runtime invoke --help
```

Supported bare commands open their interactive flows in a terminal. Operation
flags select headless behavior for most commands, but invoke commands can use
selectors such as `--id` and `--session-id` to seed an interactive console.
Run `agentcore project create` for guided setup. To create a default project
without the wizard, run `agentcore project create --name MyAssistant`.
Run `agentcore create` for guided setup. To create a default project without
the wizard, run `agentcore create --name MyAssistant`.

Global flags (declared at the root, available on every command):

Expand Down Expand Up @@ -129,14 +129,14 @@ export class AgentCoreStack extends Stack {

For a Harness, use `this.application.harness("<name>")` instead.

Run `agentcore project deploy` to apply your changes. The names passed to
Run `agentcore deploy` to apply your changes. The names passed to
`runtime()` or `harness()` must match the names in your project.

If you use an existing execution role through `executionRoleArn`, CDK cannot
change its permissions. You'll need to add the required permissions to that role
yourself.

Note that `agentcore project status` reports only the resources `agentcore.json`
Note that `agentcore status` reports only the resources `agentcore.json`
declares, not the ones you add in the stack.

## Documentation
Expand Down
12 changes: 6 additions & 6 deletions docs/harness-project-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

## Harness Project Files

`project create` (without `--template`) and `project add harness` share the same
`agentcore create` (without `--template`) and `agentcore add harness` share the same
scaffolding flow. Each harness has `app/<name>/harness.yaml` and
`app/<name>/system-prompt.md`:

Expand Down Expand Up @@ -50,7 +50,7 @@ memory:
mode: managed
```

Edit the file, then run `agentcore project deploy` from the project directory to
Edit the file, then run `agentcore deploy` from the project directory to
apply changes. A local edit does not update an already deployed harness.
The examples below are separate alternatives or sections to add to your file.
Replace a section when switching modes rather than keeping fields from both.
Expand Down Expand Up @@ -151,7 +151,7 @@ systemPrompt: |
Path-shaped inline values ending in `.md` or `.txt` are rejected by the current
schema. Use the conventional `system-prompt.md` file instead.

`project add harness --system-prompt "Your instructions"` writes the supplied
`agentcore add harness --system-prompt "Your instructions"` writes the supplied
text to `system-prompt.md`, leaving `systemPrompt` out of the generated YAML.

## Memory
Expand Down Expand Up @@ -379,7 +379,7 @@ skills:

For a private repository, store its access token in an AgentCore Identity API-key
credential provider. The project deployment path resolves `auth.credentialName`
from the [project credentials](../command.md#agentcore-project-add-credentials) declared in
from the [project credentials](../command.md#agentcore-add-credentials) declared in
`agentcore.json`:

```yaml
Expand Down Expand Up @@ -471,7 +471,7 @@ rather than being silently skipped.
Exporting a Harness to a code-owned Runtime has additional limits: filesystem
skills are rejected, and bundled AWS skills are omitted with an explanation in
`EXPORT_NOTES.md`. S3 and Git sources are supported by the exporter. See
[Export a Harness](../command.md#agentcore-project-export-harness).
[Export a Harness](../command.md#agentcore-export-harness).

See [Harness skills](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-skills.html)
and the [Agent Skills format](https://agentskills.io/specification) for source
Expand Down Expand Up @@ -551,7 +551,7 @@ dockerfile: Dockerfile
```

The path is relative to the directory containing `harness.yaml`. If supplied
through `project add harness --dockerfile`, the CLI copies the file into the
through `agentcore add harness --dockerfile`, the CLI copies the file into the
harness directory as `Dockerfile`.

Alternatively, reference a pre-built ECR image:
Expand Down
44 changes: 9 additions & 35 deletions e2eTest/project/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,7 @@ describe(
const created = parseResult(
ProjectCreatedSchema,
await cli.run(
[
"project",
"create",
"--name",
projectName,
"--template",
"empty",
"--skip-git",
"--json",
],
["create", "--name", projectName, "--template", "empty", "--skip-git", "--json"],
projectRoot,
),
);
Expand All @@ -184,16 +175,7 @@ describe(
const added = parseResult(
OperationSchema,
await cli.run(
[
"project",
"add",
"runtime",
"--name",
runtime.name,
"--template",
runtime.template,
"--json",
],
["add", "runtime", "--name", runtime.name, "--template", runtime.template, "--json"],
projectDir,
),
);
Expand All @@ -220,7 +202,7 @@ describe(
};

beforeAll(() => {
dev = cli.start(["project", "dev", "--mode", "headless"], projectDir);
dev = cli.start(["dev", "--mode", "headless"], projectDir);
dev.stdout?.on("data", captureDevOutput);
dev.stderr?.on("data", captureDevOutput);
dev.stdout?.resume();
Expand All @@ -242,11 +224,11 @@ describe(
// the server may take a bit to get ready, so we retry on a timeout.
const response = await retry(async () => {
if (!dev) {
throw new Error(`project dev did not start. \nstdout/stdout = ${pendingOutput}`);
throw new Error(`agentcore dev did not start. \nstdout/stdout = ${pendingOutput}`);
}
if (dev.exitCode !== null) {
throw new Error(
`project dev exited with code ${dev.exitCode ?? "unknown"}. \nstdout/stdout = ${pendingOutput}`,
`agentcore dev exited with code ${dev.exitCode ?? "unknown"}. \nstdout/stdout = ${pendingOutput}`,
);
}

Expand All @@ -261,7 +243,6 @@ describe(
LocalRuntimeInvokeResponseSchema,
await cli.run(
[
"project",
"invoke",
"runtime",
"--local",
Expand Down Expand Up @@ -292,7 +273,7 @@ describe(
test("deploys all runtimes", { timeout: TIMEOUT_MS.PROJECT_DEPLOY }, async () => {
const deployment = parseResult(
DeployResponseSchema,
await cli.run(["project", "deploy", "--yes", "--json"], projectDir),
await cli.run(["deploy", "--yes", "--json"], projectDir),
);
expect(deployment.message).toContain("Deployed project");
});
Expand All @@ -306,7 +287,6 @@ describe(
RuntimeInvokeResponseSchema,
await cli.run(
[
"project",
"invoke",
"runtime",
"--name",
Expand Down Expand Up @@ -335,10 +315,7 @@ describe(
async (runtime) => {
const removed = parseResult(
OperationSchema,
await cli.run(
["project", "remove", "runtime", "--name", runtime.name, "--json"],
projectDir,
),
await cli.run(["remove", "runtime", "--name", runtime.name, "--json"], projectDir),
);
expect(removed.operation).toBe("remove");
},
Expand All @@ -350,13 +327,10 @@ describe(
async () => {
parseResult(
JsonObjectSchema,
await cli.run(["project", "remove", "all", "--yes", "--json"], projectDir),
await cli.run(["remove", "all", "--yes", "--json"], projectDir),
);

parseResult(
JsonObjectSchema,
await cli.run(["project", "deploy", "--yes", "--json"], projectDir),
);
parseResult(JsonObjectSchema, await cli.run(["deploy", "--yes", "--json"], projectDir));
},
);
},
Expand Down
18 changes: 17 additions & 1 deletion scripts/generate-command-reference.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,23 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
const REPOSITORY_ROOT = resolve(SCRIPT_DIR, "..");
const DEFAULT_GROUPS = [
{ id: "global-options", title: "Global options", commands: [] },
{ id: "project", title: "Project commands", commands: ["project"] },
{
id: "project",
title: "Project commands",
commands: [
"create",
"add",
"export",
"remove",
"dev",
"deploy",
"invoke",
"log",
"traces",
"status",
"build",
],
},
{ id: "harness", title: "Harness commands", commands: ["harness"] },
{ id: "identity", title: "Identity commands", commands: ["identity"] },
{ id: "runtime", title: "Runtime commands", commands: ["runtime"] },
Expand Down
10 changes: 5 additions & 5 deletions src/assets/cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ the conventional `system-prompt.md` file in the harness directory.
You normally do not run this app directly:

```bash
agentcore project build # synthesizes the CloudFormation templates into agentcore/cdk/cdk.out
agentcore project deploy # synthesizes, then deploys the stack for the selected target
agentcore project status # reports the resources agentcore.json declares
agentcore build # synthesizes the CloudFormation templates into agentcore/cdk/cdk.out
agentcore deploy # synthesizes, then deploys the stack for the selected target
agentcore status # reports the resources agentcore.json declares
```

`npm run build` compiles the app, and `npx cdk synth` / `npx cdk diff` work from this directory too.
Expand All @@ -43,10 +43,10 @@ checkout.addEnvironmentVariable('ORDERS_TABLE', orders.tableName);
orders.grantReadData(this.application.harness('support')); // any AWS L2 grant works too
```

Then run `agentcore project deploy` again. An unknown name fails at synth and lists the names that exist.
Then run `agentcore deploy` again. An unknown name fails at synth and lists the names that exist.

If a runtime or harness is configured with an `executionRoleArn`, CDK cannot modify that imported role: every grant
emits a synth-time warning listing the permissions that were not attached, and the role must already carry them.

`agentcore project status` reports only the resources `agentcore.json` declares; resources you add here are visible
`agentcore status` reports only the resources `agentcore.json` declares; resources you add here are visible
through CloudFormation (`aws cloudformation describe-stack-resources`).
2 changes: 1 addition & 1 deletion src/assets/evaluators/python-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ def handler(input: EvaluatorInput, context) -> EvaluatorOutput:
return EvaluatorOutput(value=1.0, label="Pass", explanation="…")
```

Then `agentcore project deploy` packages this directory into the evaluator
Then `agentcore deploy` packages this directory into the evaluator
Lambda and registers the evaluator.
4 changes: 2 additions & 2 deletions src/assets/templates/a2a-python-strands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ def my_tool(param: str) -> str:

## Developing locally

`agentcore project dev` starts the agent locally on `0.0.0.0:9000`. Fetch its agent card at
`agentcore dev` starts the agent locally on `0.0.0.0:9000`. Fetch its agent card at
`http://127.0.0.1:9000/.well-known/agent-card.json` and send it messages by posting A2A
JSON-RPC to `http://127.0.0.1:9000/`.

## Deployment

`agentcore project deploy` deploys the agent into Amazon Bedrock AgentCore. Invoke it with the
`agentcore deploy` deploys the agent into Amazon Bedrock AgentCore. Invoke it with the
AWS CLI (`bedrock-agentcore invoke-agent-runtime`) using an A2A JSON-RPC payload.
10 changes: 5 additions & 5 deletions src/assets/templates/agent-python-langchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ session, and streams its response.
between turns.
- `model/load.py`: creates the Bedrock chat model with `init_chat_model`.
- `pyproject.toml`: Python dependencies, managed with
[uv](https://docs.astral.sh/uv/). `agentcore project create` has already run
[uv](https://docs.astral.sh/uv/). `agentcore create` has already run
`uv sync` for you (unless you passed `--skip-install`), so `.venv/` is ready.

## Develop

Run the agent locally from the project root:

```bash
agentcore project dev
agentcore project invoke runtime --local --name {{name}} --payload '{"prompt":"What is 2 plus 3?"}'
agentcore dev
agentcore invoke runtime --local --name {{name}} --payload '{"prompt":"What is 2 plus 3?"}'
```

Environment variables for local development go in `agentcore/.env.local`
Expand All @@ -31,8 +31,8 @@ Environment variables for local development go in `agentcore/.env.local`
## Deploy

```bash
agentcore project deploy
agentcore project invoke runtime --payload '{"prompt":"Hello!"}'
agentcore deploy
agentcore invoke runtime --payload '{"prompt":"Hello!"}'
```

Traces are collected automatically: AgentCore Runtime starts the agent under
Expand Down
8 changes: 4 additions & 4 deletions src/assets/templates/agent-python-minimal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ invocation — a starting point you own and grow into a real agent.
- `main.py` — the agent. A `BedrockAgentCoreApp` wraps the entrypoint that
receives each invocation payload and returns the response.
- `pyproject.toml` — Python dependencies, managed with
[uv](https://docs.astral.sh/uv/). `agentcore project create` has already run
[uv](https://docs.astral.sh/uv/). `agentcore create` has already run
`uv sync` for you (unless you passed `--skip-install`), so `.venv/` is ready.

## Develop

Run the agent locally from the project root:

```bash
agentcore project dev
agentcore dev
```

Environment variables for local development go in `agentcore/.env.local`
Expand All @@ -26,6 +26,6 @@ Environment variables for local development go in `agentcore/.env.local`
## Deploy

```bash
agentcore project deploy
agentcore project invoke runtime --payload '{"prompt":"Hello!"}'
agentcore deploy
agentcore invoke runtime --payload '{"prompt":"Hello!"}'
```
Loading
Loading