Create a new experiment to test different variants
create
method allows you to create a new experiment with multiple variants to test. This is the foundation for running A/B tests and comparing different approaches.
Parameter | Type | Required | Description |
---|---|---|---|
name | str | Yes | The name of the experiment |
description | str | No | Description of the experiment |
variants | List[Dict] | Yes | List of variants to test |
metrics | List[str] | No | Metrics to track (default: standard metrics) |
traffic_split | Dict[str, float] | No | Traffic distribution between variants |
metadata | Dict[str, Any] | No | Custom metadata for the experiment |
id
: Unique experiment identifiername
: Experiment namedescription
: Optional descriptionvariants
: List of variants being testedmetrics
: Metrics being trackedtraffic_split
: Traffic distributionstatus
: Current status (draft)metadata
: Custom metadatacreated_at
: Creation timestampcreated_by
: User who created the experiment