The agent and Kameleoon
Highwind’s agent knows Kameleoon from both sides: it writes your app’s code (tag, consent, goals, feature flags) and, when your account is connected, it reads and changes your Kameleoon account (experiments, variations, goals, results). Talk to it like a colleague who has access to both.
Before you start
Section titled “Before you start”- For it to work in your app: add the Kameleoon app connector (site code).
- For it to work in your account: connect the Kameleoon source (API credentials), and turn on Allow the agent to make changes if you want it to create or change things.
Everything is explained in Setup. In your message, mention @Kameleoon so the agent knows your
request is about Kameleoon. The panel’s Ask the agent button does it for you, with the experiment and variation
ids.
What you can ask
Section titled “What you can ask”Explore your account
Section titled “Explore your account”@Kameleoon List the running experiments on my site, with their tested page and their goals.@Kameleoon Which goals exist on my site? Which ones aren't linked to any experiment?Create an experiment and its variations
Section titled “Create an experiment and its variations”@Kameleoon Create an experiment "Hero: benefit-driven headline" on the published site's home page,with two headline variations: "Launch your site in 5 minutes" and "Your site, without writing code".The agent creates the experiment as a draft, with its variations. It doesn’t start it until you ask.
Write a variation’s code
Section titled “Write a variation’s code”@Kameleoon In the variation "Variation 1" (ID 456) of the experiment "Hero" (ID 123),make the "Sign up" button green and add a "New" badge next to the headline.The agent relies on your app’s code to target the right elements, then saves the JavaScript and CSS in the variation.
It can also first add stable data-… attributes in the app so the variation is reliable (remember to publish then).
Read and interpret results
Section titled “Read and interpret results”@Kameleoon Analyze the results of experiment 123. Is there a winning variation on the main goal?The agent has Kameleoon compute the results (conversion, improvement, reliability per variation) and explains them to you. A variation wins when its reliability is above 95% with a positive improvement.
@Kameleoon Bring the winning variation of experiment 123 directly into the site.Run the test
Section titled “Run the test”@Kameleoon Start experiment 123.@Kameleoon Pause the experiment "Hero: benefit-driven headline".Track a goal in code
Section titled “Track a goal in code”For a conversion that happens in code (successful sign-up, confirmed payment), the agent adds the call to Kameleoon at the right moment, with your goal’s id:
@Kameleoon When sign-up succeeds, record a conversion on my "Sign-up" goal.With the tag, it uses Kameleoon’s command queue, which works even before the tag has loaded:
window.kameleoonQueue.push(["Kameleoon.API.Goals.processConversion", GOAL_ID]);If your account is connected, the agent finds the goal id itself; otherwise, it asks you for it or leaves a clearly named constant to fill in.
Wire a feature flag with the SDK
Section titled “Wire a feature flag with the SDK”To decide in code which feature to show (progressive rollout, “on” / “off” version), ask for the SDK explicitly:
@Kameleoon Use the Kameleoon SDK: show the new checkout flow only if the "new_checkout" feature flagis on for the visitor.The agent adds Kameleoon’s JavaScript SDK and creates a shared client in src/lib/kameleoon.ts. The app shows a
default version while the SDK initializes or if it fails, so it never breaks. If edits are allowed, it can also create
the feature flag in your account or turn it on for an environment, when you ask.
See how the code works
import { Environment, KameleoonClient } from "@kameleoon/javascript-sdk";
export const kameleoon = new KameleoonClient({ siteCode: SITE_CODE, configuration: { environment: Environment.Production },});export const ready = kameleoon.initialize(); // awaited before reading a flag
const visitorCode = kameleoon.getVisitorCode();const variation = kameleoon.getVariation({ visitorCode, featureKey: "new_checkout" }); // "off", "on" or a variantkameleoon.trackConversion({ visitorCode, goalId: GOAL_ID, revenue: 49 });kameleoon.setLegalConsent(visitorCode, true); // from the cookie banner (false when the visitor declines)Read-only or edits allowed
Section titled “Read-only or edits allowed”| Read-only (default) | Edits allowed | |
|---|---|---|
| Read sites, experiments, variations, feature flags, goals, segments | Yes | Yes |
| Compute and read an experiment’s results | Yes | Yes |
| Create or edit an experiment, a variation, a goal | No | Yes, when you ask |
| Start, pause, stop an experiment | No | Yes, when you ask |
| Create a feature flag, turn it on or off | No | Yes, when you ask |
In read-only mode, if you ask for a change, the agent tells you to first turn on Allow the agent to make changes on the Kameleoon source (Connectors page).
The rules the agent follows
Section titled “The rules the agent follows”- It only changes what you ask for, exactly as you ask. It doesn’t delete, stop, start or turn off anything without an explicit request. In its summary, it says what it changed.
- Discussion mode never touches your account, even with edits allowed: the agent reads, explains or proposes a plan, then describes the change it would make. Switch back to Building mode for it to apply it. See Discussion mode.
- It acts with your rights. The agent uses your API credentials: it can’t do anything your Kameleoon account can’t, and Kameleoon refuses what your role doesn’t allow.
- It only reads your account for your requests.
- No personal data is sent to Kameleoon from your app: no email, name or phone number. A signed-in user is only identified by an opaque id.
- Consent is respected: a visitor who declines cookies isn’t included in a test.