---
title: "Reference: Agent.listWorkflows() | Agents"
description: "Documentation for the `Agent.listWorkflows()` method in Mastra agents, which retrieves the workflows that the agent can execute."
packages:
  - "@mastra/core"
---

# Agent.listWorkflows()

The `.listWorkflows()` method retrieves the workflows configured for an agent, resolving them if they're a function. These workflows enable the agent to execute complex, multi-step processes with defined execution paths.

## Usage example

```typescript
await agent.listWorkflows();
```

## Parameters

<PropertiesTable
  content={[
    {
      name: "options",
      type: "{ requestContext?: RequestContext }",
      isOptional: true,
      defaultValue: "{}",
      description: "Optional configuration object containing request context.",
    },
  ]}
/>

## Returns

<PropertiesTable
  content={[
    {
      name: "workflows",
      type: "Promise<Record<string, Workflow>>",
      description:
        "A promise that resolves to a record of workflow names to their corresponding Workflow instances.",
    },
  ]}
/>

## Extended usage example

```typescript
await agent.listWorkflows({
  requestContext: new RequestContext(),
});
```

### Options parameters

<PropertiesTable
  content={[
    {
      name: "requestContext",
      type: "RequestContext",
      isOptional: true,
      defaultValue: "new RequestContext()",
      description:
        "Request Context for dependency injection and contextual information.",
    },
  ]}
/>

## Related

- [Agents overview](/docs/v1/agents/overview)
- [Workflows overview](/docs/v1/workflows/overview)
