Skip to main content

Mastra.listAgents()

The .listAgents() method is used to retrieve all agents that have been configured in the Mastra instance.

Usage example
Direct link to Usage example

mastra.listAgents()

Parameters
Direct link to Parameters

This method doesn't accept any parameters.

Returns
Direct link to Returns

agents:

TAgents
A record of all configured agents, where keys are agent names and values are agent instances.
On this page