TypeScript SDK¶
The TypeScript SDK (aitestagent) provides the same powerful AI testing capabilities as the Python package, optimized for Node.js and TypeScript projects.
Installation¶
Quick Start¶
import { test, accuracy, criteria } from 'aitestagent';
// Simple test with custom criteria
const result = await test("Hello, world!", {
criteria: "is a friendly greeting"
});
console.log(result.passed); // true/false
console.log(result.score); // 1-10
console.log(result.reasoning);
Features¶
- Simple API - Just
test(),accuracy(), andcriteria() - LLM-as-Judge - Powered by PraisonAI's Judge implementation
- CLI Tool - Test from command line with
aitestagent - TypeScript First - Full type definitions included
- Caching - Built-in result caching for faster iteration
Next Steps¶
- API Reference - Complete API documentation
- CLI Usage - Command line interface
- Examples - Code examples and patterns