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
6 changes: 3 additions & 3 deletions .github/workflows/canary-v0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:

jobs:
resolve_release:
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.resolve.outputs.version }}
steps:
Expand All @@ -42,7 +42,7 @@ jobs:

canary:
needs: resolve_release
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Use the test harness from the same release as the published CLI.
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
heartbeat:
needs: [resolve_release, canary]
if: ${{ !cancelled() }}
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
steps:
# Use the emitter from this branch; the canary job checks out the v0 release.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
# Resolve the commit hash for npm's latest published version.
resolve_release:
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.resolve.outputs.ref }}
version: ${{ steps.resolve.outputs.version }}
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
needs: [resolve_release, e2e]
# A cancelled run emits no failure sample; the alarm may still breach on missing data.
if: ${{ !cancelled() }}
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
analyze:
name: Analyze
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
actions: read
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ env:

jobs:
authorize:
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -87,10 +87,8 @@ jobs:
if: needs.authorize.outputs.is-authorized == 'true'
runs-on: >-
${{ fromJSON(
matrix.name == 'Linux' &&
format('["codebuild-agentcore-e2e-{0}-{1}","e2e-linux"]', github.run_id, github.run_attempt)
|| matrix.name == 'Windows' &&
format('["codebuild-agentcore-e2e-{0}-{1}","image:windows-1.0","e2e-windows"]', github.run_id, github.run_attempt)
matrix.name == 'Linux' && '["ubuntu-latest"]'
|| matrix.name == 'Windows' && '["windows-latest"]'
|| matrix.name == 'macOS' && '["macos-latest"]'
|| matrix.name == 'Linux-arm64' && '["ubuntu-24.04-arm"]'
) }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
statuses: write
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-size-title.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: codebuild
runner: ubuntu
secrets: inherit

security-review:
Expand All @@ -44,7 +44,7 @@ jobs:
contents: read
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-security-review.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: codebuild
runner: ubuntu
pr_number: ${{ inputs.pr_number || format('{0}', github.event.pull_request.number) }}
allowed_base_branches: '["v0.x","v1.x","box-integration"]'
secrets: inherit
Expand All @@ -63,7 +63,7 @@ jobs:
contents: read
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-pr-ai-review.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: codebuild
runner: ubuntu
model_id: us.anthropic.claude-opus-5
pr_url: >-
${{ github.event_name == 'workflow_dispatch' &&
Expand All @@ -81,7 +81,7 @@ jobs:
github.event_name == 'pull_request_target' &&
contains(fromJSON('["opened","reopened","synchronize"]'), github.event.action)
)
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
pr-tarball:
needs: tarball-authorize
if: needs.tarball-authorize.outputs.is_authorized == 'true'
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
prerelease:
runs-on: codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-latest
timeout-minutes: 30
env:
RELEASE_TAG: ${{ github.ref_name == 'v0.x' && 'prerelease' || format('prerelease-{0}', github.ref_name) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slack-issue-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
call:
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-slack-issue-notification.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
with:
runner: codebuild
runner: ubuntu
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/slack-open-prs-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
call:
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-slack-open-prs-notification.yml@c2106996dd94e56f6c5fad625c83573e9724fb63
uses: aws/agentcore-devx-devtools/.github/workflows/reusable-slack-open-prs-notification.yml@db12e119f4802fc59da3f8e48cc02c43b225d71d
with:
runner: codebuild
runner: ubuntu
secrets: inherit
6 changes: 2 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ jobs:
fail-fast: false
matrix:
include:
# Per-job labels stop GitHub from routing a job to the runner CodeBuild created for another job.
# https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-action-runners-update-labels.html
- name: Linux
runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}", "verify-linux"]'
runner: '"ubuntu-latest"'
target: linux-x64
binary: ./dist/bin/agentcore-linux-x64
- name: Windows
runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}", "image:windows-1.0", "verify-windows"]'
runner: '"windows-latest"'
target: windows-x64
binary: ./dist/bin/agentcore-windows-x64.exe
steps:
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ Global flags, available on every command:
(`transformAgentCoreJson`). All three come from `@aws/agentcore-cdk`, so that
logic is updated through the library rather than changes to your CDK app.

`agentcore build` and `agentcore deploy` keep the dependencies `agentcore create`
wrote to `agentcore/cdk/package.json` at the versions this CLI vends, and run
`npm install` when they change or are not installed, so both commands may need
network access to npm. Dependencies you add yourself are left alone. To manage
the CDK dependencies yourself, run `agentcore config disableDependencyManagement true`.

`lib/cdk-stack.ts` instantiates one `AgentCoreApplication`. This is the file you
edit to add your own resources. Runtimes and harnesses implement `iam.IGrantable`,
so you can pass them to a resource's CDK grant methods to give your agents access.
Expand Down
78 changes: 74 additions & 4 deletions command.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# AgentCore CLI command reference

This reference was generated from `agentcore --help` for version `1.1.0`.
This reference was generated from `agentcore --help` for version `1.2.0`.

## Table of contents

Expand Down Expand Up @@ -160,6 +160,11 @@ This reference was generated from `agentcore --help` for version `1.1.0`.
- [`agentcore eval dataset delete`](#agentcore-eval-dataset-delete)
- [`agentcore eval dataset update`](#agentcore-eval-dataset-update)
- [`agentcore eval dataset publish`](#agentcore-eval-dataset-publish)
- [`agentcore eval dataset-generation`](#agentcore-eval-dataset-generation)
- [`agentcore eval dataset-generation start`](#agentcore-eval-dataset-generation-start)
- [`agentcore eval dataset-generation get`](#agentcore-eval-dataset-generation-get)
- [`agentcore eval dataset-generation list`](#agentcore-eval-dataset-generation-list)
- [`agentcore eval dataset-generation delete`](#agentcore-eval-dataset-generation-delete)
- [`agentcore eval batch-evaluation`](#agentcore-eval-batch-evaluation)
- [`agentcore eval batch-evaluation evaluate`](#agentcore-eval-batch-evaluation-evaluate)
- [`agentcore eval batch-evaluation simulate`](#agentcore-eval-batch-evaluation-simulate)
Expand Down Expand Up @@ -299,6 +304,7 @@ add a harness to the current project (not available in China regions)
- `--execution-role-arn <execution-role-arn>`: IAM role the harness assumes; a default role is created when omitted
- `--authorizer-type <authorizer-type>`: inbound authorizer type (AWS\_IAM or CUSTOM\_JWT)
- `--authorizer-configuration <authorizer-configuration>`: inbound authorizer configuration (JSON)
- `--build-config <build-config>`: advanced build settings (JSON object): build (Container or ContainerLocal), dockerfile, buildContextPath, customDockerBuildArgs. Without buildContextPath, dockerfile is a path relative to the current directory, copied once to app/&lt;name&gt;/Dockerfile (app/&lt;name&gt;/ is the build context). With buildContextPath (relative to the project root), dockerfile is relative to that build context and used in place. Build args are not secret: they appear in logs and image metadata

#### `agentcore add runtime`

Expand Down Expand Up @@ -328,6 +334,7 @@ add a Runtime to the current project
- `--agent-id <agent-id>`: Bedrock Agent ID to import; translates that agent version into runtime code instead of writing docs
- `--agent-alias-id <agent-alias-id>`: Bedrock Agent Alias ID selecting the version to import; must point at a prepared version, not DRAFT (requires --agent-id)
- `--framework <framework>`: agent framework for an imported Bedrock Agent: strands or langgraph (requires --agent-id)
- `--build-config <build-config>`: advanced build settings (JSON object): build (CodeZip, Container, or ContainerLocal), dockerfile, buildContextPath, customDockerBuildArgs. Without buildContextPath, dockerfile is a path relative to the current directory, copied once to app/&lt;name&gt;/Dockerfile (app/&lt;name&gt;/ is the build context). With buildContextPath (relative to the project root), dockerfile is relative to that build context and used in place. Build args are not secret: they appear in logs and image metadata

#### `agentcore add runtime-endpoint`

Expand Down Expand Up @@ -2320,13 +2327,12 @@ manage AgentCore evaluation datasets
agentcore eval dataset create [options]
```

create a dataset from JSONL examples
create a dataset, optionally seeded from JSONL examples

**Options**

- `--name <name>`: the name of the dataset (required)
- `--source <source>`: dataset examples: a JSONL file (file://&lt;path&gt;), an S3 JSONL object (s3://&lt;bucket&gt;/&lt;key&gt;), or - for stdin (required)
- `--schema-type <schema-type>`: the structure of the dataset's examples, immutable after creation (predefined | simulated) (required)
- `--source <source>`: dataset examples: a JSONL file (file://&lt;path&gt;), an S3 JSONL object (s3://&lt;bucket&gt;/&lt;key&gt;), or - for stdin; omit to create an empty dataset
- `--description <description>`: a description of the dataset
- `--kms-key-arn <kms-key-arn>`: customer managed KMS key ARN for dataset data
- `--tags <tags...>`: tags as repeated key=value entries or one JSON object
Expand Down Expand Up @@ -2396,6 +2402,70 @@ publish the current DRAFT as a new immutable version

- `--id <id>`: the ID of the dataset to publish (required)

#### `agentcore eval dataset-generation`

```text
agentcore eval dataset-generation [options] [command]
```

generate dataset examples from agent traces

##### `agentcore eval dataset-generation start`

```text
agentcore eval dataset-generation start [options]
```

start an asynchronous generation into a dataset's DRAFT

**Options**

- `--dataset-id <dataset-id>`: the ID of the dataset to write examples into (required)
- `--name <name>`: the name of the generation (required)
- `--description <description>`: a description of the generation
- `--scenario-type <scenario-type>`: the kind of example every scenario becomes (fixed | dynamic); service defaults to dynamic when omitted
- `--generation-config <generation-config>`: where traces are read from and which become examples (JSON inline, file://&lt;path&gt;, or - for stdin) (required)

##### `agentcore eval dataset-generation get`

```text
agentcore eval dataset-generation get [options]
```

get a generation by ID

**Options**

- `--dataset-id <dataset-id>`: the ID of the dataset (required)
- `--id <id>`: the ID of the generation (required)

##### `agentcore eval dataset-generation list`

```text
agentcore eval dataset-generation list [options]
```

list a dataset's generations

**Options**

- `--dataset-id <dataset-id>`: the ID of the dataset (required)
- `--next-token <next-token>`: pagination token returned by a previous request
- `--max-results <max-results>`: maximum number of items to return (1-100)

##### `agentcore eval dataset-generation delete`

```text
agentcore eval dataset-generation delete [options]
```

delete a generation record (its examples stay in the DRAFT)

**Options**

- `--dataset-id <dataset-id>`: the ID of the dataset (required)
- `--id <id>`: the ID of the generation (required)

#### `agentcore eval batch-evaluation`

```text
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws/agentcore",
"version": "1.1.0",
"version": "1.2.0",
"repository": {
"type": "git",
"url": "https://github.com/aws/agentcore-cli.git"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"typescript": "~5.9.3"
},
"dependencies": {
"@aws/agentcore-cdk": "1.1.0",
"@aws/agentcore-cdk": "1.2.0",
"aws-cdk-lib": "~2.269.0",
"constructs": "~10.7.0"
}
Expand Down
2 changes: 2 additions & 0 deletions src/assets/templates/harness/harness.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ tags: {}
{{#if yaml.networkConfig}}
{{yaml.networkConfig}}
{{else}}
{{#unless containerLocal}}
# For VPC Dockerfile builds, also supply networkConfig.vpcId.
{{/unless}}
{{/if}}
{{#if yaml.connections}}
# Grants existing project resources and exposes their connection variables.
Expand Down
11 changes: 11 additions & 0 deletions src/core/dev/container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ function commandCall(calls: ProcessCall[], operation: "build" | "run" | "stop"):
}

describe("ContainerDevRunner", () => {
test("uses an absolute buildContextPath inside the project without prefixing it again", async () => {
const root = await mkdtemp(join(tmpdir(), "agentcore-container-"));
tempDirectories.push(root);
await mkdir(join(root, "ctx"), { recursive: true });
await writeFile(join(root, "ctx", "Dockerfile"), "FROM scratch\n");
const { calls, runner } = harness();

await collect(runner.run(input(root, runtime({ buildContextPath: join(root, "ctx") }))));

expect(commandCall(calls, "build").options.cwd).toBe(join(root, "ctx"));
});
test("builds with a widened context and redacts build arg values from errors", async () => {
const projectRuntime = runtime({
buildContextPath: ".",
Expand Down
Loading
Loading