Skip to content
Closed
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
3 changes: 3 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"zod": "^4.4.3"
},
"overrides": {
"@opentelemetry/core": "^2.10.0"
"@opentelemetry/core": "^2.10.0",
"@aws-cdk/toolkit-lib": {
"yaml": "^1"
}
}
}
10 changes: 7 additions & 3 deletions src/assets/cdk/bin/cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ async function main() {
const connectorParametersByFile = resolveConnectorParametersByFile(specAny, projectRoot);
const harnessConfigs = resolveHarnessConfigs(specAny, projectRoot);

// Read deployed state for credential ARNs (populated by pre-deploy identity setup)
// Read deployed state for credential ARNs (populated by pre-deploy identity setup).
// Under agentcore/.cli/ to match the released CLI's location.
let deployedState: Record<string, unknown> | undefined;
try {
deployedState = JSON.parse(fs.readFileSync(path.join(configRoot, '.cli', 'deployed-state.json'), 'utf8'));
} catch {
// Deployed state may not exist on first deploy
} catch (err) {
// A missing file is the normal first-deploy case. A malformed one is not:
// surface it rather than silently synthesizing without the credential ARNs
// it holds (which would drop them from the stack).
if ((err as NodeJS.ErrnoException).code !== 'ENOENT') throw err;
}

const app = new App();
Expand Down
6 changes: 4 additions & 2 deletions src/assets/templates/shared/gitignore.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ __pycache__/
# Node
node_modules/

# AgentCore CLI state
agentcore/.cli/
# AgentCore CLI state (ignore local scratch like traces/logs, but commit the
# deployed-state binding so a target's stack + credential ARNs are shared)
agentcore/.cli/*
!agentcore/.cli/deployed-state.json

# CDK
agentcore/cdk/cdk.out/
40 changes: 40 additions & 0 deletions src/assets/templates/strands-http-python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a project generated by the AgentCore CLI!

# Layout

The generated application code lives at the agent root directory. At the root, there is a `.gitignore` file, an
`agentcore/` folder which represents the configurations and state associated with this project. Other `agentcore`
commands like `deploy`, `dev`, and `invoke` rely on the configuration stored here.

## Agent Root

The main entrypoint to your app is defined in `main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
file defines a Starlette ASGI app with the chosen Agent framework SDK running within.

`model/load.py` instantiates your chosen model provider.

## Input Validation

Validate invocation input before forwarding it to Strands. Keep plain prompts typed as strings. If the app accepts a
caller-supplied message history, retain `strip_trailing_tool_use()`, which normalizes the history tail before
invoking the agent.

## Environment Variables

| Variable | Required | Description |
| --- | --- | --- |
{{#if hasIdentity}}| `{{identityProviders.[0].envVarName}}` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
{{/if}}| `LOCAL_DEV` | No | Set to `1` to use `.env.local` instead of AgentCore Identity |

# Developing locally

If installation was successful, a virtual environment is already created with dependencies installed.

Activate the environment with `source .venv/bin/activate` on macOS/Linux, `.venv\Scripts\activate.bat` in Windows
Command Prompt, or `.\.venv\Scripts\activate.ps1` in Windows PowerShell.

`agentcore project dev` will start a local server on 0.0.0.0:8080.

# Deployment

After providing credentials, `agentcore project deploy` will deploy your project into Amazon Bedrock AgentCore.
41 changes: 41 additions & 0 deletions src/assets/templates/strands-http-python/gitignore.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Environment variables
.env

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual environments
.venv/
venv/
ENV/
env/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db
Loading
Loading