Skip to content

Commit 0ed7f92

Browse files
authored
Merge branch 'main' into namespaceRedesignControlPlane
2 parents e7e5cfa + 530394b commit 0ed7f92

87 files changed

Lines changed: 2985 additions & 470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/e2e-tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
aws_region:
66
description: 'AWS region for deployment'
77
default: 'us-east-1'
8+
cdk_branch:
9+
description: 'CDK repo branch to build from (default: main)'
10+
default: 'main'
811
pull_request_target:
912
branches: [main]
1013

@@ -78,9 +81,11 @@ jobs:
7881

7982
# Build @aws/agentcore-cdk from source for cross-package testing.
8083
# Requires secrets: CDK_REPO_NAME (org/repo), CDK_REPO_TOKEN (fine-grained PAT)
81-
- name: Build CDK package from main
84+
- name: Build CDK package
8285
run: |
83-
git clone --depth 1 "https://x-access-token:${CDK_REPO_TOKEN}@github.com/${CDK_REPO}.git" /tmp/cdk-repo
86+
CDK_BRANCH="${{ inputs.cdk_branch || 'main' }}"
87+
echo "Building CDK from branch: $CDK_BRANCH"
88+
git clone --depth 1 --branch "$CDK_BRANCH" "https://x-access-token:${CDK_REPO_TOKEN}@github.com/${CDK_REPO}.git" /tmp/cdk-repo
8489
cd /tmp/cdk-repo
8590
npm ci
8691
npm run build

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
CHANGELOG.md
22
src/assets/**/*.md
33
.github/scripts/prompts/
4+
src/assets/**/*.ts
5+
src/assets/**/*.json
6+
src/assets/**/*.template

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ Each primitive extends `BasePrimitive` and implements: `add()`, `remove()`, `pre
7878

7979
Current primitives:
8080

81-
- `AgentPrimitive` — agent creation (template + BYO), removal, credential resolution
81+
- `AgentPrimitive` — agent creation (template + BYO), removal, credential resolution. Template agents: Strands,
82+
LangChain_LangGraph, GoogleADK, OpenAIAgents, VercelAI
8283
- `MemoryPrimitive` — memory creation with strategies, removal
8384
- `CredentialPrimitive` — credential creation, .env management, removal
8485
- `EvaluatorPrimitive` — custom evaluator creation/removal with cross-reference validation

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ agentcore invoke
6262

6363
## Supported Frameworks
6464

65-
| Framework | Notes |
66-
| ------------------- | ----------------------------- |
67-
| Strands Agents | AWS-native, streaming support |
68-
| LangChain/LangGraph | Graph-based workflows |
69-
| Google ADK | Gemini models only |
70-
| OpenAI Agents | OpenAI models only |
65+
| Framework | Notes |
66+
| ------------------- | --------------------------------------------------- |
67+
| Strands Agents | AWS-native, streaming support (Python + TypeScript) |
68+
| LangChain/LangGraph | Graph-based workflows |
69+
| Google ADK | Gemini models only |
70+
| OpenAI Agents | OpenAI models only |
7171

7272
## Supported Model Providers
7373

docs/commands.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ agentcore create \
5151
# Skip agent creation
5252
agentcore create --name MyProject --no-agent
5353

54+
# TypeScript (Strands or Vercel AI)
55+
agentcore create \
56+
--name MyTsProject \
57+
--language TypeScript \
58+
--framework Strands \
59+
--model-provider Bedrock
60+
5461
# Preview without creating
5562
agentcore create --name MyProject --defaults --dry-run
5663

@@ -71,8 +78,8 @@ agentcore create \
7178
| `--defaults` | Use defaults (Python, Strands, Bedrock, no memory) |
7279
| `--no-agent` | Skip agent creation |
7380
| `--type <type>` | `create` (default) or `import` |
74-
| `--language <lang>` | `Python` (default) |
75-
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `GoogleADK`, `OpenAIAgents` |
81+
| `--language <lang>` | `Python` (default) or `TypeScript` (Strands-only; see [Frameworks](frameworks.md#supported-languages)) |
82+
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `GoogleADK`, `OpenAIAgents`, `VercelAI` |
7683
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
7784
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
7885
| `--api-key <key>` | API key for non-Bedrock providers |
@@ -202,7 +209,7 @@ agentcore add agent \
202209
| `--type <type>` | `create` (default), `byo`, or `import` |
203210
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
204211
| `--language <lang>` | `Python` (create); `Python`, `TypeScript`, `Other` (BYO) |
205-
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `GoogleADK`, `OpenAIAgents` |
212+
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `GoogleADK`, `OpenAIAgents`, `VercelAI` |
206213
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
207214
| `--api-key <key>` | API key for non-Bedrock providers |
208215
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (create and import; see [Memory Shorthand Mapping](memory.md#--memory-shorthand-mapping)) |

docs/container-builds.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ app/MyAgent/
3939

4040
## Generated Dockerfile
4141

42-
The template uses `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image with these design choices:
42+
The template uses `public.ecr.aws/docker/library/python:3.12-slim` as the base image (with `uv` installed via
43+
`pip install uv`) with these design choices:
4344

4445
- **Layer caching**: Dependencies (`pyproject.toml`) are installed before copying application code
4546
- **Non-root**: Runs as `bedrock_agentcore` (UID 1000)
@@ -48,6 +49,28 @@ The template uses `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base im
4849

4950
You can customize the Dockerfile freely — add system packages, change the base image, or use multi-stage builds.
5051

52+
### TypeScript Dockerfile
53+
54+
For TypeScript agents, the generated `Dockerfile` uses `public.ecr.aws/docker/library/node:22-slim`:
55+
56+
- **Layer caching**: `package.json` (+ `package-lock.json` if present) is copied first, then `npm ci --omit=dev` runs
57+
(falls back to `npm install` when no lockfile is present)
58+
- **Non-root**: Runs as `bedrock_agentcore` (UID 1000), matching the Python image
59+
- **Entrypoint**: `npx tsx main.ts` — no compile step, so dev and container runtime share the same entry shape
60+
- **Ports**: Exposes 8080 / 8000 / 9000 to match the HTTP / MCP / A2A contract
61+
62+
Example `agentcore.json` for a TypeScript container agent:
63+
64+
```json
65+
{
66+
"name": "MyTsAgent",
67+
"build": "Container",
68+
"entrypoint": "main.ts",
69+
"codeLocation": "app/MyTsAgent/",
70+
"runtimeVersion": "NODE_22"
71+
}
72+
```
73+
5174
## Configuration
5275

5376
In `agentcore.json`, set `"build": "Container"`:

docs/frameworks.md

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
AgentCore CLI supports multiple agent frameworks for template-based agent creation, plus a BYO (Bring Your Own) option
44
for existing code.
55

6+
## Supported Languages
7+
8+
| Language | Supported Frameworks | Runtime | Notes |
9+
| ---------- | -------------------- | ------------ | ---------------------------------------------------------------------------------- |
10+
| Python | All frameworks | Python 3.12+ | Default language. Uses `uv` for dependency management. |
11+
| TypeScript | Strands, Vercel AI | Node 22 | Uses `npm` + `tsx` for the dev loop. Other frameworks are not yet available in TS. |
12+
13+
Pass `--language TypeScript` to `agentcore create` or `agentcore add agent` to scaffold a TypeScript project. The
14+
framework is restricted to `Strands` or `VercelAI`; other values are rejected. See
15+
[Local Development](local-development.md#typescript-agents) for the TS dev loop.
16+
617
## Available Frameworks
718

819
| Framework | Supported Model Providers |
@@ -11,6 +22,7 @@ for existing code.
1122
| **LangChain_LangGraph** | Bedrock, Anthropic, OpenAI, Gemini |
1223
| **GoogleADK** | Gemini only |
1324
| **OpenAIAgents** | OpenAI only |
25+
| **VercelAI** | Bedrock, Anthropic, OpenAI, Gemini |
1426

1527
## Framework Selection Guide
1628

@@ -26,8 +38,13 @@ AWS's native agent framework designed for Amazon Bedrock.
2638

2739
**Model providers:** Bedrock, Anthropic, OpenAI, Gemini
2840

41+
**Languages:** Python, TypeScript
42+
2943
```bash
3044
agentcore create --framework Strands --model-provider Bedrock
45+
46+
# TypeScript variant
47+
agentcore create --framework Strands --model-provider Bedrock --language TypeScript
3148
```
3249

3350
### LangChain / LangGraph
@@ -76,6 +93,27 @@ OpenAI's native agent framework.
7693
agentcore create --framework OpenAIAgents --model-provider OpenAI --api-key sk-...
7794
```
7895

96+
### Vercel AI SDK
97+
98+
Vercel's AI SDK for building AI-powered applications.
99+
100+
**Best for:**
101+
102+
- Full-stack AI applications with streaming support
103+
- Projects using Vercel's ecosystem
104+
- TypeScript-first agent development
105+
106+
**Model providers:** Bedrock, Anthropic, OpenAI, Gemini
107+
108+
**Languages:** Python, TypeScript
109+
110+
```bash
111+
agentcore create --framework VercelAI --model-provider Bedrock
112+
113+
# TypeScript variant
114+
agentcore create --framework VercelAI --model-provider Bedrock --language TypeScript
115+
```
116+
79117
## Import from Bedrock Agents
80118

81119
If you have an existing Bedrock Agent, you can import its configuration and translate it into runnable Strands or
@@ -151,19 +189,19 @@ agentcore add agent \
151189

152190
## Framework Comparison
153191

154-
| Feature | Strands | LangChain | GoogleADK | OpenAIAgents |
155-
| ---------------------- | ------- | --------- | --------- | ------------ |
156-
| Multi-provider support | Yes | Yes | No | No |
157-
| AWS Bedrock native | Yes | No | No | No |
158-
| Tool ecosystem | Growing | Extensive | Moderate | Moderate |
159-
| Memory integration | Native | Via libs | Via libs | Via libs |
192+
| Feature | Strands | LangChain | GoogleADK | OpenAIAgents | VercelAI |
193+
| ---------------------- | ------- | --------- | --------- | ------------ | -------- |
194+
| Multi-provider support | Yes | Yes | No | No | Yes |
195+
| AWS Bedrock native | Yes | No | No | No | No |
196+
| Tool ecosystem | Growing | Extensive | Moderate | Moderate | Moderate |
197+
| Memory integration | Native | Via libs | Via libs | Via libs | Via libs |
160198

161199
## Protocol Compatibility
162200

163201
Not all frameworks support all protocol modes. MCP protocol is a standalone tool server with no framework.
164202

165-
| Protocol | Supported Frameworks |
166-
| -------- | ----------------------------------------------------- |
167-
| **HTTP** | Strands, LangChain_LangGraph, GoogleADK, OpenAIAgents |
168-
| **MCP** | None (standalone tool server) |
169-
| **A2A** | Strands, GoogleADK, LangChain_LangGraph |
203+
| Protocol | Supported Frameworks |
204+
| -------- | --------------------------------------------------------------- |
205+
| **HTTP** | Strands, LangChain_LangGraph, GoogleADK, OpenAIAgents, VercelAI |
206+
| **MCP** | None (standalone tool server) |
207+
| **A2A** | Strands, GoogleADK, LangChain_LangGraph |

docs/local-development.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ The dev server automatically:
4242
2. Runs `uv sync` to install dependencies from `pyproject.toml`
4343
3. Starts uvicorn with your agent
4444

45+
### TypeScript Agents
46+
47+
TypeScript agents (Strands-only) use Node 22 and `tsx` for the dev loop:
48+
49+
1. Runs `npm install` on first scaffold to populate `node_modules/` from `package.json`
50+
2. Starts the agent with `npx tsx watch main.ts` — file changes reload automatically
51+
3. No compile step is required; `tsx` executes `.ts` sources directly
52+
53+
Set `AGENTCORE_SKIP_INSTALL=1` to skip `npm install` if you want to manage dependencies yourself.
54+
4555
### API Keys
4656

4757
For non-Bedrock providers, add keys to `agentcore/.env.local`:

e2e-tests/e2e-helper.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ interface E2EConfig {
2828
requiredEnvVar?: string;
2929
build?: string;
3030
memory?: string;
31+
/** Language for the agent project. Defaults to 'Python'. */
32+
language?: 'Python' | 'TypeScript';
33+
/** Skip logs and traces tests. */
34+
skipObservability?: boolean;
3135
/** Lifecycle configuration to pass via --idle-timeout / --max-lifetime flags. */
3236
lifecycleConfig?: {
3337
idleTimeout?: number;
@@ -37,7 +41,8 @@ interface E2EConfig {
3741

3842
export function createE2ESuite(cfg: E2EConfig) {
3943
const hasApiKey = !cfg.requiredEnvVar || !!process.env[cfg.requiredEnvVar];
40-
const canRun = baseCanRun && hasApiKey;
44+
const needsUv = cfg.language !== 'TypeScript';
45+
const canRun = prereqs.npm && prereqs.git && hasAws && hasApiKey && (!needsUv || prereqs.uv);
4146

4247
describe.sequential(`e2e: ${cfg.framework}/${cfg.modelProvider} — create → deploy → invoke`, () => {
4348
let testDir: string;
@@ -58,7 +63,7 @@ export function createE2ESuite(cfg: E2EConfig) {
5863
'--name',
5964
agentName,
6065
'--language',
61-
'Python',
66+
cfg.language ?? 'Python',
6267
'--framework',
6368
cfg.framework,
6469
'--model-provider',
@@ -221,7 +226,7 @@ export function createE2ESuite(cfg: E2EConfig) {
221226
120000
222227
);
223228

224-
it.skipIf(!canRun)(
229+
it.skipIf(!canRun || !!cfg.skipObservability)(
225230
'logs returns entries from the invocation',
226231
async () => {
227232
await retry(
@@ -250,7 +255,7 @@ export function createE2ESuite(cfg: E2EConfig) {
250255
120000
251256
);
252257

253-
it.skipIf(!canRun)(
258+
it.skipIf(!canRun || !!cfg.skipObservability)(
254259
'logs supports level filtering',
255260
async () => {
256261
// --level error should succeed even if no error-level logs exist
@@ -261,7 +266,7 @@ export function createE2ESuite(cfg: E2EConfig) {
261266
120000
262267
);
263268

264-
it.skipIf(!canRun)(
269+
it.skipIf(!canRun || !!cfg.skipObservability)(
265270
'traces list succeeds after invocation',
266271
async () => {
267272
// traces list has no --json flag — verify exit code and non-empty output
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { createE2ESuite } from './e2e-helper.js';
2+
3+
createE2ESuite({
4+
framework: 'Strands',
5+
modelProvider: 'Bedrock',
6+
language: 'TypeScript',
7+
skipObservability: true,
8+
});

0 commit comments

Comments
 (0)