Repository navigation
feat(agent-core): run a runner as a client only with AGENT_WORKER=false - #493
Closed
pablochacin wants to merge 1 commit into
Closed
pablochacin wants to merge 1 commit into
pablochacin wants to merge 1 commit 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>
6 of 7 tasks
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
AGENT_WORKER, which lets an agent process start runs without executing them.With
AGENT_WORKER=falseor0,BaseWorkflowRunner.start()creates only the workflow client and does not start the workflow runtime. The process starts runs and reads their state. A worker in another process of the same App ID executes them. Unset, or any other value, keeps today's behaviour.This lets one agent run as a front end that serves requests, with separate workers that execute runs. The Amazon Bedrock AgentCore quickstart needs this, and currently vendors this change.
shutdown(), so it gets the same guard.DurableAgentdoes not read the variable. It has no front end, and its docstring now points toDaprWorkflowAgentRunnerfor a split deployment.The variable is documented in the
BaseWorkflowRunnerclass docstring.How it was tested
AGENT_WORKERvalues are read and howstart()andshutdown()behave, for the base runner and for the LangGraph runner.uv run pytest tests -m "not integration": 1045 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 header (no new files)git commit -s)🤖 Generated with Claude Code