create Step createStep : { < TStepId extends string , TStateSchema extends PublicSchema | undefined , TInputSchema extends PublicSchema , TOutputSchema extends PublicSchema , TResumeSchema extends PublicSchema | undefined = undefined , TSuspendSchema extends PublicSchema | undefined = undefined , TRequestContextSchema extends PublicSchema | undefined = undefined , > ( params : StepParams < TStepId , TStateSchema , TInputSchema , TOutputSchema , TResumeSchema , TSuspendSchema , TRequestContextSchema , > , ) : Step < TStepId , TStateSchema extends PublicSchema ? InferPublicSchema < TStateSchema > : unknown , InferPublicSchema < TInputSchema > , InferPublicSchema < TOutputSchema > , TResumeSchema extends PublicSchema ? InferPublicSchema < TResumeSchema > : unknown , TSuspendSchema extends PublicSchema ? InferPublicSchema < TSuspendSchema > : unknown , DefaultEngineType , TRequestContextSchema extends PublicSchema ? InferPublicSchema < TRequestContextSchema > : unknown , > ; < TStepId extends string > ( agent : | SubAgent < TStepId , any > | Agent < TStepId , any , undefined , unknown , AgentEditorConfig | undefined > , agentOptions ?: Omit < AgentStepOptions < {} > , "structuredOutput" > & {} , ) : Step < TStepId , unknown , {} , {} , unknown , unknown , DefaultEngineType > ; < TStepId extends string , TStepOutput > ( agent : | SubAgent < TStepId , any > | Agent < TStepId , any , undefined , unknown , AgentEditorConfig | undefined > , agentOptions : Omit < AgentStepOptions < TStepOutput > , "structuredOutput" > & {} , ) : Step < TStepId , unknown , {} , TStepOutput , unknown , unknown , DefaultEngineType , > ; < TSchemaIn , TSchemaOut , TSuspend , TResume , TContext extends ToolExecutionContext < TSuspend , TResume , any > , TId extends string , TRequestContext extends unknown = unknown , > ( tool : Tool < TSchemaIn , TSchemaOut , TSuspend , TResume , TContext , TId , TRequestContext , > , toolOptions ?: {} , ) : Step < TId , unknown , TSchemaIn , TSchemaOut , TSuspend , TResume , DefaultEngineType , TRequestContext , > ; < TProcessorId extends string > ( processor : | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} | Processor < TProcessorId , unknown > & {} , ) : Step < ` processor: ${ TProcessorId } ` , unknown , ProcessorStepInputType , ProcessorStepOutputType , unknown , unknown , DefaultEngineType , > ; < TStepId extends string , TStateSchema extends PublicSchema | undefined , TInputSchema extends PublicSchema , TOutputSchema extends PublicSchema , TResumeSchema extends PublicSchema | undefined = undefined , TSuspendSchema extends PublicSchema | undefined = undefined , TRequestContextSchema extends PublicSchema | undefined = undefined , > ( params : StepParams < TStepId , TStateSchema , TInputSchema , TOutputSchema , TResumeSchema , TSuspendSchema , TRequestContextSchema , > , ) : Step < TStepId , TStateSchema extends PublicSchema ? InferPublicSchema < TStateSchema > : unknown , InferPublicSchema < TInputSchema > , InferPublicSchema < TOutputSchema > , TResumeSchema extends PublicSchema ? InferPublicSchema < TResumeSchema > : unknown , TSuspendSchema extends PublicSchema ? InferPublicSchema < TSuspendSchema > : unknown , DefaultEngineType , TRequestContextSchema extends PublicSchema ? InferPublicSchema < TRequestContextSchema > : unknown , > ; }
create Workflow createWorkflow : < TWorkflowId extends string = string , TInputSchema extends PublicSchema < any > = PublicSchema < any > , TOutputSchema extends PublicSchema < any > = PublicSchema < any > , TStateSchema extends PublicSchema < any > | undefined = undefined , TSteps extends Step < string , any , any , any , any , any , DefaultEngineType , unknown > [] = Step < string , unknown , unknown , unknown , unknown , unknown , any , unknown , > [] , TRequestContextSchema extends PublicSchema < any > | undefined = undefined , > ( params : CreateWorkflowParams < TWorkflowId , TStateSchema , TInputSchema , TOutputSchema , TSteps , TRequestContextSchema , > , ) => Workflow < DefaultEngineType , TSteps , TWorkflowId , InferSchemaOutput < TStateSchema > , InferPublicSchema < TInputSchema > , InferPublicSchema < TOutputSchema > , InferPublicSchema < TInputSchema > , InferSchemaOutput < TRequestContextSchema > , >
Type Declaration < TWorkflowId extends string = string , TInputSchema extends PublicSchema < any > = PublicSchema < any > , TOutputSchema extends PublicSchema < any > = PublicSchema < any > , TStateSchema extends PublicSchema < any > | undefined = undefined , TSteps extends Step < string , any , any , any , any , any , DefaultEngineType , unknown > [] = Step < string , unknown , unknown , unknown , unknown , unknown , any , unknown , > [] , TRequestContextSchema extends PublicSchema < any > | undefined = undefined , > ( params : CreateWorkflowParams < TWorkflowId , TStateSchema , TInputSchema , TOutputSchema , TSteps , TRequestContextSchema , > , ) : Workflow < DefaultEngineType , TSteps , TWorkflowId , InferSchemaOutput < TStateSchema > , InferPublicSchema < TInputSchema > , InferPublicSchema < TOutputSchema > , InferPublicSchema < TInputSchema > , InferSchemaOutput < TRequestContextSchema > , > Type Parameters TWorkflowId extends string = string TInputSchema extends PublicSchema < any > = PublicSchema < any > TOutputSchema extends PublicSchema < any > = PublicSchema < any > TStateSchema extends PublicSchema < any > | undefined = undefined TSteps extends Step < string , any , any , any , any , any , DefaultEngineType , unknown > [] = Step < string , unknown , unknown , unknown , unknown , unknown , any , unknown > [] TRequestContextSchema extends PublicSchema < any > | undefined = undefined Parameters params : CreateWorkflowParams < TWorkflowId , TStateSchema , TInputSchema , TOutputSchema , TSteps , TRequestContextSchema , > Returns Workflow < DefaultEngineType , TSteps , TWorkflowId , InferSchemaOutput < TStateSchema > , InferPublicSchema < TInputSchema > , InferPublicSchema < TOutputSchema > , InferPublicSchema < TInputSchema > , InferSchemaOutput < TRequestContextSchema > , >
Creates a step from explicit params (IMPORTANT: FIRST overload for best error messages when using .then in workflows)