跳到主要内容
非官方简体中文翻译,内容版权归 Mastra 所有,遵循 Apache-2.0 许可。

Mastra.listWorkflows()

The .listWorkflows() method is used to retrieve all workflows that have been configured in the Mastra instance. The method accepts an optional options object.

Usage example
Usage example的直接链接

mastra.listWorkflows()

Parameters
Parameters的直接链接

options:

{ serialized?: boolean }
Optional configuration object. When serialized is true, returns simplified workflow objects with only the name property instead of full workflow instances.

Returns
Returns的直接链接

workflows:

Record<string, Workflow>
A record of all configured workflows, where keys are workflow IDs and values are workflow instances (or simplified objects if serialized is true).
On this page