JavaScript SDK
Official JavaScript/TypeScript SDK for ATHENA Trust Calibration API.
Installation
npm install @athena-ai/sdkOr with yarn:
yarn add @athena-ai/sdkQuick Start
import { Athena } from '@athena-ai/sdk';
const athena = new Athena({ apiKey: 'ak_xxx' });
// Detect bias in a decision
const result = await athena.bias.detect({
userId: 'user_123',
decision: {
actionTaken: 'approved',
aiRecommended: 'approved'
}
});
if (result.biasDetected) {
console.log('Warning:', result.riskLevel);
}Features
✅ Full TypeScript support with 100% autocomplete coverage
✅ Automatic retries with exponential backoff
✅ Rate limit handling with Retry-After support
✅ Webhook signature verification (HMAC-SHA256)
✅ Express middleware included
✅ Browser and Node.js compatible
✅ Zero runtime dependencies
Configuration
API Reference
Bias Detection
Trust Score
Calibration Analysis
Stats & Analytics
Audit Trail
Compliance Export
Webhooks
Webhook Verification
Verify Signature
Express Middleware
Error Handling
TypeScript Support
All types are exported and fully documented:
Browser Usage
The SDK works in browsers via bundlers:
Support
License
MIT
Last updated