A/B Testing with GrowthBook
Feature flags and experimentation using GrowthBook.
Overview
Clew Code integrates with GrowthBook for feature flag management and A/B testing. This allows gradual rollout of new features, targeted experiments, and configuration-driven behavior changes.
Architecture
GrowthBook is integrated via the @growthbook/growthbook SDK. Feature flags are evaluated at runtime and can control:
- UI component visibility
- Behavioral variations (e.g., different prompt templates)
- Provider selection defaults
- Beta feature access
- Experimental tool availability
Configuration
Set the GrowthBook API key in your environment:
export GROWTHBOOK_API_KEY=your-api-key
Or configure in .clew/settings.json:
{
"growthbook": {
"apiKey": "your-api-key",
"attributes": {
"environment": "development"
}
}
}
Current Feature Flags
| Flag | Purpose |
|---|---|
BRIDGE_MODE | Enable/disable Bridge v1 (CCR) functionality |
tengu_ccr_bridge | GrowthBook-gated CCR bridge access |