Skip to main content

Mastra.getAgents()

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

Usage example

mastra.getAgents();

Parameters

This method does not accept any parameters.

Returns

agents:

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

On this page