# Function createProductionWorkflowEngine

Workflows exports - Workflow engine with parallel execution Split from index.ts for file size compliance (Issue #285)

- createProductionWorkflowEngine(
  config?: WorkflowEngineFactoryConfig,
  ): Promise<IWorkflowEngine>

  Creates and initializes a WorkflowEngine with auto-detected model adapter.

  This is the most complete factory function - it:

  1. Loads built-in templates
  2. Auto-detects the best available model adapter (CLI or API)
  3. Creates the workflow engine with real step execution

  Falls back gracefully to mock execution if no adapter is available.

  #### Parameters

  - `Optional` config: WorkflowEngineFactoryConfig

    Engine configuration

  #### Returns Promise<IWorkflowEngine>

  Promise resolving to WorkflowEngine instance

  #### Example

      // Create production-ready workflow engine
      const engine = await createProductionWorkflowEngine();

      // Execute a workflow with real agent experts
      const result = await engine.execute(workflow, inputs);

  - Defined in packages/nexus-agents/src/workflows/workflow-engine-factory.ts:687