-
Notifications
You must be signed in to change notification settings - Fork 68
feat(project): run npm install, uv sync, and git init after scaffolding #1872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+516
−18
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f47e14c
feat(project): run npm install, uv sync, and git init after scaffolding
tejaskash e53c060
docs(template): TODO to swap local-run instructions for agentcore dev…
tejaskash 826787f
test(project): inject a no-op tool check so tests don't depend on hos…
tejaskash da43186
test(io): run exec test scripts from files for win32 compatibility
tejaskash 837a8f1
refactor(io): address review feedback on exec utility and progress ev…
tejaskash a5ff802
fix(middleware): count only cli-passed flags when deciding TUI-on-empty
tejaskash cf22add
test(middleware): cover TUI-on-empty vs headless decision
tejaskash 06154dd
refactor(io): parameterize tool probe args; tighten middleware tests
tejaskash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # hello-world | ||
|
|
||
| A minimal AgentCore Runtime agent built with the | ||
| [Strands Agents SDK](https://strandsagents.com) — our recommended framework | ||
| for building agents on AWS Bedrock AgentCore. | ||
|
|
||
| ## What's here | ||
|
|
||
| - `main.py` — the agent. A `BedrockAgentCoreApp` wraps a Strands `Agent`; | ||
| the `@app.entrypoint` function receives each invocation payload and streams | ||
| the agent's response back to the caller. | ||
| - `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. | ||
|
|
||
| ## Run it locally | ||
|
|
||
| ```bash | ||
| uv run main.py | ||
| ``` | ||
|
|
||
| The app listens on http://localhost:8080. Invoke it: | ||
|
|
||
| ```bash | ||
| curl -X POST http://localhost:8080/invocations \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"prompt": "Hello!"}' | ||
| ``` | ||
|
|
||
| <!-- TODO: replace the uv run + curl instructions with `agentcore dev` and | ||
| `agentcore invoke` once those commands are available. --> | ||
|
|
||
| ## Build your agent | ||
|
|
||
| Start in `main.py`: | ||
|
|
||
| - Change the `system_prompt` to shape your agent's behavior. | ||
| - Give it tools — Strands ships ready-made ones and makes custom tools a | ||
| decorator away: | ||
|
|
||
| ```python | ||
| from strands import Agent, tool | ||
|
|
||
| @tool | ||
| def word_count(text: str) -> int: | ||
| """Count words in text.""" | ||
| return len(text.split()) | ||
|
|
||
| agent = Agent(system_prompt="You are a helpful assistant.", tools=[word_count]) | ||
| ``` | ||
|
|
||
| - Add dependencies with `uv add <package>`. | ||
|
|
||
| See the [Strands documentation](https://strandsagents.com/latest/documentation/docs/) | ||
| for multi-agent patterns, MCP tools, and model configuration. | ||
|
|
||
| ## Deploy | ||
|
|
||
| Deploy from the project root with the AgentCore CLI; the CDK app under | ||
| `agentcore/cdk` provisions the Runtime that hosts this agent. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.