Back to Mastra

Reference: Agent.getDescription() | Agents

docs/src/content/en/reference/agents/getDescription.mdx

2025-12-18572 B
Original Source

Agent.getDescription()

The .getDescription() method retrieves the description configured for an agent. This method returns a string description that describes the agent's purpose and capabilities.

Usage example

typescript
agent.getDescription()

Parameters

This method takes no parameters.

Returns

<PropertiesTable content={[ { name: 'description', type: 'string', description: 'The description of the agent, or an empty string if no description was configured.', }, ]} />