@aws/agentcore 0.3.0-preview.6.1 → 0.3.0-preview.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +19 -8
- package/dist/assets/agents/AGENTS.md +1 -1
- package/dist/assets/cdk/bin/cdk.ts +13 -7
- package/dist/assets/cdk/lib/cdk-stack.ts +1 -0
- package/dist/assets/cdk/test/cdk.test.ts +4 -0
- package/dist/cli/index.mjs +679 -346
- package/dist/lib/constants.d.ts +0 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +0 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/schemas/io/config-io.d.ts +2 -10
- package/dist/lib/schemas/io/config-io.d.ts.map +1 -1
- package/dist/lib/schemas/io/config-io.js +0 -15
- package/dist/lib/schemas/io/config-io.js.map +1 -1
- package/dist/lib/schemas/io/path-resolver.d.ts +0 -5
- package/dist/lib/schemas/io/path-resolver.d.ts.map +1 -1
- package/dist/lib/schemas/io/path-resolver.js +0 -6
- package/dist/lib/schemas/io/path-resolver.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +10 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +17 -1
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +400 -1
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +44 -1
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/deployed-state.d.ts +173 -12
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
- package/dist/schema/schemas/deployed-state.js +23 -3
- package/dist/schema/schemas/deployed-state.js.map +1 -1
- package/dist/schema/schemas/mcp.d.ts +129 -353
- package/dist/schema/schemas/mcp.d.ts.map +1 -1
- package/dist/schema/schemas/mcp.js +88 -18
- package/dist/schema/schemas/mcp.js.map +1 -1
- package/dist/schema/schemas/primitives/index.d.ts +2 -0
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +7 -1
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/dist/schema/schemas/primitives/online-eval-config.d.ts +1 -0
- package/dist/schema/schemas/primitives/online-eval-config.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/online-eval-config.js +2 -0
- package/dist/schema/schemas/primitives/online-eval-config.js.map +1 -1
- package/dist/schema/schemas/primitives/policy.d.ts +49 -0
- package/dist/schema/schemas/primitives/policy.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/policy.js +62 -0
- package/dist/schema/schemas/primitives/policy.js.map +1 -0
- package/dist/schema/schemas/primitives/tags.d.ts +6 -0
- package/dist/schema/schemas/primitives/tags.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/tags.js +27 -0
- package/dist/schema/schemas/primitives/tags.js.map +1 -0
- package/package.json +11 -4
- package/scripts/check-old-cli.lib.mjs +102 -0
- package/scripts/check-old-cli.mjs +6 -22
package/README.md
CHANGED
|
@@ -17,18 +17,20 @@ AgentCore with minimal configuration.
|
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
> **Public Preview**: If you previously used the
|
|
25
|
-
> [Bedrock AgentCore Starter Toolkit](https://github.com/aws/bedrock-agentcore-starter-toolkit), uninstall it before
|
|
26
|
-
> using this CLI:
|
|
20
|
+
> **Upgrading from the Bedrock AgentCore Starter Toolkit?** If the old Python CLI is still installed, you'll see a
|
|
21
|
+
> warning after install asking you to uninstall it. Both CLIs use the `agentcore` command name, so having both can cause
|
|
22
|
+
> confusion. Uninstall the old one using whichever tool you originally used:
|
|
27
23
|
>
|
|
28
24
|
> ```bash
|
|
29
|
-
> pip uninstall bedrock-agentcore-starter-toolkit
|
|
25
|
+
> pip uninstall bedrock-agentcore-starter-toolkit # if installed via pip
|
|
26
|
+
> pipx uninstall bedrock-agentcore-starter-toolkit # if installed via pipx
|
|
27
|
+
> uv tool uninstall bedrock-agentcore-starter-toolkit # if installed via uv
|
|
30
28
|
> ```
|
|
31
29
|
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @aws/agentcore
|
|
32
|
+
```
|
|
33
|
+
|
|
32
34
|
## Quick Start
|
|
33
35
|
|
|
34
36
|
Use the terminal UI to walk through all commands interactively, or run each command individually:
|
|
@@ -96,7 +98,7 @@ agentcore invoke
|
|
|
96
98
|
| -------------------- | --------------------------------------------- |
|
|
97
99
|
| `add evaluator` | Add a custom LLM-as-a-Judge evaluator |
|
|
98
100
|
| `add online-eval` | Add continuous evaluation for live traffic |
|
|
99
|
-
| `run
|
|
101
|
+
| `run eval` | Run on-demand evaluation against agent traces |
|
|
100
102
|
| `evals history` | View past eval run results |
|
|
101
103
|
| `pause online-eval` | Pause a deployed online eval config |
|
|
102
104
|
| `resume online-eval` | Resume a paused online eval config |
|
|
@@ -73,13 +73,19 @@ async function main() {
|
|
|
73
73
|
const spec = await configIO.readProjectSpec();
|
|
74
74
|
const targets = await configIO.readAWSDeploymentTargets();
|
|
75
75
|
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
// Extract MCP configuration from project spec.
|
|
77
|
+
// Gateway fields are stored in agentcore.json but may not yet be on the
|
|
78
|
+
// AgentCoreProjectSpec type from @aws/agentcore-cdk, so we read them
|
|
79
|
+
// dynamically and cast the resulting object.
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
const specAny = spec as any;
|
|
82
|
+
const mcpSpec = specAny.agentCoreGateways?.length
|
|
83
|
+
? {
|
|
84
|
+
agentCoreGateways: specAny.agentCoreGateways,
|
|
85
|
+
mcpRuntimeTools: specAny.mcpRuntimeTools,
|
|
86
|
+
unassignedTargets: specAny.unassignedTargets,
|
|
87
|
+
}
|
|
88
|
+
: undefined;
|
|
83
89
|
|
|
84
90
|
// Read deployed state for credential ARNs (populated by pre-deploy identity setup)
|
|
85
91
|
let deployedState: Record<string, unknown> | undefined;
|
|
@@ -301,6 +307,7 @@ export class AgentCoreStack extends Stack {
|
|
|
301
307
|
mcpSpec,
|
|
302
308
|
agentCoreApplication: this.application,
|
|
303
309
|
credentials,
|
|
310
|
+
projectTags: spec.tags,
|
|
304
311
|
});
|
|
305
312
|
}
|
|
306
313
|
|
|
@@ -374,6 +381,10 @@ test('AgentCoreStack synthesizes with empty spec', () => {
|
|
|
374
381
|
credentials: [],
|
|
375
382
|
evaluators: [],
|
|
376
383
|
onlineEvalConfigs: [],
|
|
384
|
+
policyEngines: [],
|
|
385
|
+
agentCoreGateways: [],
|
|
386
|
+
mcpRuntimeTools: [],
|
|
387
|
+
unassignedTargets: [],
|
|
377
388
|
},
|
|
378
389
|
});
|
|
379
390
|
const template = Template.fromStack(stack);
|
|
@@ -4265,7 +4276,7 @@ model** where agents, memories, and credentials are top-level arrays.
|
|
|
4265
4276
|
The project uses a **flat resource model**. Agents, memories, and credentials are independent top-level arrays in
|
|
4266
4277
|
\`agentcore.json\`. There is no binding or attachment between resources in the schema — each resource is provisioned
|
|
4267
4278
|
independently. To use a memory or credential from an agent, the application code discovers the resource at runtime
|
|
4268
|
-
(e.g., via environment variables or SDK calls).
|
|
4279
|
+
(e.g., via environment variables or SDK calls). Tags defined in \`agentcore.json\` flow through to deployed CloudFormation resources.
|
|
4269
4280
|
|
|
4270
4281
|
## Critical Invariants
|
|
4271
4282
|
|
|
@@ -11,7 +11,7 @@ model** where agents, memories, and credentials are top-level arrays.
|
|
|
11
11
|
The project uses a **flat resource model**. Agents, memories, and credentials are independent top-level arrays in
|
|
12
12
|
`agentcore.json`. There is no binding or attachment between resources in the schema — each resource is provisioned
|
|
13
13
|
independently. To use a memory or credential from an agent, the application code discovers the resource at runtime
|
|
14
|
-
(e.g., via environment variables or SDK calls).
|
|
14
|
+
(e.g., via environment variables or SDK calls). Tags defined in `agentcore.json` flow through to deployed CloudFormation resources.
|
|
15
15
|
|
|
16
16
|
## Critical Invariants
|
|
17
17
|
|
|
@@ -28,13 +28,19 @@ async function main() {
|
|
|
28
28
|
const spec = await configIO.readProjectSpec();
|
|
29
29
|
const targets = await configIO.readAWSDeploymentTargets();
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
// Extract MCP configuration from project spec.
|
|
32
|
+
// Gateway fields are stored in agentcore.json but may not yet be on the
|
|
33
|
+
// AgentCoreProjectSpec type from @aws/agentcore-cdk, so we read them
|
|
34
|
+
// dynamically and cast the resulting object.
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
|
+
const specAny = spec as any;
|
|
37
|
+
const mcpSpec = specAny.agentCoreGateways?.length
|
|
38
|
+
? {
|
|
39
|
+
agentCoreGateways: specAny.agentCoreGateways,
|
|
40
|
+
mcpRuntimeTools: specAny.mcpRuntimeTools,
|
|
41
|
+
unassignedTargets: specAny.unassignedTargets,
|
|
42
|
+
}
|
|
43
|
+
: undefined;
|
|
38
44
|
|
|
39
45
|
// Read deployed state for credential ARNs (populated by pre-deploy identity setup)
|
|
40
46
|
let deployedState: Record<string, unknown> | undefined;
|
|
@@ -13,6 +13,10 @@ test('AgentCoreStack synthesizes with empty spec', () => {
|
|
|
13
13
|
credentials: [],
|
|
14
14
|
evaluators: [],
|
|
15
15
|
onlineEvalConfigs: [],
|
|
16
|
+
policyEngines: [],
|
|
17
|
+
agentCoreGateways: [],
|
|
18
|
+
mcpRuntimeTools: [],
|
|
19
|
+
unassignedTargets: [],
|
|
16
20
|
},
|
|
17
21
|
});
|
|
18
22
|
const template = Template.fromStack(stack);
|