> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learningcommons.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Install the TypeScript SDK and run your first evaluator.

Install the TypeScript SDK, then run an evaluator from your project.

## Install the SDK

| | Latest release |
| - | - |
| [GitHub](https://github.com/learning-commons-org/evaluators/tree/main/sdks/typescript#installation) ↗ | [![npm version](https://img.shields.io/npm/v/@learning-commons/evaluators)](https://www.npmjs.com/package/@learning-commons/evaluators) |

Install the SDK from the package registry rather than cloning the [evaluators repository](https://github.com/learning-commons-org/evaluators) ↗. The published package is versioned, so you can pick up fixes and new evaluators with a standard package update:

```bash theme={null}
npm install @learning-commons/evaluators@latest

# Then the provider adapter for the evaluators you use. These are optional peer
# dependencies, so npm does not install them for you.
npm install @ai-sdk/google    # Text Complexity evaluators (except Sentence Structure) and Graphics evaluators
npm install @ai-sdk/openai    # Feedback evaluators, Sentence Structure, Vocabulary Complexity
npm install @ai-sdk/anthropic # Math Standards Alignment
```

Vocabulary Complexity uses two models, so it needs both `@ai-sdk/google` and `@ai-sdk/openai`.

> [!NOTE]
>
> Each evaluator calls the provider it was validated against. Without that
> provider's adapter installed you'll see `ConfigurationError: To use the   <provider> provider, install its adapter`.

## Run an evaluator

```typescript theme={null}
import { GradeLevelAppropriatenessEvaluator } from "@learning-commons/evaluators";

const evaluator = new GradeLevelAppropriatenessEvaluator({
  googleApiKey: process.env.GOOGLE_API_KEY,
});

const { result } = await evaluator.evaluate({
  text: "The cat's out of the bag now.",
});

console.log(result.grade_band); // e.g. 2-3
```

## Related topics

> **[Supported evaluators](/evaluators/sdk-api-reference/typescript/supported-evaluators)**
>
> See which evaluators the TypeScript SDK includes, and which API keys they
> need.

> **[Configuration](/evaluators/sdk-api-reference/typescript/configuration)**
>
> Configure evaluators, including API keys and options.

> **[Evaluation](/evaluators/sdk-api-reference/typescript/evaluation)**
>
> Understand evaluator input and output fields.

> **[Error handling](/evaluators/sdk-api-reference/typescript/error-handling)**
>
> Handle configuration, validation, and API errors.
