Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

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 exampleDirect link to Usage example

await agent.listScorers();

ParametersDirect link to Parameters

options?:

{ runtimeContext?: RuntimeContext }
= {}
Optional configuration object containing request context.

ReturnsDirect link to 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 exampleDirect link to Extended usage example

await agent.listScorers({
runtimeContext: new RuntimeContext(),
});

Options parametersDirect link to Options parameters

runtimeContext?:

RuntimeContext
= new RuntimeContext()
Request Context for dependency injection and contextual information.

On this page