Skip to content

refactor(templates): use consistent naming scheme and align hello world template. - #2170

Merged
Hweinstock merged 6 commits into
aws:refactorfrom
Hweinstock:feat/rename-templates
Sep 2, 2026
Merged

refactor(templates): use consistent naming scheme and align hello world template.#2170
Hweinstock merged 6 commits into
aws:refactorfrom
Hweinstock:feat/rename-templates

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Problem

The template naming scheme is fairly inconsistent . See

export const RUNTIME_TEMPLATE_SHORTCUTS = {
"hello-world-python": {
runtimeName: "hello_world",
build: "CodeZip",
language: "Python",
framework: "none",
modelProvider: "Bedrock",
memory: "none",
runtimeVersion: "PYTHON_3_14",
},
"hello-world-python-container": {
runtimeName: "hello_world",
build: "Container",
language: "Python",
framework: "none",
modelProvider: "Bedrock",
memory: "none",
},
"strands-python": {
runtimeName: "strands_agent",
build: "CodeZip",
language: "Python",
framework: "strands",
modelProvider: "Bedrock",
memory: "longAndShortTerm",
runtimeVersion: "PYTHON_3_14",
},
"strands-ts": {
runtimeName: "strands_agent",
build: "CodeZip",
language: "TypeScript",
framework: "strands",
modelProvider: "Bedrock",
memory: "longAndShortTerm",
runtimeVersion: "NODE_22",
},
"py-mcp": {
runtimeName: "mcp_server",
build: "CodeZip",
language: "Python",
framework: "none",
protocol: "MCP",
modelProvider: "Bedrock",
memory: "none",
runtimeVersion: "PYTHON_3_14",
},
"strands-py-a2a": {
runtimeName: "a2a_agent",
build: "CodeZip",
language: "Python",
framework: "strands",
protocol: "A2A",
modelProvider: "Bedrock",
memory: "longAndShortTerm",
runtimeVersion: "PYTHON_3_14",
},
. We want to establish a consistent convention.

Solution

  • The http agents follow the pattern of agent-[language]-[framework]. Ex. agent-python-strands.
  • The mcp templates follow the pattern of mcp-[language]-[framework] Ex. mcp-python-fastmcp.
  • The a2a template follow the pattern of a2a-[language]-[framework] Ex. a2a-python-strands.
  • The existing hello-world template becomes agent-python. The container case is combined into the same template for consistency. The asset code is simplified to an http agent with no strands dependency that always returns hello world text.

Verification

  • Had my agent go through each template, create a project, run the local dev server, curl them from a separate terminal, and then deploy and invoke them via aws cli.
  • Manually did this for the new hello-world template
$ agentcore project create --name AgentPy --template agent-python --skip-git
Creating project tree
Installing CDK dependencies with npm
Syncing Python dependencies with uv
Created project 'AgentPy' in ./AgentPy
To deploy it: cd AgentPy && agentcore project deploy

$ cd AgentPy

$ cat agentcore/agentcore.json | jq
{
  "name": "AgentPy",
  "version": 1,
  "managedBy": "CDK",
  "runtimes": [
    {
      "name": "agent_python",
      "build": "CodeZip",
      "entrypoint": "main.py",
      "codeLocation": "app/agent_python",
      "runtimeVersion": "PYTHON_3_14"
    }
  ]
}

$ agentcore project dev --mode headless --agent agent_python --port 8080 --no-traces &
[1] 2600697
[agent_python] Starting development server
[agent_python] INFO:     Will watch for changes in these directories: ['/local/home/hkobew/gh-repos/worktrees/rename-templates/AgentPy/app/hello_world']
[agent_python] INFO:     Uvicorn running on http://127.0.0.1:8080 (Press CTRL+C to quit)
[agent_python] INFO:     Started reloader process [2600766] using StatReload
[agent_python] INFO:     Started server process [2600785]
[agent_python] INFO:     Waiting for application startup.
[agent_python] INFO:     Application startup complete.

$ curl -X POST localhost:8080/invocations -H "Content-Type: application/json" -d '{"prompt": "respond to me!"}'
[agent_python] {"timestamp": "2026-09-02T18:09:46.348Z", "level": "INFO", "message": "Invocation completed successfully (0.019s)", "logger": "bedrock_agentcore.app", "requestId": "570c3ebb-891a-44ef-a615-a2ee0c7547a0"}
{"message": "Hello, world!"}[agent_python] INFO:     127.0.0.1:41098 - "POST /invocations HTTP/1.1" 200 OK

$ agentcore project deploy
✓ Created default deployment target: account ***, region us-east-1 (agentcore/aws-targets.json)
✓ Verifying AWS account ***
✓ Synthesizing CloudFormation templates
✓ Deploying AgentCore-AgentPy-default
Deployed project 'AgentPy' to target 'default'

$ ARN=$(aws cloudformation describe-stacks --stack-name AgentCore-AgentPy-default --region us-east-1 \
  --query "Stacks[0].Outputs[?contains(OutputKey,'RuntimeArn')].OutputValue" --output text)

$ echo $ARN
arn:aws:bedrock-agentcore:us-east-1:***:runtime/AgentPy_agent_python-fETN3O4TLD

$ aws bedrock-agentcore invoke-agent-runtime --region us-east-1 --cli-binary-format raw-in-base64-out \
  --agent-runtime-arn "$ARN" --payload '{"prompt":"anything"}' \
  --content-type application/json --accept application/json out.json
{
    "runtimeSessionId": "247af780-4c43-4b21-b881-2b7acd244988",
    "contentType": "application/json",
    "statusCode": 200
}

$ cat out.json | jq
{
  "message": "Hello, world!"
}

@github-actions github-actions Bot added the size/l PR size: L label Sep 2, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 2, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentCore Harness Review

Verdict: Changes requested

Nice, well-scoped rename. Test snapshots and shortcut mappings all line up with the new template layout, and merging hello-world-python-container into the agent-python template + a --build Container filter reads cleanly (the CodeZip snapshot at src/core/project/__snapshots__/manager.test.ts.snap confirms Dockerfile/.dockerignore are filtered out of the non-container flow).

One thing to fix before merge:

Stale template name in a user-facing error

src/core/project/templates/runtime.ts:201 still references the old template name in the InputValidationError message thrown by the strands/TypeScript/HTTP resolver:

"the strands-ts template does not support short-term-only memory; ..."

That template is now agent-typescript-strands — the sibling throw two lines above (line 193) was already updated. Please update this message to say agent-typescript-strands for consistency (users following the error text won't recognize strands-ts anymore since it's no longer in RUNTIME_TEMPLATE_SHORTCUTS).

Not blocking, just a heads-up

The template shortcut names in src/handlers/project/shortcuts.ts are user-facing surface area (they're the values of --template). Renaming them all in one PR breaks anyone with a script pinned to hello-world-python / strands-python / strands-ts / py-mcp / strands-py-a2a. If you want to be gentle you could keep the old names as aliases for a release; if that's already been decided as an acceptable break, no action needed.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 2, 2026
@codecov-commenter

codecov-commenter commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.14%. Comparing base (17d29e2) to head (b5d6e88).

Additional details and impacted files
@@             Coverage Diff              @@
##           refactor    #2170      +/-   ##
============================================
- Coverage     97.14%   97.14%   -0.01%     
============================================
  Files           535      535              
  Lines         36837    36827      -10     
============================================
- Hits          35785    35775      -10     
  Misses         1052     1052              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 2, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026
@Hweinstock

Copy link
Copy Markdown
Contributor Author

addressed the harness reviewer by updating the error message.

@Hweinstock
Hweinstock marked this pull request as ready for review September 2, 2026 20:19
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 2, 2026
AlexanderRichey
AlexanderRichey previously approved these changes Sep 2, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026
@Hweinstock
Hweinstock force-pushed the feat/rename-templates branch from b5d6e88 to 1425fec Compare September 2, 2026 22:10
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 2, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 2, 2026
@Hweinstock
Hweinstock merged commit d403f5d into aws:refactor Sep 2, 2026
18 of 21 checks passed
@Hweinstock
Hweinstock deleted the feat/rename-templates branch September 3, 2026 17:10
This was referenced Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants