Skip to content

Commit 592af45

Browse files
authored
fix: correct path references and env var names in agent README templates (#364)
* fix: correct path references and env var names in agent README templates All 6 agent framework README templates referenced nonexistent paths (src/main.py, src/model/load.py, .agentcore) from an older layout. Updated to match the actual generated project structure (main.py, model/load.py, agentcore/). Also replaced hardcoded env var names (AGENTCORE_IDENTITY_OPENAI etc.) with dynamic Handlebars template using identityProviders.[0].envVarName, gated by hasIdentity so Bedrock projects omit the API key row. Added src/assets/**/*.md to .prettierignore since asset markdown files are Handlebars templates that prettier cannot parse correctly. * fix: correct env file reference from agentcore/.env to .env.local The actual env file used is agentcore/.env.local (constant ENV_FILE in src/lib/constants.ts), not agentcore/.env.
1 parent 4da0591 commit 592af45

File tree

8 files changed

+109
-124
lines changed

8 files changed

+109
-124
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
CHANGELOG.md
2+
src/assets/**/*.md

src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -792,25 +792,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/au
792792
793793
# Layout
794794
795-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
796-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
795+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
796+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
797797
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
798798
799-
## src/
799+
## Agent Root
800800
801-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
801+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
802802
file defines a Starlette ASGI app with the AutoGen framework running within.
803803
804-
\`src/model/load.py\` instantiates your chosen model provider.
804+
\`model/load.py\` instantiates your chosen model provider.
805805
806806
## Environment Variables
807807
808-
| Variable | Required | Description |
809-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
810-
| \`AGENTCORE_IDENTITY_OPENAI\` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
811-
| \`AGENTCORE_IDENTITY_ANTHROPIC\` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
812-
| \`AGENTCORE_IDENTITY_GEMINI\` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
813-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
808+
| Variable | Required | Description |
809+
| --- | --- | --- |
810+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
811+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
814812
815813
# Developing locally
816814
@@ -1148,25 +1146,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/cr
11481146
11491147
# Layout
11501148
1151-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
1152-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
1149+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
1150+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
11531151
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
11541152
1155-
## src/
1153+
## Agent Root
11561154
1157-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
1155+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
11581156
file defines a Starlette ASGI app with the CrewAI framework running within.
11591157
1160-
\`src/model/load.py\` instantiates your chosen model provider.
1158+
\`model/load.py\` instantiates your chosen model provider.
11611159
11621160
## Environment Variables
11631161
1164-
| Variable | Required | Description |
1165-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
1166-
| \`AGENTCORE_IDENTITY_OPENAI\` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
1167-
| \`AGENTCORE_IDENTITY_ANTHROPIC\` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
1168-
| \`AGENTCORE_IDENTITY_GEMINI\` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
1169-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
1162+
| Variable | Required | Description |
1163+
| --- | --- | --- |
1164+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
1165+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
11701166
11711167
# Developing locally
11721168
@@ -1474,23 +1470,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/go
14741470
14751471
# Layout
14761472
1477-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
1478-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
1473+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
1474+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
14791475
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
14801476
1481-
## src/
1477+
## Agent Root
14821478
1483-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
1479+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
14841480
file defines a Starlette ASGI app with the Google ADK framework running within.
14851481
1486-
\`src/model/load.py\` instantiates your chosen model provider (Gemini).
1482+
\`model/load.py\` instantiates your chosen model provider (Gemini).
14871483
14881484
## Environment Variables
14891485
1490-
| Variable | Required | Description |
1491-
| --------------------------- | -------- | ---------------------------------------------------------------- |
1492-
| \`AGENTCORE_IDENTITY_GEMINI\` | Yes | Gemini API key (local) or Identity provider name (deployed) |
1493-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
1486+
| Variable | Required | Description |
1487+
| --- | --- | --- |
1488+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
1489+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
14941490
14951491
# Developing locally
14961492
@@ -1755,25 +1751,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/la
17551751
17561752
# Layout
17571753
1758-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
1759-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
1754+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
1755+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
17601756
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
17611757
1762-
## src/
1758+
## Agent Root
17631759
1764-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
1760+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
17651761
file defines a Starlette ASGI app with the LangChain/LangGraph framework running within.
17661762
1767-
\`src/model/load.py\` instantiates your chosen model provider.
1763+
\`model/load.py\` instantiates your chosen model provider.
17681764
17691765
## Environment Variables
17701766
1771-
| Variable | Required | Description |
1772-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
1773-
| \`AGENTCORE_IDENTITY_OPENAI\` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
1774-
| \`AGENTCORE_IDENTITY_ANTHROPIC\` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
1775-
| \`AGENTCORE_IDENTITY_GEMINI\` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
1776-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
1767+
| Variable | Required | Description |
1768+
| --- | --- | --- |
1769+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
1770+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
17771771
17781772
# Developing locally
17791773
@@ -2105,23 +2099,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/op
21052099
21062100
# Layout
21072101
2108-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
2109-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
2102+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
2103+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
21102104
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
21112105
2112-
## src/
2106+
## Agent Root
21132107
2114-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
2108+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
21152109
file defines a Starlette ASGI app with the OpenAI Agents SDK framework running within.
21162110
2117-
\`src/model/load.py\` instantiates your chosen model provider (OpenAI).
2111+
\`model/load.py\` instantiates your chosen model provider (OpenAI).
21182112
21192113
## Environment Variables
21202114
2121-
| Variable | Required | Description |
2122-
| --------------------------- | -------- | ---------------------------------------------------------------- |
2123-
| \`AGENTCORE_IDENTITY_OPENAI\` | Yes | OpenAI API key (local) or Identity provider name (deployed) |
2124-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
2115+
| Variable | Required | Description |
2116+
| --- | --- | --- |
2117+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
2118+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
21252119
21262120
# Developing locally
21272121
@@ -2352,25 +2346,23 @@ exports[`Assets Directory Snapshots > Python framework assets > python/python/st
23522346
23532347
# Layout
23542348
2355-
There is one directory with generated application code, \`src/\` . At the root, there is a \`.gitignore\` file, a
2356-
\`.agentcore\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
2349+
The generated application code lives at the agent root directory. At the root, there is a \`.gitignore\` file, an
2350+
\`agentcore/\` folder which represents the configurations and state associated with this project. Other \`agentcore\`
23572351
commands like \`deploy\`, \`dev\`, and \`invoke\` rely on the configuration stored here.
23582352
2359-
## src/
2353+
## Agent Root
23602354
2361-
The main entrypoint to your app is defined in \`src/main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
2355+
The main entrypoint to your app is defined in \`main.py\`. Using the AgentCore SDK \`@app.entrypoint\` decorator, this
23622356
file defines a Starlette ASGI app with the chosen Agent framework SDK running within.
23632357
2364-
\`src/model/load.py\` instantiates your chosen model provider.
2358+
\`model/load.py\` instantiates your chosen model provider.
23652359
23662360
## Environment Variables
23672361
2368-
| Variable | Required | Description |
2369-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
2370-
| \`AGENTCORE_IDENTITY_OPENAI\` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
2371-
| \`AGENTCORE_IDENTITY_ANTHROPIC\` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
2372-
| \`AGENTCORE_IDENTITY_GEMINI\` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
2373-
| \`LOCAL_DEV\` | No | Set to \`1\` to use \`agentcore/.env\` instead of AgentCore Identity |
2362+
| Variable | Required | Description |
2363+
| --- | --- | --- |
2364+
{{#if hasIdentity}}| \`{{identityProviders.[0].envVarName}}\` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
2365+
{{/if}}| \`LOCAL_DEV\` | No | Set to \`1\` to use \`.env.local\` instead of AgentCore Identity |
23742366
23752367
# Developing locally
23762368

src/assets/python/autogen/base/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@ This is a project generated by the agentcore create CLI tool!
22

33
# Layout
44

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

9-
## src/
9+
## Agent Root
1010

11-
The main entrypoint to your app is defined in `src/main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
11+
The main entrypoint to your app is defined in `main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
1212
file defines a Starlette ASGI app with the AutoGen framework running within.
1313

14-
`src/model/load.py` instantiates your chosen model provider.
14+
`model/load.py` instantiates your chosen model provider.
1515

1616
## Environment Variables
1717

18-
| Variable | Required | Description |
19-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
20-
| `AGENTCORE_IDENTITY_OPENAI` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
21-
| `AGENTCORE_IDENTITY_ANTHROPIC` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
22-
| `AGENTCORE_IDENTITY_GEMINI` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
23-
| `LOCAL_DEV` | No | Set to `1` to use `agentcore/.env` instead of AgentCore Identity |
18+
| Variable | Required | Description |
19+
| --- | --- | --- |
20+
{{#if hasIdentity}}| `{{identityProviders.[0].envVarName}}` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
21+
{{/if}}| `LOCAL_DEV` | No | Set to `1` to use `.env.local` instead of AgentCore Identity |
2422

2523
# Developing locally
2624

src/assets/python/crewai/base/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@ This is a project generated by the agentcore create CLI tool!
22

33
# Layout
44

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

9-
## src/
9+
## Agent Root
1010

11-
The main entrypoint to your app is defined in `src/main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
11+
The main entrypoint to your app is defined in `main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
1212
file defines a Starlette ASGI app with the CrewAI framework running within.
1313

14-
`src/model/load.py` instantiates your chosen model provider.
14+
`model/load.py` instantiates your chosen model provider.
1515

1616
## Environment Variables
1717

18-
| Variable | Required | Description |
19-
| ------------------------------ | --------------- | ---------------------------------------------------------------- |
20-
| `AGENTCORE_IDENTITY_OPENAI` | Yes (OpenAI) | OpenAI API key (local) or Identity provider name (deployed) |
21-
| `AGENTCORE_IDENTITY_ANTHROPIC` | Yes (Anthropic) | Anthropic API key (local) or Identity provider name (deployed) |
22-
| `AGENTCORE_IDENTITY_GEMINI` | Yes (Gemini) | Gemini API key (local) or Identity provider name (deployed) |
23-
| `LOCAL_DEV` | No | Set to `1` to use `agentcore/.env` instead of AgentCore Identity |
18+
| Variable | Required | Description |
19+
| --- | --- | --- |
20+
{{#if hasIdentity}}| `{{identityProviders.[0].envVarName}}` | Yes | {{modelProvider}} API key (local) or Identity provider name (deployed) |
21+
{{/if}}| `LOCAL_DEV` | No | Set to `1` to use `.env.local` instead of AgentCore Identity |
2422

2523
# Developing locally
2624

src/assets/python/googleadk/base/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ This is a project generated by the agentcore create CLI tool!
22

33
# Layout
44

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

9-
## src/
9+
## Agent Root
1010

11-
The main entrypoint to your app is defined in `src/main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
11+
The main entrypoint to your app is defined in `main.py`. Using the AgentCore SDK `@app.entrypoint` decorator, this
1212
file defines a Starlette ASGI app with the Google ADK framework running within.
1313

14-
`src/model/load.py` instantiates your chosen model provider (Gemini).
14+
`model/load.py` instantiates your chosen model provider (Gemini).
1515

1616
## Environment Variables
1717

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

2323
# Developing locally
2424

0 commit comments

Comments
 (0)