background=True to Workflow.arun(). This returns a WorkflowRunOutput object with a run_id for polling the workflow status until completion.
Background execution requires async workflows using
.arun(). Poll for results using workflow.get_run(run_id) and check completion status with .has_completed().Ideal for long-running operations like large-scale data processing, multi-step research, or batch operations that shouldn’t block your main application thread.Example
You can also use WebSocket for background workflows. See the Workflow Websocket example.