Skip to content

Python support: a Temporal Python SDK counterpart of @workflowbuilder/temporal #268

Open

Description

@LeoIannacone

Problem

@workflowbuilder/temporal runs Workflow Builder diagrams on Temporal, but only from a Node.js worker. Many Temporal users write their workers in Python, especially teams with AI and machine-learning stacks, and teams using agent frameworks whose Temporal integrations are Python-first.

For those teams, adopting Workflow Builder today means running a Node.js worker beside their Python stack: one more runtime to build, deploy, monitor and upgrade. Temporal also does not allow one workflow to mix SDK languages, so the interpreter workflow has to stay in TypeScript. At best, Python code can run as activities on a separate task queue, and workflow-level features such as timers, child workflows and continue-as-new stay out of reach from Python.

Request

In order of preference:

1. A Python package (for example on PyPI) that implements the same runner for the Temporal Python SDK. Ideally it would match the TypeScript plugin on:

  • the interpreter workflow (runWorkflow) with one executeNode activity per node
  • the executor registry and the per-node-type activity profiles
  • the store port (emitExecutionEvent, updateExecutionStatus)
  • the resolveNode Workflow Update, with the same validation and the same error types (verdict_malformed, verdict_for_unknown_node, node_not_waiting, verdict_already_delivered)
  • the same run event names and sequence numbering
  • the same replay guarantees: histories recorded by earlier versions keep replaying, and behaviour changes sit behind patched()

2. Failing that, or as a first step: a language-neutral specification of the contracts, ideally published as JSON Schema, covering:

  • the diagram definition and the workflow input
  • the executeNode input and result (both the completed and the waiting case)
  • the resolveNode payload and its error types
  • the run event types and their payloads
  • the execution status transitions

This would come with a conformance test suite, for example golden event sequences or recorded workflow histories, that a third-party Python runner could run. That would let a community implementation show that the editor, the run view and the reference backend keep working against it. It would also help keep these contracts stable as the plugin moves towards 1.0.

Related

#141 (per-node-type task queue routing through a taskQueue field on the activity profile) would be a useful interim step, because it would let Python workers handle individual node types as activities. It does not cover the workflow side, which is what this issue is about.

Context

We are evaluating Workflow Builder for a backend whose Temporal workers are written in Python. We would be happy to test an early version, or review a draft of the specification, and give feedback.

Activity

  1. piotrblaszczyk commented on Nov 24, 2026

    @piotrblaszczyk
    Contributor

    Hi @LeoIannacone!

    Thanks for the detailed write-up, and sorry for the slow reply. Conference season caught up with us.

    We are looking at several ways to approach this. Support for Python workers is high on our roadmap, and other options are still on the table.

    We are settling the scope right now, so your perspective would help a lot. Would you be up for a 30-minute call about what you need in practice? If so, drop me a line at [email protected] and we will find a slot.

  2. khoap1220-hue commented on Nov 26, 2026

    @khoap1220-hue

    Built a clean-room MIT Python 3.10+ counterpart (workflowbuilder_temporal) for the temporalio SDK matching @workflowbuilder/temporal's wire protocol (runWorkflow on workflow-execution, executeNode / emitEvent / updateStatus activities, and execution-<id> workflow IDs) plus 8 JSON Schema Draft 2020-12 contract definitions: https://github.com/khoap1220-hue/workflowbuilder-temporal-py. The wave interpreter (run_graph) reproduces @workflow-builder/execution-core's topological concurrency, fail / continue / errorRoute policies, BFS dead-branch node_skipped reasons (branch_not_taken, error_route_not_taken, upstream_skipped), copy-on-write secret redaction, and ECMAScript-identical visibleNodeIds ordering. Human-in-the-loop pauses register @workflow.update(name="resolveNode") with a pre-acceptance validator raising non-retryable ApplicationError codes (verdict_malformed, verdict_for_unknown_node, node_not_waiting, verdict_already_delivered), paired with TemporalWorkflowEngine.resolve_node() mapping run_not_found and delivery_timeout. Replay and worker guards cover workflow.patched("wb-running-status-at-start"), wbNodeError: 1 ApplicationError envelopes for PermanentNodeExecutionError / TransientNodeExecutionError, per-node-type ActivityProfile validation with 300-byte UTF-8 summary clamping, resolve_template(), and snapshot_to_definition() / evaluate_decision_branches(). All 20 pytest checks pass (including live temporalio.testing.WorkflowEnvironment.start_time_skipping() runs against examples/workflow-builder-temporal/shared/diagram.json) — let me know which conformance history scenarios or monorepo boundaries you'd like aligned next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions