TypeScript SDK, REST API, sub-100ms edge assignments. Smart traffic allocation that optimizes itself. Not a marketer's drag-and-drop tool.
import { BanditClient } from '@bandit/sdk';
const bandit = new BanditClient({
apiUrl: 'https://api.runbandit.com',
apiKey: 'your-api-key'
});
// Get the best variant for this user
const { treatment } = await bandit.getAssignment('headline-test', 'user-123');
// Track when they convert
bandit.trackEvent({ eventType: 'CONVERSION', value: 29.99 });Pass user context for smarter targeting. The contextual bandit uses device type, location, and custom features to personalize assignments.
import { BanditClient } from '@bandit/sdk';
const bandit = new BanditClient({
apiUrl: 'https://api.runbandit.com',
apiKey: 'your-api-key'
});
// Get assignment with context for smarter targeting
const { treatment, confidence } = await bandit.getAssignment(
'headline-experiment',
'user-123',
{
deviceType: 'mobile',
location: 'US',
referrer: 'google'
}
);
// Show the winning variant
document.getElementById('hero').innerHTML = treatment.config.html;
// Track conversion with value
bandit.trackEvent({
eventType: 'CONVERSION',
value: 29.99,
metadata: { product: 'premium-plan' }
});From SDK call to optimized assignment in under 100ms.
Optimization that adapts to your traffic shape and converges faster than fixed splits.
Traffic shifts toward winning variants automatically — no manual reallocation needed.
The platform balances exploration with exploitation as confidence grows.
Converges efficiently even when you only have a few hundred users per day.
Personalize assignments using device, location, and any custom features you pass.
A simulation of traffic allocation shifting across three variants as performance data comes in. In production, this happens automatically on every request.
Traffic automatically shifts to the best-performing variant. No manual intervention needed.
npm install @bandit/sdknew BanditClient({ apiUrl, apiKey })bandit.getAssignment(expId, userId)bandit.trackEvent({ eventType, value })open dashboard → watch it optimize
Start optimizing in five minutes. Free tier available, no credit card required.