module documentation

Workflow-side wrappers for executing LangGraph nodes inline in a workflow.

Function wrap_workflow Wrap a function as a workflow-side LangGraph node.
def wrap_workflow(func: Callable[..., Any], *, streaming_topic: str | None = None, summary_fn: Callable[[tuple[Any, ...], dict[str, Any]], str | None] | None = None) -> Callable[..., Awaitable[Any]]: (source) ΒΆ

Wrap a function as a workflow-side LangGraph node.

Mirrors wrap_activity: the outer wrapper resolves a stream writer and passes it to an inner run that invokes the user function with the writer installed. Workflow-side nodes publish synchronously to the in-workflow WorkflowStream (no signal round-trip); activity-side nodes go through WorkflowStreamClient.

Workflow-side nodes have no activity to carry a summary, so a summary_fn result updates the workflow's current details via temporalio.workflow.set_current_details (last-writer-wins); an empty result clears it.