Repository navigation
feat(bedrock): serve a workflow agent runner on Amazon Bedrock AgentCore - #494
Open
pablochacin wants to merge 2 commits into
Open
pablochacin wants to merge 2 commits into
pablochacin wants to merge 2 commits into
Conversation
With AGENT_WORKER set to false or 0, BaseWorkflowRunner.start() creates only the workflow client and does not start the workflow runtime. The process starts runs and reads their state, and a worker in another process of the same App ID executes them. This lets an agent run as a front end that serves requests, with separate workers, for example on Amazon Bedrock AgentCore. Unset, or any other value, keeps the current behaviour. The LangGraph runner's own shutdown() gets the same guard. Strands' DurableAgent does not read the variable; its docstring says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds diagrid.agent.bedrock. BedrockRunner takes the workflow runner of a diagrid agent and serves it on the AgentCore Runtime HTTP contract: POST /invocations and GET /ping on port 8080. Each AgentCore session runs its tasks as the workflow instance named after the session ID. A request while the session's run is unfinished waits for that run instead of starting another, so a request after a restart resumes it. An adapter per runner type says how to start a run and where it stores its task and answer. There are adapters for the Strands, OpenAI Agents, Pydantic AI, ADK, Claude Agent SDK, LangChain, smolagents, CrewAI, LangGraph and Deep Agents runners. HolmesGPT is not supported: its runs can wait for a tool approval, which the AgentCore contract cannot send. Importing the package copies the keys of the AWS Secrets Manager secret named by AGENT_SECRET_ARN into the environment, before the Dapr SDK reads it. The new bedrock extra installs boto3 for that, and is part of all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Pablo Chacin <pablochacin@gmail.com>
msfussell
reviewed
Dec 1, 2026
msfussell
left a comment
There was a problem hiding this comment.
For clarity can we check the name here of the package?First this is for AgentCore rather than Bedrock. Second I would expect AWS in the name to make it clear. Can we check this name.
This branch has not been deployed
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 and why
Adds
diagrid.agent.bedrock, which serves a diagrid agent runner on Amazon Bedrock AgentCore Runtime. It supports the runners of every framework extension except HolmesGPT. How it works and how to configure it is indiagrid/agent/bedrock/README.md. The newbedrockextra installs it.Also adds
AGENT_WORKER. WithAGENT_WORKER=falseor0, a runner starts runs and reads their state, but does not execute them: workers in other processes of the same App ID do. Unset, or any other value, keeps today's behaviour. This lets an agent on AgentCore run as a front end with separate workers.How it was tested
BedrockRunner, its adapters, andAGENT_WORKERon the base and LangGraph runners.uv run pytest tests -m "not integration": 1081 passed, 4 skipped.Checklist
uv run ruff format(no path arguments, soexamples/is covered too)uv run flake8 diagrid tests --ignore=E501,F401,W503,E203,E704uv run mypy --config-file mypy.iniuv run pytest tests -m "not integration"diagrid/carry the license headergit commit -s): theAGENT_WORKERcommit is not🤖 Generated with Claude Code