TypeScript SDK, REST API, sub-100ms edge assignments. Real bandit algorithms running on your funnel — wired in with five lines and a reward.
import { BanditClient } from '@runbandit/sdk';
const bandit = new BanditClient({
apiUrl: 'https://runbandit.com',
apiKey: 'your-api-key'
});
// Get the best variant for this user
const assignment = await bandit.getAssignment('headline-test', 'user-123');
// Show the variant content
document.querySelector('#headline').textContent = assignment.config.content;
// Track when they convert
bandit.trackNamedEvent({ name: 'purchase', value: 29.99 });Pass user context to opt into the contextual bandit — device, location, referrer, anything you have. Per-context assignments are a power-user toggle, not the default.
import { BanditClient } from '@runbandit/sdk';
const bandit = new BanditClient({
apiUrl: 'https://runbandit.com',
apiKey: 'your-api-key'
});
// Get assignment with context for smarter targeting
const assignment = await bandit.getAssignment(
'headline-experiment',
'user-123',
{
deviceType: 'mobile',
location: 'US',
referrer: 'google'
}
);
// Show the winning variant
document.getElementById('hero').textContent = assignment.config.content;
// Track conversion with value
bandit.trackNamedEvent({
name: 'purchase',
value: 29.99,
metadata: { product: 'premium-plan' }
});From SDK call to optimized assignment in under 100ms.
Real bandit algorithms running at the edge. Honest math, not branded magic.
Traffic flows toward winning variants automatically — exploration vs exploitation handled by the algorithm.
Thompson Sampling out of the box. Confidence is a real number, not a vibe.
Converges on hundreds of users per day, not the tens of thousands a fixed split needs.
Pass device, location, or custom features and opt into per-context assignments via the contextual bandit.
Discounted or sliding-window memory, so a bandit that has already made up its mind can be talked out of it.
A live simulation of traffic flowing across three variants as rewards come in. In production, this happens on every request — sub-100ms, at the edge.
Traffic automatically shifts to the best-performing variant. No manual intervention needed.
Drop-in is mostly drop-in — but you do have to wire the reward. We're honest about the work.
npm install @runbandit/sdknew BanditClient({ apiUrl, apiKey })bandit.getAssignment(expId, userId)bandit.trackNamedEvent({ name, value })open dashboard → watch it converge
Drop in the SDK, wire your reward, let the math run. Free tier available, no credit card required.