Introduce AgentCore strands-agent sample - #360
Open
justinschoeff wants to merge 3 commits into
Open
Conversation
justinschoeff
force-pushed
the
schoeff/strands-agent
branch
2 times, most recently
from
September 9, 2026 02:12
d74938a to
cae7e6b
Compare
This sample includes a strands agent loop aimed to run on AWS AgentCore, invoked by Temporal serverless workers. This utilizes the AWS AgentCore CLI and related configuration for serverless workers.
justinschoeff
force-pushed
the
schoeff/strands-agent
branch
from
September 9, 2026 02:26
cae7e6b to
77768ed
Compare
justinschoeff
marked this pull request as ready for review
September 9, 2026 13:10
| must set that version as current, or nothing will be routed to the Worker: | ||
|
|
||
| ```bash | ||
|
|
Comment on lines
133
to
+140
| [tool.ruff] | ||
| target-version = "py310" | ||
| extend-exclude = ["lambda_worker"] | ||
| extend-exclude = ["bedrock_agentcore", "lambda_worker"] | ||
|
|
||
| [tool.mypy] | ||
| ignore_missing_imports = true | ||
| namespace_packages = true | ||
| exclude = ["lambda_worker/"] | ||
| exclude = ["bedrock_agentcore/", "lambda_worker/"] |
Member
There was a problem hiding this comment.
What's behind the decision not to lint/typecheck?
| * [activity_worker](activity_worker) - Use Python activities from a workflow in another language. | ||
| * [batch_sliding_window](batch_sliding_window) - Batch processing with a sliding window of child workflows. | ||
| * [bedrock](bedrock) - Orchestrate a chatbot with Amazon Bedrock. | ||
| * [bedrock_agentcore/strands-agent](bedrock_agentcore/strands-agent) - Run a AWS Strands Agent with Temporal Plugin on AgentCore Worker. |
Member
There was a problem hiding this comment.
Use underscores for directory name consistency?
Suggested change
| * [bedrock_agentcore/strands-agent](bedrock_agentcore/strands-agent) - Run a AWS Strands Agent with Temporal Plugin on AgentCore Worker. | |
| * [bedrock_agentcore/strands_agent](bedrock_agentcore/strands_agent) - Run a AWS Strands Agent with Temporal Plugin on AgentCore Worker. |
Member
There was a problem hiding this comment.
Why do we have a strands-agent subdirectory in the first place? Planning on demoing other agent frameworks with AgentCore?
| @app.entrypoint | ||
| @app.async_task # keeps /ping on "HealthyBusy" until this returns | ||
| async def invoke(payload: dict) -> dict: | ||
| """Poll until idle, then drain. The payload is unused: every call is a new session and new worker.""" |
Member
There was a problem hiding this comment.
Would it make sense to launch the Worker in a background task/thread, register it with add_async_task, and immediately return an acknowledgement?
| interceptors=[tracker], | ||
| deployment_config=WorkerDeploymentConfig( | ||
| version=WorkerDeploymentVersion( | ||
| deployment_name=DEPLOYMENT_NAME, build_id=BUILD_ID |
Member
There was a problem hiding this comment.
Consider passing deployment name and build ID in the payload. Using environment variables as a second source of truth could cause version drift
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was changed
This sample includes a strands agent loop aimed to run on AWS AgentCore,
invoked by Temporal serverless workers. This utilizes the AWS AgentCore
CLI and related configuration for serverless workers.
Why?
AWS AgentCore has a unique interface and is a key service being marketed by AWS. This is in preparation for launch of serverless workers supporting AgentCore.
Checklist
Closes
How was this tested:
Ran the commands in readme, verified it created runtime, started the workflow and watched the worker in AgentCore runtime trigger activities in CW logs and in workflow history.
Any docs updates needed?
@lennessyy is working on docs