mirror of
https://github.com/run-llama/workflows-py.git
synced 2026-07-19 08:46:21 -04:00
Closed
opened 2026-02-16 02:16:44 -05:00 by yindo
·
0 comments
No Branch/Tag Specified
main
update-debugger-assets
changeset-release/main
adrianbot/mlflow-workflow-tracing-tests
adrianbot/child-workflows-recursive
adrianbot/cw-stack-3-alive-timeout
adrianbot/cw-stack-1-broker-tree
adrian/child-workflows-slim
adrian/llamactl-organizations-use
adrianbot/mlflow-dbos-e2e
adrian/child-workflows-runtime-compat
adrian/child-workflows-durable
adrian/child-workflows
adrian/child-workflow-prep-refactors
adrian/child-workflows-page
adrian/child-workflows-docs
adrian/fan-out-fan-in-l0
claude/centralize-instance-checks-y7ogi1
adrian/fan-out-async-iterator
adrianbot/statedb-go-binary
adrian/workflow-pressure-diagnostics
chore/fix-lint-594
adrian/llamactl-get-split
claude/simplify-mapreduce-syntax-2CPyP
claude/setup-python-311-env-3BfmE
claude/plan-operator-namespace-jzsmq
vasu/retryable_exceptions
chore/fix-lint-525
logan/error-handling
claude/fix-handler-idle-state-SCxQj
claude/organize-examples-KJFTa
clelia/agentcore-memory
adrian/issue-404
changeset-release/dev
adrian/multi-result
claude/fix-database-locked-tests-d2yrv
quickstart
claude/slack-feedback-notification-PehCn
claude/add-durable-workflow-example-YnY23
claude/add-runtime-decorator-abstractions-UJNsv
adrian/mcp
chore/fix-lint-330
adrian/server-decorator
chore/fix-lint-323
claude/test-precommit-fix-sACsb
adrian/store-interface
claude/resolve-package-conflicts-dV32a
claude/add-dbos-test-suite-v0yfb
adrian/wf-registry
claude/relative-workflow-paths-RGVg8
claude/refactor-workflows-server-package-hqICG
claude/release-idle-workflows-VaCpR
logan/child_workflows
logan/building_blocks
adrian/handler-id-quote-issue-53e3
cursor/LI-4612-implement-dedicated-stop-event-subtypes-for-failures-86ee
adrian/test-ctx
cursor/LI-4463-implement-lazy-file-reference-system-b1b3
copilot/sub-pr-202
cursor/LI-3952-generate-workflow-server-reference-docs-0107
cursor/LI-4105-update-wait-for-event-documentation-3bdd
clelia/golden-examples
cursor/LI-3867-refactor-event-api-for-consistency-and-flexibility-dc87
logan/attach_sequence_number_to_events
logan/handler_metadata
adrian/version-bump
cursor/LI-3715-stop-workflow-handler-and-cancel-tasks-807e
cursor/LI-3710-prevent-workflow-server-crash-on-invalid-reload-3421
cursor/LI-3716-filter-internal-events-in-workflow-consumer-eb17
massi/api-reference
clelia/gather-in-step-decorator
v1.3.1
logan/typed_state_poc
llama-agents-server@v0.6.4
llama-agents-server@0.6.4
llama-agents@0.12.5
llama-agents-control-plane@0.12.3
llama-agents-server@0.6.3
llama-agents-server@v0.6.3
llama-index-workflows@2.22.2
llama-agents-client@0.3.11
llama-agents-server@v0.6.2
llama-agents-client@0.3.10
llama-index-workflows@2.22.1
llama-agents-server@0.6.2
llama-agents-dbos@0.4.1
llama-agents-server@v0.6.1
llama-index-workflows@2.22.0
llama-agents-client@0.3.9
llama-agents-server@0.6.1
llama-index-utils-workflow@0.11.0
llamactl@0.10.3
llama-agents-server@0.6.0
llama-index-workflows@2.21.0
llama-agents-dbos@0.4.0
llama-agents-server@v0.6.0
llama-agents-appserver@0.11.5
llama-agents-agentcore@0.9.4
llama-agents@0.12.4
llama-agents-client@0.3.8
llamactl@0.10.2
llamactl@0.10.1
llamactl@0.10.0
llama-agents-control-plane@0.12.2
llama-agents-appserver@0.11.4
llama-agents@0.12.3
llama-agents-agentcore@0.9.3
llama-agents-core@0.10.2
llama-agents-dbos@0.3.1
llama-agents-dbos@0.3.0
llamactl@0.9.1
llama-agents-server@0.5.0
llama-agents-core@0.10.1
llamactl@0.9.0
llama-agents-control-plane@0.12.1
llama-agents-appserver@0.11.3
llama-agents-agentcore@0.9.2
llama-agents-server@v0.5.0
llama-agents@0.12.2
llama-agents-dbos@0.2.3
llama-agents@0.12.1
llama-agents-appserver@0.11.2
llama-agents-core@0.10.0
llama-agents-agentcore@0.9.1
llamactl@0.8.0
llama-agents-control-plane@0.12.0
llamactl@0.7.3
llama-index-workflows@2.20.0
llama-agents@0.12.0
llama-agents-server@v0.4.7
llama-agents-server@0.4.7
llama-agents-client@0.3.7
llamactl@0.7.2
llama-index-workflows@2.19.1
llama-agents-client@0.3.6
llama-agents-agentcore@0.9.0
llama-agents-appserver@0.11.1
llama-agents-server@v0.4.6
llama-agents-dbos@0.2.2
llama-agents-server@0.4.6
llama-agents@0.11.1
llama-agents-appserver@0.11.0
llama-agents-control-plane@0.11.1
llama-agents-agentcore@0.8.19
llamactl@0.7.1
llama-agents@0.11.0
llama-agents-operator@0.11.1
llama-agents-agentcore@0.8.18
llama-agents-crds@0.7.2
llama-agents@0.10.12
llama-agents-server@v0.4.5
llama-agents-client@0.3.5
llama-agents-server@0.4.5
llama-index-workflows@2.19.0
llamactl@0.7.0
llama-agents-core@0.9.0
llama-agents-appserver@0.10.5
llama-agents-server@0.4.4
llama-agents-control-plane@0.11.0
llama-agents-client@0.3.4
llama-index-workflows@2.18.0
llama-agents@0.10.11
llama-agents-agentcore@0.8.17
llama-agents-server@v0.4.4
llama-agents-agentcore@0.8.16
llama-agents-agentcore@0.8.15
llama-agents-server@0.4.3
llama-agents-server@v0.4.3
llama-agents-core@0.8.5
llamactl@0.6.9
llama-agents-control-plane@0.10.5
llama-agents-appserver@0.10.4
llama-agents-agentcore@0.8.14
llama-agents@0.10.10
llama-agents-server@0.4.2
llama-agents-agentcore@0.8.13
llama-agents-server@v0.4.2
llama-agents-appserver@0.10.3
llamactl@0.6.8
llama-agents@0.10.9
llama-agents-agentcore@0.8.12
llama-agents@0.10.8
llamactl@0.6.7
llama-agents-control-plane@0.10.4
llama-agents-agentcore@0.8.11
llama-agents-server@0.4.1
llama-agents-server@v0.4.1
llama-agents-agentcore@0.8.10
llama-agents-agentcore@0.8.9
llama-agents-agentcore@0.8.8
llama-index-workflows@2.17.3
llama-agents-server@0.4.0
llama-agents-client@0.3.3
llama-index-workflows@2.17.2
llama-agents-server@0.3.3
llama-agents-client@0.3.2
llama-agents-server@v0.3.2
llama-agents-server@0.3.2
llama-agents-dbos@0.2.1
llama-index-workflows@2.17.1
llama-agents-server@0.3.1
llama-agents-server@v0.3.1
llama-index-utils-workflow@0.10.1
llama-agents-client@0.3.1
llama-index-utils-workflow@0.10.0
llama-agents-dbos@0.2.0
llama-agents-client@0.3.0
llama-agents-server@v0.3.0
llama-agents-server@0.3.0
llama-index-workflows@2.17.0
llama-agents-server@v0.2.3
llama-agents-server@0.2.3
llama-agents-client@0.2.3
llama-index-workflows@2.16.1
llama-index-workflows@2.16.0
llama-index-utils-workflow@0.9.5
llama-agents-dbos@0.1.2
llama-agents-server@v0.2.2
llama-agents-client@0.2.2
llama-agents-server@0.2.2
llama-index-workflows@2.15.1
llama-agents-client@0.2.1
llama-agents-server@0.2.1
llama-agents-dbos@0.1.1
llama-index-utils-workflow@0.9.4
llama-agents-server@v0.2.1
llama-index-utils-workflow@0.9.3
llama-index-workflows@2.15.0
llama-agents-dbos@0.1.0
llama-agents-server@v0.2.0
llama-agents-server@0.2.0
llama-agents-client@0.2.0
llama-index-workflows@2.15.0-rc.1
llama-agents-client@0.2.0-rc.1
llama-index-utils-workflow@0.9.3-rc.1
llama-agents-server@0.2.0-rc.3
llama-agents-dbos@0.1.0-rc.1
llama-agents-server@0.1.3
llama-index-utils-workflow@0.9.2
llama-agents-server@v0.1.3
llama-agents-client@0.1.3
llama-index-workflows@2.14.2
llama-agents-server@0.2.0-rc.2
llama-agents-dbos@0.1.0-rc.0
llama-agents-server@0.2.0-rc.1
llama-agents-client@0.2.0-rc.0
llama-index-utils-workflow@0.9.2-rc.0
llama-index-workflows@2.15.0-rc.0
llama-agents-server@0.2.0-rc.0
llama-agents-server@v0.2.0-rc.0
llama-agents-client@0.1.2
llama-index-utils-workflow@0.9.1
llama-index-workflows@2.14.1
llama-agents-server@v0.1.2
llama-agents-server@0.1.2
llama-agents-server@v0.1.1
llama-index-utils-workflow@0.9.0
llama-agents-client@0.1.1
llama-agents-server@0.1.1
llama-index-workflows@2.14.0
llama-index-workflows@2.13.1
llama-index-workflows@v2.13.1
llama-index-workflows@2.13.0
llama-index-utils-workflow@0.8.0
llama-index-workflows@v2.13.0
llama-index-workflows@2.12.2
llama-index-workflows@v2.12.2
llama-index-utils-workflow@0.7.1
llama-index-workflows@v2.12.1
llama-index-workflows@2.12.1
llama-index-workflows@2.12.0
llama-index-utils-workflow@0.7.0
llama-index-workflows@v2.12.0
llama-index-utils-workflow@0.6.0
llama-index-workflows@v2.11.7
llama-index-workflows@2.11.7
llama-index-workflows@v2.11.6
llama-index-workflows@2.11.6
llama-index-utils-workflow@0.5.2
llama-index-workflows@2.11.5
llama-index-workflows@v2.11.5
llama-index-workflows@v2.11.4
llama-index-workflows@2.11.4
llama-index-utils-workflow@0.5.1
llama-index-workflows@2.11.3
llama-index-workflows@v2.11.3
llama-index-workflows@2.11.2
llama-index-utils-workflow@0.5.0
llama-index-workflows@v2.11.2
llama-index-workflows@v2.11.1
v2.11.1
v2.11.0
v2.10.3
v2.10.2
v2.10.1
v2.10.0
v2.9.1
v2.9.0
llama-index-utils-workflow@v0.5.0
v2.8.3
v2.8.2
v2.8.1
v2.8.0
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.0
v2.3.0
v2.2.2
v2.2.1
v2.2.0
v2.1.0
v2.0.1
v2.0.0
v1.3.0
v1.2.0
v1.1.0
v1.0.1
v1.0.0
v0.2.2
v0.2.1
v0.2.0
v0.1.0
No Label
pull-request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: run-llama/workflows-py#147
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/workflows-py/pull/130
Author: @qianl15
Created: 10/8/2025
Status: ❌ Closed
Base:
main← Head:qian/dbos-workflow📝 Commits (10+)
c451999init DBOS52da5f5Merge branch 'run-llama:main' into qian/dbos-workflow55a5cc4Start DBOSWorkflow77eeb15DBOS workflow initial pass done5052a75nitf1087a3Merge branch 'run-llama:main' into qian/dbos-workflowb778f0cdurable send event81ebff5clean up test3200617Simplify3e8c5f1Wrap time.time() in a step📊 Changes
7 files changed (+1111 additions, -2 deletions)
View changed files
📝
pyproject.toml(+1 -0)➕
src/workflows/dbos/__init__.py(+7 -0)➕
src/workflows/dbos/dbos_context.py(+422 -0)➕
src/workflows/dbos/dbos_workflow.py(+235 -0)➕
tests/dbos/__init__.py(+0 -0)➕
tests/dbos/test_dbos.py(+111 -0)📝
uv.lock(+335 -2)📄 Description
Summary
This PR integrates DBOS with workflow and context to provide out-of-the-box durable execution and checkpointing.
Changes
DBOSWorkflow:
Workflowto start a DBOS durable workflow for each step worker, and use durable notification for sending theStartEvent._donestep finishes, it broadcasts a message to all running DBOS workflows to signal the end. This cleanly terminates running tasks.DBOSContext:
Contextto provide durable execution, making each step worker's main loop a DBOS workflow (including the cancel worker). It also usesDBOS.recvto durably receive incoming events for each step.DBOSContextneeds to have a unique name and be created in a static function. This is important for DBOS to correctly find the definition of workflows for failure recovery.DBOS.step.ctx.send_eventandctx.send_event_asyncuse DBOS durable send instead of in-memory queues for communicating events between steps.DBOS.sleepand_durable_timeto make sure determinism within a step workflow.Example
Here is a simple example to use DBOS.
Discussion
_donestep behavior -- it currently throws aWorkflowDoneexception. Though it works, its workflow generates error stack trace that can be annoying. An alternative way is to use durable events to signal the end of the workflow.Workflow.runshould also become a DBOS workflow, and each step is a sub-workflow. However, currently,_run_workflowusesasyncio.waitwhich is not deterministic (a fundamental requirement for durable workflows). This may require changes to how it waits for the workflow to finish.DBOS.stepfunctions.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.