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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ cd MyAssistant && agentcore project deploy
agentcore harness invoke --id <id from the deploy outputs> --prompt "hello"

# Scaffold runtime code instead (pass a template or framework flags).
agentcore project create --name MyAgent --template strands-python
agentcore project create --name MyAgent --template agent-python-strands

# Translate an existing Amazon Bedrock Agent version into editable runtime code.
# The selected alias identifies the immutable source version; generated code
Expand Down
31 changes: 31 additions & 0 deletions src/assets/templates/agent-python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# agent-python

A minimal AgentCore Runtime HTTP agent with no agent framework. Its
`@app.entrypoint` returns a fixed `Hello, world!` message for every
invocation — a starting point you own and grow into a real agent.

## What's here

- `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 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
```

Environment variables for local development go in `agentcore/.env.local`
(gitignored).

## Deploy

```bash
agentcore project deploy
agentcore project invoke runtime --payload '{"prompt":"Hello!"}'
```
13 changes: 13 additions & 0 deletions src/assets/templates/agent-python/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from bedrock_agentcore.runtime import BedrockAgentCoreApp

app = BedrockAgentCoreApp()


@app.entrypoint
def invoke(payload, context):
"""Add agent logic here"""
return {"message": "Hello, world!"}


if __name__ == "__main__":
app.run()
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "hello-world"
name = "agent-python"
version = "0.1.0"
description = "AgentCore Runtime application using the Strands SDK"
description = "Minimal AgentCore Runtime HTTP agent"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"aws-opentelemetry-distro ~= 0.18.0",
"bedrock-agentcore ~= 1.9.1",
"botocore[crt] ~= 1.43.0",
"strands-agents ~= 1.15.0",
]

[tool.hatch.build.targets.wheel]
Expand Down
33 changes: 0 additions & 33 deletions src/assets/templates/hello-world-python-container/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions src/assets/templates/hello-world-python-container/main.py

This file was deleted.

19 changes: 0 additions & 19 deletions src/assets/templates/hello-world-python-container/pyproject.toml

This file was deleted.

62 changes: 0 additions & 62 deletions src/assets/templates/hello-world-python/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions src/assets/templates/hello-world-python/main.py

This file was deleted.

80 changes: 40 additions & 40 deletions src/core/project/__snapshots__/manager.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ exports[`FsProjectManager.create scaffolds the expected file tree into a fresh d
"agentcore/cdk/package.json",
"agentcore/cdk/test/cdk.test.ts",
"agentcore/cdk/tsconfig.json",
"app/hello_world/README.md",
"app/hello_world/main.py",
"app/hello_world/pyproject.toml",
"app/agent_python/README.md",
"app/agent_python/main.py",
"app/agent_python/pyproject.toml",
]
`;

Expand All @@ -41,23 +41,23 @@ exports[`FsProjectManager.create snapshots the Strands project manifest and runt
"agentcore/cdk/package.json",
"agentcore/cdk/test/cdk.test.ts",
"agentcore/cdk/tsconfig.json",
"app/strands_agent/.gitignore",
"app/strands_agent/README.md",
"app/strands_agent/main.py",
"app/strands_agent/mcp_client/__init__.py",
"app/strands_agent/mcp_client/client.py",
"app/strands_agent/memory/__init__.py",
"app/strands_agent/memory/session.py",
"app/strands_agent/model/__init__.py",
"app/strands_agent/model/load.py",
"app/strands_agent/model/mantle_compat.py",
"app/strands_agent/pyproject.toml",
"app/strands_agent/skills/fetcher.py",
"app/agent_python_strands/.gitignore",
"app/agent_python_strands/README.md",
"app/agent_python_strands/main.py",
"app/agent_python_strands/mcp_client/__init__.py",
"app/agent_python_strands/mcp_client/client.py",
"app/agent_python_strands/memory/__init__.py",
"app/agent_python_strands/memory/session.py",
"app/agent_python_strands/model/__init__.py",
"app/agent_python_strands/model/load.py",
"app/agent_python_strands/model/mantle_compat.py",
"app/agent_python_strands/pyproject.toml",
"app/agent_python_strands/skills/fetcher.py",
],
"memories": [
{
"eventExpiryDuration": 30,
"name": "strands_agentMemory",
"name": "agent_python_strandsMemory",
"strategies": [
{
"namespaceTemplates": [
Expand Down Expand Up @@ -92,9 +92,9 @@ exports[`FsProjectManager.create snapshots the Strands project manifest and runt
"runtimes": [
{
"build": "CodeZip",
"codeLocation": "app/strands_agent",
"codeLocation": "app/agent_python_strands",
"entrypoint": "main.py",
"name": "strands_agent",
"name": "agent_python_strands",
"protocol": "HTTP",
"runtimeVersion": "PYTHON_3_14",
},
Expand All @@ -120,19 +120,19 @@ exports[`FsProjectManager.create snapshots the Strands TypeScript project manife
"agentcore/cdk/package.json",
"agentcore/cdk/test/cdk.test.ts",
"agentcore/cdk/tsconfig.json",
"app/strands_agent/.gitignore",
"app/strands_agent/README.md",
"app/strands_agent/main.ts",
"app/strands_agent/mcp_client/client.ts",
"app/strands_agent/memory/memory.ts",
"app/strands_agent/model/load.ts",
"app/strands_agent/package.json",
"app/strands_agent/tsconfig.json",
"app/agent_typescript_strands/.gitignore",
"app/agent_typescript_strands/README.md",
"app/agent_typescript_strands/main.ts",
"app/agent_typescript_strands/mcp_client/client.ts",
"app/agent_typescript_strands/memory/memory.ts",
"app/agent_typescript_strands/model/load.ts",
"app/agent_typescript_strands/package.json",
"app/agent_typescript_strands/tsconfig.json",
],
"memories": [
{
"eventExpiryDuration": 30,
"name": "strands_agentMemory",
"name": "agent_typescript_strandsMemory",
"strategies": [
{
"namespaceTemplates": [
Expand Down Expand Up @@ -167,9 +167,9 @@ exports[`FsProjectManager.create snapshots the Strands TypeScript project manife
"runtimes": [
{
"build": "CodeZip",
"codeLocation": "app/strands_agent",
"codeLocation": "app/agent_typescript_strands",
"entrypoint": "main.js",
"name": "strands_agent",
"name": "agent_typescript_strands",
"protocol": "HTTP",
"runtimeVersion": "NODE_22",
},
Expand All @@ -195,19 +195,19 @@ exports[`FsProjectManager.create snapshots the Strands A2A project manifest and
"agentcore/cdk/package.json",
"agentcore/cdk/test/cdk.test.ts",
"agentcore/cdk/tsconfig.json",
"app/a2a_agent/.gitignore",
"app/a2a_agent/README.md",
"app/a2a_agent/main.py",
"app/a2a_agent/memory/__init__.py",
"app/a2a_agent/memory/session.py",
"app/a2a_agent/model/__init__.py",
"app/a2a_agent/model/load.py",
"app/a2a_agent/pyproject.toml",
"app/a2a_python_strands/.gitignore",
"app/a2a_python_strands/README.md",
"app/a2a_python_strands/main.py",
"app/a2a_python_strands/memory/__init__.py",
"app/a2a_python_strands/memory/session.py",
"app/a2a_python_strands/model/__init__.py",
"app/a2a_python_strands/model/load.py",
"app/a2a_python_strands/pyproject.toml",
],
"memories": [
{
"eventExpiryDuration": 30,
"name": "a2a_agentMemory",
"name": "a2a_python_strandsMemory",
"strategies": [
{
"namespaceTemplates": [
Expand Down Expand Up @@ -242,9 +242,9 @@ exports[`FsProjectManager.create snapshots the Strands A2A project manifest and
"runtimes": [
{
"build": "CodeZip",
"codeLocation": "app/a2a_agent",
"codeLocation": "app/a2a_python_strands",
"entrypoint": "main.py",
"name": "a2a_agent",
"name": "a2a_python_strands",
"protocol": "A2A",
"runtimeVersion": "PYTHON_3_14",
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/project/manager.export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function projectWithHarness(
name: "orders",
skipInstall: true,
skipGit: true,
scaffoldRuntimeInput: resolveRuntimeTemplateShortcut("hello-world-python"),
scaffoldRuntimeInput: resolveRuntimeTemplateShortcut("agent-python"),
}),
);
project = await drain(
Expand Down
Loading
Loading