---
name: bijection-experiments
description: "Evaluate and integrate the Experiments component with Bijection."
---

# Experiments

Deterministic A/B experimentation — sticky variant assignment and deduped exposure tracking, as a Bijection component

- Package: @bijectionhq/experiments
- Category: Database & Backend
- Status: Included
- License: (MIT AND Apache-2.0)
- Bijection source (repository access required): https://github.com/bijectionhq/experiments/tree/f9e797855da70dbc3572377a23fe1ac794fb0a32
- Upstream: https://github.com/vllnt/convex-experiments/tree/5cba3038154ba9989ccb70ea3ca560fb85263808
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/experiments

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/experiments.git
cd experiments
git checkout f9e797855da70dbc3572377a23fe1ac794fb0a32
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This source is included in Bijection's workspace. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @vllnt/convex-experiments. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


> Agents: read this skill fully before writing code that uses A/B Experiments. Follow the installation and configuration steps exactly.

# A/B Experiments

## Instructions

@vllnt/convex-experiments assigns subjects to weighted variants and records which variants they encounter. It supplies the assignment and exposure layer of an A/B test while your application measures outcomes.

Define weighted variants, start enrollment, and use logExposure to assign and record a subject. peek resolves a variant without writing, and results returns assignment and exposure tallies. Stopping an experiment preserves its recorded data. Scopes separate experiments across surfaces or tenants.

The host authenticates subjects, authorizes experiment management, and records conversions or quality scores. Exposure tallies are not conversion analysis or statistical significance. Use a new experiment key when changing an established allocation.

Maintained by [bntvllnt](https://bntvllnt.com) at [VLLNT](https://vllnt.com). Find the author on [GitHub](https://github.com/bntvllnt) and [X](https://x.com/bntvllnt).

### Installation

```bash
npm install @vllnt/convex-experiments
```

Current npm version: `@vllnt/convex-experiments@0.1.0`

## Use cases

- Mobile onboarding: keep each person on the same introduction flow across visits.
- SaaS conversion tests: compare checkout copy, upgrade screens, or feature presentations.
- AI applications: assign prompt or model configurations and record outcomes in your own evaluation data.
- Games and learning: compare challenge presentations or tutorial variants with stable enrollment.

## How it works

Define weighted variants, start enrollment, and use logExposure to assign and record a subject. peek resolves a variant without writing, and results returns assignment and exposure tallies. Stopping an experiment preserves its recorded data. Scopes separate experiments across surfaces or tenants.

The host authenticates subjects, authorizes experiment management, and records conversions or quality scores. Exposure tallies are not conversion analysis or statistical significance. Use a new experiment key when changing an established allocation.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by A/B Experiments is not needed

## Resources

- [npm package](https://www.npmjs.com/package/%40vllnt%2Fconvex-experiments)
- [GitHub repository](https://github.com/vllnt/convex-experiments)
- [Live demo](https://vllnt.com/)
- [Convex Components Directory](https://www.convex.dev/components/vllnt/convex-experiments)
- [Convex documentation](https://docs.convex.dev)