Skip to main content
The @know-your-ai/evaluate SDK gives you full programmatic control over evaluations. Use it to automate security testing in CI/CD pipelines, build custom evaluation workflows, or integrate evaluation results into your own dashboards.

Installation

Quick start

Run an existing evaluation in 3 lines:

Client setup

The DSN contains your API keys, endpoint, and product ID. Find it in the Know Your AI dashboard under Product Settings, API Keys.

From environment

Manual configuration (advanced)

Full workflow: create, configure, and run

Step 1 — Create a dataset

Step 2 — Create an evaluation

You can link multiple datasets to a single evaluation:

Step 4 — Run the evaluation

API reference

Datasets API

Create dataset with items

List datasets with pagination

Evaluations API

Create evaluation with full options

Evaluation Runs API

Low-level run control

If you need more control than client.runEvaluation() provides:

CI/CD integration

GitHub Actions

Evaluation script for CI

Advanced patterns

Run multiple evaluations in parallel

Custom progress reporting

Batch dataset creation from files

Compare two model versions

Error handling

All SDK methods return an ApiResponse object:
Always check result.success before accessing result.data: