@mastra/core
Version:
23 lines (13 loc) • 832 B
Markdown
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
# 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
```typescript
mastra.listWorkflows()
```
## 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
**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).
## Related
- [Workflows overview](https://mastra.ai/docs/workflows/overview)