Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

Workflow.createRunAsync()

The .createRunAsync() method creates a new workflow run instance, allowing you to execute the workflow with specific input data. This is the current API that returns a Run instance.

note

For the legacy createRun() method that returns an object with methods, see the Legacy Workflows section.

Usage exampleDirect link to Usage example

await workflow.createRunAsync();

ParametersDirect link to Parameters

runId?:

string
Optional custom identifier for the workflow run

ReturnsDirect link to Returns

run:

Run
A new workflow run instance that can be used to execute the workflow

Extended usage exampleDirect link to Extended usage example

const workflow = mastra.getWorkflow("workflow");

const run = await workflow.createRunAsync();

const result = await run.start({
inputData: {
value: 10,
},
});

On this page