Standard implementation of WorkflowEngine

Executes workflows by orchestrating agents, tools, and other steps.

Features:

  • Sequential and parallel execution
  • Conditional branching
  • Loop support
  • Retry with exponential backoff
  • Pause/resume/cancel
  • Step execution history
const engine = new StandardWorkflowEngine({
agentOrchestrator,
toolRegistry,
ragPipelines: new Map([['default', ragPipeline]])
});

const result = await engine.execute(workflow, { input: 'data' });
if (result.isSuccess) {
console.log('Workflow completed:', result.value.variables);
}

Implements

  • WorkflowEngine

Constructors

Methods

  • Execute a workflow

    Parameters

    • workflow: Workflow
    • input: Record<string, unknown>

    Returns Promise<Result<WorkflowExecution, Error>>

  • Resume a paused workflow

    Parameters

    • executionId: string
    • Optionalinput: Record<string, unknown>

    Returns Promise<Result<WorkflowExecution, Error>>

  • Pause a running workflow

    Parameters

    • executionId: string

    Returns Promise<Result<void, Error>>

  • Cancel a running workflow

    Parameters

    • executionId: string

    Returns Promise<Result<void, Error>>

  • Get execution status

    Parameters

    • executionId: string

    Returns Promise<undefined | WorkflowExecution>

  • List all executions for a workflow

    Parameters

    • workflowId: string

    Returns Promise<WorkflowExecution[]>