UNPKG

@mastra/core

Version:

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

32 lines (20 loc) 1.01 kB
# Agent.listScorers() The `.listScorers()` method retrieves the scoring configuration configured for an agent, resolving it if it's a function. This method provides access to the scoring system used for evaluating agent responses and performance. ## Usage example ```typescript await agent.listScorers() ``` ## Parameters **options** (`{ requestContext?: RequestContext }`): Optional configuration object containing request context. (Default: `{}`) **options.requestContext** (`RequestContext`): Request Context for dependency injection and contextual information. ## Returns **scorers** (`MastraScorers | Promise<MastraScorers>`): The scoring configuration configured for the agent, either as a direct object or a promise that resolves to the scorers. ## Extended usage example ```typescript await agent.listScorers({ requestContext: new RequestContext(), }) ``` ## Related - [Agents overview](https://mastra.ai/docs/agents/overview) - [Request Context](https://mastra.ai/docs/server/request-context)