Skip to main content
A winning variation lives in Kameleoon as experiment code, so your team has to rewrite it in your codebase before the change can ship. Doing that by hand means fetching the code, rebuilding it as native code, and wrapping it in a flag so you can release it to part of your traffic first. Your AI assistant runs these steps through the Kameleoon MCP server, starting with transpose_winning_experiment, which checks the winner and returns the code in one call. The assistant needs access to your repository to follow its conventions, and it doesn’t stop or delete the experiment. The result is a flag with a delivery rule, and the rule goes live in the target environment once you confirm the enable preview.

How the assistant ships a winner

transpose_winning_experiment fetches the code of the winning variation, or of a variation you select manually, and applies the winner-decision logic. It then returns instructions for re-implementing the variation and gating it behind a new feature flag. The assistant runs these four steps:
  1. Run transpose_winning_experiment to get the winning variation’s code and implementation instructions.
  2. Convert the code into native, production-ready code, such as React components, that fits the existing codebase.
  3. Create a feature flag in Kameleoon and gate the new implementation behind it.
  4. Enable the flag after you confirm the preview, then validate the feature in production.

Before you begin

  • Setup: Connect Kameleoon to your AI assistant. For a chat assistant such as Claude or ChatGPT, see Connect Kameleoon to Claude and ChatGPT. For a coding agent such as Claude Code, Codex, or Cursor, see Set up MCP clients.
  • Experiment: a finished experiment with a winning variation, or a variation you select manually.
  • Codebase: access to the repository that the assistant should change, so it can follow the existing conventions.

Automate the rollout

The transpose tool covers the winner check and the code retrieval in one call. Converting the code and rolling it out still benefit from an explicit system prompt, because the prompt sets the rules the assistant follows. The prompt below targets React apps. It tells the assistant to call the tool, convert the code, gate it behind a new feature flag, and roll it out, all through the MCP tools.

Ship the winner with a prompt

Paste the prompt below into your AI assistant to have it convert a winning React variation, gate it behind a feature flag, and roll it out. Enter the ID of your experiment in the Experiment ID field, and the ID of the variation to convert in the Fallback variation ID field if you use manual mode. When the workflow finishes, the flag exists with a delivery rule that starts at the release time you set. The flag is enabled in the target environment only after you confirm the enable preview, and the assistant reports the final configuration from feature_flag_get. Tool parameters are in the Experiment tools and Feature flag tools references.